1
0

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.
This commit is contained in:
Andrew Waterman 2017-11-20 12:30:40 -08:00
parent 66b7a8a5ed
commit 5e94884f09

View File

@ -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
}