Enum.Make_binaryConstructs a hardcaml interface which represents hardware for the given Enum as an abstract Interface, using a Binary internal representation.
include Interface.Sinclude Ppx_compare_lib.Equal.S1 with type 'a t := 'a tinclude Ppx_compare_lib.Equal.S1__local with type 'a t := 'a tinclude Ppx_compare_lib.Comparable.S1 with type 'a t := 'a tinclude Ppx_compare_lib.Comparable.S1__local with type 'a t := 'a tval sexp_of_t : ('a -> Sexplib0.Sexp.t) -> 'a t -> Sexplib0.Sexp.tval iter : 'a t -> f:('a -> unit) @ local -> unitval to_list : 'a t -> 'a listval port_names_and_widths : (string * int) tinclude Base.Equal.S1__local with type 'a t := 'a tval equal : 'a Base.Equal.equal -> 'a t Base.Equal.equalval port_names : string tRTL names specified in the interface definition - commonly also the OCaml field name.
val port_widths : int tBit widths specified in the interface definition.
val const : 'a -> 'a tconst x sets each port to x
module Unsafe_assoc_by_port_name : sig ... endval fold :
'a t ->
init:'acc ->
f:('acc -> ('a -> 'acc) @ local) @ local ->
'accval offsets : ?rev:bool -> unit -> 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.
module All (M : Base.Monad.S) : sig ... endSimilar to Monad.all for lists -- combine and lift the monads to outside the interface.
val or_error_all : 'a Core.Or_error.t t -> 'a t Core.Or_error.tEquivalent to All(Or_error).all. This is made a special case for convenience.
module type Comb = sig ... endmodule Of_clocked_signal : sig ... endmodule Names_and_widths : sig ... endval wave_formats : Wave_format.t tOptional Metadata
val ast : Interface.Ast.tval to_enum : Bits.t t -> Cases.t Core.Or_error.tval to_raw : 'a t -> 'atype 'a outer := 'a tmodule Of_signal : sig ... endmodule Of_bits : sig ... endmodule Of_always : sig ... endHelper functions to ease usage of the Always API when working with interfaces.
Set an input port in simulation to a concrete Cases value.
Similar to sim_set, but operates on raw Bits.t instead.
val sim_get : Bits.t ref t -> Cases.t Core.Or_error.tRead 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