From 68205b844dc8aa3d9deaf898ea3bebc6990557b4 Mon Sep 17 00:00:00 2001 From: Jordan Carlin Date: Mon, 2 Dec 2024 13:07:54 -0800 Subject: [PATCH] Update Breker platform.yaml and test compilation --- .gitignore | 1 + Makefile | 4 ++++ bin/regression-wally | 16 ++++++++++------ bin/wsim | 4 +++- testbench/trek_files/Makefile | 5 +++-- testbench/trek_files/platform.yaml | 6 +++--- 6 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 9a0f35cc1..41086d3b4 100644 --- a/.gitignore +++ b/.gitignore @@ -33,6 +33,7 @@ tests/fp/combined_IF_vectors/IF_vectors/*.tv tests/custom/*/*/ tests/custom/*/*/*.memfile sim/tests/riscvdv +testbench/trek_files/uvm_output # Linux linux/buildroot diff --git a/Makefile b/Makefile index 52513a812..f52fd943d 100644 --- a/Makefile +++ b/Makefile @@ -39,6 +39,10 @@ coverage: cvw-arch-verif: $(MAKE) -C ${WALLY}/addins/cvw-arch-verif +breker: + $(MAKE) -C ${WALLY}/testbench/trek_files + $(MAKE) -C ${WALLY}/tests/breker + clean: $(MAKE) clean -C sim $(MAKE) clean -C ${WALLY}/tests/fp diff --git a/bin/regression-wally b/bin/regression-wally index 800d0dd82..e119422b1 100755 --- a/bin/regression-wally +++ b/bin/regression-wally @@ -291,7 +291,7 @@ def addTests(tests, sim): configs.append(tc) -def addTestsByDir(dir, config, sim, lockstepMode=0): +def addTestsByDir(dir, config, sim, lockstepMode=0, brekerMode=0): if os.path.isdir(dir): sim_logdir = WALLY+ "/sim/" + sim + "/logs/" if coverStr == "--fcov": # use --fcov in place of --lockstep @@ -312,6 +312,10 @@ def addTestsByDir(dir, config, sim, lockstepMode=0): cmdPrefix="wsim --lockstep --sim " + sim + " " + config gs="Mismatches : 0" fileEnd = ".elf" + elif brekerMode: + cmdPrefix="wsim --sim " + sim + " " + config + gs="# trek: info: summary: Test PASSED" + fileEnd = ".elf" else: cmdPrefix="wsim --sim " + sim + " " + config gs="Single Elf file tests are not signatured verified." @@ -442,8 +446,8 @@ elif (args.fcov): # run tests in lockstep in functional coverage mode addTestsByDir(WALLY+"/addins/cvw-arch-verif/tests/rv64/", "rv64gc", coveragesim) addTestsByDir(WALLY+"/addins/cvw-arch-verif/tests/priv/rv32/", "rv32gc", coveragesim) addTestsByDir(WALLY+"/addins/cvw-arch-verif/tests/priv/rv64/", "rv64gc", coveragesim) -# elif (args.breker): -# addLockstepTestsByDir(WALLY+"/tests/breker/work", "breker", coveragesim, 0) +elif (args.breker): + addTestsByDir(WALLY+"/tests/breker/work", "breker", "questa", brekerMode=1) else: for sim in sims: if (not (args.buildroot and sim == lockstepsim)): # skip short buildroot sim if running long one @@ -454,9 +458,9 @@ else: # run derivative configurations and lockstep tests in nightly regression if (args.nightly): - addTestsByDir(WALLY+"/tests/coverage", "rv64gc", lockstepsim, 1) - addTestsByDir(WALLY+"/tests/riscof/work/wally-riscv-arch-test/rv64i_m", "rv64gc", lockstepsim, 1) - addTestsByDir(WALLY+"/tests/riscof/work/wally-riscv-arch-test/rv32i_m", "rv32gc", lockstepsim, 1) + addTestsByDir(WALLY+"/tests/coverage", "rv64gc", lockstepsim, lockstepMode=1) + addTestsByDir(WALLY+"/tests/riscof/work/wally-riscv-arch-test/rv64i_m", "rv64gc", lockstepsim, lockstepMode=1) + addTestsByDir(WALLY+"/tests/riscof/work/wally-riscv-arch-test/rv32i_m", "rv32gc", lockstepsim, lockstepMode=1) addTests(derivconfigtests, defaultsim) # addTests(bpredtests, defaultsim) # This is currently broken in regression due to something related to the new wsim script. diff --git a/bin/wsim b/bin/wsim index a6bb89b72..075d473b2 100755 --- a/bin/wsim +++ b/bin/wsim @@ -67,7 +67,9 @@ def elfFileCheck(args): # extract the elf name from the path to be the test suite fields = args.testsuite.rsplit('/', 3) # if the name is just ref.elf in a deep path (riscv-arch-test/wally-riscv-arch-test), then use the directory name as the test suite to make it unique; otherwise work directory will have duplicates. - if (len(fields) > 3): + if ("breker" in args.testsuite): + args.testsuite = fields[-1] + elif (len(fields) > 3): if (fields[2] == "ref"): args.testsuite = f"{fields[1]}_{fields[3]}" else: diff --git a/testbench/trek_files/Makefile b/testbench/trek_files/Makefile index 02c9b6f56..34409e0ae 100644 --- a/testbench/trek_files/Makefile +++ b/testbench/trek_files/Makefile @@ -4,8 +4,9 @@ TREKSVIP_YAML := $(BREKER_HOME)/examples/tutorials/svip/treksvip/yaml/treksvi TREKEXE_FLAGS += --seed 0x # free (0x) or lock (0x1) the seed used for test generation TREKSVIP = source $(TREKFILES)/breker-setup.sh && treksvip -p $(PLATFORM_YAML) -p $(TREKSVIP_YAML) $(TREKEXE_FLAGS) -uvm_output: - rm -rf uvm_output +uvm_output: uvm_output/trek_uvm.sv + +uvm_output/trek_uvm.sv: $(PLATFORM_YAML) $(TREKSVIP_YAML) $(TREKSVIP) -p $(PLATFORM_YAML) -p $(TREKSVIP_YAML) --uvm_output=uvm_output clean: diff --git a/testbench/trek_files/platform.yaml b/testbench/trek_files/platform.yaml index 16b1da612..376a25857 100644 --- a/testbench/trek_files/platform.yaml +++ b/testbench/trek_files/platform.yaml @@ -100,7 +100,7 @@ trek: doc: >- Detail settings when mailbox type is `single` init_type: - value: static + value: backdoor #static doc: >- Strategy to use for mailbox memory initialization. Options are: @@ -108,13 +108,13 @@ trek: - backdoor - frontdoor c2t_base: - value: 0x1000 + value: 0x83000000 doc: >- Fixed base address of C to trekbox mailbox region. Allow 64 bytes per processor. Used for init_type of `backdoor` and `frontdoor` only. t2c_base: - value: 0x2000 + value: 0x83001000 doc: >- Fixed base address of trekbox to C mailbox region. Allow 64 bytes per processor.