packet.hh (12823:ba630bc7a36d) packet.hh (12966:3b20a7f755d5)
1/*
2 * Copyright (c) 2012-2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 333 unchanged lines hidden (view full) ---

342 /// The size of the request or transfer.
343 unsigned size;
344
345 /**
346 * Track the bytes found that satisfy a functional read.
347 */
348 std::vector<bool> bytesValid;
349
1/*
2 * Copyright (c) 2012-2018 ARM Limited
3 * All rights reserved
4 *
5 * The license below extends only to copyright in the software and shall
6 * not be construed as granting a license to any other intellectual
7 * property including but not limited to intellectual property relating
8 * to a hardware implementation of the functionality of the software

--- 333 unchanged lines hidden (view full) ---

342 /// The size of the request or transfer.
343 unsigned size;
344
345 /**
346 * Track the bytes found that satisfy a functional read.
347 */
348 std::vector<bool> bytesValid;
349
350 // Quality of Service priority value
351 uint8_t _qosValue;
352
350 public:
351
352 /**
353 * The extra delay from seeing the packet until the header is
354 * transmitted. This delay is used to communicate the crossbar
355 * forwarding latency to the neighbouring object (e.g. a cache)
356 * that actually makes the packet wait. As the delay is relative,
357 * a 32-bit unsigned should be sufficient.

--- 307 unchanged lines hidden (view full) ---

665 bool satisfied() const { return flags.isSet(SATISFIED); }
666
667 void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); }
668 bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); }
669 void setBlockCached() { flags.set(BLOCK_CACHED); }
670 bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); }
671 void clearBlockCached() { flags.clear(BLOCK_CACHED); }
672
353 public:
354
355 /**
356 * The extra delay from seeing the packet until the header is
357 * transmitted. This delay is used to communicate the crossbar
358 * forwarding latency to the neighbouring object (e.g. a cache)
359 * that actually makes the packet wait. As the delay is relative,
360 * a 32-bit unsigned should be sufficient.

--- 307 unchanged lines hidden (view full) ---

668 bool satisfied() const { return flags.isSet(SATISFIED); }
669
670 void setSuppressFuncError() { flags.set(SUPPRESS_FUNC_ERROR); }
671 bool suppressFuncError() const { return flags.isSet(SUPPRESS_FUNC_ERROR); }
672 void setBlockCached() { flags.set(BLOCK_CACHED); }
673 bool isBlockCached() const { return flags.isSet(BLOCK_CACHED); }
674 void clearBlockCached() { flags.clear(BLOCK_CACHED); }
675
676 /**
677 * QoS Value getter
678 * Returns 0 if QoS value was never set (constructor default).
679 *
680 * @return QoS priority value of the packet
681 */
682 inline uint8_t qosValue() const { return _qosValue; }
683
684 /**
685 * QoS Value setter
686 * Interface for setting QoS priority value of the packet.
687 *
688 * @param qos_value QoS priority value
689 */
690 inline void qosValue(const uint8_t qos_value)
691 { _qosValue = qos_value; }
692
693 inline MasterID masterId() const { return req->masterId(); }
694
673 // Network error conditions... encapsulate them as methods since
674 // their encoding keeps changing (from result field to command
675 // field, etc.)
676 void
677 setBadAddress()
678 {
679 assert(isResponse());
680 cmd = MemCmd::BadAddressError;

--- 60 unchanged lines hidden (view full) ---

741 }
742
743 /**
744 * Constructor. Note that a Request object must be constructed
745 * first, but the Requests's physical address and size fields need
746 * not be valid. The command must be supplied.
747 */
748 Packet(const RequestPtr &_req, MemCmd _cmd)
695 // Network error conditions... encapsulate them as methods since
696 // their encoding keeps changing (from result field to command
697 // field, etc.)
698 void
699 setBadAddress()
700 {
701 assert(isResponse());
702 cmd = MemCmd::BadAddressError;

--- 60 unchanged lines hidden (view full) ---

763 }
764
765 /**
766 * Constructor. Note that a Request object must be constructed
767 * first, but the Requests's physical address and size fields need
768 * not be valid. The command must be supplied.
769 */
770 Packet(const RequestPtr &_req, MemCmd _cmd)
749 : cmd(_cmd), id((PacketId)_req.get()), req(_req), data(nullptr),
750 addr(0), _isSecure(false), size(0), headerDelay(0), snoopDelay(0),
771 : cmd(_cmd), id((PacketId)_req.get()), req(_req),
772 data(nullptr), addr(0), _isSecure(false), size(0),
773 _qosValue(0), headerDelay(0), snoopDelay(0),
751 payloadDelay(0), senderState(NULL)
752 {
753 if (req->hasPaddr()) {
754 addr = req->getPaddr();
755 flags.set(VALID_ADDR);
756 _isSecure = req->isSecure();
757 }
758 if (req->hasSize()) {

--- 4 unchanged lines hidden (view full) ---

763
764 /**
765 * Alternate constructor if you are trying to create a packet with
766 * a request that is for a whole block, not the address from the
767 * req. this allows for overriding the size/addr of the req.
768 */
769 Packet(const RequestPtr &_req, MemCmd _cmd, int _blkSize, PacketId _id = 0)
770 : cmd(_cmd), id(_id ? _id : (PacketId)_req.get()), req(_req),
774 payloadDelay(0), senderState(NULL)
775 {
776 if (req->hasPaddr()) {
777 addr = req->getPaddr();
778 flags.set(VALID_ADDR);
779 _isSecure = req->isSecure();
780 }
781 if (req->hasSize()) {

--- 4 unchanged lines hidden (view full) ---

786
787 /**
788 * Alternate constructor if you are trying to create a packet with
789 * a request that is for a whole block, not the address from the
790 * req. this allows for overriding the size/addr of the req.
791 */
792 Packet(const RequestPtr &_req, MemCmd _cmd, int _blkSize, PacketId _id = 0)
793 : cmd(_cmd), id(_id ? _id : (PacketId)_req.get()), req(_req),
771 data(nullptr), addr(0), _isSecure(false), headerDelay(0),
794 data(nullptr), addr(0), _isSecure(false),
795 _qosValue(0), headerDelay(0),
772 snoopDelay(0), payloadDelay(0), senderState(NULL)
773 {
774 if (req->hasPaddr()) {
775 addr = req->getPaddr() & ~(_blkSize - 1);
776 flags.set(VALID_ADDR);
777 _isSecure = req->isSecure();
778 }
779 size = _blkSize;

--- 7 unchanged lines hidden (view full) ---

787 * less than that of the original packet. In this case the new
788 * packet should allocate its own data.
789 */
790 Packet(const PacketPtr pkt, bool clear_flags, bool alloc_data)
791 : cmd(pkt->cmd), id(pkt->id), req(pkt->req),
792 data(nullptr),
793 addr(pkt->addr), _isSecure(pkt->_isSecure), size(pkt->size),
794 bytesValid(pkt->bytesValid),
796 snoopDelay(0), payloadDelay(0), senderState(NULL)
797 {
798 if (req->hasPaddr()) {
799 addr = req->getPaddr() & ~(_blkSize - 1);
800 flags.set(VALID_ADDR);
801 _isSecure = req->isSecure();
802 }
803 size = _blkSize;

--- 7 unchanged lines hidden (view full) ---

811 * less than that of the original packet. In this case the new
812 * packet should allocate its own data.
813 */
814 Packet(const PacketPtr pkt, bool clear_flags, bool alloc_data)
815 : cmd(pkt->cmd), id(pkt->id), req(pkt->req),
816 data(nullptr),
817 addr(pkt->addr), _isSecure(pkt->_isSecure), size(pkt->size),
818 bytesValid(pkt->bytesValid),
819 _qosValue(pkt->qosValue()),
795 headerDelay(pkt->headerDelay),
796 snoopDelay(0),
797 payloadDelay(pkt->payloadDelay),
798 senderState(pkt->senderState)
799 {
800 if (!clear_flags)
801 flags.set(pkt->flags & COPY_FLAGS);
802

--- 442 unchanged lines hidden ---
820 headerDelay(pkt->headerDelay),
821 snoopDelay(0),
822 payloadDelay(pkt->payloadDelay),
823 senderState(pkt->senderState)
824 {
825 if (!clear_flags)
826 flags.set(pkt->flags & COPY_FLAGS);
827

--- 442 unchanged lines hidden ---