package hardcaml_waveterm

  1. Overview
  2. Docs
include module type of struct include Hardcaml_waveterm_kernel.Waveform end
val sexp_of_t : t -> Sexplib0.Sexp.t
include Ppx_compare_lib.Equal.S with type t := t
val equal : t -> t -> bool
val create : ('i, 'o) Hardcaml.Cyclesim.t -> t * ('i, 'o) Hardcaml.Cyclesim.t

Create waveform. Returns a new simulation object that side effects the waveform.

val create_from_data : waves:Hardcaml_waveterm_kernel__.Wave.t Base.list -> ports:Hardcaml_waveterm_kernel__.Port.t Base.list -> t
val waves : t -> Hardcaml_waveterm_kernel__.Wave.t Base.array
val update_waves : t -> Hardcaml_waveterm_kernel__.Wave.t Base.array -> t
val combine : t -> t -> t

Combine two waveforms into one waveform

type 'a with_options = ?display_rules:Hardcaml_waveterm_kernel.Display_rules.t -> ?display_width:Base.int -> ?display_height:Base.int -> ?display_values:Base.bool -> ?wave_width:Base.int -> ?wave_height:Base.int -> ?signals_width:Base.int -> ?start_cycle:Base.int -> ?signals_alignment:Hardcaml_waveterm_kernel.Text_alignment.t -> 'a

Waveform configuration options.

display_rules see Display_rules. A waveform may be constructed once and displayed multiple times with differing options.

wave_height sets the number of rows each wave is displayed with.

  • <0 an exception is raised
  • 0 2 lines per wave. This show transitions but not the data for multi-bit signals.
  • 1 2 lines for binary data, 3 lines for multi-bit data. This is the default and most compact view.
  • n (n+1) lines per wave.

wave_width sets the number of chars used to render each clock cycle.

  • n>=0 ((n+1)*2) characters per cycle. This ensures that the clock is properly rendered when n=0. The default of 3 allows up to 7 chars per cycle to be rendered to represent data values in the waveform.
  • n<0 (-n) cycles per character. Characters in the waveform within which multiple transitions occur are displayed with a double veritical bar.

display_width and display_height simply set the overall size of the displayed waveform. An auto scaling routine assigns approximately 1/3 of the display for the signals and values windows. The default size is 70 character wide and 20 high. The minimum size is 7 characters wide and 3 high and an exception is raise otherwise.

signals_alignment changes the text alignment of the displayed signals names. By default this is Wave_format.Left.

val sort_ports_and_formats : t -> Hardcaml_waveterm_kernel.Display_rules.t Base.option -> Hardcaml_waveterm_kernel__.Wave.t Base.array
val to_buffer : (t -> Base.Buffer.t) with_options

Write waveform into a Buffer.t.

val to_string : (t -> Base.string) with_options

Convert waveform to a string.

val print : (?show_digest:Base.bool -> ?channel:Stdio.Out_channel.t -> t -> Base.unit) with_options

Print waveform to channel

module Serialize : sig ... end
val expect : (?show_digest:bool -> ?serialize_to:string -> Hardcaml_waveterm_kernel.Waveform.t -> unit) Hardcaml_waveterm_kernel.Waveform.with_options
OCaml

Innovation. Community. Security.