mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
busybear: add better warning on illegal instruction
...also it seems that mret is being picked up as an illegal instruction??
This commit is contained in:
parent
4160bf50b0
commit
43d23e3d9b
@ -262,8 +262,14 @@ module testbench_busybear();
|
|||||||
end
|
end
|
||||||
|
|
||||||
always @(dut.hart.priv.csr.genblk1.csrm.MCAUSE_REGW) begin
|
always @(dut.hart.priv.csr.genblk1.csrm.MCAUSE_REGW) begin
|
||||||
|
if (dut.hart.priv.csr.genblk1.csrm.MCAUSE_REGW == 2 && instrs != 0) begin
|
||||||
|
$display("!!!!!! illegal instruction !!!!!!!!!!");
|
||||||
|
$display("(as a reminder, MCAUSE and MEPC are set by this)");
|
||||||
|
$display("at %0t ps, instr %0d, HADDR %x", $time, instrs, HADDR);
|
||||||
|
`ERROR
|
||||||
|
end
|
||||||
if (dut.hart.priv.csr.genblk1.csrm.MCAUSE_REGW == 5 && instrs != 0) begin
|
if (dut.hart.priv.csr.genblk1.csrm.MCAUSE_REGW == 5 && instrs != 0) begin
|
||||||
$display("!!!!!!illegal (physical) memory access !!!!!!!!!!");
|
$display("!!!!!! illegal (physical) memory access !!!!!!!!!!");
|
||||||
$display("(as a reminder, MCAUSE and MEPC are set by this)");
|
$display("(as a reminder, MCAUSE and MEPC are set by this)");
|
||||||
$display("at %0t ps, instr %0d, HADDR %x", $time, instrs, HADDR);
|
$display("at %0t ps, instr %0d, HADDR %x", $time, instrs, HADDR);
|
||||||
`ERROR
|
`ERROR
|
||||||
|
Loading…
Reference in New Issue
Block a user