Header menu logo issie

FastRun Module

Nested modules

Modules Description

Constants

Functions and values

Function or value Description

buildFastSimulation simulationArraySize diagramName graph

Full Usage: buildFastSimulation simulationArraySize diagramName graph

Parameters:
Returns: Result<FastSimulation, SimulationError>

Create a fast simulation data structure, with all necessary arrays, and components ordered for evaluation. This function also creates the reducer functions for each component similar to the reducer builder in Builder, but with inputs and outputs using the FastSimulation mutable arrays

simulationArraySize : int
diagramName : string
graph : SimulationGraph
Returns: Result<FastSimulation, SimulationError>

buildFastSimulationFData simulationArraySize diagramName graph

Full Usage: buildFastSimulationFData simulationArraySize diagramName graph

Parameters:
Returns: Result<FastSimulation, SimulationError>
simulationArraySize : int
diagramName : string
graph : SimulationGraph
Returns: Result<FastSimulation, SimulationError>

canBeReduced fs step fc

Full Usage: canBeReduced fs step fc

Parameters:
Returns: bool
Modifiers: inline

True if all conditions are fulfiled for the component to be in the next batch to be reduced. Used when ordering components.

fs : FastSimulation
step : int
fc : FastComponent
Returns: bool

changeInput cid input step fastSim

Full Usage: changeInput cid input step fastSim

Parameters:

Change an input and make simulation correct. N.B. step must be the latest time-step since future steps are not rerun (TODO: perhaps they should be!)

cid : ComponentId
input : FSInterface
step : int
fastSim : FastSimulation

changeInputBatch step fastSim changes

Full Usage: changeInputBatch step fastSim changes

Parameters:

Change multiple inputs in one batch before re-running the simulation NOTE - Only used in TruthTable

step : int
fastSim : FastSimulation
changes : (ComponentId * FSInterface) list

changeInputFData cid input step fastSim

Full Usage: changeInputFData cid input step fastSim

Parameters:
cid : ComponentId
input : FSInterface
step : int
fastSim : FastSimulation

checkAndValidate fs

Full Usage: checkAndValidate fs

Parameters:
Returns: Result<FastSimulation, SimulationError>

Check all the active FastComponents to ensure everything is valid Use data from initialisation to write any not-yet-written component output widths

fs : FastSimulation
Returns: Result<FastSimulation, SimulationError>

checkAndValidateFData fs

Full Usage: checkAndValidateFData fs

Parameters:
Returns: Result<FastSimulation, SimulationError>
fs : FastSimulation
Returns: Result<FastSimulation, SimulationError>

compareLoadedStates fs (arg2, arg3) p

Full Usage: compareLoadedStates fs (arg2, arg3) p

Parameters:
Returns: bool
fs : FastSimulation
arg1 : Component list
arg2 : Connection list
p : Project option
Returns: bool

createFastArrays fs gather

Full Usage: createFastArrays fs gather

Parameters:
Returns: FastSimulation
fs : FastSimulation
gather : GatherData
Returns: FastSimulation

extractFastSimulationIOs simIOs simulationData

Full Usage: extractFastSimulationIOs simIOs simulationData

Parameters:
Returns: (SimulationIO * FSInterface) list

Extract top-level inputs or outputs with names and wire widths. Used by legacy code.

simIOs : SimulationIO list
simulationData : SimulationData
Returns: (SimulationIO * FSInterface) list

extractFastSimulationIOsFData simIOs simulationData

Full Usage: extractFastSimulationIOsFData simIOs simulationData

Parameters:
Returns: (SimulationIO * FSInterface) list
simIOs : SimulationIO list
simulationData : SimulationData
Returns: (SimulationIO * FSInterface) list

extractFastSimulationOutput fs step (arg3, arg4) opn

Full Usage: extractFastSimulationOutput fs step (arg3, arg4) opn

Parameters:
Returns: FSInterface

return output port data from simulation as a Bit list Each element in list is one bit

fs : FastSimulation
step : int
arg2 : ComponentId
arg3 : ComponentId list
opn : OutputPortNumber
Returns: FSInterface

extractFastSimulationOutputFData fs step (arg3, arg4) opn

Full Usage: extractFastSimulationOutputFData fs step (arg3, arg4) opn

Parameters:
Returns: FSInterface
fs : FastSimulation
step : int
arg2 : ComponentId
arg3 : ComponentId list
opn : OutputPortNumber
Returns: FSInterface

extractFastSimulationState fs step (arg3, arg4)

Full Usage: extractFastSimulationState fs step (arg3, arg4)

Parameters:
Returns: SimulationComponentState

return state data from simulation

fs : FastSimulation
step : int
arg2 : ComponentId
arg3 : ComponentId list
Returns: SimulationComponentState

extractFastSimulationWidth fs (arg2, arg3) opn

Full Usage: extractFastSimulationWidth fs (arg2, arg3) opn

Parameters:
Returns: int
fs : FastSimulation
arg1 : ComponentId
arg2 : ComponentId list
opn : OutputPortNumber
Returns: int

extractStatefulComponents step fastSim

Full Usage: extractStatefulComponents step fastSim

Parameters:
Returns: (FastComponent * SimulationComponentState)[]
step : int
fastSim : FastSimulation
Returns: (FastComponent * SimulationComponentState)[]

extractViewers simulationData

Full Usage: extractViewers simulationData

Parameters:
Returns: ((string * string) * int * FSInterface) list

Extract all Viewer components with names and wire widths. Used by legacy code.

simulationData : SimulationData
Returns: ((string * string) * int * FSInterface) list

findSimulationComponent (arg1, arg2) sd

Full Usage: findSimulationComponent (arg1, arg2) sd

Parameters:
Returns: SimulationComponent

Look up a simulation component (not a FastComponent)

arg0 : ComponentId
arg1 : ComponentId list
sd : SimulationData
Returns: SimulationComponent

findSimulationComponentOpt (arg1, arg2) graph

Full Usage: findSimulationComponentOpt (arg1, arg2) graph

Parameters:
Returns: SimulationComponent option

Look up a simulation (not a FastSimulation) component or return None.

arg0 : ComponentId
arg1 : ComponentId list
graph : SimulationGraph
Returns: SimulationComponent option

getFLabel fs (arg2, arg3)

Full Usage: getFLabel fs (arg2, arg3)

Parameters:
Returns: string * string
fs : FastSimulation
arg1 : ComponentId
arg2 : ComponentId list
Returns: string * string

isComb comp

Full Usage: isComb comp

Parameters:
Returns: bool
Modifiers: inline

True if the component is combinational

comp : FastComponent
Returns: bool

printComp fs step fc

Full Usage: printComp fs step fc

Parameters:
Returns: string

print function for debugging

fs : FastSimulation
step : int
fc : FastComponent
Returns: string

runFastSimulation timeOut lastStepNeeded fs

Full Usage: runFastSimulation timeOut lastStepNeeded fs

Parameters:
Returns: float option

Run an existing fast simulation up to the given number of steps. This function will mutate the write-once data arrays of simulation data and only simulate the new steps needed, so it may return immediately doing no work. If the simulation data arrays are not large enough they are extended up to a limit. After that, they act as a circular buffer. TimeOut if not None is the cutoff time after which the simulation terminates execution unfinished. Use fs.ClockTick to determine whether simulation has completed. returns speed, in clock cycles per ms, or None if complete

timeOut : float option
lastStepNeeded : int
fs : FastSimulation
Returns: float option

Type something to start searching.