rlx-fpga
FPGA backend for RLX — per-graph datapath synthesis. Takes an rlx-ir
graph (or a Model) and emits target-agnostic
SystemVerilog plus weight .mem files, with optional Yosys/nextpnr
scripts for a concrete part.
Like rlx-cortexm, this crate
sits one layer below the runtime Backend trait. The entry points
are export_graph / rlx_runtime::export (feature
fpga), not Session::compile.
See docs/fpga-export.md for the
full export configuration and HwTarget matrix.
Quick start
Checked-in demo: examples/mnist_sv/ (top.sv + layers + weights).
use *; // feature = "fpga"
fpga
.hw_target
.sideband
.sideband
.export_model?;
use ;
// ... build or load an INT8 Graph ...
export_graph?;
Hardware targets
HwTarget |
RTL | Sidecars |
|---|---|---|
Generic (default) |
soft ports | synth.sh (Yosys generic), EXPORT.md |
Ecp5 |
same RTL | + constraints.lpf stub, ecp5 P&R script |
Ice40 |
same RTL | + constraints.pcf stub |
Xilinx7 |
same RTL | + constraints.xdc stub (experimental) |
What's here
export/export_config— Graph → Model → emit with tune +HwTargetfrom_graph—Model::from_graph/FromGraphOptionsquant— integer-only Q0.31 / Q0.15 requantizeverilog— pure-Rust SystemVerilog writercodegen— per-op emitters +emit_with_configreference— Rust forward pass (parity vs Verilog)bin/rlx-fpga-emit— CLI
License
GPL-3.0-only.