r/FPGA • u/FlowsDSL • 16h ago
Flows: C-like language for FPGAs with cycle-by-cycle hardware traces mapped to source (open source)
https://github.com/FlowsDSL/flowsdsl
Flows is a language and toolchain that compiles C-like code to SystemVerilog. step marks a clock cycle explicitly: the compiler doesn't schedule timing, you do. Within a step, the code becomes combinational logic. Programs are transforms that run concurrently and communicate through queues and wires.
Every generated design records a trace of the program's state on each cycle and streams it to the host, mapped back to source lines, transforms and variables. No simulation needed to see what happened. It's in the hardware from the start.
The example ping responder runs on an Alveo U50, answers pings at 10 Gigabit Ethernet line rate, and starts each reply before the request has finished arriving. It meets timing at 322 MHz. All traces in the documentation were captured on the card. The PCIe and Ethernet platform underneath is custom, with no XDMA or vendor MAC.
The docs are written as a path for software developers: a working ping responder first, timing and clock domains when the trace shows why they matter.
Currently targets the U50 with Vivado 2023.2; details in the README's status section. Questions and critique welcome in Discussions.