Enum.Make_binaryConstructs a hardcaml interface which represents hardware for the given Enum as an abstract Interface, using a Binary internal representation.
module Cases : sig ... endinclude Interface.Sval sexp_of_t : ( 'a -> Sexplib0.Sexp.t ) -> 'a t -> Sexplib0.Sexp.tval iter : 'a t -> f:( 'a -> Base.unit ) -> Base.unitval to_list : 'a t -> 'a Base.listval t : (Base.string * Base.int) tinclude Base.Equal.S1 with type 'a t := 'a tval equal : 'a Base__Equal.equal -> 'a t Base__Equal.equalval port_names : Base.string tRTL names specified in the interface definition - commonly also the OCaml field name.
val port_widths : Base.int tBit widths specified in the interface definition.
module Unsafe_assoc_by_port_name : sig ... endval fold : 'a t -> init:'acc -> f:( 'acc -> 'a -> 'acc ) -> 'accval offsets : ?rev:Base.bool -> Base.unit -> Base.int tOffset of each field within the interface. The first field is placed at the least significant bit, unless the rev argument is true.
Take a list of interfaces and produce a single interface where each field is a list.
Create a list of interfaces from a single interface where each field is a list. Raises if all lists don't have the same length.
Similar to Monad.all for lists -- combine and lift the monads to outside the interface.
Equivalent to All(Or_error).all. This is made a special case for convenience.
module type Comb = sig ... endmodule Names_and_widths : sig ... endval ast : Interface.Ast.tval to_raw : 'a t -> 'atype 'a outer := 'a tmodule Of_signal : sig ... endmodule Of_bits : sig ... endmodule Of_always : sig ... endSet an input port in simulation to a concrete Cases value.
Similar to sim_set, but operates on raw Bits.t instead.
Read an output port from simulation to a concreate Cases value. Returns Ok enum when the Bits.t value can be parsed, and Error _ when the value is unhandled.
Similar to sim_get, but operates on raw Bits.t instead. This doesn't return _ Or_error.t. Undefined values will be returned as it is.
val unwrap : 'a t -> 'amodule Unsafe : sig ... end