Module M.Render

Functions for drawing waves, signal names and values

val get_max_signal_width_in_chars : Waves.t -> Base.int

max width of name window

val get_estimated_max_value_width : Waves.t -> Base.int

gets an estimate fo the max with of values. Inaccruate for the constructors U, S and F.

val total_cycles_in_waveform : Waves.t -> Base.int

max no of wave cycles

val total_signals_in_waveform : Waves.t -> Base.int

max no of wave signals

val wave_width_of_code : Base.int -> [ `Cycles_per_char of Base.int | `Chars_per_cycle of Base.int ]

Turn the UI integer representation of wave_width into a the rendering form.

val draw_clock_cycles : ctx:Hardcaml_waveterm_kernel.Draw.ctx -> style:Hardcaml_waveterm_kernel.Style.t -> bounds:Hardcaml_waveterm_kernel.Rect.t -> wave_width:[ `Cycles_per_char of Base.int | `Chars_per_cycle of Base.int ] -> cnt:Base.int -> Base.unit

draws cnt clock cycles

val draw_binary_data : ctx:Hardcaml_waveterm_kernel.Draw.ctx -> style:Hardcaml_waveterm_kernel.Style.t -> bounds:Hardcaml_waveterm_kernel.Rect.t -> wave_width:[ `Cycles_per_char of Base.int | `Chars_per_cycle of Base.int ] -> data:Data.t -> off:Base.int -> Base.unit

draw binary waveform data

val draw_data : ctx:Hardcaml_waveterm_kernel.Draw.ctx -> style:Hardcaml_waveterm_kernel.Style.t -> bounds:Hardcaml_waveterm_kernel.Rect.t -> to_str:(Hardcaml.Bits.t -> Base.string) -> alignment:Hardcaml_waveterm_kernel.Text_alignment.t -> wave_width:[ `Cycles_per_char of Base.int | `Chars_per_cycle of Base.int ] -> data:Data.t -> off:Base.int -> Base.unit

draw arbitrary waveform data

val with_border : draw:'a draw_item -> label:Base.string -> ?border:Hardcaml_waveterm_kernel.Style.t -> 'a draw_item
val draw_cursor : ctx:Hardcaml_waveterm_kernel.Draw.ctx -> bounds:Hardcaml_waveterm_kernel.Rect.t -> wave_cursor:Base.int -> primary:Base.bool -> state:Waves.t -> Base.unit

draw cursor

val draw_wave : ?style:Hardcaml_waveterm_kernel.Style.t -> ?wave_cursors:[ `Primary of Base.int | `Secondary of Base.int ] Base.list -> selected_wave_index:Base.int Base.option -> ctx:Hardcaml_waveterm_kernel.Draw.ctx -> bounds:Hardcaml_waveterm_kernel.Rect.t -> Waves.t -> Base.unit

draw waveforms

draw signal names

val draw_values : ?style:Hardcaml_waveterm_kernel.Style.t -> ?wave_cursor:Base.int -> selected_wave_index:Base.int Base.option -> ctx:Hardcaml_waveterm_kernel.Draw.ctx -> bounds:Hardcaml_waveterm_kernel.Rect.t -> Waves.t -> Base.int

draw signal values

draw standard user inferface (names, values, waveforms left to right

type pick =
  1. | Wave of {
    1. cycle : Base.int;
    2. signal_index : Base.int Base.option;
    }
  2. | Value of {
    1. signal_index : Base.int Base.option;
    }
  3. | Signal of {
    1. signal_index : Base.int Base.option;
    }
  4. | Status
  5. | No_pick
module Static : sig ... end