FastExtract Module
Functions and values
| Function or value | Description |
Full Usage:
changeInput cid input step fastSim
Parameters:
ComponentId
input : FSInterface
step : int
fastSim : FastSimulation
|
|
Full Usage:
changeInputBatch step fastSim changes
Parameters:
int
fastSim : FastSimulation
changes : (ComponentId * FSInterface) list
|
|
Full Usage:
changeInputFData cid input step fastSim
Parameters:
ComponentId
input : FSInterface
step : int
fastSim : FastSimulation
|
|
Full Usage:
compareLoadedStates fs (arg2, arg3) p
Parameters:
FastSimulation
arg1 : Component list
arg2 : Connection list
p : Project option
Returns: bool
|
Check if the components and connections of a fast simulation and a canvas are the same. Is the design the simulation was built from still what the project holds? False puts the Refresh button up. Asked of DesignAsDrawn and not of the SIMULATED sheets, because the two differ for a design holding an array component: there the simulation is of a wrapper and a body, and the project has neither - so every such simulation reported itself edited the moment it started.
|
|
Every step array of a build, dense by its own index - what turns a driver HANDLE back into the array it names, in one indexed load. A driver index is what the port slice hands the renderer (PortView.sheetSliceOf) and what a read quotes back, so the simulator answering reads must be able to look one up without the wave tables a lean build does not have. Slots nothing owns - a clocked component's state array, allocated an index but not an IOArray - stay None, and a read naming one is an error. Memoised on the simulation: one array per build, the length of NumStepArrays, filled by one walk of the components. On the renderer this is never built - the renderer reads no arrays by handle - so the memo costs nothing there.
|
Full Usage:
extractFastSimulationIOs simIOs simulationData
Parameters:
SimulationIO list
simulationData : SimulationData
Returns: (SimulationIO * FSInterface) list
|
|
Full Usage:
extractFastSimulationIOsFData simIOs simulationData
Parameters:
SimulationIO list
simulationData : SimulationData
Returns: (SimulationIO * FSInterface) list
|
|
Full Usage:
extractFastSimulationOutput fs step (arg3, arg4) opn
Parameters:
FastSimulation
step : int
arg2 : ComponentId
arg3 : ComponentId list
opn : OutputPortNumber
Returns: FSInterface
|
|
Full Usage:
extractFastSimulationOutputFData fs step (arg3, arg4) opn
Parameters:
FastSimulation
step : int
arg2 : ComponentId
arg3 : ComponentId list
opn : OutputPortNumber
Returns: FSInterface
|
|
Full Usage:
extractFastSimulationState fs step (arg3, arg4)
Parameters:
FastSimulation
step : int
arg2 : ComponentId
arg3 : ComponentId list
Returns: SimulationComponentState
|
|
Full Usage:
extractFastSimulationWidth fs (arg2, arg3) opn
Parameters:
FastSimulation
arg1 : ComponentId
arg2 : ComponentId list
opn : OutputPortNumber
Returns: int
|
|
Full Usage:
extractStatefulComponents step fastSim
Parameters:
int
fastSim : FastSimulation
Returns: (FastComponent * SimulationComponentState) array
|
|
Full Usage:
extractViewers simulationData
Parameters:
SimulationData
Returns: ((string * string) * int * FSInterface) list
|
|
Full Usage:
extractViewersFData simulationData
Parameters:
SimulationData
Returns: ((string * string) * int * FSInterface) list
|
|
Full Usage:
getArrayOfOutputs fc outputNum ticks
Parameters:
FastComponent
outputNum : int
ticks : int
Returns: bigint array
|
|
Full Usage:
getFLabel fs (arg2, arg3)
Parameters:
FastSimulation
arg1 : ComponentId
arg2 : ComponentId list
Returns: string * string
|
|
Full Usage:
getFastComponentInput fc inputNum step
Parameters:
FastComponent
inputNum : int
step : int
Returns: bigint
Modifiers: inline |
Get the input value of a fast component as a bigint. fc: the fast component to get the input from. inputNum: which input as numbered in the inputs array. step: which time step to get the value from. used by waveSimSVGs, maybe this function could be moved there and optimised as code there at cost of modularity.
|
Full Usage:
getFastComponentOutput fc outputNum step
Parameters:
FastComponent
outputNum : int
step : int
Returns: bigint
Modifiers: inline |
Get the output value of a fast component as a bigint. fc: the fast component to get the output from. outputNum: which output as numbered in the outputs array. step: which time step to get the value from. used by waveSimSVGs, maybe this function could be moved there and optimised as code there at cost of modularity.
|
Full Usage:
outputsAreTheSameAsDefault fs fc tick currdefault
Parameters:
FastSimulation
fc : FastComponent
tick : int
currdefault : bigint
Returns: bool
|
|
Full Usage:
sampleOfArray fs io cycle
Parameters:
FastSimulation
io : IOArray
cycle : int
Returns: bigint option
|
|
Full Usage:
tryFindOutputArray fs (arg2, arg3) opn
Parameters:
FastSimulation
arg1 : ComponentId
arg2 : ComponentId list
opn : OutputPortNumber
Returns: Result<IOArray, string>
|
The step array an output port's data lives in, resolved ONCE. Everything `extractFastSimulationOutput` does per read except the read itself: the map lookup on (component, access path) - a structural comparison on a list - and the hop through FCustomOutputCompLookup that answers a custom component's output with the array of the Output component inside the subsheet. What comes back is the array and its width, from which a value at a cycle is an indexed load. For anything reading MANY samples of the same signal. Reading a whole window per sample cost that lookup, a FastData and an FSInterface allocation, and a conversion to bigint, per sample - for a wave that is often one bit wide. A Result, not an exception: the caller may be a server answering a request it did not compose, where a bad signal name is an answer rather than a crash.
|