diff --git a/wally-pipelined/regression/regression-wally.py b/wally-pipelined/regression/regression-wally.py index a997c2a7b..bd703a017 100755 --- a/wally-pipelined/regression/regression-wally.py +++ b/wally-pipelined/regression/regression-wally.py @@ -10,6 +10,7 @@ # output. # ################################## +import sys from collections import namedtuple TestCase = namedtuple("TestCase", ['name', 'cmd', 'grepstr']) @@ -23,22 +24,22 @@ TestCase = namedtuple("TestCase", ['name', 'cmd', 'grepstr']) # edit this list to add more test cases configs = [ - #TestCase( - # name="busybear", - # cmd="vsim -do wally-busybear-batch.do -c > {}", - # grepstr="loaded 100000 instructions" - #), - TestCase( - name="buildroot", - cmd="vsim -do wally-buildroot-batch.do -c > {}", - grepstr="6300000 instructions" - ), TestCase( name="lints", cmd="./lint-wally &> {}", grepstr="All lints run with no errors or warnings" - ), + ) ] +def getBuildrootTC(short): + INSTR_LIMIT = 100000 # multiple of 100000 + MAX_EXPECTED = 6.3e6 + if short: + BRcmd="vsim > {} -c < {} -c < 10000) ? INSTR_LIMIT-10000 : 1; // # of instructions at which to turn on waves in graphical sim + string ProgramAddrMapFile, ProgramLabelMapFile; /////////////////////////////////////////////////////////////////////////////// @@ -343,10 +345,12 @@ module testbench(); // always check PC, instruction bits if (checkInstrW) begin InstrCountW += 1; - // turn on waves at certain point - if (InstrCountW == waveOnICount) $stop; // print progress message if (InstrCountW % 'd100000 == 0) $display("Reached %d instructions", InstrCountW); + // turn on waves + if (InstrCountW == INSTR_WAVEON) $stop; + // end sim + if ((InstrCountW == INSTR_LIMIT) && (INSTR_LIMIT!=0)) $stop; fault = 0; if (`DEBUG_TRACE >= 1) begin `checkEQ("PCW",PCW,ExpectedPCW) @@ -423,8 +427,8 @@ module testbench(); initial begin $readmemh({`LINUX_TEST_VECTORS,"bootmem.txt"}, dut.uncore.bootdtim.bootdtim.RAM, 'h1000 >> 3); $readmemh({`LINUX_TEST_VECTORS,"ram.txt"}, dut.uncore.dtim.RAM); - $readmemb(`TWO_BIT_PRELOAD, dut.hart.ifu.bpred.bpred.Predictor.DirPredictor.PHT.memory); - $readmemb(`BTB_PRELOAD, dut.hart.ifu.bpred.bpred.TargetPredictor.memory.memory); + $readmemb(`TWO_BIT_PRELOAD, dut.hart.ifu.bpred.bpred.Predictor.DirPredictor.PHT.mem); + $readmemb(`BTB_PRELOAD, dut.hart.ifu.bpred.bpred.TargetPredictor.memory.mem); ProgramAddrMapFile = {`LINUX_TEST_VECTORS,"vmlinux.objdump.addr"}; ProgramLabelMapFile = {`LINUX_TEST_VECTORS,"vmlinux.objdump.lab"}; end