FastCreate Module
Functions and values
| Function or value | Description |
Full Usage:
addComponentWaveDrivers f fc pType
Parameters:
FastSimulation
fc : FastComponent
pType : PortType
Returns: WaveIndexT[] array
|
|
Full Usage:
addWaveIndexAndDrivers waveComps f
Parameters:
Map<FComponentId, FastComponent>
f : FastSimulation
Returns: WaveIndexT array
|
Called after the fs.Drivers array is created. waveComps must contain all components that can be viewed in the wave simulation. This function mutates fs.Drivers adding the correct arrays where these are used. In some cases an array may never be used and therefore is not added. In parallel with this, the function returns an array of WaveIndexT records that reference component ports which can be viewed in a wave simulation. Every WaveIndex references an element of fs.Drivers from which the simulation data is found.
|
|
|
Full Usage:
assertThat cond msg
Parameters:
bool
msg : string
Modifiers: inline |
|
Full Usage:
checkSimulationFits arraySize cost
Parameters:
int
cost : StepCost
Returns: Result<unit, SimulationError>
|
Refuse a simulation whose step arrays would not fit, before a byte of them is allocated. Before rather than after, because the arrays ARE what exhausts memory: a check that had to build them first would be the thing it is meant to prevent. Everything it needs is known by then - the flattened design gives every width, and the caller has said how many cycles it wants - so the answer is exact rather than a guess. A Result and not an exception: this is a limit an ordinary user reaches by asking for a long waveform simulation of a big design, so it travels the same path as any other simulation error and is shown the same way, saying what would fit instead.
|
|
|
Full Usage:
createFastComponent maxArraySize sComp accessPath
Parameters:
int
sComp : SimulationComponent
accessPath : ComponentId list
Returns: FastComponent
|
|
Full Usage:
createInitFastCompPhase simulationArraySize g f
Parameters:
int
g : GatherData
f : FastSimulation
Returns: FastSimulation
|
|
|
|
Full Usage:
emptyFastSimulation diagramName
Parameters:
string
Returns: FastSimulation
|
|
|
|
Full Usage:
finishStepArena ()
Parameters:
unit
|
|
|
|
Full Usage:
getFid cid ap
Parameters:
ComponentId
ap : ComponentId list
Returns: ComponentId * ComponentId list
|
|
|
|
Full Usage:
linkFastComponents g f
Parameters:
GatherData
f : FastSimulation
Returns: FastSimulation
|
Use the Outputs links from the original SimulationComponents in gather to link together the data arrays of the FastComponents. InputLinks[i] array is set equal to the correct driving Outputs array so that Input i reads the data reduced by the correct output of the component that drives it. The main work is dealing with custom components which represent whole design sheets with recursively defined component graphs The custom component itself is not linked, and does not exist as a simulatable FastComponent. Note: custom components are linked in later as unsimulatable placeholders to allow wave simulation to access ports Instead its CustomSimulationGraph Input and Output components are linked to the components that connect the corresponding inputs and outputs of the custom component.
|
Full Usage:
linkFastCustomComponentsToDriverArrays fs (arg2, arg3) fc
Parameters:
FastSimulation
arg1 : ComponentId
arg2 : ComponentId list
fc : FastComponent
Returns: Unit
|
|
|
|
|
|
|
|
|
|
|
|
Full Usage:
startStepArena ()
Parameters:
unit
|
|
Full Usage:
stepArrayIndex
Returns: int
|
|
Full Usage:
stepBytesForWidth w
Parameters:
int
Returns: int
|
|
|
What one clock cycle of this design will cost, worked out from the flattened design before the arrays exist. createInitFastCompPhase allocates exactly one step array per output port of every component in AllComps, so that is what is counted here. AllComps includes the custom components, whose output arrays are allocated and then replaced by links to the arrays inside them (linkFastCustomComponentsToDriverArrays). Those arrays come out of the step-array arena along with everything else, and arena space is not reclaimed until the whole simulation goes - so this count is exactly what a built simulation occupies, the replaced quarter included, not an estimate of it. The per-step State array is counted too. Only RAMs ever write it, but createFastComponent allocates one for every component that could be synchronous - customs included - so on a register-heavy design it is real memory, and the estimate that omitted it said a design was smaller than it is.
|