Structs

  • A Strobe generates a periodic pulse train, with a single clock-cycle wide pulse at the prescribed frequency. The argument [N] of the generic Strobe is used to size the counter that stores the internal delay value. Unfortunately, Rust const generics are currently not good enough to compute [N] on the fly. However, a compile time assert ensures that the number of clock cycles between pulses does not overflow the [N]-bit wide register inside the Strobe.