- Documentation
- Flux C++ extension
- Language introduction
Language introduction
Flux uses C++ syntax and adds a small number of constructs:
| Construct | Hardware meaning |
|---|---|
__fpga function |
A hardware module |
bits<N> |
An unsigned value exactly N bits wide |
clock |
A clock domain |
__onRise(clk) |
Updates that happen on the rising edge of clk |
__unroll(...) |
Copies of hardware, one per iteration |
__memory(read, collision) |
Timing behavior of a memory |
Not all of C++
Section titled “Not all of C++”Hardware has no program counter, heap or recursion in the processor sense. Only a subset of C++ can be used inside an __fpga function, and the compiler rejects constructs it cannot express. Do not expect to mark existing software __fpga and get a circuit.
Software stays software
Section titled “Software stays software”Functions without __fpga are compiled for a processor through Clang and LLVM. They are where you set up boards and communicate with the design.