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 |
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 |
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) |
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), |
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), |
794 data(nullptr), addr(0), _isSecure(false), 795 _qosValue(0), headerDelay(0), |
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()), |
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 --- |