forked from Github_Repos/cvw
make Cache Flush Logic dependent on !READ_ONLY_CACHE
read-only caches do not have flush logic since they do not have to deal with dirty bits.
This commit is contained in:
parent
247af17b6b
commit
d3a988c96c
6
src/cache/cache.sv
vendored
6
src/cache/cache.sv
vendored
@ -188,6 +188,7 @@ module cache #(parameter LINELEN, NUMLINES, NUMWAYS, LOGBWPL, WORDLEN, MUXINTE
|
||||
// Flush logic
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
if (!READ_ONLY_CACHE) begin:flushlogic
|
||||
// Flush address (line number)
|
||||
assign ResetOrFlushCntRst = reset | FlushCntRst;
|
||||
flopenr #(SETLEN) FlushAdrReg(clk, ResetOrFlushCntRst, FlushAdrCntEn, FlushAdrP1, NextFlushAdr);
|
||||
@ -200,6 +201,11 @@ module cache #(parameter LINELEN, NUMLINES, NUMWAYS, LOGBWPL, WORDLEN, MUXINTE
|
||||
if(NUMWAYS > 1) assign NextFlushWay = {FlushWay[NUMWAYS-2:0], FlushWay[NUMWAYS-1]};
|
||||
else assign NextFlushWay = FlushWay[NUMWAYS-1];
|
||||
assign FlushWayFlag = FlushWay[NUMWAYS-1];
|
||||
end // block: flushlogic
|
||||
else begin:flushlogic
|
||||
assign FlushWayFlag = 0;
|
||||
assign FlushAdrFlag = 0;
|
||||
end
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////////////////
|
||||
// Cache FSM
|
||||
|
Loading…
Reference in New Issue
Block a user