Skip to content

What is Flux?

Flux is a C++ library and compiler for writing synchronous hardware. An FPGA (field-programmable gate array) is a chip whose logic you configure after manufacture. Flux lets you describe that logic with C++ functions.

gate.flux
__fpga void andGate(bits<1> a, bits<1> b, bits<1>& y) {
y = a & b;
}

A function marked __fpga is lowered to hardware. Code without the mark stays ordinary C++ that runs on a processor, and never becomes circuitry by accident.

  • The flux command-line compiler.
  • C++ headers for boards, simulation and host communication.
  • Native configuration images for a supported subset of designs. See boards.

There is no graphical editor, waveform viewer, Verilog or SystemVerilog input, or analog (SPICE) simulation. These are goals; see the roadmap.