Fixed bug in cacheLRU when NUMWAYS = 2.

This commit is contained in:
Ross Thompson 2023-04-27 14:30:01 -05:00
parent 212fee3613
commit 7c0eb16e62

View File

@ -113,7 +113,7 @@ module cacheLRU
// The root node of the LRU tree will always be selected in LRUUpdate. No mux needed.
assign NextLRU[NUMWAYS-2] = ~WayExpanded[NUMWAYS-2];
mux2 #(1) LRUMuxes[NUMWAYS-3:0](CurrLRU[NUMWAYS-3:0], ~WayExpanded[NUMWAYS-3:0], LRUUpdate[NUMWAYS-3:0], NextLRU[NUMWAYS-3:0]);
if (NUMWAYS > 2) mux2 #(1) LRUMuxes[NUMWAYS-3:0](CurrLRU[NUMWAYS-3:0], ~WayExpanded[NUMWAYS-3:0], LRUUpdate[NUMWAYS-3:0], NextLRU[NUMWAYS-3:0]);
// Compute next victim way.
for(node = NUMWAYS-2; node >= NUMWAYS/2; node--) begin