diff --git a/testbench/testbench.sv b/testbench/testbench.sv index 3a4eeb617..cd7a6ad3b 100644 --- a/testbench/testbench.sv +++ b/testbench/testbench.sv @@ -321,13 +321,18 @@ module testbench; end_signature_addr = ProgramAddrLabelArray["sig_end_canary"]; signature_size = end_signature_addr - begin_signature_addr; end + logic EcallFaultM; + if (P.ZICSR_SUPPORTED) + assign EcallFaultM = dut.core.priv.priv.EcallFaultM; + else + assign EcallFaultM = 0; always @(posedge clk) begin //////////////////////////////////////////////////////////////////////////////// // Verify the test ran correctly by checking the memory against a known signature. //////////////////////////////////////////////////////////////////////////////// if(TestBenchReset) test = 1; if (P.ZICSR_SUPPORTED & TEST == "coremark") - if (dut.core.priv.priv.EcallFaultM) begin + if (EcallFaultM) begin $display("Benchmark: coremark is done."); $stop; end @@ -861,20 +866,25 @@ end // Check errors testadr = ($unsigned(begin_signature_addr))/(P.XLEN/8); testadrNoBase = (begin_signature_addr - P.UNCORE_RAM_BASE)/(P.XLEN/8); + // logic UNCORE_RAM_SUPPORTED; + // if(P.UNCORE_RAM_SUPPORTED) + // assign UNCORE_RAM_SUPPORTED = P.UNCORE_RAM_SUPPORTED; + // else + // assign UNCORE_RAM_SUPPORTED = 0; for (i=0; i