Lingua Franca (LF) is a polyglot coordination language featuring time as a first-class citizen. FlexPRET is a 5-stage RISC-V processor with timing-predictable and repeatable execution. This repository explores how the high-level timing semantics and constraints at the LF level are fulfilled by FlexPRET such that hard real-time deadlines are guaranteed to be satisfied.
(Optional) To skip the setup, you can use a pre-built Ubuntu VM image with most of the dependencies installed. Follow these instructions to adjust the VM image.
-
Install the RISC-V GNU toolchain by following these instructions.
-
Clone this repo with submodules.
git clone https://github.com/icyphy/lf-flexpret.git
git submodule update --init --recursive
- Install Lingua Franca (Java 17 or up required).
cd lingua-franca
./bin/build-lf-cli
- Add
./bin/lfc
toPATH
.
- Build a FlexPRET emulator.
cd flexpret
make ISPM_KBYTES=128 DSPM_KBYTES=128 emulator
cd ..
- Build and run a simple LF program
lfc src/Timer.lf
cd src-gen/Timer/
../../flexpret/emulator/fp-emu +ispm=Timer.mem
You should see the following outputs
$ ../../flexpret/emulator/fp-emu +ispm=Timer.mem
1
2
3
4
5
6
7
8
9
10
- Core.sim.v:3154: Verilog $finish
It is recommended to add flexpret/emulator/fp-emu
to PATH
so that fp-emu
can be directly called anywhere.