Module Hardcaml_circuits.Onehot_clean

Convert an arbitrary input vector to onehot. The first bit set scanning from either the lsb or msb will be set in the output and all others will be 0. The architecture has logarithmic delay.

examples (with scan_from_msb):

type 'a t = {
any_bit_set : 'a;
data : 'a;
}
val scan_from_msb : (module Hardcaml.Comb.S with type t = 'a) -> 'a -> 'a t
val scan_from_lsb : (module Hardcaml.Comb.S with type t = 'a) -> 'a -> 'a t