picobello is an open-source research platform focusing on AI and Machine Learning acceleration.
picobello is developed as part of the PULP (Parallel Ultra-Low Power) project, a joint effort between ETH Zurich and the University of Bologna. picobello is also supported by the EUPilot project, under the name MLS.
For IIS-members, the environment can be set up by sourcing the iis-env.sh
script:
source iis-env.sh
This will set up all environment variables, and install the virtual python environment, which is needed to generate the RTL and SW sources.
For non-IIS members, there is some additional setup required to get the environment up and running.
The first requirement you need to install is bender
. Check the installation page on how to set it up.
You need to have a python>=3.11 installed, in order to create the virtual python environment:
make python-venv
source .venv/bin/activate
By default, it will use the python
in your $PATH
. If you want to use a specific python version, you can set the BASE_PYTHON
environment variable accordingly.
Picobello requires two different toolchains at the moment:
- Snitch software tests require the Clang compiler extended with Snitch-specific instructions. There are some precompiled releases available on the PULP Platform LLVM Project fork that are ready to be downloaded and unzipped.
- Cheshire requires a 64-bit GCC toolchain that can be installed from the riscv-gnu-toolchain git following the Installation (Newlib) instructions.
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
:
export LLVM_BINROOT=/path/to/llvm/bin
export PATH=$PATH:/path/to/gcc/bin
For automatic formatting of generated sources, install verible
. By default, the Makefile will look for a verible-verilog-format
in your path, but you can also set it explicitly with the VERIBLE_FMT
environment variable. This dependency is optional for normal users, but it is required to contribute to the project, since the CI will use verible to check the formatting of the code. Once installed, you can format the SV code in this repository with:
make verible-fmt
After setting up the environment, you can generate all the RTL code for Cheshire, FlooNoC, and Snitch by running:
make all
or more selectively:
make floo-hw-all
make chs-hw-all
make sn-hw-all
To compile the software for Cheshire and the snitch cluster, you can run the following commands:
make sw
or more selectively:
make chs-sw-tests
make snrt-tests
The Picobello simulation flow currently only supports Questasim. The make vsim-compile
command will build the RTL code.
Tests can be executed by setting all the required command-line variable for Cheshire, see the Cheshire Docs for more details.
To run a simple Chehire helloworld in Picobello, do the following:
make vsim-run CHS_BINARY=sw/cheshire/tests/helloworld.spm.elf
To run an offloading example test for Snitch, do:
make vsim-run CHS_BINARY=sw/cheshire/tests/simple_offload.spm.elf SN_BINARY=sw/snitch/tests/build/simple.elf
Use the vsim-run-batch
command to run tests in batch mode with RTL optimizations to reduce the Questasim runtime.
Additionally, you can run the following command to get a list of all available commands:
make help
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
), and all software sources are licensed under the Apache License 2.0.