65 const MemCmd::CommandInfo
69 { {}, InvalidCmd,
"InvalidCmd" },
72 { {IsRead, IsRequest, NeedsResponse}, ReadResp,
"ReadReq" },
74 { {IsRead, IsResponse, HasData}, InvalidCmd,
"ReadResp" },
76 { {IsRead, IsResponse, HasData, IsInvalidate},
77 InvalidCmd,
"ReadRespWithInvalidate" },
79 { {IsWrite, NeedsWritable, IsRequest, NeedsResponse, HasData},
80 WriteResp,
"WriteReq" },
82 { {IsWrite, IsResponse}, InvalidCmd,
"WriteResp" },
90 { {IsWrite, IsResponse}, InvalidCmd,
"WriteCompleteResp" },
92 { {IsWrite, IsRequest, IsEviction, HasData, FromCache},
93 InvalidCmd,
"WritebackDirty" },
97 { {IsWrite, IsRequest, IsEviction, HasData, FromCache},
98 InvalidCmd,
"WritebackClean" },
101 { {IsWrite, IsRequest, HasData, FromCache}, InvalidCmd,
"WriteClean" },
103 { {IsRequest, IsEviction, FromCache}, InvalidCmd,
"CleanEvict" },
105 { {IsRead, IsRequest, IsSWPrefetch, NeedsResponse},
106 SoftPFResp,
"SoftPFReq" },
108 { {IsRead, NeedsWritable, IsInvalidate, IsRequest,
109 IsSWPrefetch, NeedsResponse}, SoftPFResp,
"SoftPFExReq" },
111 { {IsRead, IsRequest, IsHWPrefetch, NeedsResponse, FromCache},
112 HardPFResp,
"HardPFReq" },
114 { {IsRead, IsResponse, IsSWPrefetch, HasData}, InvalidCmd,
"SoftPFResp" },
116 { {IsRead, IsResponse, IsHWPrefetch, HasData}, InvalidCmd,
"HardPFResp" },
118 { {IsWrite, NeedsWritable, IsRequest, NeedsResponse, HasData},
119 WriteResp,
"WriteLineReq" },
121 { {IsInvalidate, NeedsWritable, IsUpgrade, IsRequest, NeedsResponse,
122 FromCache}, UpgradeResp,
"UpgradeReq" },
124 { {IsInvalidate, NeedsWritable, IsUpgrade, IsLlsc,
125 IsRequest, NeedsResponse, FromCache},
126 UpgradeResp,
"SCUpgradeReq" },
128 { {IsUpgrade, IsResponse}, InvalidCmd,
"UpgradeResp" },
130 { {IsRead, NeedsWritable, IsInvalidate,
131 IsLlsc, IsRequest, NeedsResponse, FromCache},
132 UpgradeFailResp,
"SCUpgradeFailReq" },
135 { {IsRead, IsResponse, HasData}, InvalidCmd,
"UpgradeFailResp" },
139 { {IsRead, NeedsWritable, IsInvalidate, IsRequest, NeedsResponse,
140 FromCache}, ReadExResp,
"ReadExReq" },
143 { {IsRead, IsResponse, HasData}, InvalidCmd,
"ReadExResp" },
147 { {IsRead, IsRequest, NeedsResponse, FromCache},
148 ReadResp,
"ReadCleanReq" },
152 { {IsRead, IsRequest, NeedsResponse, FromCache},
153 ReadResp,
"ReadSharedReq" },
156 { {IsRead, IsLlsc, IsRequest, NeedsResponse},
157 ReadResp,
"LoadLockedReq" },
159 { {IsWrite, NeedsWritable, IsLlsc,
160 IsRequest, NeedsResponse, HasData},
161 StoreCondResp,
"StoreCondReq" },
163 { {IsWrite, NeedsWritable, IsLlsc, IsRequest, NeedsResponse, HasData},
164 StoreCondResp,
"StoreCondFailReq" },
166 { {IsWrite, IsLlsc, IsResponse},
167 InvalidCmd,
"StoreCondResp" },
169 { {IsRead, IsLockedRMW, NeedsWritable, IsRequest, NeedsResponse},
170 LockedRMWReadResp,
"LockedRMWReadReq" },
172 { {IsRead, IsLockedRMW, NeedsWritable, IsResponse, HasData},
173 InvalidCmd,
"LockedRMWReadResp" },
175 { {IsWrite, IsLockedRMW, NeedsWritable, IsRequest, NeedsResponse,
176 HasData}, LockedRMWWriteResp,
"LockedRMWWriteReq" },
178 { {IsWrite, IsLockedRMW, NeedsWritable, IsResponse},
179 InvalidCmd,
"LockedRMWWriteResp" },
181 { {IsRead, IsWrite, NeedsWritable, IsRequest, HasData, NeedsResponse},
182 SwapResp,
"SwapReq" },
184 { {IsRead, IsWrite, IsResponse, HasData}, InvalidCmd,
"SwapResp" },
185 { {}, InvalidCmd,
"Deprecated_MessageReq" },
186 { {}, InvalidCmd,
"Deprecated_MessageResp" },
188 {{IsRequest, NeedsResponse}, MemFenceResp,
"MemFenceReq"},
190 {{IsRequest, NeedsResponse}, MemSyncResp,
"MemSyncReq"},
192 {{IsResponse}, InvalidCmd,
"MemSyncResp"},
194 {{IsResponse}, InvalidCmd,
"MemFenceResp"},
198 { {IsRequest, IsClean, NeedsResponse, FromCache},
199 CleanSharedResp,
"CleanSharedReq" },
203 { {IsResponse, IsClean}, InvalidCmd,
"CleanSharedResp" },
206 { {IsRequest, IsInvalidate, IsClean, NeedsResponse, FromCache},
207 CleanInvalidResp,
"CleanInvalidReq" },
211 { {IsResponse, IsInvalidate, IsClean},
212 InvalidCmd,
"CleanInvalidResp" },
214 { {IsResponse, IsError}, InvalidCmd,
"InvalidDestError" },
216 { {IsResponse, IsError}, InvalidCmd,
"BadAddressError" },
218 { {IsRead, IsResponse, IsError}, InvalidCmd,
"FunctionalReadError" },
220 { {IsWrite, IsResponse, IsError}, InvalidCmd,
"FunctionalWriteError" },
222 { {IsRequest, IsPrint}, InvalidCmd,
"PrintReq" },
224 { {IsRequest, IsFlush, NeedsWritable}, InvalidCmd,
"FlushReq" },
226 { {IsInvalidate, IsRequest, NeedsWritable, NeedsResponse, FromCache},
227 InvalidateResp,
"InvalidateReq" },
229 { {IsInvalidate, IsResponse},
230 InvalidCmd,
"InvalidateResp" },
232 { {IsRead, IsRequest, NeedsResponse}, HTMReqResp,
"HTMReq" },
233 { {IsRead, IsResponse}, InvalidCmd,
"HTMReqResp" },
234 { {IsRead, IsRequest}, InvalidCmd,
"HTMAbort" },
235 { {IsRequest}, InvalidCmd,
"TlbiExtSync" },
251 const Addr val_end = val_start +
size - 1;
253 if (is_secure !=
_isSecure || func_start > val_end ||
254 val_start > func_end) {
262 safe_cast<PrintReqState*>(
senderState)->printObj(obj);
272 const Addr val_offset = func_start > val_start ?
273 func_start - val_start : 0;
274 const Addr func_offset = func_start < val_start ?
275 val_start - func_start : 0;
276 const Addr overlap_size = std::min(val_end, func_end)+1 -
277 std::max(val_start, func_start);
280 std::memcpy(getPtr<uint8_t>() + func_offset,
290 bool all_bytes_valid =
true;
295 for (; all_bytes_valid &&
i < func_offset; ++
i)
299 for (
i = func_offset;
i < func_offset + overlap_size; ++
i)
303 for (; all_bytes_valid &&
i <
getSize(); ++
i)
306 return all_bytes_valid;
308 std::memcpy(_data + val_offset,
309 getConstPtr<uint8_t>() + func_offset,
332 assert(sender_state != NULL);
350 auto [
val, success] =
365 const std::string &prefix)
const
369 req->isSecure() ?
" (s)" :
"",
370 req->isInstFetch() ?
" IF" :
"",
371 req->isUncacheable() ?
" UC" :
"",
373 req->isToPOC() ?
" PoC" :
"",
374 req->isToPOU() ?
" PoU" :
"");
379 std::ostringstream str;
386 const int blk_size)
const
411 : curPrefixPtr(new
std::string(
"")),
os(_os), verbosity(_verbosity)
418 labelStack.pop_back();
419 assert(labelStack.empty());
425 std::string *_prefix)
426 : label(_label), prefix(_prefix), labelPrinted(false)
432 const std::string &prefix)
455 if (!
i->labelPrinted) {
457 i->labelPrinted =
true;