dcache: fix plru update logic (#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.
Showing
想要评论请 注册 或 登录