Header menu logo issie

WaveSimHelpers Module

Types and nested modules

Type/Module Description

Constants

BinaryTransition

Determines whether a clock cycle is generated with a vertical bar at the beginning, denoting that a waveform changes value at the start of that clock cycle. NB this does not determine whether a waveform changes value at the end of that clock cycle. TODO: Remove this since it is unnecessary. Can use WaveValues instead.

Gap

Stores information about gaps between NonBinaryTransitions. Used in displayValuesOnWave

NonBinaryTransition

Determines whether a non-binary waveform changes value at the beginning of that clock cycle.

PortIndex

convenience type for use when checking which drivers are connected

Transition

Waveforms can be either binary or non-binary; these have different properties.

WaveSimButtonOptions

Functions and values

Function or value Description

allConnectedPorts fs sp

Full Usage: allConnectedPorts fs sp

Parameters:
Returns: SheetPort list

Given a list of ports, get all ports connected to any port in it. used by connsOfWave

fs : FastSimulation
sp : SheetPort list
Returns: SheetPort list

binaryWavePoints clkCycleWidth startCycle index transition

Full Usage: binaryWavePoints clkCycleWidth startCycle index transition

Parameters:
    clkCycleWidth : float
    startCycle : int
    index : int
    transition : BinaryTransition

Returns: XYPos array

Generate points for a binary waveform

clkCycleWidth : float
startCycle : int
index : int
transition : BinaryTransition
Returns: XYPos array

bitLimsString (a, b)

Full Usage: bitLimsString (a, b)

Parameters:
    a : int
    b : int

Returns: string

get string in the [x:x] format given the bit limits output representation of bus width

a : int
b : int
Returns: string

button options func label

Full Usage: button options func label

Parameters:
Returns: ReactElement

Helper function to create Bulma buttons

options : Option list
func : MouseEvent -> unit
label : ReactElement
Returns: ReactElement

calculateBinaryTransitions waveValues

Full Usage: calculateBinaryTransitions waveValues

Parameters:
    waveValues : FData array

Returns: BinaryTransition array

Determine transitions for each clock cycle of a binary waveform. Assumes that waveValues starts at clock cycle 0.

waveValues : FData array
Returns: BinaryTransition array

calculateBinaryTransitionsBigInt waveValues

Full Usage: calculateBinaryTransitionsBigInt waveValues

Parameters:
    waveValues : bigint array

Returns: BinaryTransition array
waveValues : bigint array
Returns: BinaryTransition array

calculateBinaryTransitionsUInt32 waveValues

Full Usage: calculateBinaryTransitionsUInt32 waveValues

Parameters:
    waveValues : uint32 array

Returns: BinaryTransition array
waveValues : uint32 array
Returns: BinaryTransition array

calculateNonBinaryTransitions waveValues

Full Usage: calculateNonBinaryTransitions waveValues

Parameters:
    waveValues : 'a array

Returns: NonBinaryTransition array

Determine transitions for each clock cycle of a non-binary waveform. Assumes that waveValues starts at clock cycle 0.

waveValues : 'a array
Returns: NonBinaryTransition array

camelCaseDottedWords text

Full Usage: camelCaseDottedWords text

Parameters:
    text : string

Returns: string

convert a string to CamelCase:

text : string
Returns: string

checkIfMemoryCompsOutOfDate p fs

Full Usage: checkIfMemoryCompsOutOfDate p fs

Parameters:
Returns: bool

returns true if any memory component in fs linked to a .ram file is outofdate because of the .ram file changing

p : Project
fs : FastSimulation
Returns: bool

connectedIOs fs sp

Full Usage: connectedIOs fs sp

Parameters:
Returns: SheetPort list

given an IOlabel port, get all same-name IOLabels on the same sheet

fs : FastSimulation
sp : SheetPort
Returns: SheetPort list

connectedPorts fs sheetPort

Full Usage: connectedPorts fs sheetPort

Parameters:
Returns: SheetPort list

given a SheetPort, get all directly connected SheetPorts

fs : FastSimulation
sheetPort : SheetPort
Returns: SheetPort list

