Issie logo Issie

WavePath Module

Naming a saved selection in a way that survives being saved. A `WaveIndexT` names a signal by component id and access path. Those are facts about one loaded design: ids are reallocated when a project is opened (`Helpers.remapLoadedComponent`), and a saved path's ids belong to OTHER sheets, which the loader's per-sheet mapping cannot see - so what it cannot place became the 0 sentinel (`Helpers.sheetOfJson`). A saved selection named that way was only as durable as the id scheme it was written under, which is why `3cpu/eep1`'s selection came back as component 0 and was dropped. What a person would use instead is what this uses: the LABELS of the custom component instances entered from the sheet being simulated, then the component's own label. That survives ids being reallocated, survives the file being written by a different version, and best-effort survives edits elsewhere in the design - which is what a saved selection is for, since it is a convenience rather than a record of anything. **A label path names exactly one wave-carrying component.** Labels are unique per sheet and enforced: `CanvasStateAnalyser.checkComponentNamesAreOk` refuses to simulate a sheet with duplicates. The types it exempts - `MergeWires`, `SplitWire`, `BusSelection`, `NotConnected` - carry no waveform at all, and the fifth, `IOLabel`, shares a label deliberately: a labelled net has one driver and every member reads it, so naming the group is naming the signal. Compared exactly, not case-insensitively. Issie's duplicate check groups on the label as written, so `abc` and `ABC` are two components and matching them loosely would make a path ambiguous where the design is not. Nothing here knows about a simulation: it walks the design's sheets, so it works before one is built - which is when the selection is loaded.

Functions and values

Function or value Description

componentOfPath ldcs topSheet labels

Full Usage: componentOfPath ldcs topSheet labels

Parameters:
Returns: (ComponentId * ComponentId list) option

The component a label path names, or None where the design does not hold it - renamed or deleted since the selection was saved, which is a wave that is simply no longer offered.

ldcs : LoadedComponent list
topSheet : string
labels : string list
Returns: (ComponentId * ComponentId list) option

pathOfComponent ldcs topSheet (arg3, arg4)

Full Usage: pathOfComponent ldcs topSheet (arg3, arg4)

Parameters:
Returns: string list option

The label path of a component named by id and access path, or None where the design does not hold it - a selection made against a design that has since changed.

ldcs : LoadedComponent list
topSheet : string
arg2 : ComponentId
arg3 : ComponentId list
Returns: string list option

pathOfSignal ldcs topSheet wi

Full Usage: pathOfSignal ldcs topSheet wi

Parameters:
Returns: WavePath option

The saved form of one selected wave.

ldcs : LoadedComponent list
topSheet : string
wi : WaveIndexT
Returns: WavePath option

signalOfPath ldcs topSheet path

Full Usage: signalOfPath ldcs topSheet path

Parameters:
Returns: WaveIndexT option

The wave a saved path names. `SimArrayIndex` is left at -1: it is a fact about a build, and there is no build here. The wave simulator fills it in when one exists (`WaveSimHelpers.reResolveWave`), which it has to do after every rebuild in any case.

ldcs : LoadedComponent list
topSheet : string
path : WavePath
Returns: WaveIndexT option

Type something to start searching.