package hardcaml_step_testbench

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Imperative.CyclesimSource

Sourcemodule Monads : sig ... end
Sourcemodule type S = sig ... end
include S
include Imperative.S with module Step_monad = Monads.Step_monad
Sourcemodule No_data : Digital_components.Data.S with type t = unit
Sourcemodule Step_monad = Monads.Step_monad
include Core.Monad.S with type 'a t := 'a t
val (>>=) : 'a t -> ('a -> 'b t) -> 'b t
val (>>|) : 'a t -> ('a -> 'b) -> 'b t
module Monad_infix : sig ... end
val bind : 'a t -> f:('a -> 'b t) -> 'b t
val return : 'a -> 'a t
val map : 'a t -> f:('a -> 'b) -> 'b t
val join : 'a t t -> 'a t
val ignore_m : 'a t -> unit t
val all : 'a t list -> 'a list t
val all_unit : unit t list -> unit t
module Let_syntax : sig ... end
Sourceval cycle : ?num_cycles:int -> unit -> unit t

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

Sourceval for_ : int -> int -> (int -> unit t) -> unit t

for_ i j f does f i, f (i+1), ... f j in sequence. If j < i, then for_ i j immediately returns unit.

Sourceval start : ('a -> 'b t) -> 'a -> ('b, No_data.t) Step_monad.Component_finished.t t
Sourcetype 'a finished_event = ('a, unit) Step_monad.Component_finished.t Step_monad.Event.t
Sourceval spawn : (unit -> 'a t) -> 'a finished_event t

Launch a new task within the current simulation step.

Sourceval wait_for : 'a finished_event -> 'a t

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

Sourceval wait_for_with_timeout : 'a finished_event -> timeout_in_cycles:int -> 'a option t

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

Sourcemodule List : sig ... end
Sourcemodule Array : sig ... end
Sourceval run_with_timeout : ?update_children_after_finish:bool -> ?timeout:int -> unit -> simulator:(_, _) Hardcaml.Cyclesim.t -> testbench:(No_data.t -> 'a t) -> 'a option

Run the testbench until the main task finishes.

The optional timeout argument stops the simulation after the given number of steps and returns None. Otherwise it will continue until the testbech completes.

Sourceval run_until_finished : ?update_children_after_finish:bool -> unit -> simulator:(_, _) Hardcaml.Cyclesim.t -> testbench:(No_data.t -> 'a t) -> 'a

Run the testbench until completion.

OCaml

Innovation. Community. Security.