connsOfWave fs wave

Full Usage: connsOfWave fs wave

Parameters:
Returns: ConnectionId list

Get all the connections of a given wave signal

fs : FastSimulation
wave : Wave
Returns: ConnectionId list

endButtonAction canvasState model dispatch ev

Full Usage: endButtonAction canvasState model dispatch ev

Parameters:
    canvasState : 'a
    model : Model
    dispatch : Msg -> unit
    ev : 'b

end the current simulation

canvasState : 'a
model : Model
dispatch : Msg -> unit
ev : 'b

endCycle wsModel

Full Usage: endCycle wsModel

Parameters:
Returns: int

Right-most visible clock cycle.

wsModel : WaveSimModel
Returns: int

extendSimulation timeOut ws

Full Usage: extendSimulation timeOut ws

Parameters:
Returns: float option

Run ws.FastSim if necessary to ensure simulation has number of steps needed to display all cycles on screen. TimeOut is an optional time out used to implement a progress bar.

timeOut : float option
ws : WaveSimModel
Returns: float option

getCompDetails fs wave

Full Usage: getCompDetails fs wave

Parameters:
Returns: string

determines how components are dispalyed in waveform selector

fs : FastSimulation
wave : Wave
Returns: string

getCompGroup fs wave

Full Usage: getCompGroup fs wave

Parameters:
Returns: ComponentGroup

Which group (for selector classification) is a component in?

fs : FastSimulation
wave : Wave
Returns: ComponentGroup

getConnectedComponentPorts ws (arg2, arg3, arg4)

Full Usage: getConnectedComponentPorts ws (arg2, arg3, arg4)

Parameters:
Returns: PortIndex list

Some components have input and output connected - return both ports in that case

ws : WaveSimModel
arg1 : FastComponent
arg2 : int
arg3 : PortType
Returns: PortIndex list

getConnectedWaves ws wave

Full Usage: getConnectedWaves ws wave

Parameters:
Returns: Wave list

get all waves electrically connected to a given wave

ws : WaveSimModel
wave : Wave
Returns: Wave list

getFastSimualationLinkedPorts fs (arg2, arg3, arg4)

Full Usage: getFastSimualationLinkedPorts fs (arg2, arg3, arg4)

Parameters:
Returns: Map<FComponentId, (SimulationComponent * ComponentId list)>
fs : FastSimulation
arg1 : 'a
arg2 : 'b
arg3 : 'c
Returns: Map<FComponentId, (SimulationComponent * ComponentId list)>

getInputPortNumber ipn

Full Usage: getInputPortNumber ipn

Parameters:
Returns: int

get integer from OutputPortNumber

ipn : InputPortNumber
Returns: int

getOutputPortNumber opn

Full Usage: getOutputPortNumber opn

Parameters:
Returns: int

get integer from OutputPortNumber

opn : OutputPortNumber
Returns: int

getWaveSimButtonOptions (arg1, arg2) model ws

Full Usage: getWaveSimButtonOptions (arg1, arg2) model ws

Parameters:
Returns: WaveSimButtonOptions

Return info about current state of waveform simulator which is used to switch buttons on/off etc.

arg0 : Component list
arg1 : Connection list
model : Model
ws : WaveSimModel
Returns: WaveSimButtonOptions

getWaveValue currClkCycle wave width

Full Usage: getWaveValue currClkCycle wave width

Parameters:
    currClkCycle : int
    wave : Wave
    width : int

Returns: FastData

Retrieve value of wave at given clock cycle as an int.

currClkCycle : int
wave : Wave
width : int
Returns: FastData

highZoom clkCycleWidth

Full Usage: highZoom clkCycleWidth

Parameters:
    clkCycleWidth : float

Returns: bool

If true, then show cross-hatch only for non-binary waves when wave is changing value very fast.

clkCycleWidth : float
Returns: bool

infoButton tooltipMessage style tooltipPosition

Full Usage: infoButton tooltipMessage style tooltipPosition

Parameters:
    tooltipMessage : string
    style : CSSProp list
    tooltipPosition : string

Returns: ReactElement

info button generation function

