vram/VRAM: expand the full size test to check neighbor writes
As part of debugging why my writes seemed to get mirrored across a stripe of 4 bytes. This test verifies that writing two contiguous addresses reads back the correct value, when run against the simulated ECP5 EBR model.
This commit is contained in:
parent
f45ff0d105
commit
76a1a36006
|
@ -105,6 +105,7 @@ module mkTestFull(FSM);
|
|||
|
||||
let fsm <- mkFSM(seq
|
||||
dut.cpu.request.put(VRAMRequest{addr: 1, data: tagged Valid 42});
|
||||
dut.cpu.request.put(VRAMRequest{addr: 2, data: tagged Valid 45});
|
||||
dut.cpu.request.put(VRAMRequest{addr: 1, data: tagged Invalid});
|
||||
action
|
||||
let resp <- dut.cpu.response.get();
|
||||
|
@ -112,6 +113,13 @@ module mkTestFull(FSM);
|
|||
$display("vram read: ", fshow(resp));
|
||||
dynamicAssert(resp.data == 42, "wrong data read after writing");
|
||||
endaction
|
||||
dut.cpu.request.put(VRAMRequest{addr: 2, data: tagged Invalid});
|
||||
action
|
||||
let resp <- dut.cpu.response.get();
|
||||
if (testflags.verbose)
|
||||
$display("vram read: ", fshow(resp));
|
||||
dynamicAssert(resp.data == 45, "wrong data read after writing");
|
||||
endaction
|
||||
endseq);
|
||||
return fsm;
|
||||
endmodule
|
||||
|
|
Loading…
Reference in New Issue