packet.hh (11127:f39c2cc0d44e) | packet.hh (11199:929fd978ab4e) |
---|---|
1/* 2 * Copyright (c) 2012-2015 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 --- 72 unchanged lines hidden (view full) --- 81 enum Command 82 { 83 InvalidCmd, 84 ReadReq, 85 ReadResp, 86 ReadRespWithInvalidate, 87 WriteReq, 88 WriteResp, | 1/* 2 * Copyright (c) 2012-2015 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 --- 72 unchanged lines hidden (view full) --- 81 enum Command 82 { 83 InvalidCmd, 84 ReadReq, 85 ReadResp, 86 ReadRespWithInvalidate, 87 WriteReq, 88 WriteResp, |
89 Writeback, | 89 WritebackDirty, 90 WritebackClean, |
90 CleanEvict, 91 SoftPFReq, 92 HardPFReq, 93 SoftPFResp, 94 HardPFResp, 95 WriteLineReq, 96 UpgradeReq, 97 SCUpgradeReq, // Special "weak" upgrade for StoreCond --- 41 unchanged lines hidden (view full) --- 139 IsRead, //!< Data flows from responder to requester 140 IsWrite, //!< Data flows from requester to responder 141 IsUpgrade, 142 IsInvalidate, 143 NeedsExclusive, //!< Requires exclusive copy to complete in-cache 144 IsRequest, //!< Issued by requester 145 IsResponse, //!< Issue by responder 146 NeedsResponse, //!< Requester needs response from target | 91 CleanEvict, 92 SoftPFReq, 93 HardPFReq, 94 SoftPFResp, 95 HardPFResp, 96 WriteLineReq, 97 UpgradeReq, 98 SCUpgradeReq, // Special "weak" upgrade for StoreCond --- 41 unchanged lines hidden (view full) --- 140 IsRead, //!< Data flows from responder to requester 141 IsWrite, //!< Data flows from requester to responder 142 IsUpgrade, 143 IsInvalidate, 144 NeedsExclusive, //!< Requires exclusive copy to complete in-cache 145 IsRequest, //!< Issued by requester 146 IsResponse, //!< Issue by responder 147 NeedsResponse, //!< Requester needs response from target |
148 IsEviction, |
|
147 IsSWPrefetch, 148 IsHWPrefetch, 149 IsLlsc, //!< Alpha/MIPS LL or SC access 150 HasData, //!< There is an associated payload 151 IsError, //!< Error response 152 IsPrint, //!< Print state matching address (for debugging) 153 IsFlush, //!< Flush the address from caches 154 NUM_COMMAND_ATTRIBUTES --- 32 unchanged lines hidden (view full) --- 187 bool isRead() const { return testCmdAttrib(IsRead); } 188 bool isWrite() const { return testCmdAttrib(IsWrite); } 189 bool isUpgrade() const { return testCmdAttrib(IsUpgrade); } 190 bool isRequest() const { return testCmdAttrib(IsRequest); } 191 bool isResponse() const { return testCmdAttrib(IsResponse); } 192 bool needsExclusive() const { return testCmdAttrib(NeedsExclusive); } 193 bool needsResponse() const { return testCmdAttrib(NeedsResponse); } 194 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); } | 149 IsSWPrefetch, 150 IsHWPrefetch, 151 IsLlsc, //!< Alpha/MIPS LL or SC access 152 HasData, //!< There is an associated payload 153 IsError, //!< Error response 154 IsPrint, //!< Print state matching address (for debugging) 155 IsFlush, //!< Flush the address from caches 156 NUM_COMMAND_ATTRIBUTES --- 32 unchanged lines hidden (view full) --- 189 bool isRead() const { return testCmdAttrib(IsRead); } 190 bool isWrite() const { return testCmdAttrib(IsWrite); } 191 bool isUpgrade() const { return testCmdAttrib(IsUpgrade); } 192 bool isRequest() const { return testCmdAttrib(IsRequest); } 193 bool isResponse() const { return testCmdAttrib(IsResponse); } 194 bool needsExclusive() const { return testCmdAttrib(NeedsExclusive); } 195 bool needsResponse() const { return testCmdAttrib(NeedsResponse); } 196 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); } |
197 bool isEviction() const { return testCmdAttrib(IsEviction); } |
|
195 196 /** | 198 199 /** |
200 * A writeback is an eviction that carries data. 201 */ 202 bool isWriteback() const { return testCmdAttrib(IsEviction) && 203 testCmdAttrib(HasData); } 204 205 /** |
|
197 * Check if this particular packet type carries payload data. Note 198 * that this does not reflect if the data pointer of the packet is 199 * valid or not. 200 */ 201 bool hasData() const { return testCmdAttrib(HasData); } 202 bool isLLSC() const { return testCmdAttrib(IsLlsc); } 203 bool isSWPrefetch() const { return testCmdAttrib(IsSWPrefetch); } 204 bool isHWPrefetch() const { return testCmdAttrib(IsHWPrefetch); } --- 281 unchanged lines hidden (view full) --- 486 bool isRead() const { return cmd.isRead(); } 487 bool isWrite() const { return cmd.isWrite(); } 488 bool isUpgrade() const { return cmd.isUpgrade(); } 489 bool isRequest() const { return cmd.isRequest(); } 490 bool isResponse() const { return cmd.isResponse(); } 491 bool needsExclusive() const { return cmd.needsExclusive(); } 492 bool needsResponse() const { return cmd.needsResponse(); } 493 bool isInvalidate() const { return cmd.isInvalidate(); } | 206 * Check if this particular packet type carries payload data. Note 207 * that this does not reflect if the data pointer of the packet is 208 * valid or not. 209 */ 210 bool hasData() const { return testCmdAttrib(HasData); } 211 bool isLLSC() const { return testCmdAttrib(IsLlsc); } 212 bool isSWPrefetch() const { return testCmdAttrib(IsSWPrefetch); } 213 bool isHWPrefetch() const { return testCmdAttrib(IsHWPrefetch); } --- 281 unchanged lines hidden (view full) --- 495 bool isRead() const { return cmd.isRead(); } 496 bool isWrite() const { return cmd.isWrite(); } 497 bool isUpgrade() const { return cmd.isUpgrade(); } 498 bool isRequest() const { return cmd.isRequest(); } 499 bool isResponse() const { return cmd.isResponse(); } 500 bool needsExclusive() const { return cmd.needsExclusive(); } 501 bool needsResponse() const { return cmd.needsResponse(); } 502 bool isInvalidate() const { return cmd.isInvalidate(); } |
503 bool isEviction() const { return cmd.isEviction(); } 504 bool isWriteback() const { return cmd.isWriteback(); } |
|
494 bool hasData() const { return cmd.hasData(); } 495 bool isLLSC() const { return cmd.isLLSC(); } 496 bool isError() const { return cmd.isError(); } 497 bool isPrint() const { return cmd.isPrint(); } 498 bool isFlush() const { return cmd.isFlush(); } 499 500 // Snoop flags 501 void assertMemInhibit() --- 501 unchanged lines hidden (view full) --- 1003 // data pointer 1004 return checkFunctional(other, other->getAddr(), other->isSecure(), 1005 other->getSize(), 1006 other->hasData() ? 1007 other->getPtr<uint8_t>() : NULL); 1008 } 1009 1010 /** | 505 bool hasData() const { return cmd.hasData(); } 506 bool isLLSC() const { return cmd.isLLSC(); } 507 bool isError() const { return cmd.isError(); } 508 bool isPrint() const { return cmd.isPrint(); } 509 bool isFlush() const { return cmd.isFlush(); } 510 511 // Snoop flags 512 void assertMemInhibit() --- 501 unchanged lines hidden (view full) --- 1014 // data pointer 1015 return checkFunctional(other, other->getAddr(), other->isSecure(), 1016 other->getSize(), 1017 other->hasData() ? 1018 other->getPtr<uint8_t>() : NULL); 1019 } 1020 1021 /** |
1011 * Is this request notification of a clean or dirty eviction from the cache. | 1022 * Does the request need to check for cached copies of the same block 1023 * in the memory hierarchy above. |
1012 **/ 1013 bool | 1024 **/ 1025 bool |
1014 evictingBlock() const | 1026 mustCheckAbove() const |
1015 { | 1027 { |
1016 return (cmd == MemCmd::Writeback || 1017 cmd == MemCmd::CleanEvict); | 1028 return cmd == MemCmd::HardPFReq || isEviction(); |
1018 } 1019 1020 /** | 1029 } 1030 1031 /** |
1021 * Does the request need to check for cached copies of the same block 1022 * in the memory hierarchy above. 1023 **/ | 1032 * Is this packet a clean eviction, including both actual clean 1033 * evict packets, but also clean writebacks. 1034 */ |
1024 bool | 1035 bool |
1025 mustCheckAbove() const | 1036 isCleanEviction() const |
1026 { | 1037 { |
1027 return (cmd == MemCmd::HardPFReq || 1028 evictingBlock()); | 1038 return cmd == MemCmd::CleanEvict || cmd == MemCmd::WritebackClean; |
1029 } 1030 1031 /** 1032 * Check a functional request against a memory value represented 1033 * by a base/size pair and an associated data array. If the 1034 * current packet is a read, it may be satisfied by the memory 1035 * value. If the current packet is a write, it may update the 1036 * memory value. --- 38 unchanged lines hidden --- | 1039 } 1040 1041 /** 1042 * Check a functional request against a memory value represented 1043 * by a base/size pair and an associated data array. If the 1044 * current packet is a read, it may be satisfied by the memory 1045 * value. If the current packet is a write, it may update the 1046 * memory value. --- 38 unchanged lines hidden --- |