tooltipMessage : string
style : CSSProp list
tooltipPosition : string
Returns: ReactElement

isRamSelected (arg1, arg2) wsModel

Full Usage: isRamSelected (arg1, arg2) wsModel

Parameters:
Returns: bool
arg0 : ComponentId
arg1 : ComponentId list
wsModel : WaveSimModel
Returns: bool

isWaveSelected wsModel index

Full Usage: isWaveSelected wsModel index

Parameters:
Returns: bool
wsModel : WaveSimModel
index : WaveIndexT
Returns: bool

listCollectSomes mapFn lst

Full Usage: listCollectSomes mapFn lst

Parameters:
    mapFn : 'a -> 'b option
    lst : 'a list

Returns: 'b list
mapFn : 'a -> 'b option
lst : 'a list
Returns: 'b list

listMaxWithDef defaultValue lst

Full Usage: listMaxWithDef defaultValue lst

Parameters:
    defaultValue : 'a
    lst : 'a list

Returns: 'a
defaultValue : 'a
lst : 'a list
Returns: 'a

makeCoords clkCycleWidth clkCycle transition

Full Usage: makeCoords clkCycleWidth clkCycle transition

Parameters:
    clkCycleWidth : float
    clkCycle : int
    transition : Transition

Returns: XYPos * XYPos * XYPos * XYPos

Make top-left, top-right, bottom-left, bottom-right coordinates for a clock cycle.

clkCycleWidth : float
clkCycle : int
transition : Transition
Returns: XYPos * XYPos * XYPos * XYPos

makeXCoords clkCycleWidth clkCycle transition

Full Usage: makeXCoords clkCycleWidth clkCycle transition

Parameters:
    clkCycleWidth : float
    clkCycle : int
    transition : Transition

Returns: float * float

Make left and right x-coordinates for a clock cycle.

clkCycleWidth : float
clkCycle : int
transition : Transition
Returns: float * float

nameOfSubsheet fs subSheet

Full Usage: nameOfSubsheet fs subSheet

Parameters:
Returns: string

Get the name of a subsheet from its subsheet (string) path list to root of simulation.

fs : FastSimulation
subSheet : List<string>
Returns: string

nonBinaryWavePoints clkCycleWidth startCycle index transition

Full Usage: nonBinaryWavePoints clkCycleWidth startCycle index transition

Parameters:
Returns: XYPos array * XYPos array

Generate points for a non-binary waveform.

clkCycleWidth : float
startCycle : int
index : int
transition : NonBinaryTransition
Returns: XYPos array * XYPos array

path2fId fastSim path

Full Usage: path2fId fastSim path

Parameters:
Returns: FComponentId option
fastSim : FastSimulation
path : ComponentId list
Returns: FComponentId option

pointsToString points

Full Usage: pointsToString points

Parameters:
Returns: string

Convert XYPos list to string

points : XYPos array
Returns: string

portBits n

Full Usage: portBits n

Parameters:
    n : int

Returns: string
n : int
Returns: string

prefixOf pre whole

Full Usage: prefixOf pre whole

Parameters:
    pre : 'a list
    whole : 'a list

Returns: bool

Check if one list is an initial sublist of another

pre : 'a list
whole : 'a list
Returns: bool

printSPL tp fs spL

Full Usage: printSPL tp fs spL

Parameters:
Returns: SheetPort list

function to print a lits of SheetPort for debugging IOLabels

tp : string
fs : FastSimulation
spL : SheetPort list
Returns: SheetPort list

removeHighlights model dispatch

Full Usage: removeHighlights model dispatch

Parameters:

remove highlights on components generated by hovering on waveform labels

model : Model
dispatch : Msg -> unit

selectedWaves wsModel

Full Usage: selectedWaves wsModel

Parameters:
Returns: Wave list

List of selected waves (of type Wave)

wsModel : WaveSimModel
Returns: Wave list

selectionInfoButton

Full Usage: selectionInfoButton

Returns: ReactElement

button used to give hover message about selection filter box.

Returns: ReactElement

setSelectionOpen wsModel cBox show

Full Usage: setSelectionOpen wsModel cBox show

