Skip to content

Commit

Permalink
review: Addresses various minor review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
GiannaP committed Aug 7, 2023
1 parent ae875a0 commit 90191ca
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 53 deletions.
24 changes: 0 additions & 24 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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
12 changes: 0 additions & 12 deletions docs/ug/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions target/snitch_cluster/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 <cluster_config.yaml>`.
Banshee uses also a cluster configuration file, however, that is given directly when simulating a specific binary with banshee with the help of `--configuration <cluster_config.yaml>`.

### Building the software

Expand All @@ -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._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
14 changes: 7 additions & 7 deletions target/snitch_cluster/sw/runtime/rtl/src/snitch_cluster_start.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

0 comments on commit 90191ca

Please sign in to comment.