Header menu logo issie

WaveSim Module

Functions and values

Function or value Description

cancelSpinner model

Full Usage: cancelSpinner model

Parameters:
Returns: Model

remove the spinner popup

model : Model
Returns: Model

changeZoom wsModel zoomIn dispatch

Full Usage: changeZoom wsModel zoomIn dispatch

Parameters:

If zoomIn, then increase width of clock cycles (i.e.reduce number of visible cycles). otherwise reduce width. GenerateWaveforms message will reconstitute SVGs after the change.

wsModel : WaveSimModel
zoomIn : bool
dispatch : Msg -> unit

clkCycleButtons wsModel dispatch

Full Usage: clkCycleButtons wsModel dispatch

Parameters:
Returns: ReactElement

Click on these to change the highlighted clock cycle.

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

clkCycleNumberRow wsModel

Full Usage: clkCycleNumberRow wsModel

Parameters:
Returns: ReactElement

Generate a row of numbers in the waveforms column. Numbers correspond to clock cycles.

wsModel : WaveSimModel
Returns: ReactElement

displayBigIntOnWave wsModel width waveValues transitions

Full Usage: displayBigIntOnWave wsModel width waveValues transitions

Parameters:
Returns: ReactElement list
wsModel : WaveSimModel
width : int
waveValues : bigint array
transitions : NonBinaryTransition array
Returns: ReactElement list

displayUInt32OnWave wsModel width waveValues transitions

Full Usage: displayUInt32OnWave wsModel width waveValues transitions

Parameters:
Returns: ReactElement list

Generates SVG to display values on non-binary waveforms when there is enough space. TODO: Fix this so it does not generate all 500 cycles.

wsModel : WaveSimModel
width : int
waveValues : uint32 array
transitions : NonBinaryTransition array
Returns: ReactElement list

generateWaveform ws index wave

Full Usage: generateWaveform ws index wave

Parameters:
Returns: Wave

Called when InitiateWaveSimulation msg is dispatched and when wave simulator is refreshed. Generates or updates the SVG for a specific waveform whetehr needed or not. The SVG depends on cycle width as well as start/stop clocks and design. Assumes that the fast simulation data has not changed and has enough cycles

ws : WaveSimModel
index : WaveIndexT
wave : Wave
Returns: Wave

highlightCircuit fs comps wave dispatch

Full Usage: highlightCircuit fs comps wave dispatch

Parameters:
Returns: Unit
fs : FastSimulation
comps : ComponentId list
wave : Wave
dispatch : Msg -> Unit
Returns: Unit

makeWaveformsWithTimeOut timeOut ws allWaves wavesToBeMade

Full Usage: makeWaveformsWithTimeOut timeOut ws allWaves wavesToBeMade

Parameters:
Returns: Map<WaveIndexT, Wave> * int * float option

This function regenerates all the waveforms listed on wavesToBeMade. Generation is subject to timeout, so may not complete. Returns tuple: allWaves (with new waveforms); numberDone (no of waveforms made); timeToDo; Some (time actually taken) (> timeout) or None if complete with no timeOut.

timeOut : float option
ws : WaveSimModel
allWaves : Map<WaveIndexT, Wave>
wavesToBeMade : WaveIndexT list
Returns: Map<WaveIndexT, Wave> * int * float option

nameRows model wsModel dispatch

Full Usage: nameRows model wsModel dispatch

Parameters:
Returns: ReactElement list

Create label of waveform name for each selected wave. Note that this is generated after calling selectedWaves. Any changes to this function must also be made to valueRows and waveRows, as the order of the waves matters here. This is because the wave viewer is comprised of three columns of many rows, rather than many rows of three columns.

model : Model
wsModel : WaveSimModel
dispatch : Msg -> unit
Returns: ReactElement list

namesColumn model wsModel dispatch

Full Usage: namesColumn model wsModel dispatch

Parameters:
Returns: ReactElement

Create column of waveform names

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

ramTable wsModel (arg2, arg3)

Full Usage: ramTable wsModel (arg2, arg3)

Parameters:
Returns: ReactElement

Table showing contents of a RAM component.

