package hardcaml_circuits

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

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):

  • 1111 -> 1000
  • 0000 -> 0000
  • 0110 -> 0100
type 'a t = {
  1. any_bit_set : 'a;
  2. 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
OCaml

Innovation. Community. Security.