Working with Calyx involves a lot of command-line tools. For example, an incomplete yet daunting list of CLI tools used by Calyx is:
- All the Calyx frontends.
- Calyx compiler and its various command line tools
- Verilator, the Verilog simulation framework used to test Calyx-generated designs.
- Waveform viewers to see the results of simulation
fud aims to provide a simple interface for using these toolchains and
executing them in a pipeline. The source for fud is
You need Flit to install
fud. Install it with
pip3 install flit.
You can then install
(If using this method to install
pip3 should be version >= 20)
If you are working on
fud itself, you can install it with a symlink with:
flit install --symlink
You can also install
flit build pip3 install dist/fud-0.1.0-py3-none-any.whl
fud to the root of the repository:
fud config global.futil_directory <full path to Calyx repository>
Fud uses a global configuration file to locate tool paths and default values.
To view the configuration, use
fud c or
Check. Fud can automatically check if your configuration is valid and can help you set certain variables. Perform this check with:
To view the current value of a key, use
fud config key. For example, the
following shows the path to the Calyx compiler.
fud config stages.futil.exec
Keys can be updated using
fud config key value.
For example, the following command updates the path to the Calyx compiler.
fud config stages.futil.exec ./target/debug/futil
fud wraps both frontends and backends for Calyx.
For a minimally useful
fud installation, you need to configure the Verilator
backend and accompanying tools.
fud will use the
verilator executable to run Verilator.
To use a different binary, configure the path by:
fud config stages.verilog.exec <binary>
Vcdump is a tool for converting
vcd (Value Change Dump) files to JSON for
easier analysis with the command line.
Install it with:
cargo install vcdump
In order to use the Dahlia frontend with Fud, first install
Once Dahlia is compiled, point
fud to the Dahlia compiler binary:
fud config stages.dahlia.exec <full path to dahlia repo>/fuse
You need flit to install our Python frontends.
pip3 install flit
Our Python frontends use a Calyx ast library written in Python. Install with:
cd calyx-py && flit install -s
Frontend specific instructions:
- Systolic array: Nothing else needed.
- Install dependencies:
pip3 install prettytable
- Install external
fud register ntt -p frontends/ntt-pipeline/fud/ntt.py
- Install dependencies:
cd frontends/mrxl && flit install -s
mrxlexternal stage for
fud register mrxl -p frontends/mrxl/fud/mrxl.py
- TVM Relay: See instructions.
fud supports wraps the Vivado (
synth-verilog) and Vivado HLS (
tools to generate area and resource estimates for Calyx designs.
See the instructions to configure them.
Fud is structured as a sequence of stages that transform inputs of one form to outputs.
fud transforms a file in one stage into a file in a later stage.
--to options specify the input and output stages to the
fud exec subcommand.
fud info to view all possible stages.
fud will try to guess the starting stage by looking at the extension of the
input file and output file (if specified using the
If it fails to guess correctly or doesn't know about the extension, you can
manually set the stages using