mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
Got the shadow ram cache flush working.
This commit is contained in:
parent
9fe6190763
commit
17dc488010
@ -402,19 +402,22 @@ add wave -noupdate /testbench/dut/uncore/dtim/RAM
|
||||
add wave -noupdate /testbench/dut/uncore/dtim/A
|
||||
add wave -noupdate /testbench/dut/uncore/dtim/HWDATA
|
||||
add wave -noupdate /testbench/dut/uncore/dtim/memwrite
|
||||
add wave -noupdate /testbench/dut/uncore/dtim/risingHREADYTim
|
||||
add wave -noupdate /testbench/dut/uncore/dtim/memread
|
||||
add wave -noupdate /testbench/dut/hart/lsu/dcache/ReadDataBlockWayM
|
||||
add wave -noupdate /testbench/dut/uncore/dtim/HCLK
|
||||
add wave -noupdate /testbench/dut/hart/clk
|
||||
add wave -noupdate /testbench/DCacheFlushFSM/CacheData
|
||||
add wave -noupdate /testbench/DCacheFlushFSM/ShadowRAM
|
||||
add wave -noupdate /testbench/DCacheFlushFSM/CacheAdr
|
||||
add wave -noupdate /testbench/DCacheFlushFSM/CacheData
|
||||
add wave -noupdate /testbench/DCacheFlushFSM/CacheDirty
|
||||
add wave -noupdate /testbench/DCacheFlushFSM/CacheTag
|
||||
add wave -noupdate /testbench/DCacheFlushFSM/CacheValid
|
||||
add wave -noupdate -expand -group shadowram /testbench/DCacheFlushFSM/clk
|
||||
add wave -noupdate -expand -group shadowram /testbench/DCacheFlushFSM/start
|
||||
add wave -noupdate -expand -group shadowram -color Orchid /testbench/DCacheFlushFSM/ShadowRAM
|
||||
TreeUpdate [SetDefaultTree]
|
||||
WaveRestoreCursors {{Cursor 12} {63874 ns} 0} {{Cursor 13} {4851 ns} 0} {{Cursor 3} {58080 ns} 0}
|
||||
WaveRestoreCursors {{Cursor 12} {63589 ns} 0} {{Cursor 13} {4851 ns} 0} {{Cursor 3} {58080 ns} 0}
|
||||
quietly wave cursor active 1
|
||||
configure wave -namecolwidth 250
|
||||
configure wave -valuecolwidth 297
|
||||
@ -430,4 +433,4 @@ configure wave -griddelta 40
|
||||
configure wave -timeline 0
|
||||
configure wave -timelineunits ns
|
||||
update
|
||||
WaveRestoreZoom {0 ns} {67394 ns}
|
||||
WaveRestoreZoom {63529 ns} {63661 ns}
|
||||
|
@ -630,11 +630,14 @@ string tests32f[] = '{
|
||||
// check results
|
||||
always @(negedge clk)
|
||||
begin
|
||||
/* -----\/----- EXCLUDED -----\/-----
|
||||
if (dut.hart.priv.EcallFaultM &&
|
||||
(dut.hart.ieu.dp.regf.rf[3] == 1 ||
|
||||
(dut.hart.ieu.dp.regf.we3 &&
|
||||
dut.hart.ieu.dp.regf.a3 == 3 &&
|
||||
dut.hart.ieu.dp.regf.wd3 == 1))) begin
|
||||
-----/\----- EXCLUDED -----/\----- */
|
||||
if (DCacheFlushDone) begin
|
||||
$display("Code ended with ecall with gp = 1");
|
||||
|
||||
#600; // give time for instructions in pipeline to finish
|
||||
@ -1035,16 +1038,20 @@ module DCacheFlushFSM
|
||||
if (start) begin #1
|
||||
for(i = 0; i < numlines; i++) begin
|
||||
for(j = 0; j < numways; j++) begin
|
||||
for(k = 0; k < numwords; k++) begin
|
||||
$display("Help me!")
|
||||
ShadowRAM[CacheAdr[j][i][k]] = CacheData[j][i][k];
|
||||
end
|
||||
if (CacheValid[j][i] && CacheDirty[j][i]) begin
|
||||
for(k = 0; k < numwords; k++) begin
|
||||
ShadowRAM[CacheAdr[j][i][k]/8] = CacheData[j][i][k];
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
|
||||
|
||||
flop #(1) doneReg(.clk(clk),
|
||||
.d(start),
|
||||
.q(done));
|
||||
|
||||
endmodule
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user