Skip to content

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

Notifications You must be signed in to change notification settings

icyphy/lf-flexpret

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Feb 25, 2024
6f05de0 · Feb 25, 2024
Oct 12, 2022
Dec 10, 2022
Oct 10, 2023
Apr 18, 2023
Dec 17, 2023
Dec 17, 2023
Dec 17, 2023
Sep 27, 2022
Dec 10, 2022
Apr 16, 2023
Apr 16, 2023
Apr 16, 2023

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