Tiago Muck has uploaded this change for review. (
https://gem5-review.googlesource.com/c/public/gem5/+/57395 )
Change subject: mem-ruby: fix functionalRead on pending CU
......................................................................
mem-ruby: fix functionalRead on pending CU
Normally we don't check the TBE data if there are outstanding response
messages for the transaction because that means the latest valid data is
either in another cache or within an inflight message.
However this is not the case when we have either a pending CleanUnique
or we are handling CleanUnique. So bypass the pending message check in
this case.
Change-Id: I5f31039ca2a01a6a68fee8e0f3cf02c7e437b43e
Signed-off-by: Tiago Mück <tiago.m...@arm.com>
---
M src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
1 file changed, 27 insertions(+), 3 deletions(-)
diff --git a/src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
b/src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
index adf4e1c..47bd560 100644
--- a/src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
+++ b/src/mem/ruby/protocol/chi/CHI-cache-funcs.sm
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2021 ARM Limited
+ * Copyright (c) 2021-2022 ARM Limited
* All rights reserved
*
* The license below extends only to copyright in the software and shall
@@ -135,8 +135,15 @@
TBE tbe := getCurrentActiveTBE(addr);
if(is_valid(tbe)) {
assert(Cache_State_to_permission(tbe.state) == AccessPermission:Busy);
- if (tbe.expected_req_resp.hasExpected() ||
- tbe.expected_snp_resp.hasExpected()) {
+ // It's assumed that if all caches are in transient state, the latest
data
+ // is 1) within an inflight message, then 2 ) in memory. But with
+ // CleanUnique there may be no inflight messages with data, so it needs
+ // special handling.
+ bool cu_requester_or_responder :=
+ (tbe.reqType == CHIRequestType:CleanUnique) ||
+ (tbe.pendReqType == CHIRequestType:CleanUnique);
+ if ((tbe.expected_req_resp.hasExpected() ||
+ tbe.expected_snp_resp.hasExpected())
&& !cu_requester_or_responder) {
DPRINTF(RubySlicc, "%x %s,%s\n", addr, tbe.state,
AccessPermission:Busy);
return AccessPermission:Busy;
}
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/57395
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: develop
Gerrit-Change-Id: I5f31039ca2a01a6a68fee8e0f3cf02c7e437b43e
Gerrit-Change-Number: 57395
Gerrit-PatchSet: 1
Gerrit-Owner: Tiago Muck <tiago.m...@arm.com>
Gerrit-MessageType: newchange
_______________________________________________
gem5-dev mailing list -- gem5-dev@gem5.org
To unsubscribe send an email to gem5-dev-le...@gem5.org
%(web_page_url)slistinfo%(cgiext)s/%(_internal_name)s