258,261d257
< /// Are the 'addr' and 'size' fields valid?
< VALID_ADDR = 0x00000100,
< VALID_SIZE = 0x00000200,
<
526c522
< Addr getAddr() const { assert(flags.isSet(VALID_ADDR)); return addr; }
---
> Addr getAddr() const { return addr; }
534c530
< void setAddr(Addr _addr) { assert(flags.isSet(VALID_ADDR)); addr = _addr; }
---
> void setAddr(Addr _addr) { addr = _addr; }
536c532
< unsigned getSize() const { assert(flags.isSet(VALID_SIZE)); return size; }
---
> unsigned getSize() const { return size; }
548,552c544
< bool isSecure() const
< {
< assert(flags.isSet(VALID_ADDR));
< return _isSecure;
< }
---
> bool isSecure() const { return _isSecure; }
580,581c572,573
< * first, but the Requests's physical address and size fields need
< * not be valid. The command must be supplied.
---
> * first, and have a valid physical address and size. The command
> * must be supplied.
584,585c576,578
< : cmd(_cmd), req(_req), data(nullptr), addr(0), _isSecure(false),
< size(0), headerDelay(0), payloadDelay(0),
---
> : cmd(_cmd), req(_req), data(nullptr), addr(req->getPaddr()),
> _isSecure(req->isSecure()), size(req->getSize()),
> headerDelay(0), payloadDelay(0),
587,597c580
< {
< if (req->hasPaddr()) {
< addr = req->getPaddr();
< flags.set(VALID_ADDR);
< _isSecure = req->isSecure();
< }
< if (req->hasSize()) {
< size = req->getSize();
< flags.set(VALID_SIZE);
< }
< }
---
> { }
600,602c583,585
< * Alternate constructor if you are trying to create a packet with
< * a request that is for a whole block, not the address from the
< * req. this allows for overriding the size/addr of the req.
---
> * Alternate constructor when creating a packet that is for a
> * whole block. This allows for overriding the size and addr of
> * the request.
604,605c587,590
< Packet(const RequestPtr _req, MemCmd _cmd, int _blkSize)
< : cmd(_cmd), req(_req), data(nullptr), addr(0), _isSecure(false),
---
> Packet(const RequestPtr _req, MemCmd _cmd, unsigned _blkSize)
> : cmd(_cmd), req(_req), data(nullptr),
> addr(_req->getPaddr() & ~Addr(_blkSize - 1)),
> _isSecure(_req->isSecure()), size(_blkSize),
608,616c593
< {
< if (req->hasPaddr()) {
< addr = req->getPaddr() & ~(_blkSize - 1);
< flags.set(VALID_ADDR);
< _isSecure = req->isSecure();
< }
< size = _blkSize;
< flags.set(VALID_SIZE);
< }
---
> { }
637,638d613
< flags.set(pkt->flags & (VALID_ADDR|VALID_SIZE));
<
760,769d734
< void
< setSize(unsigned size)
< {
< assert(!flags.isSet(VALID_SIZE));
<
< this->size = size;
< flags.set(VALID_SIZE);
< }
<
<