Parameters:
Returns: WaveSimModel
wsModel : WaveSimModel
cBox : CheckBoxStyle
show : bool
Returns: WaveSimModel

setWaveComponentSelectionOpen wsModel fIds show

Full Usage: setWaveComponentSelectionOpen wsModel fIds show

Parameters:
Returns: WaveSimModel

Sets or clears a subset of ShowComponentDetail

wsModel : WaveSimModel
fIds : FComponentId list
show : bool
Returns: WaveSimModel

setWaveGroupSelectionOpen wsModel grps show

Full Usage: setWaveGroupSelectionOpen wsModel grps show

Parameters:
Returns: WaveSimModel

Sets or clears a subset of ShowGroupDetail

wsModel : WaveSimModel
grps : (ComponentGroup * string list) list
show : bool
Returns: WaveSimModel

setWaveSheetSelectionOpen wsModel subSheets show

Full Usage: setWaveSheetSelectionOpen wsModel subSheets show

Parameters:
    wsModel : WaveSimModel
    subSheets : string list list
    show : bool

Returns: WaveSimModel

Sets or clears a subset of ShowSheetDetail

wsModel : WaveSimModel
subSheets : string list list
show : bool
Returns: WaveSimModel

sheetIdToName fastSim sheetId

Full Usage: sheetIdToName fastSim sheetId

Parameters:
Returns: string list
fastSim : FastSimulation
sheetId : ComponentId list
Returns: string list

sheetIdToSubsheets fastSim sheetId

Full Usage: sheetIdToSubsheets fastSim sheetId

Parameters:
Returns: string list
fastSim : FastSimulation
sheetId : ComponentId list
Returns: string list

singleWaveWidth m

Full Usage: singleWaveWidth m

Parameters:
Returns: float

Width of one clock cycle.

m : WaveSimModel
Returns: float

subSheetsToNameReact subSheets

Full Usage: subSheetsToNameReact subSheets

Parameters:
    subSheets : string list

Returns: ReactElement

get react element to display a subsheet indication as a dotted string

subSheets : string list
Returns: ReactElement

summaryName ws cBox subSheet waves

Full Usage: summaryName ws cBox subSheet waves

Parameters:
Returns: ReactElement

Name for summary field in details element. NB: There are fields which are commented out: these can be added back in later on if we want to group those components together by type rather than separately by name.

ws : WaveSimModel
cBox : CheckBoxStyle
subSheet : string list
waves : Wave list
Returns: ReactElement

td1 react

Full Usage: td1 react

Parameters:
Returns: ReactElement
react : ReactElement
Returns: ReactElement

tr1 react

Full Usage: tr1 react

Parameters:
Returns: ReactElement
react : ReactElement
Returns: ReactElement

viewBoxMinX m

Full Usage: viewBoxMinX m

Parameters:
Returns: string

Left-most coordinate of the SVG viewbox.

m : WaveSimModel
Returns: string

viewBoxWidth m

Full Usage: viewBoxWidth m

Parameters:
Returns: string

Total width of the SVG viewbox.

m : WaveSimModel
Returns: string

waveInfoButton dispatch

Full Usage: waveInfoButton dispatch

Parameters:
Returns: ReactElement

button driving a popup with a page of info about waveform simulator

dispatch : Msg -> Unit
Returns: ReactElement

waveToSheetPort fs wave

Full Usage: waveToSheetPort fs wave

Parameters:
Returns: SheetPort list

Work out a SheetPort from a wave, if one exists SheetPorts may not exist in some corner cases when simulation is ending etc.

fs : FastSimulation
wave : Wave
Returns: SheetPort list

wavesToIds waves

Full Usage: wavesToIds waves

Parameters:
Returns: WaveIndexT list

Convert Wave list to list of WaveIndexT

waves : Wave list
Returns: WaveIndexT list

xShift clkCycleWidth

Full Usage: xShift clkCycleWidth

Parameters:
    clkCycleWidth : float

Returns: float

Left-shift non-binary waveforms by this much.

clkCycleWidth : float
Returns: float

Type something to start searching.