From 1d4c543f71bfd5af2ff8a511a4cbf2fe4299cad5 Mon Sep 17 00:00:00 2001 From: Daniel Torres Date: Fri, 17 Jun 2022 20:53:15 -0700 Subject: [PATCH] arch tests now run on spike and sail and compare signatures during build --- pipelined/testbench/testbench.sv | 10 +- pipelined/testbench/tests.vh | 1036 ++++++++++---------- tests/riscof/Makefile | 7 +- tests/riscof/sail_cSim/riscof_sail_cSim.py | 6 +- 4 files changed, 530 insertions(+), 529 deletions(-) diff --git a/pipelined/testbench/testbench.sv b/pipelined/testbench/testbench.sv index 95112fec8..e442d27ad 100644 --- a/pipelined/testbench/testbench.sv +++ b/pipelined/testbench/testbench.sv @@ -197,8 +197,7 @@ logic [3:0] dummy; ProgramLabelMapFile = {pathname, tests[test], ".elf.objdump.lab"}; // declare memory labels that interest us, the updateProgramAddrLabelArray task will find the addr of each label and fill the array // to expand, add more elements to this array and initialize them to zero (also initilaize them to zero at the start of the next test) - ProgramAddrLabelArray = '{ "begin_signature" : 0, - "tohost" : 0 }; + ProgramAddrLabelArray = '{ "begin_signature" : 0, "tohost" : 0 }; updateProgramAddrLabelArray(ProgramAddrMapFile, ProgramLabelMapFile, ProgramAddrLabelArray); $display("Read memfile %s", memfilename); reset_ext = 1; # 42; reset_ext = 0; @@ -251,8 +250,10 @@ logic [3:0] dummy; for(i=0; i config$(XLEN).ini - riscof run --work-dir=$(work_dir) --config=config$(XLEN).ini --suite=$(arch_dir)/riscv-test-suite/ --env=$(arch_dir)/riscv-test-suite/env --no-browser --no-dut-run - mv $(work_dir)/rv$(XLEN)i_m work/ + riscof run --work-dir=$(work_dir) --config=config$(XLEN).ini --suite=$(arch_dir)/riscv-test-suite/ --env=$(arch_dir)/riscv-test-suite/env --no-browser + rm -rf work/rv$(XLEN)i_m + mv -f $(work_dir)/rv$(XLEN)i_m work/ clean: rm -f config64.ini diff --git a/tests/riscof/sail_cSim/riscof_sail_cSim.py b/tests/riscof/sail_cSim/riscof_sail_cSim.py index de78070d1..7a7d16afb 100644 --- a/tests/riscof/sail_cSim/riscof_sail_cSim.py +++ b/tests/riscof/sail_cSim/riscof_sail_cSim.py @@ -90,7 +90,7 @@ class sail_cSim(pluginTemplate): test_dir = testentry['work_dir'] test_name = test.rsplit('/',1)[1][:-2] - elf = 'ref.elf' + elf = 'Ref.elf' execute = "@cd "+testentry['work_dir']+";" @@ -98,8 +98,8 @@ class sail_cSim(pluginTemplate): compile_cmd = cmd + ' -D' + " -D".join(testentry['macros']) execute+=compile_cmd+";" - execute += self.objdump_cmd.format(elf, self.xlen, 'ref.elf.objdump') - sig_file = os.path.join(test_dir, "ref.signature.output") + execute += self.objdump_cmd.format(elf, self.xlen, 'Ref.elf.objdump') + sig_file = os.path.join(test_dir, self.name[:-1] + ".signature") execute += self.sail_exe[self.xlen] + ' --test-signature={0} {1} > {2}.log 2>&1;'.format(sig_file, elf, test_name)