WaveSimSelect Module
Functions and values
| Function or value | Description |
Full Usage:
compWavesToOffer model compId
Parameters:
Model
compId : ComponentId
Returns: Wave list
|
|
Full Usage:
defaultSelectedWaves fs ws
Parameters:
FastSimulation
ws : WaveSimModel
Returns: WaveIndexT list
|
The waves to show when a wave simulation starts with nothing chosen. An empty viewer is never what the user wants: it makes the first thing they see after pressing Start a sentence telling them to press a different button. First choice is every Viewer in the design, because a Viewer is placed for one reason only - somebody wanted to watch that net - so wherever they are, they are the signals the author of the design thought were worth looking at. Which INSTANCE of a sheet each is taken from is the selector's business, not this function's: the slice it is pointed at is what the user would see if they opened Select Waves, and a default selection naming instances the selector is not showing is one the user cannot find again. With no Viewers anywhere, the top sheet's own ports - inputs and outputs, which are what a design says about itself to whatever uses it. A top sheet can have no ports at all: a whole CPU is often a ROM, a RAM and a couple of subsystem instances, wired to each other and to nothing outside, which is what the `3cpu` demo's `eep1` is. Then everything on the top sheet that carries a wave, which is the output of every component drawn on it. That is a screenful on a large top sheet and it is still better than the empty viewer it replaces, which explains itself to nobody. All of them, at each stage, and not the first few: someone who placed thirty Viewers meant all thirty. Read off the DESIGN - one instance of each sheet, since which Viewers a sheet has is a fact about the sheet - and not off the waves, which on a large design number in the hundreds of thousands.
|
Full Usage:
enclosingInstance accessPath
Parameters:
ComponentId list
Returns: FComponentId option
|
|
Full Usage:
heldProbeValue model wi cycle
Parameters:
Model
wi : WaveIndexT
cycle : int
Returns: bigint option
|
The value the probe has been given for exactly the wave and cycle it is asking about. None while the answer has not arrived, or has arrived for something else - a different wire, a different cycle. The probe then draws nothing, which is right: a label showing the last wire's value under the pointer on this one would look exactly like an answer.
|
Full Usage:
probeLabelForWire model fs cycle radix wireModel cid
Parameters:
Model
fs : FastSimulation
cycle : int
radix : NumberBase
wireModel : Model
cid : ConnectionId
Returns: string option
|
What to write beside the cursor for the wire it is resting on: the signal's name and its value at `cycle`. None when the simulation cannot answer - the wire is on a sheet it holds more than one copy of, carries no wave of its own, or has not been simulated as far as this cycle. The name without its sheet: the waveform viewer prefixes the sheet because its rows are drawn away from the design and come from all over it, so a bare "Q" there could be any of them. Here the label is on the wire, on the sheet the user is looking at, and the sheet name is the one thing the position already says. It is also the longest part of the name, on a label that has to fit beside the pointer without covering the circuit.
|
Full Usage:
probeQuestion model
Parameters:
Model
Returns: (FastSimulation * WaveIndexT * int * NumberBase) option
|
What the schematic probe is asking about: which simulation, which wave, at which cycle, in which radix - or None when it is asking nothing. **Asked in one place and read in two**: the view that draws the label, and the pass that fetches its value. Computed twice, they could differ, and a label would then be drawn from the value of a different wire or a different cycle - which looks exactly like a correct answer. The waveform simulator first: when both are running, its cursor is where the user has deliberately put it, and it is the one they are looking at. The step simulator's clock tick is simply how far it has been stepped, which is still the right answer when it is the only simulation there is. And only while nothing is being dragged - during a gesture the pointer is doing something else and a label following it is in the way.
|
Full Usage:
selectCompWavesModal wsModel dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
selectRamButton wsModel dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
selectRamModal wsModel dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
selectWavesButton wsModel dispatch
Parameters:
WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement
|
|
Full Usage:
toggleRamSelection (arg1, arg2) ramLabel dispatch
Parameters:
ComponentId
arg1 : ComponentId list
ramLabel : string
dispatch : Msg -> 'a
Returns: 'a
|
|
Full Usage:
waveIndexOfWire fs wireModel cid
Parameters:
FastSimulation
wireModel : Model
cid : ConnectionId
Returns: WaveIndexT option
|
The signal a wire of the open sheet carries, as an index into a simulation's waves. A wire is driven by one output port, so the wire's value is that port's. Which copy of the port depends on how many times the open sheet is instantiated in the design being simulated: with more than one there is no single answer, so none is given - the same rule wavesOfComponent applies to the schematic's right-click menu.
|
Full Usage:
waveValueAt fs cycle radix wi
Parameters:
FastSimulation
cycle : int
radix : NumberBase
wi : WaveIndexT
Returns: string option
|
The value of one wave at one cycle, written as the waveform viewer's value column writes it. The step index wraps: the step simulator uses its data arrays as a circular buffer, so a long step simulation is holding only the last MaxArraySize cycles. The waveform simulator does not wrap - its array is sized for the whole run - so there the modulo does nothing. This one reads the given simulation DIRECTLY, and is the only value read left that does. Not an oversight. The probe is handed whichever simulation it should answer from - the waveform simulator's while one is running, and the STEP simulator's otherwise (MainView's Probe.source) - and the cache models one active source, not a choice made per call. Routing this through it would have the probe read the waveform simulation while the user is stepping the other one. It goes through a provider when the step simulator gets one, which is also when this stops working by reaching into a FastSimulation that .NET mode will not have.
|
Full Usage:
wavesOfComponent fs ws compId
Parameters:
FastSimulation
ws : WaveSimModel
compId : ComponentId
Returns: Wave list * int
|
|
Full Usage:
wireWaveToOffer model cid
Parameters:
Model
cid : ConnectionId
Returns: WaveIndexT option
|
|
Full Usage:
withDefaultSelectionIfEmpty fs wsModel
Parameters:
FastSimulation
wsModel : WaveSimModel
Returns: WaveSimModel
|
|
Full Usage:
withDefaultSelectionIfPending fs wsModel
Parameters:
FastSimulation
wsModel : WaveSimModel
Returns: WaveSimModel
|
The same, for a simulation that is still OWED its default selection - which is what every refresh of a started simulation asks, rather than the start asking once. The choice reads the top instance's ports, and while the .NET simulator is simulating those are not known until its first slice arrives: asking once, at the start, asked before there was anything to answer with, and the viewer opened empty in the mode that ships. So it is asked again until it has something to say - and then not again, which is what leaves a viewer the user has emptied on purpose empty. See WaveSimModel.DefaultSelectionPending.
|