diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 7d3485599..70ac6d623 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -116,12 +116,6 @@ snitch-cluster-vlt: - grep -zoP 'All tests passed' tests.log - grep -zoP 'All tests passed' apps.log # yamllint enable rule:line-length - artifacts: - when: on_failure - paths: - - target/snitch_cluster/tests.log - - target/snitch_cluster/apps.log - expire_in: 1 day # VCS snitch-cluster-vcs: @@ -135,12 +129,6 @@ snitch-cluster-vcs: - grep -zoP 'All tests passed' tests.log - grep -zoP 'All tests passed' apps.log # yamllint enable rule:line-length - artifacts: - when: on_failure - paths: - - target/snitch_cluster/tests.log - - target/snitch_cluster/apps.log - expire_in: 1 day # Questa snitch-cluster-vsim: @@ -154,12 +142,6 @@ snitch-cluster-vsim: - grep -zoP 'All tests passed' tests.log - grep -zoP 'All tests passed' apps.log # yamllint enable rule:line-length - artifacts: - when: on_failure - paths: - - target/snitch_cluster/tests.log - - target/snitch_cluster/apps.log - expire_in: 1 day # Banshee snitch-cluster-banshee: @@ -179,9 +161,3 @@ snitch-cluster-banshee: - grep -zoP 'All tests passed' tests.log - grep -zoP 'All tests passed' apps.log # yamllint enable rule:line-length - artifacts: - when: on_failure - paths: - - target/snitch_cluster/tests.log - - target/snitch_cluster/apps.log - expire_in: 1 day diff --git a/docs/ug/getting_started.md b/docs/ug/getting_started.md index 57ffb922c..de2487ae5 100644 --- a/docs/ug/getting_started.md +++ b/docs/ug/getting_started.md @@ -74,15 +74,3 @@ Install the required packages in the currently active virtual environment: ```shell pip install -r python-requirements.txt ``` - -## Dependencies - -This repository has a couple of tool dependencies: - -- Dependency management tool `bender`: - ```bash - # Bender tool - cargo install bender --version 0.23.2 - ``` -- Instruction-accurate simulator `banshee`: - Follow instructions on [Banshee Github Repo](https://github.com/pulp-platform/banshee) diff --git a/target/snitch_cluster/README.md b/target/snitch_cluster/README.md index 8da80293b..cb2bd2f69 100644 --- a/target/snitch_cluster/README.md +++ b/target/snitch_cluster/README.md @@ -32,7 +32,7 @@ vcs-2020.12 make bin/snitch_cluster.vcs These commands compile the RTL sources respectively in `work-vlt`, `work-vsim` and `work-vcs`. Additionally, common C++ testbench sources (e.g. the [frontend server (fesvr)](https://github.com/riscv-software-src/riscv-isa-sim)) are compiled under `work`. Each command will also generate a script or an executable (e.g. `bin/snitch_cluster.vsim`) which you can invoke to simulate the hardware. We will see how to do this in a later section. ### Building the Banshee simulator -Instead of running an RTL simulation, you can use our instruction-accuracte simulator called `banshee`. To install the simulator, please follow the instructions of the Banshee repository: [https://github.com/pulp-platform/banshee](https://github.com/pulp-platform/banshee). +Instead of running an RTL simulation, you can use our instruction-accurate simulator called `banshee`. To install the simulator, please follow the instructions of the Banshee repository: [https://github.com/pulp-platform/banshee](https://github.com/pulp-platform/banshee). ### Cluster configuration @@ -48,7 +48,7 @@ make CFG_OVERRIDE=cfg/custom.hjson bin/snitch_cluster.vlt ___Note:__ whenever you override the configuration file on the `make` command-line, the configuration will be stored in the `cfg/lru.hjson` file. Successive invocations of `make` will automatically pick up the `cfg/lru.hjson` file. You can therefore omit the `CFG_OVERRIDE` definition in successive commands unless you want to override the least-recently used configuration._ -Banshee uses also a cluster configuration file, however, that is given directly when simulating a specific binary with banshee with the help of the `--configuration `. +Banshee uses also a cluster configuration file, however, that is given directly when simulating a specific binary with banshee with the help of `--configuration `. ### Building the software @@ -66,7 +66,7 @@ The `sw` target first generates some C header files which depend on the hardware The `DEBUG=ON` flag is used to tell the compiler to produce debugging symbols. It is necessary for the `annotate` target, showcased in the Debugging section of this guide, to work. -The `SELECT_RUNTIME` is set by default to `rtl`. To use the Banshee runtime, it requires to be set to be set to `banshee` with `SELECT_RUNTIME=banshee`. +The `SELECT_RUNTIME` flag is set by default to `rtl`. To build the software with the Banshee runtime, set the flag to `banshee`. ___Note:__ the RTL is not the only source which is generated from the configuration file. The software stack also depends on the configuration file. Make sure you always build the software with the same configuration of the hardware you are going to run it on._ diff --git a/target/snitch_cluster/sw/runtime/banshee/src/snitch_cluster_start.c b/target/snitch_cluster/sw/runtime/banshee/src/snitch_cluster_start.c index c099998e9..e0f70a28c 100644 --- a/target/snitch_cluster/sw/runtime/banshee/src/snitch_cluster_start.c +++ b/target/snitch_cluster/sw/runtime/banshee/src/snitch_cluster_start.c @@ -2,13 +2,6 @@ // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 -// needs to be before #define SNRT_CRT0_EXIT -static inline void snrt_exit(int exit_code) { - volatile uint32_t *scratch_reg = (volatile uint32_t *)0x02000014; - - if (snrt_global_core_idx() == 0) *(scratch_reg) = (exit_code << 1) | 1; -} - #define SNRT_INIT_TLS #define SNRT_INIT_BSS #define SNRT_INIT_CLS @@ -18,4 +11,11 @@ static inline void snrt_exit(int exit_code) { #define SNRT_CRT0_POST_BARRIER #define SNRT_CRT0_EXIT +// needs to be before #include "start.c" +static inline void snrt_exit(int exit_code) { + volatile uint32_t *scratch_reg = (volatile uint32_t *)0x02000014; + + if (snrt_global_core_idx() == 0) *(scratch_reg) = (exit_code << 1) | 1; +} + #include "start.c" diff --git a/target/snitch_cluster/sw/runtime/rtl/src/snitch_cluster_start.c b/target/snitch_cluster/sw/runtime/rtl/src/snitch_cluster_start.c index 19b250e72..0c61be025 100644 --- a/target/snitch_cluster/sw/runtime/rtl/src/snitch_cluster_start.c +++ b/target/snitch_cluster/sw/runtime/rtl/src/snitch_cluster_start.c @@ -2,13 +2,6 @@ // Licensed under the Apache License, Version 2.0, see LICENSE for details. // SPDX-License-Identifier: Apache-2.0 -// needs to be before #define SNRT_CRT0_EXIT -static inline void snrt_exit(int exit_code) { - extern volatile uint32_t tohost; - - if (snrt_global_core_idx() == 0) tohost = (exit_code << 1) | 1; -} - #define SNRT_INIT_TLS #define SNRT_INIT_BSS #define SNRT_INIT_CLS @@ -18,4 +11,11 @@ static inline void snrt_exit(int exit_code) { #define SNRT_CRT0_POST_BARRIER #define SNRT_CRT0_EXIT +// needs to be before #include "start.c" +static inline void snrt_exit(int exit_code) { + extern volatile uint32_t tohost; + + if (snrt_global_core_idx() == 0) tohost = (exit_code << 1) | 1; +} + #include "start.c"