Skip to content

Data determinism (LF) meets time determinism (FlexPRET).

Notifications You must be signed in to change notification settings

icyphy/lf-flexpret

Repository files navigation

Lingua Franca on FlexPRET

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.

Setup

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

  1. Install the RISC-V GNU toolchain by following these instructions.

  2. Clone this repo with submodules.

git clone https://github.com/icyphy/lf-flexpret.git
git submodule update --init --recursive
  1. Install Lingua Franca (Java 17 or up required).
cd lingua-franca
./bin/build-lf-cli
  1. Add ./bin/lfc to PATH.

Quick start

  1. Build a FlexPRET emulator.
cd flexpret
make ISPM_KBYTES=128 DSPM_KBYTES=128 emulator
cd ..
  1. 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.

About

Data determinism (LF) meets time determinism (FlexPRET).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published