Issie logo Issie

WaveSimSVGs Module

Functions to make SVGs of waveforms from FastSimulation data

Types and nested modules

Type/Module Description

Constants

Transition

create a new array which samples the old one every mult cycles. start: index of first cycle. count: number of samples. 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. Determines whether a non-binary waveform changes value at the beginning of that clock cycle. Waveforms can be either binary or non-binary; these have different properties.

Functions and values

Function or value Description

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

displayBigIntOnWave wsModel width waveValues transitions gapCache

Full Usage: displayBigIntOnWave wsModel width waveValues transitions gapCache

Parameters:
Returns: ReactElement list

Generates SVG to display bigint values on waveforms.

Should be refactored together with displayUInt32OnWave.

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

displayUInt32OnWave wsModel width waveValues transitions gapCache

Full Usage: displayUInt32OnWave wsModel width waveValues transitions gapCache

Parameters:
Returns: ReactElement list

Generates SVG to display non-binary values on waveforms.

Should be refactored together with displayBigIntOnWave.

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

drawnFor ws wave

Full Usage: drawnFor ws wave

Parameters:
Returns: Drawn option

The waveform to put on screen for one wave: the view the controls ask for where its data is here, and otherwise the one it is already showing. Called from the view, for every wave, on every render. Three outcomes, in the order they are tried: the waveform asked for has already been made, so it is reused; it has not, and the data is here, so it is made and kept; the data is not here, so what is on screen stays there. Only the last is a judgement, and it is the one the user asked for - a viewer that empties itself while it waits looks broken, one that shows the last view for a moment does not. None only before anything has ever been drawn for this wave, which is the moment a wave is added to the selection. An empty row is right there: there is nothing older to show.

ws : WaveSimModel
wave : Wave
Returns: Drawn option

getWaveValue ws wave

Full Usage: getWaveValue ws wave

Parameters:
Returns: FastData option

The value the cursor is on, read from the waveform that is DRAWN beside it. Not from the cache and not by clock cycle. The cursor is a column of the picture, so the value next to it is the sample that column was drawn from - which while the picture is a window behind the controls is not the cycle the numbers above it say. Reading by cycle instead answered nothing at all there, and a column of "?" beside perfectly good waveforms is a worse lie than a value that matches what is on screen. None where nothing is drawn for this wave, or the cursor is off the end of what is: an empty row has no value, and neither has a column that is not there. Goes through `drawnFor` rather than reading the memo, so that it does not matter whether the value column or the waveform column is built first: whichever gets there does the drawing and the other finds it done. Reading the memo instead was a render behind on any render that changed the picture.

ws : WaveSimModel
wave : Wave
Returns: FastData option

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

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

Retrieve value of wave at given clock cycle as an int. At extra (sampling) zoom this allows detail clock cycles within one sample therefore clkCycleDetail IS NOT scaled the same as the sample numbers used everywhere else. Make left and right x-coordinates for a clock cycle.

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

nonBinaryFillPoints startCycle clkCycleWidth gap

Full Usage: nonBinaryFillPoints startCycle clkCycleWidth gap

Parameters:
    startCycle : int
    clkCycleWidth : float
    gap : Gap

Returns: XYPos array

Generate polyfill points for a non-binary gap via gap info.

startCycle : int
clkCycleWidth : float
gap : Gap
Returns: XYPos array

nonBinaryWavePoints clkCycleWidth startCycle index transition

Full Usage: nonBinaryWavePoints clkCycleWidth startCycle index transition

Parameters:
Returns: XYPos array * XYPos array

Generate polyline points for a non-binary waveform via transition info.

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

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.