package hardcaml_event_driven_sim

  1. Overview
  2. Docs

Module Event_driven_sim.SimulatorSource

Event_driven_simulator is an interface for writing event driven simulators (the main user is hardcaml-event-driven-sim). The simulator frameworks' semantics largely resembles those of VHDL.

Sourcemodule type Value_S = sig ... end
Sourcemodule Signal_id : sig ... end
Sourcemodule Signal : sig ... end
Sourcemodule Process : sig ... end
Sourcetype t
Sourceval create : Process.t list -> t

Creates a new simulator running given processes.

Sourceval current_time : t -> int
Sourceval step : t -> unit

Advances time to the next time step.

Sourceval delta_step : t -> unit

Advances time a single delta step.

Sourceval stabilise : t -> unit

Advances time until there are no updates scheduled.

Sourceval next_scheduled_time : t -> int option

At what time next event in the queue is scheduled?

Sourceval (!!) : 't Signal.t -> 't

Read current value of a signal (same as Signal.read)

Sourceval (!&) : 't Signal.t -> Signal_id.t

Returns id of a signal.

Schedule a change to a signal without any delay.

Sourceval set : 't Signal.t -> 't -> unit
Sourceval (<--) : 't Signal.t -> 't -> unit
Sourceval set_after : 't Signal.t -> 't -> delay:int -> unit

Schedule a change to a signal after a delay.

The behaviour of this delay is the same as of VHDL transport delay.

Sourceval (<---) : 't Signal.t -> 't -> delay:int -> unit
Sourceval run : t -> time_limit:int -> unit

Run a simulation until time time_limit.

Sourcemodule Expert : sig ... end
Sourcemodule Async : sig ... end

Async-like wrapper around schedule_call and schedule_on_change.

Sourcemodule Change_monitor : sig ... end
Sourcemodule Debug : sig ... end
Sourcemodule Version_signal : sig ... end

A signal that keeps track of the state of some external data.

OCaml

Innovation. Community. Security.