Skip to content

Commit

Permalink
Also restore dirty block state when rewinding a cache hit
Browse files Browse the repository at this point in the history
  • Loading branch information
mortbopet committed Jul 20, 2020
1 parent 7ac8b78 commit 6162394
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cachesim/cachesim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -372,8 +372,8 @@ void CacheSim::undo() {
else if (!trace.transaction.isHit) {
way = oldWay;
}
// Case 3: Else, it was a cache hit, and only the replacement fields needs to be updated

// Case 3: Else, it was a cache hit; Revert replacement fields and dirty blocks
way.dirtyBlocks = oldWay.dirtyBlocks;
revertCacheLineReplFields(line, oldWay, wayIdx);

// Notify that changes to the way has been performed
Expand Down

0 comments on commit 6162394

Please sign in to comment.