Digital_components.Componentt is mostly abstract, but we expose is as a constructor so that the type checker knows that t is injective.
val sexp_of_t :
('i -> Sexplib0.Sexp.t) ->
('o -> Sexplib0.Sexp.t) ->
('i, 'o) t ->
Sexplib0.Sexp.tval sexp_of_input : ('i, _) t -> 'i -> Base.Sexp.tval sexp_of_output : (_, 'o) t -> 'o -> Base.Sexp.tval output : ('i, 'o) t -> 'i -> 'ooutput returns the output based on an input and its current state, but does not update the state. A component is called "combinational" if output t i ignores t. A component is called "sequential" if output t i uses t. A sequential component is called a "moore machine" if it ignores i and a "mealy machine" if it uses i.
val update_state :
?prune:Base.bool ->
parent_period:Base.int ->
step_number:Base.int ->
('i, _) t ->
'i ->
Base.unitupdate_state updates t's state based on an input and its current state
run_with_inputs t is runs length is steps with t, on each step calling update_state and then output, pairing the input of that step with the output.
module Next_input : sig ... endval create_step_function :
show_steps:Base.bool ->
('i, 'o) t ->
('i -> 'o) Base.Staged.tmodule Run_component_until_finished (Input_monad : Base.Monad.S) : sig ... endmodule Combinational : sig ... endval create_combinational : ('i, 'o) Combinational.t -> ('i, 'o) tmodule Flip_flop_with_load_enable : sig ... endmodule Flip_flop_with_load_enable_and_reset : sig ... end