diff --git a/testbench/testbench.sv b/testbench/testbench.sv index e811ea4b..a37c101f 100644 --- a/testbench/testbench.sv +++ b/testbench/testbench.sv @@ -155,9 +155,9 @@ logic [3:0] dummy; logic HREADY; logic HSELEXT; - logic InitializingMemories; - integer ResetCount, ResetThreshold; - logic InReset; + logic InitializingMemories; + integer ResetCount, ResetThreshold; + logic InReset; // instantiate device to be tested assign GPIOPinsIn = 0; @@ -228,7 +228,7 @@ logic [3:0] dummy; // read test vectors into memory pathname = tvpaths[tests[0].atoi()]; /* if (tests[0] == `IMPERASTEST) - pathname = tvpaths[0]; + pathname = tvpaths[0]; else pathname = tvpaths[1]; */ if (riscofTest) memfilename = {pathname, tests[test], "/ref/ref.elf.memfile"}; else memfilename = {pathname, tests[test], ".elf.memfile"}; @@ -268,9 +268,6 @@ logic [3:0] dummy; // if ($time % 100000 == 0) $display("Time is %0t", $time); end - logic [`XLEN-1:0] debugmemoryadr; -// assign debugmemoryadr = dut.uncore.uncore.ram.ram.memory.RAM[5140]; - // check results assign reset_ext = InReset; @@ -285,97 +282,97 @@ logic [3:0] dummy; ResetCount = 0; end end else begin - if (TEST == "coremark") - if (dut.core.priv.priv.EcallFaultM) begin - $display("Benchmark: coremark is done."); - $stop; - end - // Termination condition (i.e. we finished running current test) - if (DCacheFlushDone) begin - integer begin_signature_addr; - InReset = 1; - begin_signature_addr = ProgramAddrLabelArray["begin_signature"]; - if (!begin_signature_addr) - $display("begin_signature addr not found in %s", ProgramLabelMapFile); - testadr = ($unsigned(begin_signature_addr))/(`XLEN/8); - testadrNoBase = (begin_signature_addr - `UNCORE_RAM_BASE)/(`XLEN/8); - #600; // give time for instructions in pipeline to finish - if (TEST == "embench") begin - // Writes contents of begin_signature to .sim.output file - // this contains instret and cycles for start and end of test run, used by embench python speed script to calculate embench speed score - // also begin_signature contains the results of the self checking mechanism, which will be read by the python script for error checking - $display("Embench Benchmark: %s is done.", tests[test]); - if (riscofTest) outputfile = {pathname, tests[test], "/ref/ref.sim.output"}; - else outputfile = {pathname, tests[test], ".sim.output"}; - outputFilePointer = $fopen(outputfile); - i = 0; - while ($unsigned(i) < $unsigned(5'd5)) begin - $fdisplayh(outputFilePointer, DCacheFlushFSM.ShadowRAM[testadr+i]); - i = i + 1; - end - $fclose(outputFilePointer); - $display("Embench Benchmark: created output file: %s", outputfile); - end else begin - // for tests with no self checking mechanism, read .signature.output file and compare to check for errors - // clear signature to prevent contamination from previous tests - for(i=0; i