forked from OpenXiangShan/XiangShan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dcache: fix plru update logic (OpenXiangShan#1921)
This commit aims to fix dcache plru access logic In the previous version, when a cacheline not in l1 is accessed, a replace way is picked and used to update l1 plru (set the way as lru). However, if the same missed cacheline is accessed multiple times before l1 refill, l1 will pick a new replace way and use it to update plru for each time the missed cacheline is accessed. It makes the plru totally a mess. To fix that problem, extra condition check is added for a missed load plru update. Now plru is updated on: * load/store hit (touch hit way) * load/store primary miss (touch replacement way) * load/store secondary miss (touch replacement way) `updateReplaceOn2ndmiss` is enabled. Disable it if the timing is bad.
- Loading branch information
1 parent
33d13d4
commit fa9ac9b
Showing
4 changed files
with
86 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters