Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
921da5d
env: Replace pip with uv
fischeti Feb 24, 2026
8a5c949
deps: Bump cheshire
fischeti Feb 24, 2026
33496b9
ci: Fixes and improvements for uv
fischeti Feb 24, 2026
30ef095
iis-env.sh: Update tool versions
fischeti Feb 24, 2026
95f845f
Makefile: Fixes and improvements
fischeti Feb 24, 2026
a91bc84
docs: Update README.md
fischeti Feb 24, 2026
c1fd7ff
pyproject.toml: Use `pytorch-cpu`
fischeti Feb 24, 2026
5f86921
ci: Checkout bender before creating venv
fischeti Feb 24, 2026
aa1d90a
deps: Bump floo_noc
fischeti Mar 27, 2026
19c95b8
license: Update annotation for lock files
fischeti Mar 27, 2026
f8d642f
uv: Update lockfile
fischeti Mar 27, 2026
829d4f4
uv: Use published floogen
fischeti Mar 27, 2026
8bed4c8
deps: Bump cheshire
fischeti Mar 27, 2026
51c7585
uv: Add cheshire as workspace dependency
fischeti Mar 27, 2026
71e4081
deps: Bump cheshire
fischeti Mar 27, 2026
444691f
sw: Fix define from rawheader output
fischeti Mar 27, 2026
d6440cd
make: Remove duplicate recipe
fischeti Mar 27, 2026
abc2102
tb: Fix raw address names
fischeti Mar 27, 2026
aa51445
py: Package `experiments` properly
fischeti Mar 27, 2026
ed271c1
ci: Bump PD commit
fischeti Mar 27, 2026
8343890
ci: Try again to interrupt
fischeti Mar 27, 2026
9d8c5f9
Bender.yml: Add default remote
fischeti Mar 27, 2026
1ea8468
ci: Bump PD commit
fischeti Mar 27, 2026
a3bc08c
pyproject.toml: Remove whitespaces
fischeti Mar 27, 2026
8f30790
deps: Bump chesire
fischeti Mar 28, 2026
1ca9a1f
deps: Bump common_verification
fischeti Mar 30, 2026
ecd1fd2
env: Revert back QuestaSim version
fischeti Mar 30, 2026
8ea26cb
pyproject.toml: Add instructions on how to modify floogen
fischeti Mar 30, 2026
39b72f1
deps: Bump peakrdl rawheader
fischeti Mar 30, 2026
9ea47fe
rdl: Shorten the rawheader svh addresses
fischeti Mar 30, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ stages:
# Sources the environment variables for the IIS environment
.init-env:
before_script:
# Hard link cached python packages since the UV cache directory
# is configured to be on the same filesystem as the build directory in the CI.
- export UV_CACHE_DIR=$CI_BUILDS_DIR/../cache/uv
- export UV_LINK_MODE=hardlink
- source iis-env.sh

##################
Expand All @@ -26,6 +30,7 @@ stages:
init-deps:
stage: init
extends:
- .init-env
- .init-deps-tpl
artifacts:
paths:
Expand Down Expand Up @@ -65,8 +70,8 @@ vsim-compile:
- .init-env
needs:
- generate-rtl
variables:
FLOO_GEN_ARGS: --no-format
extends:
- .init-env
script:
- make vsim-compile | tee compile.log 2>&1
- '! grep "\*\* Error" compile.log'
Expand Down Expand Up @@ -136,6 +141,7 @@ sim-exps:

subpipe:
stage: build
interruptible: true
needs:
- init-deps
trigger:
Expand Down
20 changes: 3 additions & 17 deletions .gitlab/common.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
PD_COMMIT: "65800b0f2d1c7d331feaffbd83bfe2d8086453e0"
PD_COMMIT: "4828594842a7955a8d3a3077ac6454443565da27"
SPU_COMMIT: "c2e8815487bd713624d74ef3e3e0465196b6d67f"

# Check the cache for bender and python dependencies
Expand All @@ -13,31 +13,17 @@ variables:
key:
files:
- Bender.lock
- requirements.txt
paths:
- .bender
- .cache/pip
policy: pull