wsModel : WaveSimModel
arg1 : FComponentId
arg2 : string
Returns: ReactElement

ramTableRow (arg1, arg2, arg3)

Full Usage: ramTableRow (arg1, arg2, arg3)

Parameters:
Returns: ReactElement

Table row that shows the address and data of a RAM component.

arg0 : string
arg1 : string
arg2 : RamRowType
Returns: ReactElement

ramTables wsModel

Full Usage: ramTables wsModel

Parameters:
Returns: ReactElement

Bulma Level component of tables showing RAM contents.

wsModel : WaveSimModel
Returns: ReactElement

refreshButtonAction (arg1, arg2) model dispatch arg5

Full Usage: refreshButtonAction (arg1, arg2) model dispatch arg5

Parameters:

Refresh the state of the wave simulator according to the model and canvas state. Redo a new simulation. Set inputs to default values. Then call refreshWaveSim via RefreshWaveSim message. 1st parameter ofrefreshWaveSin will be set true which causes all waves to be necessarily regenerated.

arg0 : Component list
arg1 : Connection list
model : Model
dispatch : Msg -> unit
arg4 : 'a

refreshWaveSim newSimulation wsModel model

Full Usage: refreshWaveSim newSimulation wsModel model

Parameters:
Returns: Model * Cmd<Msg>

Major function called after changes to extend simulation and/or redo waveforms. Note that after design change simulation muts be redonne externally, and function called with newSimulation = true. First extend simulation, if needed, with timeout and callback from Spinner if needed. Then remake any waveforms which have changed and not yet been remade. Again if needed with timeOut and callback from Spinner. Spinner (in reality a progress bar) is used if the estimated time to completion is longer than a constant. To get the estimate some initial execution must be completed (1 clock cycle and one waveform).

newSimulation : bool
wsModel : WaveSimModel
model : Model
Returns: Model * Cmd<Msg>

showWaveforms model wsModel dispatch

Full Usage: showWaveforms model wsModel dispatch

Parameters:
Returns: ReactElement

Display the names, waveforms, and values of selected waveforms

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

topHalf (arg1, arg2) model dispatch

Full Usage: topHalf (arg1, arg2) model dispatch

Parameters:
Returns: ReactElement

ReactElement showing instructions and wave sim buttons

arg0 : Component list
arg1 : Connection list
model : Model
dispatch : Msg -> unit
Returns: ReactElement

updateSpinner name payload numToDo model

Full Usage: updateSpinner name payload numToDo model

Parameters:
Returns: Model

Start or update a spinner popup

name : string
payload : Model -> Model
numToDo : int
model : Model
Returns: Model

valueRows wsModel

Full Usage: valueRows wsModel

Parameters:
Returns: int * ReactElement list

Create label of waveform value for each selected wave at a given clk cycle. Note that this is generated after calling selectedWaves. Any changes to this function must also be made to nameRows and waveRows, as the order of the waves matters here. This is because the wave viewer is comprised of three columns of many rows, rather than many rows of three columns. Return required width of values column in pixels, and list of cloumn react elements.

wsModel : WaveSimModel
Returns: int * ReactElement list

viewWaveSim (arg1, arg2) model dispatch

Full Usage: viewWaveSim (arg1, arg2) model dispatch

Parameters:
Returns: ReactElement

Entry point to the waveform simulator.

arg0 : Component list
arg1 : Connection list
model : Model
dispatch : Msg -> Unit
Returns: ReactElement

waveformColumn wsModel dispatch

Full Usage: waveformColumn wsModel dispatch

Parameters:
Returns: ReactElement

Generate a column of waveforms corresponding to selected waves.

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

waveformIsUptodate ws wave

Full Usage: waveformIsUptodate ws wave

Parameters:
Returns: bool

Detects if SVG is correct, based on zoom & position & existence The fast simulation data is assumed unchanged

ws : WaveSimModel
wave : Wave
Returns: bool

zoomButtons wsModel dispatch

Full Usage: zoomButtons wsModel dispatch

Parameters:
Returns: ReactElement

Click on these buttons to change the number of visible clock cycles.

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

Type something to start searching.