packet.hh (7464:8d92c2737ac8) | packet.hh (7465:f97b62be544f) |
---|---|
1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan | 1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan |
3 * Copyright (c) 2010 Advancec Micro Devices, Inc. |
|
3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; 9 * redistributions in binary form must reproduce the above copyright 10 * notice, this list of conditions and the following disclaimer in the --- 65 unchanged lines hidden (view full) --- 76 Writeback, 77 SoftPFReq, 78 HardPFReq, 79 SoftPFResp, 80 HardPFResp, 81 WriteInvalidateReq, 82 WriteInvalidateResp, 83 UpgradeReq, | 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions are 8 * met: redistributions of source code must retain the above copyright 9 * notice, this list of conditions and the following disclaimer; 10 * redistributions in binary form must reproduce the above copyright 11 * notice, this list of conditions and the following disclaimer in the --- 65 unchanged lines hidden (view full) --- 77 Writeback, 78 SoftPFReq, 79 HardPFReq, 80 SoftPFResp, 81 HardPFResp, 82 WriteInvalidateReq, 83 WriteInvalidateResp, 84 UpgradeReq, |
85 SCUpgradeReq, // Special "weak" upgrade for StoreCond |
|
84 UpgradeResp, | 86 UpgradeResp, |
87 SCUpgradeFailReq, // Failed SCUpgradeReq in MSHR (never sent) 88 UpgradeFailResp, // Valid for SCUpgradeReq only |
|
85 ReadExReq, 86 ReadExResp, 87 LoadLockedReq, 88 StoreCondReq, 89 StoreCondResp, 90 SwapReq, 91 SwapResp, 92 MessageReq, --- 13 unchanged lines hidden (view full) --- 106 private: 107 /** 108 * List of command attributes. 109 */ 110 enum Attribute 111 { 112 IsRead, //!< Data flows from responder to requester 113 IsWrite, //!< Data flows from requester to responder | 89 ReadExReq, 90 ReadExResp, 91 LoadLockedReq, 92 StoreCondReq, 93 StoreCondResp, 94 SwapReq, 95 SwapResp, 96 MessageReq, --- 13 unchanged lines hidden (view full) --- 110 private: 111 /** 112 * List of command attributes. 113 */ 114 enum Attribute 115 { 116 IsRead, //!< Data flows from responder to requester 117 IsWrite, //!< Data flows from requester to responder |
118 IsUpgrade, |
|
114 IsPrefetch, //!< Not a demand access 115 IsInvalidate, 116 NeedsExclusive, //!< Requires exclusive copy to complete in-cache 117 IsRequest, //!< Issued by requester 118 IsResponse, //!< Issue by responder 119 NeedsResponse, //!< Requester needs response from target 120 IsSWPrefetch, 121 IsHWPrefetch, --- 30 unchanged lines hidden (view full) --- 152 testCmdAttrib(MemCmd::Attribute attrib) const 153 { 154 return commandInfo[cmd].attributes[attrib] != 0; 155 } 156 157 public: 158 159 bool isRead() const { return testCmdAttrib(IsRead); } | 119 IsPrefetch, //!< Not a demand access 120 IsInvalidate, 121 NeedsExclusive, //!< Requires exclusive copy to complete in-cache 122 IsRequest, //!< Issued by requester 123 IsResponse, //!< Issue by responder 124 NeedsResponse, //!< Requester needs response from target 125 IsSWPrefetch, 126 IsHWPrefetch, --- 30 unchanged lines hidden (view full) --- 157 testCmdAttrib(MemCmd::Attribute attrib) const 158 { 159 return commandInfo[cmd].attributes[attrib] != 0; 160 } 161 162 public: 163 164 bool isRead() const { return testCmdAttrib(IsRead); } |
160 bool isWrite() const { return testCmdAttrib(IsWrite); } | 165 bool isWrite() const { return testCmdAttrib(IsWrite); } 166 bool isUpgrade() const { return testCmdAttrib(IsUpgrade); } |
161 bool isRequest() const { return testCmdAttrib(IsRequest); } 162 bool isResponse() const { return testCmdAttrib(IsResponse); } 163 bool needsExclusive() const { return testCmdAttrib(NeedsExclusive); } 164 bool needsResponse() const { return testCmdAttrib(NeedsResponse); } 165 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); } 166 bool hasData() const { return testCmdAttrib(HasData); } 167 bool isReadWrite() const { return isRead() && isWrite(); } 168 bool isLLSC() const { return testCmdAttrib(IsLlsc); } --- 218 unchanged lines hidden (view full) --- 387 /// Return the string name of the cmd field (for debugging and 388 /// tracing). 389 const std::string &cmdString() const { return cmd.toString(); } 390 391 /// Return the index of this command. 392 inline int cmdToIndex() const { return cmd.toInt(); } 393 394 bool isRead() const { return cmd.isRead(); } | 167 bool isRequest() const { return testCmdAttrib(IsRequest); } 168 bool isResponse() const { return testCmdAttrib(IsResponse); } 169 bool needsExclusive() const { return testCmdAttrib(NeedsExclusive); } 170 bool needsResponse() const { return testCmdAttrib(NeedsResponse); } 171 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); } 172 bool hasData() const { return testCmdAttrib(HasData); } 173 bool isReadWrite() const { return isRead() && isWrite(); } 174 bool isLLSC() const { return testCmdAttrib(IsLlsc); } --- 218 unchanged lines hidden (view full) --- 393 /// Return the string name of the cmd field (for debugging and 394 /// tracing). 395 const std::string &cmdString() const { return cmd.toString(); } 396 397 /// Return the index of this command. 398 inline int cmdToIndex() const { return cmd.toInt(); } 399 400 bool isRead() const { return cmd.isRead(); } |
395 bool isWrite() const { return cmd.isWrite(); } | 401 bool isWrite() const { return cmd.isWrite(); } 402 bool isUpgrade() const { return cmd.isUpgrade(); } |
396 bool isRequest() const { return cmd.isRequest(); } 397 bool isResponse() const { return cmd.isResponse(); } 398 bool needsExclusive() const { return cmd.needsExclusive(); } 399 bool needsResponse() const { return cmd.needsResponse(); } 400 bool isInvalidate() const { return cmd.isInvalidate(); } 401 bool hasData() const { return cmd.hasData(); } 402 bool isReadWrite() const { return cmd.isReadWrite(); } 403 bool isLLSC() const { return cmd.isLLSC(); } --- 380 unchanged lines hidden --- | 403 bool isRequest() const { return cmd.isRequest(); } 404 bool isResponse() const { return cmd.isResponse(); } 405 bool needsExclusive() const { return cmd.needsExclusive(); } 406 bool needsResponse() const { return cmd.needsResponse(); } 407 bool isInvalidate() const { return cmd.isInvalidate(); } 408 bool hasData() const { return cmd.hasData(); } 409 bool isReadWrite() const { return cmd.isReadWrite(); } 410 bool isLLSC() const { return cmd.isLLSC(); } --- 380 unchanged lines hidden --- |