Expand description
Exponent scanning as a catamorphism over Stream.
The fifth-root computation x^((4p-3)/5) processes the exponent
bit-by-bit via square-and-multiply. Each bit produces a control
signal telling the pipeline whether to square only or square-and-multiply.
This is a catamorphism (fold) over the exponent bits, producing
a Stream of RoundControl signals. Equivalently, it is an
anamorphism (unfold) that generates the control stream from the
exponent state.
Enums§
- Round
Control - Control signal for a single pipeline round.
Functions§
- exponent_
schedule - Generates the control signal stream for a fifth-root computation.
- hamming_
weight - Counts the number of multiply rounds in the exponent schedule.