Module Hardcaml_step_testbench_effectful.Imperative

include module type of struct include Imperative end
module type S = Imperative.S
include S
module I_data : sig ... end
module O_data : sig ... end
module Handler : sig ... end
val cycle : Handler.t @ local -> (?num_cycles:int -> (unit -> unit) @ local) @ local

cycle i_data ~num_cycles waits for num_cycles cycles of the simulator to run. cycle raises if num_cycles < 1.

val start : Handler.t @ local -> ((Handler.t @ local -> ('a -> 'b) @ local) -> ('a -> ('b, I_data.t) Hardcaml_step_testbench_kernel.Step_effect.Component_finished.t) @ local) @ local
val spawn : ?period:int -> Handler.t @ local -> ((Handler.t @ local -> (unit -> 'a) @ local) -> ('a, unit) finished_event) @ local

Launch a new task within the current simulation step.

val wait_for : Handler.t @ local -> (('a, 'i) finished_event -> 'a) @ local

Wait for the given event to occur, and extract its return value.

val wait_for_with_timeout : Handler.t @ local -> (('a, 'i) finished_event -> (timeout_in_cycles:int -> 'a option) @ local) @ local

Like wait_for except it stops waiting after timeout_in_cycles and returns None. Note that the spawned task continues to execute.

val forever : Handler.t @ local -> ((Handler.t @ local -> (unit -> unit) @ local) -> Core.never_returns) @ local

Runs the given step function forever.

val run_monadic_computation : Handler.t @ local -> (('a, O_data.t, I_data.t) Hardcaml_step_testbench_kernel.Step_monad.t -> 'a) @ local
module As_monad : sig ... end
module Expert : sig ... end
module Cyclesim : sig ... end
module Event_driven_sim : sig ... end