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 |
Functions and values
| Function or value | Description |
Full Usage:
cycleHeld ()
Parameters:
unit
Returns: int option
|
|
Full Usage:
fill epoch cycle signals
Parameters:
int
cycle : int
signals : PanelSignal list
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.
|
Full Usage:
forget ()
Parameters:
unit
|
|
Full Usage:
valueAt cycle signal
Parameters:
int
signal : PanelSignal
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.
|