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 |
Full Usage:
componentOfPath ldcs topSheet labels
Parameters:
LoadedComponent list
topSheet : string
labels : string list
Returns: (ComponentId * ComponentId list) option
|
|
Full Usage:
pathOfComponent ldcs topSheet (arg3, arg4)
Parameters:
LoadedComponent list
topSheet : string
arg2 : ComponentId
arg3 : ComponentId list
Returns: string list option
|
|
Full Usage:
pathOfSignal ldcs topSheet wi
Parameters:
LoadedComponent list
topSheet : string
wi : WaveIndexT
Returns: WavePath option
|
|
Full Usage:
signalOfPath ldcs topSheet path
Parameters:
LoadedComponent list
topSheet : string
path : WavePath
Returns: WaveIndexT option
|