Skip to content

icyphy/pretvm-artifacts

Repository files navigation

Artifacts for the PRET Virtual Machine paper

TODOs

  • Bring EGS as a submodule here and document how to set it up using a virtual environment etc,
  • Create a FlexPRET config for the RTAS submission so others easily can build it

Getting started

Requirements

  • Linux environment, tested on Ubuntu 24.04
  • Java 17, download here

Setup

  1. Install dependencies
sudo apt install cmake verilator sbt 
  1. Clone repo with submodule
git clone https://github.com/icyphy/pretvm-artifacts --recursive
  1. Build the lingua franca compiler
cd lingua-franca
./gradlew assemble
  1. Build the FlexPRET emulator

First download and install riscv-none-elf-gcc-14.2.0-2

  wget -q --show-progress https://github.com/xpack-dev-tools/riscv-none-elf-gcc-xpack/releases/download/v14.2.0-2/xpack-riscv-none-elf-gcc-14.2.0-2-linux-x64.tar.gz -O gcc.tar.gz
  tar xvf gcc.tar.gz --directory=/opt

Then source env.bash in the root of this artifact repo, it will add some environmental variables needed for the rest of the install and also when running programs

source env.bash

Then build the FlexPRET emulator and the FlexPRET SDK

cd flexpret
cmake -B build && cd build
make all install

cd sdk
cmake -B build && cd build
make
  1. HelloWorld to verify installation TODO: Add this step.

WCET

You can either build the docker image yourself or pull it from dockerhub.

Building it Yourself

    $ sudo docker build ./docker -t einspaten/rtas25:v2

Pulling it from Dockerhub

    $ sudo docker pull einspaten/rtas25:v2

Using the Docker Image

    $ sudo docker run -ti -v ${PWD}/docker/:/root/rtas25/ -v ${PWD}/satellite-controller:/root/rtas25/satellite-controller -v ${PWD}/pretvm-instructions:/root/rtas25/pretvm-instructions einspaten/rtas25:v2
    $ ./analyse-all.sh

TODO: we should also add the source links here and how to run the script to compile and do WCET analysis