only assign ClearDirtyWay for read-write caches

This commit is contained in:
Alec Vercruysse 2023-04-12 00:53:22 -07:00
parent 729f81a0df
commit d60e3aaf53

View File

@ -97,9 +97,9 @@ module cacheway #(parameter NUMLINES=512, LINELEN = 256, TAGLEN = 26,
/////////////////////////////////////////////////////////////////////////////////////////////
assign SetValidWay = SetValid & SelData;
assign ClearDirtyWay = ClearDirty & SelData;
if (!READ_ONLY_CACHE) begin
assign SetDirtyWay = SetDirty & SelData;
assign ClearDirtyWay = ClearDirty & SelData;
assign SelectedWriteWordEn = (SetValidWay | SetDirtyWay) & ~FlushStage;
assign SetValidEN = SetValidWay & ~FlushStage;
end