packet.hh (12346:9b1144d046ca) packet.hh (12347:c4bb52d1aba4)
1/*
2 * Copyright (c) 2012-2017 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

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

109 StoreCondFailReq, // Failed StoreCondReq in MSHR (never sent)
110 StoreCondResp,
111 SwapReq,
112 SwapResp,
113 MessageReq,
114 MessageResp,
115 MemFenceReq,
116 MemFenceResp,
1/*
2 * Copyright (c) 2012-2017 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

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

109 StoreCondFailReq, // Failed StoreCondReq in MSHR (never sent)
110 StoreCondResp,
111 SwapReq,
112 SwapResp,
113 MessageReq,
114 MessageResp,
115 MemFenceReq,
116 MemFenceResp,
117 CleanSharedReq,
118 CleanSharedResp,
119 CleanInvalidReq,
120 CleanInvalidResp,
117 // Error responses
118 // @TODO these should be classified as responses rather than
119 // requests; coding them as requests initially for backwards
120 // compatibility
121 InvalidDestError, // packet dest field invalid
122 BadAddressError, // memory address invalid
123 FunctionalReadError, // unable to fulfill functional read
124 FunctionalWriteError, // unable to fulfill functional write

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

135 * List of command attributes.
136 */
137 enum Attribute
138 {
139 IsRead, //!< Data flows from responder to requester
140 IsWrite, //!< Data flows from requester to responder
141 IsUpgrade,
142 IsInvalidate,
121 // Error responses
122 // @TODO these should be classified as responses rather than
123 // requests; coding them as requests initially for backwards
124 // compatibility
125 InvalidDestError, // packet dest field invalid
126 BadAddressError, // memory address invalid
127 FunctionalReadError, // unable to fulfill functional read
128 FunctionalWriteError, // unable to fulfill functional write

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

139 * List of command attributes.
140 */
141 enum Attribute
142 {
143 IsRead, //!< Data flows from responder to requester
144 IsWrite, //!< Data flows from requester to responder
145 IsUpgrade,
146 IsInvalidate,
147 IsClean, //!< Cleans any existing dirty blocks
143 NeedsWritable, //!< Requires writable copy to complete in-cache
144 IsRequest, //!< Issued by requester
145 IsResponse, //!< Issue by responder
146 NeedsResponse, //!< Requester needs response from target
147 IsEviction,
148 IsSWPrefetch,
149 IsHWPrefetch,
150 IsLlsc, //!< Alpha/MIPS LL or SC access

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

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 needsWritable() const { return testCmdAttrib(NeedsWritable); }
195 bool needsResponse() const { return testCmdAttrib(NeedsResponse); }
196 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); }
197 bool isEviction() const { return testCmdAttrib(IsEviction); }
148 NeedsWritable, //!< Requires writable copy to complete in-cache
149 IsRequest, //!< Issued by requester
150 IsResponse, //!< Issue by responder
151 NeedsResponse, //!< Requester needs response from target
152 IsEviction,
153 IsSWPrefetch,
154 IsHWPrefetch,
155 IsLlsc, //!< Alpha/MIPS LL or SC access

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

195 bool isWrite() const { return testCmdAttrib(IsWrite); }
196 bool isUpgrade() const { return testCmdAttrib(IsUpgrade); }
197 bool isRequest() const { return testCmdAttrib(IsRequest); }
198 bool isResponse() const { return testCmdAttrib(IsResponse); }
199 bool needsWritable() const { return testCmdAttrib(NeedsWritable); }
200 bool needsResponse() const { return testCmdAttrib(NeedsResponse); }
201 bool isInvalidate() const { return testCmdAttrib(IsInvalidate); }
202 bool isEviction() const { return testCmdAttrib(IsEviction); }
203 bool isClean() const { return testCmdAttrib(IsClean); }
198 bool fromCache() const { return testCmdAttrib(FromCache); }
199
200 /**
201 * A writeback is an eviction that carries data.
202 */
203 bool isWriteback() const { return testCmdAttrib(IsEviction) &&
204 testCmdAttrib(HasData); }
205

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

516 // look at the hasSharers flag (if not set, the response is to
517 // be considered writable)
518 assert(isRequest());
519 return cmd.needsWritable();
520 }
521 bool needsResponse() const { return cmd.needsResponse(); }
522 bool isInvalidate() const { return cmd.isInvalidate(); }
523 bool isEviction() const { return cmd.isEviction(); }
204 bool fromCache() const { return testCmdAttrib(FromCache); }
205
206 /**
207 * A writeback is an eviction that carries data.
208 */
209 bool isWriteback() const { return testCmdAttrib(IsEviction) &&
210 testCmdAttrib(HasData); }
211

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

522 // look at the hasSharers flag (if not set, the response is to
523 // be considered writable)
524 assert(isRequest());
525 return cmd.needsWritable();
526 }
527 bool needsResponse() const { return cmd.needsResponse(); }
528 bool isInvalidate() const { return cmd.isInvalidate(); }
529 bool isEviction() const { return cmd.isEviction(); }
530 bool isClean() const { return cmd.isClean(); }
524 bool fromCache() const { return cmd.fromCache(); }
525 bool isWriteback() const { return cmd.isWriteback(); }
526 bool hasData() const { return cmd.hasData(); }
527 bool hasRespData() const
528 {
529 MemCmd resp_cmd = cmd.responseCommand();
530 return resp_cmd.hasData();
531 }

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

810 */
811 static MemCmd
812 makeWriteCmd(const RequestPtr req)
813 {
814 if (req->isLLSC())
815 return MemCmd::StoreCondReq;
816 else if (req->isSwap())
817 return MemCmd::SwapReq;
531 bool fromCache() const { return cmd.fromCache(); }
532 bool isWriteback() const { return cmd.isWriteback(); }
533 bool hasData() const { return cmd.hasData(); }
534 bool hasRespData() const
535 {
536 MemCmd resp_cmd = cmd.responseCommand();
537 return resp_cmd.hasData();
538 }

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

817 */
818 static MemCmd
819 makeWriteCmd(const RequestPtr req)
820 {
821 if (req->isLLSC())
822 return MemCmd::StoreCondReq;
823 else if (req->isSwap())
824 return MemCmd::SwapReq;
818 else
825 else if (req->isCacheInvalidate()) {
826 return req->isCacheClean() ? MemCmd::CleanInvalidReq :
827 MemCmd::InvalidateReq;
828 } else if (req->isCacheClean()) {
829 return MemCmd::CleanSharedReq;
830 } else
819 return MemCmd::WriteReq;
820 }
821
822 /**
823 * Constructor-like methods that return Packets based on Request objects.
824 * Fine-tune the MemCmd type if it's not a vanilla read or write.
825 */
826 static PacketPtr

--- 380 unchanged lines hidden ---
831 return MemCmd::WriteReq;
832 }
833
834 /**
835 * Constructor-like methods that return Packets based on Request objects.
836 * Fine-tune the MemCmd type if it's not a vanilla read or write.
837 */
838 static PacketPtr

--- 380 unchanged lines hidden ---