Don't want to clear the lru bits on invalidation (clearvalid).

This commit is contained in:
Rose Thompson 2024-03-04 17:52:41 -06:00
parent a22de45631
commit 0222e8f42a

View File

@ -144,9 +144,7 @@ module cacheLRU
always_ff @(posedge clk) begin always_ff @(posedge clk) begin
if (reset) for (int set = 0; set < NUMLINES; set++) LRUMemory[set] = '0; // exclusion-tag: initialize if (reset) for (int set = 0; set < NUMLINES; set++) LRUMemory[set] = '0; // exclusion-tag: initialize
if(CacheEn) begin if(CacheEn) begin
if(ClearValid & ~FlushStage) if(LRUWriteEn)
LRUMemory[PAdr] <= '0;
else if(LRUWriteEn)
LRUMemory[PAdr] <= NextLRU; LRUMemory[PAdr] <= NextLRU;
if(LRUWriteEn & (PAdr == CacheSetTag)) if(LRUWriteEn & (PAdr == CacheSetTag))
CurrLRU <= #1 NextLRU; CurrLRU <= #1 NextLRU;