mirror of
https://github.com/openhwgroup/cvw
synced 2025-02-11 06:05:49 +00:00
busybear: reenable 'ruthless' CSR checking
This commit is contained in:
parent
38017e6aae
commit
0e3f013212
@ -279,12 +279,14 @@ module testbench_busybear();
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
string sepc_lit = "SEPC";
|
||||||
`define CHECK_CSR2(CSR, PATH) \
|
`define CHECK_CSR2(CSR, PATH) \
|
||||||
string CSR; \
|
string CSR; \
|
||||||
logic [63:0] expected``CSR``; \
|
logic [63:0] expected``CSR``; \
|
||||||
//CSR checking \
|
//CSR checking \
|
||||||
always @(``PATH``.``CSR``_REGW) begin \
|
always @(``PATH``.``CSR``_REGW) begin \
|
||||||
if ($time > 1) begin \
|
if ($time > 1) begin \
|
||||||
|
if (sepc_lit.icompare(`"CSR`")) begin #1; end \
|
||||||
scan_file_csr = $fscanf(data_file_csr, "%s\n", CSR); \
|
scan_file_csr = $fscanf(data_file_csr, "%s\n", CSR); \
|
||||||
scan_file_csr = $fscanf(data_file_csr, "%x\n", expected``CSR``); \
|
scan_file_csr = $fscanf(data_file_csr, "%x\n", expected``CSR``); \
|
||||||
if(CSR.icompare(`"CSR`")) begin \
|
if(CSR.icompare(`"CSR`")) begin \
|
||||||
@ -310,7 +312,7 @@ module testbench_busybear();
|
|||||||
`define CSRM dut.hart.priv.csr.genblk1.csrm
|
`define CSRM dut.hart.priv.csr.genblk1.csrm
|
||||||
`define CSRS dut.hart.priv.csr.genblk1.csrs.genblk1
|
`define CSRS dut.hart.priv.csr.genblk1.csrs.genblk1
|
||||||
|
|
||||||
/*
|
|
||||||
//`CHECK_CSR(FCSR)
|
//`CHECK_CSR(FCSR)
|
||||||
`CHECK_CSR2(MCAUSE, `CSRM)
|
`CHECK_CSR2(MCAUSE, `CSRM)
|
||||||
`CHECK_CSR(MCOUNTEREN)
|
`CHECK_CSR(MCOUNTEREN)
|
||||||
@ -336,8 +338,12 @@ module testbench_busybear();
|
|||||||
`CHECK_CSR(SSTATUS)
|
`CHECK_CSR(SSTATUS)
|
||||||
`CHECK_CSR2(STVAL, `CSRS)
|
`CHECK_CSR2(STVAL, `CSRS)
|
||||||
`CHECK_CSR(STVEC)
|
`CHECK_CSR(STVEC)
|
||||||
*/
|
|
||||||
|
|
||||||
|
//$stop;
|
||||||
|
initial begin
|
||||||
|
#34140421;
|
||||||
|
$stop;
|
||||||
|
end
|
||||||
initial begin //this is temporary until the bug can be fixed!!!
|
initial begin //this is temporary until the bug can be fixed!!!
|
||||||
#11130100;
|
#11130100;
|
||||||
force dut.hart.ieu.dp.regf.rf[5] = 64'h0000000080000004;
|
force dut.hart.ieu.dp.regf.rf[5] = 64'h0000000080000004;
|
||||||
@ -444,10 +450,6 @@ module testbench_busybear();
|
|||||||
(instrs <= 100000 && instrs % 10000 == 0) || (instrs <= 1000000 && instrs % 100000 == 0)) begin
|
(instrs <= 100000 && instrs % 10000 == 0) || (instrs <= 1000000 && instrs % 100000 == 0)) begin
|
||||||
$display("loaded %0d instructions", instrs);
|
$display("loaded %0d instructions", instrs);
|
||||||
end
|
end
|
||||||
// TEMP
|
|
||||||
if (instrs >= 800010) begin
|
|
||||||
$stop;
|
|
||||||
end
|
|
||||||
instrs += 1;
|
instrs += 1;
|
||||||
// are we at a branch/jump?
|
// are we at a branch/jump?
|
||||||
casex (lastCheckInstrD[31:0])
|
casex (lastCheckInstrD[31:0])
|
||||||
|
Loading…
Reference in New Issue
Block a user