Inspect the hardware
flux --emit=hardware blink.flux
module @blink [sequential] {
clock %clk
output %led : u1
state %divider : u25 [init=u25 0]
state %ledState : u1 [init=u1 1]
on_rise %clk {
if equal<bit> %divider, i32 13500000 {
next %divider = u25 0
next %ledState = xor<i32> %ledState, i32 1
}
else {
next %divider = add<i32> %divider, i32 1
}
}
drive %led = %ledState
}
Build for a board
flux --emit=fs --board=tang-nano-20k \
--top=blink blink_board.flux \
--image-output=blink.fs \
--manifest-output=blink.json
native-fs @blink [GW2AR-18C]:
67 LUTs,
26 storage elements,
carry_blocks=0,
dsp_blocks=0,
bsram_blocks=0,
1 outputs,
1 clocks,
8147 configuration fuses;
validated .fs image at blink.fs