Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ jobs:
INSTALL_EVAL_HD=true
INSTALL_PROTEUS=true
INSTALL_TOOLCHAIN=true
INSTALL_RISCV_FORMAL=true
outputs: type=docker,dest=/tmp/ecosystem-docker.tar

- name: Upload Docker artifact
Expand Down
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ ARG DEBIAN_FRONTEND=noninteractive
ARG INSTALL_TOOLCHAIN=false
ARG INSTALL_EVAL_HD=false
ARG INSTALL_PROTEUS=false
ARG INSTALL_RISCV_FORMAL=true
ARG INSTALL_RISCV_FORMAL=false
RUN echo "Install RISC-V toolchain: ${INSTALL_TOOLCHAIN}"
RUN echo "Install EVAL-HD: ${INSTALL_EVAL_HD}"
RUN echo "Setup Proteus core: ${INSTALL_PROTEUS}"
Expand All @@ -16,7 +16,7 @@ RUN echo "Install riscv-formal: ${INSTALL_RISCV_FORMAL}"
# Basic dependencies
################################################################################

RUN apt-get update && apt-get -yqq install build-essential git openjdk-17-jdk verilator libz-dev gcc-riscv64-unknown-elf python3-pip python3-venv gtkwave scons
RUN apt-get update && apt-get -yqq install build-essential git openjdk-17-jdk verilator libz-dev python3-pip python3-venv gtkwave scons

WORKDIR /ecosystem
COPY ./benchmarks ./benchmarks
Expand All @@ -34,7 +34,7 @@ RUN ./install-scripts/sbt.sh
RUN ./install-scripts/python-modules.sh

WORKDIR /ecosystem
RUN if [ "${INSTALL_TOOLCHAIN}" = "true" ] ; then ./install-scripts/toolchain.sh ; else echo Skipping RISC-V toolchain... ; fi
RUN if [ "${INSTALL_TOOLCHAIN}" = "true" ] ; then ./install-scripts/toolchain.sh ; else echo Skipping RISC-V toolchain, installing apt package...; apt-get -yqq install gcc-riscv64-unknown-elf ; fi
RUN if [ "${INSTALL_EVAL_HD}" = "true" ] ; then ./install-scripts/eval-hd.sh ; else echo Skipping EVAL-HD setup... ; fi
RUN if [ "${INSTALL_PROTEUS}" = "true" ] ; then ./install-scripts/proteus.sh ; else echo Skipping Proteus core setup... ; fi
RUN if [ "${INSTALL_RISCV_FORMAL}" = "true" ] ; then ./install-scripts/riscv-formal.sh ; else echo Skipping riscv-formal setup... ; fi
Expand Down
23 changes: 11 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,28 @@ A prebuilt Docker image can be pulled [from GitHub](https://github.com/proteus-c
docker pull ghcr.io/proteus-core/ecosystem:latest
```

### Local container setup

Alternatively, you can build this image locally with the included [Dockerfile](./Dockerfile). This installs the bare minimum setup for running simulations, with additional flags for installing other components.
The container can be built with the following command:
You can launch this image using the following command:

```shell-session
$ docker compose up
docker compose run --remove-orphans ecosystem-prebuilt
```

Additional build arguments can be added in `docker-compose.yml`, for example `INSTALL_TOOLCHAIN` to install the RISC-V GNU toolchain, `INSTALL_EVAL_HD` to install the hardware cost evaluation tool and `INSTALL_PROTEUS` to clone and install the Proteus core inside the container (instead of mounting it as a volume).
Note that installing these extra tools will add a substantial amount of time to the build process.

### Working with the container
### Building the container image

You can launch a container after building:
Alternatively, you can build this image locally with the included [Dockerfile](./Dockerfile).
This installs the bare minimum setup for running simulations, with additional flags for installing other components.
The container can be run (and built on the first run) with the following command:

```shell-session
$ docker compose run --remove-orphans ecosystem
docker compose run --remove-orphans ecosystem
```

Additional build arguments can be added in `docker-compose.yml`, for example `INSTALL_TOOLCHAIN` to install the RISC-V GNU toolchain, `INSTALL_EVAL_HD` to install the hardware cost evaluation tool and `INSTALL_PROTEUS` to clone and install the Proteus core inside the container (instead of mounting it as a volume).
Note that installing these extra tools will add a substantial amount of time to the build process.

### Non-container setup

If you want to install the components natively without using Docker, you can follow the steps in the [Dockerfile](./Dockerfile) and the [installation scripts](./install-scripts/)
If you want to install the components natively without using Docker, you can follow the steps in the [Dockerfile](./Dockerfile) and the [installation scripts](./install-scripts/).

## Developing with Proteus

Expand Down
17 changes: 15 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ services:
ecosystem:
build:
context: .
args:
INSTALL_EVAL_HD: "true"
args: # add more flags here to install EVAL-HD, riscv-formal, ...
INSTALL_TOOLCHAIN: "true"
container_name: ecosystem
restart: "no"
Expand All @@ -18,3 +17,17 @@ services:
- ./install-scripts:/ecosystem/install-scripts
- ./formal-verification:/ecosystem/formal-verification
command: "/bin/bash"
ecosystem-prebuilt:
image: ghcr.io/proteus-core/ecosystem
restart: "no"
stdin_open: true
tty: true
working_dir: /ecosystem
volumes:
- ./core:/ecosystem/core
- ./synthesis:/ecosystem/synthesis
- ./noninterference-testing:/ecosystem/noninterference-testing
- ./waveform-analysis:/ecosystem/waveform-analysis
- ./install-scripts:/ecosystem/install-scripts
- ./formal-verification:/ecosystem/formal-verification
command: "/bin/bash"
1 change: 1 addition & 0 deletions install-scripts/toolchain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ git clone --depth 1 --shallow-submodules https://github.com/riscv/riscv-gnu-tool
apt-get -yqq install autoconf automake autotools-dev curl python3 libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build
./configure --prefix=/opt/riscv --with-cmodel=medany --with-multilib-generator="rv32im_zicsr_zicond-ilp32--;rv64im_zicsr_zicond-lp64--" --enable-debug-info && make -j$(nproc) && make clean
echo 'PATH="/opt/riscv/bin:$PATH"' >> /root/.bashrc
rm -rf /toolchain
Loading