Header menu logo issie

GraphMerger Module

Functions and values

Function or value Description

checkExpansionFits topSheet (arg2, arg3) ldcs

Full Usage: checkExpansionFits topSheet (arg2, arg3) ldcs

Parameters:
Returns: Result<unit, SimulationError>

Refuse a design whose expanded graph will not fit in memory, before any of it is built.

topSheet : string
arg1 : Component list
arg2 : Connection list
ldcs : LoadedComponent list
Returns: Result<unit, SimulationError>

expandedComponentCount topSheet (arg2, arg3) ldcs

Full Usage: expandedComponentCount topSheet (arg2, arg3) ldcs

Parameters:
Returns: float

How many SimulationComponents the merged graph will hold.

topSheet : string
arg1 : Component list
arg2 : Connection list
ldcs : LoadedComponent list
Returns: float

expandedHeapEstimate topSheet (arg2, arg3) ldcs

Full Usage: expandedHeapEstimate topSheet (arg2, arg3) ldcs

Parameters:
Returns: float

What the expanded design will cost in heap, by the same reckoning checkExpansionFits refuses on. Costs a walk of each sheet's canvas and never of the expansion, so it is cheap enough to ask before every simulation - which the waveform simulator does, to decide how many clock cycles to start with rather than only whether to start at all.

topSheet : string
arg1 : Component list
arg2 : Connection list
ldcs : LoadedComponent list
Returns: float

expandedSize topSheet (arg2, arg3) ldcs

Full Usage: expandedSize topSheet (arg2, arg3) ldcs

Parameters:
Returns: float * float

How many SimulationComponents the merged graph will hold, and how many ports they have between them - which is what says what they will cost.

topSheet : string
arg1 : Component list
arg2 : Connection list
ldcs : LoadedComponent list
Returns: float * float

mergeDependencies currDiagramName graph (arg3, arg4) loadedDependencies

Full Usage: mergeDependencies currDiagramName graph (arg3, arg4) loadedDependencies

Parameters:
Returns: Result<SimulationGraph, SimulationError>
 Try to resolve all the dependencies in a graph, and replace the reducer
 of the custom components with a simulationgraph.
 
 Merges dependencies into the simulation graph and resolves all parameters.
 
 The name of the current sheet being processed
 The initial simulation graph to merge dependencies into
 The current canvas state
 List of all loaded component sheets
 
 Success: A fully merged and parameterized simulation graph
 Error: Details of any dependency or parameter resolution failures
 
 
 Parameter Resolution:

 Stage 1 - Merging (via merger function):
 - Custom components are replaced with their internal graphs
 - Parameter resolution is DEFERRED to avoid forward reference issues
 - Each custom component's graph is stored in CustomSimulationGraph field

 Stage 2 - Parameter Resolution (resolveParametersInSimulationGraph, after all merging):
 - The top sheet is resolved with its own default bindings
 - Each sheet below is resolved with the bindings of the instance containing it, so instance
   bindings override defaults
 - Sheets whose bindings give the same difference from their defaults are resolved once

 
currDiagramName : string
graph : SimulationGraph
arg2 : Component list
arg3 : Connection list
loadedDependencies : LoadedComponent list
Returns: Result<SimulationGraph, SimulationError>

resolveParametersInSimulationGraph bindings currDiagramName (arg3, arg4) loadedDependencies graph

Full Usage: resolveParametersInSimulationGraph bindings currDiagramName (arg3, arg4) loadedDependencies graph

Parameters:
Returns: Result<SimulationGraph, SimulationError>

Resolve every parameterised slot in a sheet and, recursively, in the sheets of the custom components it contains. `state` is unused: the slots come from the LoadedComponent.

bindings : Map<ParamName, ParamExpression>
currDiagramName : string
arg2 : Component list
arg3 : Connection list
loadedDependencies : LoadedComponent list
graph : SimulationGraph
Returns: Result<SimulationGraph, SimulationError>

Type something to start searching.