forked from Github_Repos/cvw
busybear: add seperate message on bad memory access becasue its confusing
This commit is contained in:
parent
e7fae21eb8
commit
bfa7aedd35
@ -106,6 +106,7 @@ module testbench_busybear();
|
|||||||
end
|
end
|
||||||
|
|
||||||
integer warningCount = 0;
|
integer warningCount = 0;
|
||||||
|
integer instrs;
|
||||||
|
|
||||||
//logic[63:0] adrTranslation[4:0];
|
//logic[63:0] adrTranslation[4:0];
|
||||||
//string translationType[4:0] = {"rf", "writeAdr", "PCW", "PC", "readAdr"};
|
//string translationType[4:0] = {"rf", "writeAdr", "PCW", "PC", "readAdr"};
|
||||||
@ -249,6 +250,15 @@ module testbench_busybear();
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
always @(dut.hart.priv.csr.genblk1.csrm.MCAUSE_REGW) begin
|
||||||
|
if (dut.hart.priv.csr.genblk1.csrm.MCAUSE_REGW == 5 && instrs != 0) begin
|
||||||
|
$display("!!!!!!illegal (physical) memory access !!!!!!!!!!");
|
||||||
|
$display("(as a reminder, MCAUSE and MEPC are set by this)");
|
||||||
|
$display("at %0t ps, instr %0d, HADDR %x", $time, instrs, HADDR);
|
||||||
|
`ERROR
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
`define CHECK_CSR2(CSR, PATH) \
|
`define CHECK_CSR2(CSR, PATH) \
|
||||||
string CSR; \
|
string CSR; \
|
||||||
logic [63:0] expected``CSR``; \
|
logic [63:0] expected``CSR``; \
|
||||||
@ -340,7 +350,6 @@ module testbench_busybear();
|
|||||||
end
|
end
|
||||||
|
|
||||||
string PCtext, PCtext2;
|
string PCtext, PCtext2;
|
||||||
integer instrs;
|
|
||||||
initial begin
|
initial begin
|
||||||
instrs = 0;
|
instrs = 0;
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user