Update Breker platform.yaml and test compilation

This commit is contained in:
Jordan Carlin 2024-12-02 13:07:54 -08:00
parent 311125f4bd
commit 68205b844d
No known key found for this signature in database
6 changed files with 24 additions and 12 deletions

1
.gitignore vendored
View File

@ -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

View File

@ -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

View File

@ -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.

View File

@ -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:

View File

@ -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:

View File

@ -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.