Issie logo Issie

WaveSimSelect Module

Functions and values

Function or value Description

compWavesToOffer model compId

Full Usage: compWavesToOffer model compId

Parameters:
Returns: Wave list

The waves to offer on the schematic's right-click menu for the component clicked on: none unless a wave simulation is running and holds exactly one copy of that component.

model : Model
compId : ComponentId
Returns: Wave list

defaultSelectedWaves fs ws

Full Usage: defaultSelectedWaves fs ws

Parameters:
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.

fs : FastSimulation
ws : WaveSimModel
Returns: WaveIndexT list

enclosingInstance accessPath

Full Usage: enclosingInstance accessPath

Parameters:
Returns: FComponentId option

The custom component instance a component sits directly inside, if any. An access path is ordered innermost first, so its head is the instance the component is immediately within and its tail is the path of the sheet that instance is drawn on.

accessPath : ComponentId list
Returns: FComponentId option

heldProbeValue model wi cycle

Full Usage: heldProbeValue model wi cycle

Parameters:
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.

model : Model
wi : WaveIndexT
cycle : int
Returns: bigint option

probeLabelForWire model fs cycle radix wireModel cid

Full Usage: probeLabelForWire model fs cycle radix wireModel cid

Parameters:
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.

model : Model
fs : FastSimulation
cycle : int
radix : NumberBase
wireModel : Model
cid : ConnectionId
Returns: string option

probeQuestion model

Full Usage: probeQuestion model

Parameters:
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.

model : Model
Returns: (FastSimulation * WaveIndexT * int * NumberBase) option

selectCompWavesModal wsModel dispatch

Full Usage: selectCompWavesModal wsModel dispatch

Parameters:
Returns: ReactElement

Modal that, when active, shows the ports of one component picked on the schematic, which of them are displayed as waveforms, and allows that to be changed. Opened from the right-click menu on that component.

wsModel : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

selectRamButton wsModel dispatch

Full Usage: selectRamButton wsModel dispatch

Parameters:
Returns: ReactElement

Button to activate RAM selection modal.

wsModel : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

selectRamModal wsModel dispatch

Full Usage: selectRamModal wsModel dispatch

Parameters:
Returns: ReactElement

Modal that, when active, allows users to select RAMs to view their contents.

wsModel : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

selectWavesButton wsModel dispatch

Full Usage: selectWavesButton wsModel dispatch

Parameters:
Returns: ReactElement

Button to activate wave selection modal

wsModel : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement

toggleRamSelection (arg1, arg2) ramLabel dispatch

Full Usage: toggleRamSelection (arg1, arg2) ramLabel dispatch

Parameters:
Returns: 'a

Toggle if a RAM's contents is selected for viewing. The selection is read from the model the update is applied to, not from the one this element was rendered with, so that a change made between the two is not undone here.

arg0 : ComponentId
arg1 : ComponentId list
ramLabel : string
dispatch : Msg -> 'a
Returns: 'a

waveIndexOfWire fs wireModel cid

Full Usage: waveIndexOfWire fs wireModel cid

Parameters:
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.

fs : FastSimulation
wireModel : Model
cid : ConnectionId
Returns: WaveIndexT option

waveValueAt fs cycle radix wi

Full Usage: waveValueAt fs cycle radix wi

Parameters:
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.

fs : FastSimulation
cycle : int
radix : NumberBase
wi : WaveIndexT
Returns: string option

wavesOfComponent fs ws compId

Full Usage: wavesOfComponent fs ws compId

Parameters:
Returns: Wave list * int

The waves to offer for one component on the canvas, and the number of copies of that component the simulation holds. A component in a sheet instantiated more than once has one copy per instantiation, and none of them is offered.

fs : FastSimulation
ws : WaveSimModel
compId : ComponentId
Returns: Wave list * int

wireWaveToOffer model cid

Full Usage: wireWaveToOffer model cid

Parameters:
Returns: WaveIndexT option

The wave to offer on a wire's right-click menu: the signal the wire carries, when a wave simulation is running and the open sheet has exactly one instance in its design - the same rule compWavesToOffer applies to a component, answered by the same resolution the probe uses.

model : Model
cid : ConnectionId
Returns: WaveIndexT option

withDefaultSelectionIfEmpty fs wsModel

Full Usage: withDefaultSelectionIfEmpty fs wsModel

Parameters:
Returns: WaveSimModel

Choose waves for a wave simulation that has none. Applied only when the user has selected nothing at all - no waves and no RAMs - so a deliberately pared-down selection is never added to, and a selection saved with the sheet is never overridden.

fs : FastSimulation
wsModel : WaveSimModel
Returns: WaveSimModel

withDefaultSelectionIfPending fs wsModel

Full Usage: withDefaultSelectionIfPending fs wsModel

Parameters:
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.

fs : FastSimulation
wsModel : WaveSimModel
Returns: WaveSimModel

Type something to start searching.