# Update the cache with bender and python dependencies
.init-deps-tpl:
script:
# Check out the biggest bender dependencies serially
# to avoid rate limiting issues
# TODO(fischeti): Remove once bender supports rate limiting
- bender path cheshire
- bender path cva6
- bender path ibex
- bender path floo_noc
- bender path idma
- bender path cluster_interconnect
- bender path snitch_cluster
# Collect bender sourcess
- bender checkout
# Install the python venv
- source iis-env.sh
# Initialize the PD repository
- make init-pd
# Collect bender sources
- bender checkout
cache:
# inherit all global cache settings
<<: *global_cache
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.11
8 changes: 4 additions & 4 deletions Bender.lock
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ packages:
- common_cells
- register_interface
cheshire:
revision: 4a3932e1bfb8ab72b2d934d65667caefbe2884fc
revision: da7babeeb96aa4778a37d0131b28b3b004222ab1
version: null
source:
Git: https://github.com/pulp-platform/cheshire.git
Expand Down Expand Up @@ -154,7 +154,7 @@ packages:
- common_verification
- tech_cells_generic
common_verification:
revision: 5fd30c18a6be6f664d1ef9e44d04956fb4e3364e
revision: fb1885f48ea46164a10568aeff51884389f67ae3
version: 0.2.5
source:
Git: https://github.com/pulp-platform/common_verification.git
Expand Down Expand Up @@ -207,8 +207,8 @@ packages:
Path: .deps/fhg_spu_cluster
dependencies: []
floo_noc:
revision: 4c98673d3761dd8909a742012b799039331826a4
version: null
revision: 959fb172670a7910fcee94c2d82e460c07c0a24c
version: 0.8.0
source:
Git: https://github.com/pulp-platform/FlooNoC.git
dependencies:
Expand Down
18 changes: 11 additions & 7 deletions Bender.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,21 @@ package:
authors:
- "Tim Fischer <fischeti@iis.ee.ethz.ch>"

remotes:
pulp: "https://github.com/pulp-platform"

dependencies:
register_interface: { git: "https://github.com/pulp-platform/register_interface.git", version: "0.4.5" }
axi: { git: "https://github.com/colluca/axi.git", rev: "multicast" }
common_cells: { git: "https://github.com/pulp-platform/common_cells.git", rev: "snitch" }
cheshire: { git: "https://github.com/pulp-platform/cheshire.git", rev: "main" }
snitch_cluster: { git: "https://github.com/pulp-platform/snitch_cluster.git", rev: "main" }
floo_noc: { git: "https://github.com/pulp-platform/FlooNoC.git", rev: "reduction-vc-rebase" }
register_interface: "0.4.5"
axi: "0.39.9"
floo_noc: { version: "0.8.0", upstream_name: "FlooNoC" }
apb: "0.2.4"
common_cells: "1.39.0"
snitch_cluster: { git: "https://github.com/pulp-platform/snitch_cluster.git", rev: "main" }
cheshire: { git: "https://github.com/pulp-platform/cheshire.git", rev: "main" }
obi: { git: "https://github.com/pulp-platform/obi.git", rev: "acfcd0f80c7539aa8da7821a66d9acf2074a5b4e" }
redmule: { git: "https://github.com/pulp-platform/redmule.git", rev: "picobello" }
hci: { git: "https://github.com/pulp-platform/hci.git", rev: "06fcba671e060f2e1b03b7ebe2d3e719f1557099" }
datamover: { git: "https://github.com/pulp-platform/datamover.git", rev: "5df9c9bd9e10ad020763c4291c571adf35ef4ae2" } # branch: transpose
apb: { git: "https://github.com/pulp-platform/apb.git", version: "0.2.4" }
apb_fll_if: { git: "https://github.com/pulp-platform/apb_fll_if.git", rev: "structs" }
axi_obi: { path: "hw/axi_obi" }
picobello-pd: { path: "./pd" }
Expand All @@ -27,6 +30,7 @@ dependencies:
workspace:
package_links:
.deps/snitch_cluster: snitch_cluster
.deps/cheshire: cheshire

