From 79812d3f1b2d7a495595011468e06022f31c5577 Mon Sep 17 00:00:00 2001 From: Germain Haugou Date: Fri, 31 May 2024 09:04:34 +0200 Subject: [PATCH] ci: Added more tests on gvsoc --- target/snitch_cluster/sw/run.yaml | 69 ++++++++++--------------------- util/sim/Simulation.py | 12 ++++++ 2 files changed, 34 insertions(+), 47 deletions(-) diff --git a/target/snitch_cluster/sw/run.yaml b/target/snitch_cluster/sw/run.yaml index 38f5e561b..b181bf813 100644 --- a/target/snitch_cluster/sw/run.yaml +++ b/target/snitch_cluster/sw/run.yaml @@ -4,99 +4,76 @@ runs: - elf: tests/build/alias.elf - simulators: [vsim, vcs, verilator] # banshee does not model alias regions + simulators: [vsim, vcs, verilator, gvsoc] # banshee does not model alias regions - elf: tests/build/atomics.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x4 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x4 - elf: tests/build/barrier.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/data_mover.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/dma_simple.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/event_unit.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/fence_i.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/fp8_comparison_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with segfault + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with segfault - elf: tests/build/fp8_comparison_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with segfault + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with segfault - elf: tests/build/fp8_computation_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with JIT issue + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with JIT issue - elf: tests/build/fp8_computation_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x6 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x6 - elf: tests/build/fp8alt_comparison_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with segfault + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with segfault - elf: tests/build/fp8alt_comparison_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x10 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x10 - elf: tests/build/fp8alt_computation_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with JIT issue + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with JIT issue - elf: tests/build/fp8alt_computation_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x12 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x12 - elf: tests/build/fp16_comparison_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x10 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x10 - elf: tests/build/fp16_comparison_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x10 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x10 - elf: tests/build/fp16_computation_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with JIT issue + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with JIT issue - elf: tests/build/fp16_computation_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x6 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x6 - elf: tests/build/fp16alt_comparison_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x10 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x10 - elf: tests/build/fp16alt_comparison_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x10 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x10 - elf: tests/build/fp16alt_computation_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with JIT issue + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with JIT issue - elf: tests/build/fp16alt_computation_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x16 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x16 - elf: tests/build/fp32_comparison_scalar.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/fp32_comparison_vector.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/fp32_computation_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x2 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x2 - elf: tests/build/fp32_computation_vector.elf - simulators: [vsim, vcs, verilator] # banshee fails with exit code 0x2 + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with exit code 0x2 - elf: tests/build/fp32_conversions_scalar.elf - simulators: [vsim, vcs, verilator] # banshee fails with illegal instruction + simulators: [vsim, vcs, verilator, gvsoc] # banshee fails with illegal instruction # - elf: tests/build/fp64_conversions_scalar.elf # simulators: [vsim, vcs, verilator] # - elf: tests/build/interrupt.elf - elf: tests/build/interrupt_local.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/multi_cluster.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/openmp_parallel.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/openmp_for_static_schedule.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/openmp_double_buffering.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/perf_cnt.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/printf_simple.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/printf_fmtint.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/simple.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/team_global.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/tls.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/varargs_1.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/varargs_2.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/zero_mem.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/non_null_exitcode.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail retcode: 126 - elf: tests/build/caq.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: tests/build/caq_frep.elf - simulators: [vsim, vcs, verilator] # banshee does not model FREP timing + simulators: [vsim, vcs, verilator, gvsoc] # banshee does not model FREP timing - elf: apps/blas/axpy/build/axpy.elf cmd: [../../../sw/blas/axpy/scripts/verify.py, "${sim_bin}", "${elf}"] - elf: apps/blas/gemm/build/gemm.elf @@ -110,9 +87,7 @@ runs: - elf: apps/dnn/concat/build/concat.elf cmd: [../../../sw/dnn/concat/scripts/verify.py, "${sim_bin}", "${elf}"] - elf: apps/dnn/fused_concat_linear/build/fused_concat_linear.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail cmd: [../../../sw/dnn/fused_concat_linear/scripts/verify.py, "${sim_bin}", "${elf}"] - elf: apps/montecarlo/pi_estimation/build/pi_estimation.elf - simulators: [vsim, vcs, verilator, banshee] # gvsoc fail - elf: apps/atax/build/atax.elf cmd: [../../../sw/apps/atax/scripts/verify.py, "${sim_bin}", "${elf}"] diff --git a/util/sim/Simulation.py b/util/sim/Simulation.py index 0192c72a9..569ecab1e 100644 --- a/util/sim/Simulation.py +++ b/util/sim/Simulation.py @@ -271,6 +271,18 @@ def __init__(self, sim_bin=None, cmd=None, **kwargs): self.cmd = ['gvsoc', '--target', 'pulp.snitch.snitch_cluster_single', '--binary', str(self.elf), 'run'] + def successful(self): + """Return whether the simulation was successful.""" + # On GVSOC, OpenOCD semi-hosting is used which can just report 0 or 1 + actual_retcode = self.get_retcode() + if actual_retcode is not None: + if self.expected_retcode != 0: + return int(actual_retcode) != 0 + else: + return int(actual_retcode) == 0 + else: + return False + class VCSSimulation(QuestaVCSSimulation): """An RTL simulation running on VCS."""