Enum.S_enum
module Cases : sig ... end
include Interface.S
val sexp_of_t : ( 'a -> Sexplib0.Sexp.t ) -> 'a t -> Sexplib0.Sexp.t
val iter : 'a t -> f:( 'a -> Base.unit ) -> Base.unit
val to_list : 'a t -> 'a Base.list
val t : (Base.string * Base.int) t
include Base.Equal.S1 with type 'a t := 'a t
val equal : 'a Base__Equal.equal -> 'a t Base__Equal.equal
val port_names : Base.string t
RTL names specified in the interface definition - commonly also the OCaml field name.
val port_widths : Base.int t
Bit widths specified in the interface definition.
module Unsafe_assoc_by_port_name : sig ... end
val fold : 'a t -> init:'acc -> f:( 'acc -> 'a -> 'acc ) -> 'acc
val offsets : ?rev:Base.bool -> Base.unit -> Base.int t
Offset 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 ... end
module Names_and_widths : sig ... end
val ast : Interface.Ast.t
val to_raw : 'a t -> 'a
type 'a outer := 'a t
module Of_signal : sig ... end
module Of_bits : sig ... end
module Of_always : sig ... end
Set 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 -> 'a
module Unsafe : sig ... end