1/* 2 * Copyright (c) 2006 The Regents of The University of Michigan |
3 * Copyright (c) 2010 Advancec Micro Devices, Inc. |
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 |
86 UpgradeResp, |
87 SCUpgradeFailReq, // Failed SCUpgradeReq in MSHR (never sent) 88 UpgradeFailResp, // Valid for SCUpgradeReq only |
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, |
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); } |
165 bool isWrite() const { return testCmdAttrib(IsWrite); } 166 bool isUpgrade() const { return testCmdAttrib(IsUpgrade); } |
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(); } |
401 bool isWrite() const { return cmd.isWrite(); } 402 bool isUpgrade() const { return cmd.isUpgrade(); } |
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 --- |