Header menu logo issie

WaveSimSelect Module

Functions and values

Function or value Description

cap sheet

Full Usage: cap sheet

Parameters:
    sheet : string

Returns: string

return sheet with all latters capitalised

sheet : string
Returns: string

caseCompAndPortName name

Full Usage: caseCompAndPortName name

Parameters:
    name : string

Returns: string
name : string
Returns: string

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 allWaves

Full Usage: defaultSelectedWaves fs allWaves

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 the simulated top sheet's own ports - inputs, then outputs, then Viewers. They are the signals every design has and the ones a beginner came to look at. An access path is empty exactly for components that are not inside any custom component instance, which is how "on the top sheet" is decided. 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. The `3cpu` demo's `eep1` is exactly that. Falling back to Viewers **anywhere in the design** answers it, 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.

fs : FastSimulation
allWaves : Map<WaveIndexT, Wave>
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 from the root of the simulation, so its last element is the instance the component is immediately within.

accessPath : ComponentId list
Returns: FComponentId option

getInputName withComp comp port

Full Usage: getInputName withComp comp port

Parameters:
Returns: string

Get names for waves that are from Input ports TODO: unify this with DrawBlock and widthInferror logic

withComp : bool
comp : FastComponent
port : InputPortNumber
Returns: string

getInputPortName compType port

Full Usage: getInputPortName compType port

Parameters:
Returns: string

Get port names for waves that are from Input ports. Appended to comp.Label

compType : ComponentType
port : InputPortNumber
Returns: string

getName index fastSim

Full Usage: getName index fastSim

Parameters:
Returns: string

Get name for a wave. Names are generated from component label, port name, and bit width of wave.

index : WaveIndexT
fastSim : FastSimulation
Returns: string

getOutputName withComp comp port fastSim

Full Usage: getOutputName withComp comp port fastSim

Parameters:
Returns: string

Get names for waves that are from Output ports TODO: unify this with DrawBlock and widthInferror logic

withComp : bool
comp : FastComponent
port : OutputPortNumber
fastSim : FastSimulation
Returns: string

getOutputPortName compType port

Full Usage: getOutputPortName compType port

Parameters:
Returns: string

Get port names for waves that are from Output ports Appended to comp.Label

compType : ComponentType
port : OutputPortNumber
Returns: string

makeWave ws fastSim wi

Full Usage: makeWave ws fastSim wi

Parameters:
Returns: Wave

Make Wave for each component and port on sheet

ws : WaveSimModel
fastSim : FastSimulation
wi : WaveIndexT
Returns: Wave

nameWithSheet fastSim dispName waveIndex

Full Usage: nameWithSheet fastSim dispName waveIndex

Parameters:
Returns: string

sheet.component.port, which is what a waveform is called. The SHEET is named, not the instance of it: which instance a waveform belongs to is said by where its row sits in the selector and by the combo box beside it, so a name carrying the instance as well said the same thing twice - and said it as a path of labels nobody asked to read. Where that leaves two waveforms with one name, the viewer disambiguates them on hover.

fastSim : FastSimulation
dispName : string
waveIndex : WaveIndexT
Returns: string

probeLabelForWire fs cycle radix wireModel cid

Full Usage: probeLabelForWire 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. getName, not nameWithSheet: 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.

fs : FastSimulation
cycle : int
radix : NumberBase
wireModel : Model
cid : ConnectionId
Returns: string 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.

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

wavesOfComponent fs allWaves compId

Full Usage: wavesOfComponent fs allWaves 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
allWaves : Map<WaveIndexT, Wave>
compId : ComponentId
Returns: Wave list * int

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

Type something to start searching.