Evaluating rust based hardware definition languages:
Other tools used:
- yosys: open source synthesis suite
- icestorm: bitstream creation for iCE40
fpgas - nextpnr:
fpgaplace and route tool - surfer: waveform viewer
To run the rust-hdl evaluation navigate to the rust-hdl-eval directory and run cargo run. This will default to a test simulation. Running cargo run -- --help will provide more information on the existing parameters to run the rust-hdl evaluation.
The implementation includes 5 seperate modes:
Basic: simple Blinky simulation- Output:
vcdfile
- Output:
Testing: simulation playground regarding theiCEsticksynthesis- Output:
vcdfile
- Output:
Adder: simulates a generic bit adder including a test bench- Output: none; runs the simulation and prints to console
SyncedandAsynced: flashes a bit stream into theiCEstick Evaluation KitSynced: The 5 LEDs on the stick will blink in unisonAsynced: The 5 LEDs on the stick will blink in a circular motion- Output:
.v,.pcf,json,.ascand the.binfiles - Flashing: The
.binfile will be flashed onto theiCEstick.
This library provides a blueprint on how to write board support packages (BSPs) for iCE40 based fpga boards.
- A finished implementation for the
iCEstick Evaluation Kitis included and can be used. - To include other chips/boards in the provided synthesis, the
pinsmodule must be implemented for the specific board, and the correct instance of anIce40ChipTypestruct must be used in the abstractedsynthmethods.
- To enable successful transpilation the open source
icestormpipeline,nextpnrandyosysshould be installed. - If any OS besides
ubuntuis used (e.g.Windows), additional steps, such as installing drivers for theiCEstick Evaluation Kit(or other boards), might be necessary.
- Includes a implementation of a blinker block
- Simulation for
.vcdfile creation works. - No official documentation for
rhdlis currently available (2025-08-19) and this makes flashing onto physical boards a lot harder than it was withrust-hdl - Will try to include this in the future!
- The test simulation can be run via just
cargo run - The
LEDstest bench can be run viacargo test test_vcd_trace- This is very similar to the test simulation though
- Includes WIP implementation to support synthesis on the
iCEstick Evaluation Kit - Writing drivers (or
BSPs) forrhdlis a lot more involved in comparison torust-hdl.rust-hdlutilizes existing open source synthesis tools and targets verilog (via transpilation).rhdlon the other hand aims to achieve all of this within nativeRust.- There are currently no clear guidelines (2025-08-19) to the process
yosysshould be installed sincerhdluses it internally