From 5e94884f096c55d56db7988bbab8cfd83ea45035 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Mon, 20 Nov 2017 12:30:40 -0800 Subject: [PATCH] Fix ITIM deallocation during I$ refill causing data corruption Deallocation can change repl_way, which violates the assumption that it remains constant throughout refill. The workaround described in commit 3db066303b16f6ac6688cdc2f48d7ff066e4b52b still suffices, provided only the hart that owns the ITIM changes the ITIM allocation. This subsumes commit 3db066303b16f6ac6688cdc2f48d7ff066e4b52b. --- src/main/scala/rocket/ICache.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/scala/rocket/ICache.scala b/src/main/scala/rocket/ICache.scala index c5b5cdd8..a922280a 100644 --- a/src/main/scala/rocket/ICache.scala +++ b/src/main/scala/rocket/ICache.scala @@ -294,7 +294,7 @@ class ICacheModule(outer: ICache) extends LazyModuleImp(outer) val enable = scratchpadWayValid(scratchpadWay(a.address)) when (!lineInScratchpad(scratchpadLine(a.address))) { scratchpadMax.get := scratchpadLine(a.address) - when (enable) { invalidate := true } + invalidate := true } scratchpadOn := enable }