Field_ops_lib.Karatsuba_ofman_mult
Multiplier using the karatsuba-ofman algorithm.
See this wikipedia entry for more details for the 2-part splitting algorithm (we call this Radix_2 in our code). We also support a Radix_3 mode, which does a 3-part splitting, but utilizes similar ideas.
The implementation here is largely based on the zcash-fpga implementation of the same algorithm
module Config : sig ... end
val hierarchical :
enable:Hardcaml.Signal.t ->
config:Config.t ->
scope:Hardcaml.Scope.t ->
clock:Hardcaml.Signal.t ->
Hardcaml.Signal.t ->
[ `Constant of Z.t | `Signal of Hardcaml.Signal.t ] ->
Hardcaml.Signal.t
Instantiates a hierarchical karatsuba-ofman-multiplier. When `Constant
is passed for the RHS argument, the implementation will take care not to register the value and leave it as a constant throughout the multiplier tree.
module With_interface (M : sig ... end) : sig ... end
Similar to hierarchical
above, but with interfaces.