diff --git a/pipelined/config/buildroot/wally-config.vh b/pipelined/config/buildroot/wally-config.vh index de6c910dc..7644eb1aa 100644 --- a/pipelined/config/buildroot/wally-config.vh +++ b/pipelined/config/buildroot/wally-config.vh @@ -30,7 +30,6 @@ `define FPGA 1 `define QEMU 1 `define LINUX_FIX_READ {'h10000005} -`define LINUX_TEST_VECTORS "../../tests/linux-testgen/linux-testvectors/" // RV32 or RV64: XLEN = 32 or 64 `define XLEN 64 diff --git a/pipelined/regression/regression-wally b/pipelined/regression/regression-wally index 17782b9de..63088afb6 100755 --- a/pipelined/regression/regression-wally +++ b/pipelined/regression/regression-wally @@ -48,19 +48,19 @@ def getBuildrootTC(short): INSTR_LIMIT = 100000 # multiple of 100000 MAX_EXPECTED = 246000000 if short: - BRcmd="vsim > {} -c < {} -c < {} -c < {} -c < {} -c < {} -c <> 3); + $sformat(testvectorDir,"%s/linux-testvectors/",RISCV_DIR); + $sformat(linuxImageDir,"%s/buildroot/output/images/",RISCV_DIR); $readmemb(`TWO_BIT_PRELOAD, dut.core.ifu.bpred.bpred.Predictor.DirPredictor.PHT.mem); $readmemb(`BTB_PRELOAD, dut.core.ifu.bpred.bpred.TargetPredictor.memory.mem); - ProgramAddrMapFile = {`LINUX_TEST_VECTORS,"vmlinux.objdump.addr"}; - ProgramLabelMapFile = {`LINUX_TEST_VECTORS,"vmlinux.objdump.lab"}; + ProgramAddrMapFile = {linuxImageDir,"vmlinux.objdump.addr"}; + ProgramLabelMapFile = {linuxImageDir,"vmlinux.objdump.lab"}; + // initialize bootrom + memFile = $fopen({testvectorDir,"bootmem.bin"}, "rb"); + readResult = $fread(dut.uncore.bootrom.bootrom.RAM,memFile); + $fclose(memFile); + // initialize RAM + memFile = $fopen({testvectorDir,"ram.bin"}, "rb"); + readResult = $fread(dut.uncore.ram.ram.RAM,memFile); + $fclose(memFile); if (CHECKPOINT==0) begin // normal - $readmemh({`LINUX_TEST_VECTORS,"ram.txt"}, dut.uncore.ram.ram.RAM); - traceFileM = $fopen({`LINUX_TEST_VECTORS,"all.txt"}, "r"); - traceFileE = $fopen({`LINUX_TEST_VECTORS,"all.txt"}, "r"); + traceFileM = $fopen({testvectorDir,"all.txt"}, "r"); + traceFileE = $fopen({testvectorDir,"all.txt"}, "r"); InstrCountW = '0; end else begin // checkpoint $sformat(checkpointDir,"checkpoint%0d/",CHECKPOINT); - checkpointDir = {`LINUX_TEST_VECTORS,checkpointDir}; + checkpointDir = {testvectorDir,checkpointDir}; //$readmemh({checkpointDir,"ram.txt"}, dut.uncore.ram.ram.RAM); - ramFile = $fopen({checkpointDir,"ram.bin"}, "rb"); - readResult = $fread(dut.uncore.ram.ram.RAM,ramFile); - $fclose(ramFile); traceFileE = $fopen({checkpointDir,"all.txt"}, "r"); traceFileM = $fopen({checkpointDir,"all.txt"}, "r"); InstrCountW = CHECKPOINT;