Skip to content

Commit be6e29d

Browse files
authored
Improve Readme for installation flow (#15)
* Check for verible-verilog-format system installation. * Extend the `Getting started` section in README.
1 parent 589ef14 commit be6e29d

File tree

2 files changed

+36
-4
lines changed

2 files changed

+36
-4
lines changed

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,16 @@ FLOO_ROOT = $(shell $(BENDER) path floo_noc)
6767
FLOO_GEN ?= floogen
6868
FLOO_CFG = $(PB_ROOT)/cfg/picobello_noc.yml
6969

70+
# Check if the "verible-verilog-format" is installed in the system
71+
# otherwise use the "--no-format" flag to generate FlooNoC.
72+
NO_FORMAT_FLAG ?=
73+
ifeq ($(shell command -v verible-verilog-format 2>/dev/null),)
74+
NO_FORMAT_FLAG += --no-format
75+
endif
76+
7077
floo-hw-all: $(PB_GEN_DIR)/floo_picobello_noc_pkg.sv
7178
$(PB_GEN_DIR)/floo_picobello_noc_pkg.sv: $(FLOO_CFG) | $(PB_GEN_DIR)
72-
$(FLOO_GEN) -c $(FLOO_CFG) -o $(PB_GEN_DIR) --only-pkg
79+
$(FLOO_GEN) -c $(FLOO_CFG) -o $(PB_GEN_DIR) --only-pkg $(NO_FORMAT_FLAG)
7380

7481
floo-clean:
7582
rm -rf $(PB_GEN_DIR)/floo_picobello_noc_pkg.sv

README.md

+28-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,34 @@
44

55
*picobello* is developed as part of the [PULP (Parallel Ultra-Low Power) project](https://pulp-platform.org/), a joint effort between ETH Zurich and the University of Bologna. *picobello* is also supported by the [EUPilot project](https://eupilot.eu), under the name MLS.
66

7-
## 🚧 Getting started
7+
## 🚧 Getting started (currently in early development)
8+
The first requirement you need to install is [Bender](https://github.com/pulp-platform/bender). Check if there is any pre-compiled release for your Operating System, otherwise follow the intructions to build your own binary using Rust.
89

9-
This repository is currently in early development and is not yet ready for general use. Please check back later for updates.
10+
At this point, the `make help` command prompts all the available make options on your terminal. To continue further, other python requirements that might need to be installed are `hjson`, `jsonref`, `jsonschema` (jsonschema version >4.0.0).
11+
12+
### RTL code generation
13+
Generate the RTL code for Cheshire, FlooNoC, and Snitch by running `make all`.
14+
15+
### Compile software tests
16+
Compiling the software tests requires two different toolchains to be exported.
17+
* Snitch software tests require the Clang compiler extended with Snitch-specific instructions. There are some precompiled releases available on the [PULP Platform LLVM Project](https://github.com/pulp-platform/llvm-project/releases/download/0.12.0/riscv32-pulp-llvm-ubuntu2004-0.12.0.tar.gz) fork that are ready to be downloaded and unzipped.
18+
* Cheshire requires a 64-bit GCC toolchain that can be installed from the [riscv-gnu-toolchain](https://github.com/riscv-collab/riscv-gnu-toolchain) git following the *Installation (Newlib)* intructions.
19+
20+
Once LLVM and GCC are obtained, export a `LLVM_BINROOT` environment variable to the binary folder of the LLVM toolchain installation. Then, add the GCC binary folder to your `$PATH`.
21+
Only at this point, run `make sw` to build the tests for both Cheshire and Snitch.
22+
23+
### Platform simulation
24+
The Picobello simulation flow currently only supports Questasim. The `make vsim-compile` command will build the RTL code.
25+
Tests can be executed by setting all the required command-line variable for Cheshire, see the [Cheshire Docs](https://pulp-platform.github.io/cheshire/gs/) for more details.
26+
To run a simple Chehire helloworld in Picobello, do the following:
27+
```
28+
make vsim-run CHS_BINARY=sw/cheshire/tests/helloworld.spm.elf
29+
```
30+
To run an offloading example test for Snitch, do:
31+
```
32+
make vsim-run CHS_BINARY=sw/cheshire/tests/simple_offload.spm.elf SN_BINARY=sw/snitch/tests/build/simple.elf
33+
```
34+
Use the `vsim-run-batch` command to run tests in batch mode with RTL optimizations to reduce the Questasim runtime.
1035

1136
## 🔐 License
12-
Unless specified otherwise in the respective file headers, all code checked into this repository is made available under a permissive license. All hardware sources are licensed under the Solderpad Hardware License 0.51 (see [`LICENSE`](LICENSE)), and all software sources are licensed under the Apache License 2.0.
37+
Unless specified otherwise in the respective file headers, all code checked into this repository is made available under a permissive license. All hardware sources are licensed under the Solderpad Hardware License 0.51 (see [`LICENSE`](LICENSE)), and all software sources are licensed under the Apache License 2.0.

0 commit comments

Comments
 (0)