Skip to content

Commit

Permalink
spike-dasm: Add to Docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
colluca committed Feb 21, 2024
1 parent a710e01 commit eb7e9e7
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 5 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,10 @@ jobs:
working-directory: target/snitch_cluster
run: |
./run.py sw/run.yaml --simulator verilator -j
- name: Annotate traces
working-directory: target/snitch_cluster
run: |
make LOGS_DIR=./runs/simple/logs annotate -j
# Tests requiring hardware FDIV unit
sw-snitch-cluster-fdiv-vlt:
Expand Down
6 changes: 6 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ before_script:
- TMPDIR=tmp pip install -r python-requirements.txt
- rm -rf tmp
- $BENDER vendor init
# Install spike-dasm
# yamllint disable rule:line-length
- wget https://github.com/pulp-platform/riscv-isa-sim/releases/download/snitch-v0.1.0/snitch-spike-dasm-0.1.0-x86_64-linux-gnu-almalinux8.7.tar.gz
# yamllint enable rule:line-length
- tar xzf snitch-spike-dasm-0.1.0-x86_64-linux-gnu-almalinux8.7.tar.gz

##############
# Build docs #
Expand Down Expand Up @@ -118,6 +123,7 @@ snitch-cluster-vsim:
- cd target/snitch_cluster
- make bin/snitch_cluster.vsim
- ./run.py sw/run.yaml --simulator vsim -j --run-dir runs/vsim
- make LOGS_DIR=./runs/vsim/simple/logs annotate -j

# Banshee
snitch-cluster-banshee:
Expand Down
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
[submodule "sw/deps/riscv-isa-sim"]
path = sw/deps/riscv-isa-sim
url = https://github.com/pulp-platform/riscv-isa-sim.git
branch = GiannaP-snitch
branch = snitch
6 changes: 2 additions & 4 deletions docs/ug/getting_started.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ git clone https://github.com/pulp-platform/{{ repo }}.git --recurse-submodules

If you had already cloned the repository without the `--recurse-submodules` flag, clone its submodules:
```shell
git submodule init --recursive
git submodule update --init --recursive
```

## Tools and environment
Expand Down Expand Up @@ -57,16 +57,14 @@ export LLVM_BINROOT="/usr/pack/riscv-1.0-kgf/pulp-llvm-0.12.0/bin"
# As a temporary workaround (until correct tool versions are installed system-wide):
export PATH=/usr/scratch/dachstein/colluca/opt/verible/bin:$PATH

# Install spike for spike-dasm (submodule of the repository)
# Install spike-dasm
cd sw/deps/riscv-isa-sim
autoconf
mkdir build
cd build
../configure
make
export PATH=$(pwd):$PATH
# or use temporary:
# export PATH=/home/colluca/snitch/bin:$PATH
```

Add these commands to your shell startup file (e.g. `~/.bashrc` if you use bash as the default shell) to ensure that the environment is set up correctly every time you open a new shell.
Expand Down
5 changes: 5 additions & 0 deletions util/container/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ FROM ubuntu:18.04 AS builder
ARG CMAKE_VERSION=3.19.4
ARG PYTHON_VERSION=3.9.12
ARG BENDER_VERSION=0.27.1
ARG SPIKE_DASM_VERSION=0.1.0
# Run dpkg without interactive dialogue
ARG DEBIAN_FRONTEND=noninteractive

Expand Down Expand Up @@ -76,6 +77,9 @@ RUN cargo install --path /tmp/banshee
RUN wget https://github.com/pulp-platform/bender/releases/download/v${BENDER_VERSION}/bender-${BENDER_VERSION}-x86_64-linux-gnu-ubuntu18.04.tar.gz
RUN tar xzf bender-${BENDER_VERSION}-x86_64-linux-gnu-ubuntu18.04.tar.gz

# Install spike-dasm
RUN wget https://github.com/pulp-platform/riscv-isa-sim/releases/download/snitch-v${SPIKE_DASM_VERSION}/snitch-spike-dasm-${SPIKE_DASM_VERSION}-x86_64-linux-gnu-ubuntu18.04.tar.gz
RUN tar xzf snitch-spike-dasm-${SPIKE_DASM_VERSION}-x86_64-linux-gnu-ubuntu18.04.tar.gz

# 2. Stage
FROM ubuntu:18.04 AS snitch_cluster
Expand Down Expand Up @@ -141,6 +145,7 @@ RUN apt-get update && apt-get install software-properties-common -y && \

# Copy artifacts from stage 1.
COPY --from=builder /tools/bender bin/
COPY --from=builder /tools/spike-dasm bin/
COPY --from=builder /root/.cargo/bin/banshee bin/
COPY --from=builder /opt/python /opt/python

Expand Down

0 comments on commit eb7e9e7

Please sign in to comment.