Daecheol You has uploaded this change for review. ( https://gem5-review.googlesource.com/c/public/gem5/+/58411 )

Change subject: mem-ruby: fix the assert in Finalize_UpdateCacheFromTBE
......................................................................

mem-ruby: fix the assert in Finalize_UpdateCacheFromTBE

TBE data can be valid when the cache entry invalid.
For example, when HNF receives ReadOnce request for a cache line in RU
state from DMA, its TBE's data is valid since it snoops the line from the upstream,
but the cache entry is invalid.
Thus, 'is_valid(cache_entry) == false' should be ORed to the assert condition.

Change-Id: Ie83c511e8d158e18abc5c9c16bc6040ce73587bf
---
M src/mem/ruby/protocol/chi/CHI-cache-actions.sm
1 file changed, 16 insertions(+), 1 deletion(-)



diff --git a/src/mem/ruby/protocol/chi/CHI-cache-actions.sm b/src/mem/ruby/protocol/chi/CHI-cache-actions.sm
index 93a97d4..8dea848 100644
--- a/src/mem/ruby/protocol/chi/CHI-cache-actions.sm
+++ b/src/mem/ruby/protocol/chi/CHI-cache-actions.sm
@@ -2624,7 +2624,7 @@
DPRINTF(RubySlicc, "Cached data %s pfb %s\n", tbe.dataBlk, cache_entry.HWPrefetched);
   } else {
     // make sure only deallocate the cache entry if data is invalid
-    assert(tbe.dataValid == false);
+    assert(tbe.dataValid == false || is_valid(cache_entry) == false);
     if (is_valid(cache_entry)) {
       cache.deallocate(address);
       unset_cache_entry();

--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/58411
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: Ie83c511e8d158e18abc5c9c16bc6040ce73587bf
Gerrit-Change-Number: 58411
Gerrit-PatchSet: 1
Gerrit-Owner: Daecheol You <daecheol....@samsung.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

Reply via email to