From 8c02ff6a1a2f65301a3f8cc9d43cbf55016d0fb7 Mon Sep 17 00:00:00 2001 From: IveanEx Date: Sun, 1 Sep 2024 18:04:47 +0200 Subject: [PATCH] Initial Commit --- .github/workflows/ci.yml | 17 +++++++++++------ target/sim/run.py | 5 +++-- target/sim/sw/run-full-occamy.yaml | 13 ------------- target/sim/sw/run-single-cluster.yaml | 15 --------------- target/sim/sw/sim_elf.yaml | 6 ++++++ 5 files changed, 20 insertions(+), 36 deletions(-) delete mode 100644 target/sim/sw/run-full-occamy.yaml delete mode 100644 target/sim/sw/run-single-cluster.yaml create mode 100644 target/sim/sw/sim_elf.yaml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 089eaca47..57becb909 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,7 +30,7 @@ jobs: ################################################# occamy-verilator: - name: Compile Occamy Software + Hardware Verilator Binary for behavioral simulation + name: Simulation with Verilator runs-on: ubuntu-22.04 container: image: ghcr.io/kuleuven-micas/snax:main @@ -40,15 +40,20 @@ jobs: submodules: 'recursive' - name: Compile Bootrom run: | - echo -e "The placeholer for compiling Bootrom" - echo -e "Should execute \"make bootrom\"" + echo -e "Compiling Bootrom" + make bootrom - name: Compile SW run: | - echo -e "The placeholer for compiling SW" - echo -e "Should execute \"make sw\"" + echo -e "Compiling SW" + make sw CFG_OVERRIDE=target/sw/cfg/occamy_cfg/hemaia.hjson - name: Compile RTL run: | make rtl CFG_OVERRIDE=target/rtl/cfg/occamy_cfg/hemaia.hjson - name: Compile Verilator Binary run: | - make occamy_system_vlt + make occamy_system_vlt CFG_OVERRIDE=target/rtl/cfg/occamy_cfg/hemaia.hjson + - name: Run Tests + working-directory: target/sim + run: |- + ./run.py --simulator verilator \ + sw/sim_elf.yaml -j diff --git a/target/sim/run.py b/target/sim/run.py index 45681c7ce..86875edf2 100755 --- a/target/sim/run.py +++ b/target/sim/run.py @@ -10,11 +10,12 @@ sys.path.append(str(Path(__file__).parent / '../../deps/snitch_cluster/util/sim')) from sim_utils import parser, get_simulations, run_simulations # noqa: E402 -from Simulator import QuestaSimulator # noqa: E402 +from Simulator import QuestaSimulator, VerilatorSimulator # noqa: E402 SIMULATORS = { - 'vsim': QuestaSimulator(Path(__file__).parent.resolve() / 'bin/occamy_top.vsim') + 'vsim': QuestaSimulator(Path(__file__).parent.resolve() / 'bin/occamy_top.vsim'), + 'verilator': VerilatorSimulator(Path(__file__).parent.resolve() / 'bin/snitch_cluster.vlt') } diff --git a/target/sim/sw/run-full-occamy.yaml b/target/sim/sw/run-full-occamy.yaml deleted file mode 100644 index abc662855..000000000 --- a/target/sim/sw/run-full-occamy.yaml +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2023 ETH Zurich and University of Bologna. -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -runs: - - elf: host/apps/offload/build/offload-axpy.elf - cmd: [../../../deps/snitch_cluster/sw/blas/axpy/scripts/verify.py, - --symbols-bin, ./device/apps/blas/axpy/build/axpy.elf, - "${sim_bin}", "${elf}"] - - elf: host/apps/offload/build/offload-gemm.elf - cmd: [../../../deps/snitch_cluster/sw/blas/gemm/scripts/verify.py, - --symbols-bin, ./device/apps/blas/gemm/build/gemm.elf, - "${sim_bin}", "${elf}"] diff --git a/target/sim/sw/run-single-cluster.yaml b/target/sim/sw/run-single-cluster.yaml deleted file mode 100644 index ed432924e..000000000 --- a/target/sim/sw/run-single-cluster.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2023 ETH Zurich and University of Bologna. -# Licensed under the Apache License, Version 2.0, see LICENSE for details. -# SPDX-License-Identifier: Apache-2.0 - -runs: - - elf: host/apps/offload/build/offload-axpy.elf - cmd: [../../../deps/snitch_cluster/sw/blas/axpy/scripts/verify.py, - --symbols-bin, ./device/apps/blas/axpy/build/axpy.elf, - "${sim_bin}", "${elf}"] - - elf: host/apps/offload/build/offload-gemm.elf - cmd: [../../../deps/snitch_cluster/sw/blas/gemm/scripts/verify.py, - --symbols-bin, ./device/apps/blas/gemm/build/gemm.elf, - "${sim_bin}", "${elf}"] - - elf: host/apps/hello_world/build/hello_world.elf - cmd: [./host/apps/hello_world/verify.py, "${sim_bin}", "${elf}"] diff --git a/target/sim/sw/sim_elf.yaml b/target/sim/sw/sim_elf.yaml new file mode 100644 index 000000000..4aa8e7c97 --- /dev/null +++ b/target/sim/sw/sim_elf.yaml @@ -0,0 +1,6 @@ +# Copyright 2024 KU Leuven. +# Licensed under the Apache License, Version 2.0, see LICENSE for details. +# SPDX-License-Identifier: Apache-2.0 + +runs: + - elf: sw/apps/offload/build/offload-snax-test-integration.elf