Issie logo Issie

StepPanelData Module

What the step simulator's panel shows, when the .NET sidecar is the one simulating. The same shape as the waveform viewer's cache and for the same reason: view code must read values synchronously, on every render, and a separate process cannot be asked synchronously. So the update function fills this and the view reads it (see the diagram at the top of `SimInterface.fs`). One snapshot, not a history. The panel shows one clock cycle - whichever the user has stepped to - so a fetch replaces what was here rather than adding to it, and everything in it is of one cycle of one session. That is what makes staleness impossible to show: a value is only ever read back for the cycle and epoch it was fetched for, and there is nothing else in here to read by mistake. A `ComponentId` IS an integer here - the whole design is reduced to integer ids when a project is opened (`Helpers.RegenerateIds`), which is what lets the sidecar name components at all.

Types

Type Description

PanelSignal

One thing the panel shows: a component output, named the way the sidecar names it.

Functions and values

Function or value Description

cycleHeld ()

Full Usage: cycleHeld ()

Parameters:
    () : unit

Returns: int option

The cycle the held values are of, or None when nothing has been fetched.

() : unit
Returns: int option

fill epoch cycle signals

Full Usage: fill epoch cycle signals

Parameters:
Returns: Promise<Result<unit, SidecarFailure>>

Read every signal the panel shows, at one cycle, in one request. One request and not one per row: the panel is redrawn on every render and has a row per top-level input, output, viewer and register, which on a large design is hundreds. `simRead` takes a list, so this is a single round trip of a few hundred bytes.

epoch : int
cycle : int
signals : PanelSignal list
Returns: Promise<Result<unit, SidecarFailure>>

forget ()

Full Usage: forget ()

Parameters:
    () : unit

Drop what was fetched. Called when the simulation ends, the design changes, or the simulator is switched - anything that makes the cycle this was of no longer the cycle being shown.

() : unit

valueAt cycle signal

Full Usage: valueAt cycle signal

Parameters:
Returns: bigint option

The value of one signal, if this snapshot is of the cycle asked for. `None` is "not fetched", which is a different thing from a value of zero and only this can tell them apart. What the panel then DRAWS for one is zero all the same - see `SimulationView.panelValue`, which argues for it: a row appearing and disappearing as replies land is worse to read than a value a moment out of date, and an unread port already looks like this. The distinction is kept here rather than thrown away because the decision is the caller's, and a caller that wants to make the other one has something to make it from.

cycle : int
signal : PanelSignal
Returns: bigint option

Type something to start searching.