sources:
# Source files grouped in levels. Files in level 0 have no dependencies on files in this
Expand Down
29 changes: 7 additions & 22 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@ L2_TILES = $(shell $(FLOO_GEN) query -c $(FLOO_CFG) endpoints.l2_spm.num 2>/dev/
BENDER_YML = $(PB_ROOT)/Bender.yml
BENDER_LOCK = $(PB_ROOT)/Bender.lock

$(PB_GEN_DIR):
mkdir -p $@

################
# Bender flags #
################

COMMON_TARGS += -t rtl -t cva6 -t cv64a6_imafdchsclic_sv39_wb -t snitch_cluster -t pb_gen_rtl
SIM_TARGS += -t simulation -t test -t idma_test

# Get rid of non-existing PD path dependency warnings
BENDER += --suppress W22

#############
# systemRDL #
#############
Expand Down Expand Up @@ -72,7 +72,7 @@ $(PB_GEN_DIR)/pb_addrmap.h: $(PB_GEN_DIR)/picobello_addrmap.rdl $(PB_RDL_ALL)
$(PEAKRDL) c-header $< $(PEAKRDL_INCLUDES) $(PEAKRDL_DEFINES) -o $@ -i -b ltoh

$(PB_GEN_DIR)/pb_addrmap.svh: $(PB_RDL_ALL)
$(PEAKRDL) raw-header $< -o $@ $(PEAKRDL_INCLUDES) $(PEAKRDL_DEFINES) --format svh
$(PEAKRDL) raw-header $< -o $@ $(PEAKRDL_INCLUDES) $(PEAKRDL_DEFINES) --format svh --no-prefix

PB_RDL_HW_ALL += $(PB_GEN_DIR)/pb_soc_regs.sv
PB_RDL_HW_ALL += $(PB_GEN_DIR)/pb_soc_regs_pkg.sv
Expand Down Expand Up @@ -111,7 +111,7 @@ include $(SN_ROOT)/make/common.mk
include $(SN_ROOT)/make/rtl.mk

$(SN_CFG): $(FLOO_CFG)
@sed -i 's/nr_clusters: .*/nr_clusters: $(SN_CLUSTERS),/' $<
@sed -i 's/nr_clusters: .*/nr_clusters: $(SN_CLUSTERS),/' $@

.PHONY: sn-hw-clean sn-hw-all

Expand All @@ -132,7 +132,7 @@ ifeq ($(shell $(VERIBLE_FMT) --version >/dev/null 2>&1 && echo OK),OK)
endif

floo-hw-all: $(PB_GEN_DIR)/floo_picobello_noc_pkg.sv
$(PB_GEN_DIR)/floo_picobello_noc_pkg.sv: $(FLOO_CFG) | $(PB_GEN_DIR)
$(PB_GEN_DIR)/floo_picobello_noc_pkg.sv: $(FLOO_CFG)
$(FLOO_GEN) pkg -c $(FLOO_CFG) -o $(PB_GEN_DIR) $(FLOO_GEN_FLAGS)


Expand Down Expand Up @@ -213,27 +213,12 @@ $(call sn_include_deps)
# Misc #
########

BASE_PYTHON ?= python
PIP_CACHE_DIR ?= $(PB_ROOT)/.cache/pip

.PHONY: dvt-flist python-venv python-venv-clean verible-fmt
.PHONY: dvt-flist verible-fmt

dvt-flist:
$(BENDER) script flist-plus $(COMMON_TARGS) $(SIM_TARGS) > .dvt/default.build

python-venv: .venv
.venv:
$(BASE_PYTHON) -m venv $@
. $@/bin/activate && \
python -m pip install --upgrade pip "setuptools<81" && \
python -m pip install --no-build-isolation --cache-dir $(PIP_CACHE_DIR) -r requirements.txt && \
python -m pip install --cache-dir $(PIP_CACHE_DIR) $(shell $(BENDER) path floo_noc) --no-deps && \
python -m pip install --cache-dir $(PIP_CACHE_DIR) -e "$(shell $(BENDER) path snitch_cluster)[kernels]"

python-venv-clean:
rm -rf .venv
rm -rf $(PIP_CACHE_DIR)

verible-fmt:
$(VERIBLE_FMT) $(VERIBLE_FMT_ARGS) $(shell $(BENDER) script flist $(SIM_TARGS) --no-deps)

Expand Down
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

*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.

## 🚧 Getting started (currently in early development)
## Getting started

### Environment setup for IIS-members

Expand All @@ -24,17 +24,15 @@ For non-IIS members, there is some additional setup required to get the environm

The first requirement you need to install is `bender`. Check the [installation page](https://github.com/pulp-platform/bender/tree/master?tab=readme-ov-file#installation) on how to set it up.

#### Virtual Python environment
#### Python environment

You need to have a python>=3.11 installed, in order to create the virtual python environment:
To generate certain source files with python you need to have [uv](https://docs.astral.sh/uv/) installed, which will create the virtual environment and install the required dependencies. To set up the environment, run:

```bash
make python-venv
uv sync --locked
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.

#### Toolchains

Picobello requires two different toolchains at the moment:
Expand Down
13 changes: 11 additions & 2 deletions REUSE.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,23 @@

version = 1

# Project documentation and tool configuration files that cannot carry SPDX headers
# READMEs and other documentation files that are ugly to carry SPDX headers
[[annotations]]
path = [
"README.md",
"MLSYS.md",
"Bender.lock",
"experiments/multicast/README.md",
"hw/axi_obi/Readme.md",
]
SPDX-FileCopyrightText = "2025 ETH Zurich and University of Bologna"
SPDX-License-Identifier = "SHL-0.51"

# Project tool version configuration files that cannot carry SPDX headers
[[annotations]]
path = [
"Bender.lock",
".python-version",
"uv.lock",
]
SPDX-FileCopyrightText = "2025 ETH Zurich and University of Bologna"
SPDX-License-Identifier = "SHL-0.51"
Empty file added experiments/__init__.py
Empty file.
5 changes: 5 additions & 0 deletions experiments/picobello/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2025 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

from .picobello import *
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
import snitch.util.experiments.experiment_utils as eu
from snitch.util.experiments import common

root = Path(__file__).resolve().parents[1]
root = Path(__file__).resolve().parents[2]
default_work_dir = root / 'target/sim/vsim'
hw_cfg = root / 'cfg/snitch_cluster.json'

Expand Down
14 changes: 3 additions & 11 deletions iis-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,11 @@
export VSIM="questa-2023.4 vsim"
export VOPT="questa-2023.4 vopt"
export VLIB="questa-2023.4 vlib"
export BASE_PYTHON=/usr/local/anaconda3/bin/python3.11
export CHS_SW_GCC_BINROOT=/usr/pack/riscv-1.0-kgf/riscv64-gcc-12.2.0/bin
export VERIBLE_FMT="oseda -2025.03 verible-verilog-format"
export SN_LLVM_BINROOT=/usr/scratch2/vulcano/colluca/tools/riscv32-snitch-llvm-almalinux8-15.0.0-snitch-0.5.0/bin

# Create the python venv
if [ ! -d ".venv" ]; then
make python-venv
fi
bender checkout

# Activate the python venv only if not already active
if [ -z "$VIRTUAL_ENV" ] || [ "$VIRTUAL_ENV" != "$(realpath .venv)" ]; then
source .venv/bin/activate
fi

export PYTHONPATH=$PWD/experiments/:$PYTHONPATH
/usr/local/uv/uv sync --locked
source .venv/bin/activate
52 changes: 52 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Copyright 2025 ETH Zurich and University of Bologna.
# Licensed under the Apache License, Version 2.0, see LICENSE for details.
# SPDX-License-Identifier: Apache-2.0

[project]
name = "picobello"
version = "0.1.0"
description = "whatever it means"
readme = "README.md"
requires-python = ">=3.11"

dependencies = [
"floogen>=0.8.0",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It might be beneficial to add Floogen as a workspace to enable development on Floogen while testing on Picobello.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried, the problem is that uv_build does not like symlinks at all. However, the following works and is also recommended for local development:

bender clone floo_noc

Then in pyproject.toml

[tool.uv.workspace]
members = [
    "working_dir/floo_noc",
]

[tool.uv.sources]
floogen = { workspace = true, editable = true }

I also added a comment in pyproject.toml

"peakrdl>=1.5.0",
"peakrdl-rawheader>=0.2.4",
"snitch[kernels]",
"cheshire"
]

[dependency-groups]
dev = [
"reuse>=6.2.0",
]

[tool.uv.workspace]
members = [
# To locally edit floogen, run `bender clone floo_noc` and add:
# "working_dir/floo_noc",
# Note: .deps/floo_noc cannot be used here because uv_build does not
# support symlinks as workspace members (https://github.com/astral-sh/uv/issues/15243).
".deps/snitch_cluster",
".deps/cheshire",
]

[tool.uv.sources]
# To locally edit floogen, also uncomment:
# floogen = { workspace = true, editable = true }
snitch = { workspace = true, editable = true }
cheshire = { workspace = true }
torch = [{ index = "pytorch-cpu" }]

[[tool.uv.index]]
name = "pytorch-cpu"
url = "https://download.pytorch.org/whl/cpu"
explicit = true

[build-system]
requires = ["uv_build>=0.6,<1"]
build-backend = "uv_build"

[tool.uv.build-backend]
module-root = "experiments"
Loading
Loading