forked from Github_Repos/cvw
Applied batch from fpga branch which fixes the dcache fence bug. The should cause the dcache to flush all dirty cache lines to main memory. The bug caused the dirty reset to clear each way for a particular line.
This commit is contained in:
parent
7158bf1d4f
commit
35fcadbe7f
6
wally-pipelined/src/cache/dcache.sv
vendored
6
wally-pipelined/src/cache/dcache.sv
vendored
@ -142,6 +142,8 @@ module dcache
|
||||
|
||||
logic LRUWriteEn;
|
||||
|
||||
logic [NUMWAYS-1:0] VDWriteEnableWay;
|
||||
|
||||
// Read Path CPU (IEU) side
|
||||
|
||||
mux4 #(INDEXLEN)
|
||||
@ -167,7 +169,7 @@ module dcache
|
||||
.WAdr,
|
||||
.PAdr(MemPAdrM),
|
||||
.WriteEnable(SRAMWayWriteEnable),
|
||||
.VDWriteEnable,
|
||||
.VDWriteEnable(VDWriteEnableWay),
|
||||
.WriteWordEnable(SRAMWordEnable),
|
||||
.TagWriteEnable(SRAMBlockWayWriteEnableM),
|
||||
.WriteData(SRAMWriteData),
|
||||
@ -329,6 +331,8 @@ module dcache
|
||||
.d(NextFlushWay),
|
||||
.q(FlushWay));
|
||||
|
||||
assign VDWriteEnableWay = FlushWay & {NUMWAYS{VDWriteEnable}};
|
||||
|
||||
assign NextFlushWay = {FlushWay[NUMWAYS-2:0], FlushWay[NUMWAYS-1]};
|
||||
|
||||
assign FlushAdrFlag = FlushAdr == FlushAdrThreshold[INDEXLEN-1:0] & FlushWay[NUMWAYS-1];
|
||||
|
Loading…
Reference in New Issue
Block a user