Issie logo Issie

ISimulator Type

A simulator, wherever it runs. Every member is asynchronous because one implementation is a separate process. An in-renderer implementation returns already-resolved promises, which costs a microtask and buys one code path in the caller. Not yet here, and deliberately: reading a RAM's contents, which needs a row type that is declared in the waveform UI and has to move first; and the simulation errors a build can return, which are threaded through as they are today.

Instance members

Instance member Description

this.Build

Full Usage: this.Build

Parameters:
Returns: Promise<Result<unit, SimulationError>>
Modifiers: abstract

Build a simulation of `top` from `design`, sized for `arraySize` cycles - or keep the one already built if it is of the same thing. The implementation KEEPS `design`. Instance enumeration is answered from it, which is what lets the renderer stop building a simulation of its own: which instances exist is a design-time fact, and only widths and data need the elaborated one.

design : LoadedComponent list
top : SheetName
arraySize : int
Returns: Promise<Result<unit, SimulationError>>

this.Epoch

Full Usage: this.Epoch

Returns: SimEpoch
Modifiers: abstract

Bumped by every Build. Anything cached or in flight carries the epoch it belongs to, so an answer from a superseded build is discarded rather than shown.

Returns: SimEpoch

this.HandlesFor

Full Usage: this.HandlesFor

Parameters:
Returns: Promise<(SignalId * SignalHandle * int) list>
Modifiers: abstract

Turn stable signal names into this build's read handles, with each signal's width. A signal named on an INPUT port resolves to the handle of the OUTPUT driving it: a net has one driver, and it is the driver that has data. Doing that here rather than in the caller is what lets a remote simulator answer at all, since the mapping needs the elaborated simulation.

arg0 : SignalId list
Returns: Promise<(SignalId * SignalHandle * int) list>

this.InstancesInside

Full Usage: this.InstancesInside

Parameters:
Returns: Promise<SimInstance list>
Modifiers: abstract

The instances of `sheet` directly inside `parent`. Answered from the design, so it costs one pass over a sheet's own components however many times that sheet is instantiated.

parent : InstancePath
sheet : SheetName
Returns: Promise<SimInstance list>

this.PortsOfCanvasComp

Full Usage: this.PortsOfCanvasComp

Parameters:
Returns: Promise<SimPort list * int>
Modifiers: abstract

The ports of one canvas component, and how many elaborated copies the simulation holds - the question the schematic's right-click menu asks.

arg0 : ComponentId
Returns: Promise<SimPort list * int>

this.PortsOfInstances

Full Usage: this.PortsOfInstances

Parameters:
Returns: Promise<Map<InstancePath, SimPort list>>
Modifiers: abstract

The ports of several instances at once, because the selector draws a whole collapsed hierarchy and one round trip for it is the difference between a pause and a stutter.

arg0 : InstancePath list
Returns: Promise<Map<InstancePath, SimPort list>>

this.ReadPoint

Full Usage: this.ReadPoint

Parameters:
Returns: Promise<Result<unit, string>>
Modifiers: abstract

One signal at one cycle - a hover tooltip, or the schematic probe.

arg0 : SignalHandle
cycle : int
Returns: Promise<Result<unit, string>>

this.ReadStepPanel

Full Usage: this.ReadStepPanel

Parameters:
    cycle : int

Returns: Promise<Result<unit, string>>
Modifiers: abstract

Everything the step panel shows at one cycle, in one request.

cycle : int
Returns: Promise<Result<unit, string>>

this.ReadWindow

Full Usage: this.ReadWindow

Parameters:
Returns: Promise<Result<unit, string>>
Modifiers: abstract

The samples the current view draws, for these signals, plus the cursor column - which is separate because the drawn window samples every `Multiplier` cycles while the cursor sits on an exact one.

arg0 : SignalHandle list
window : Window
cursorCycle : int
Returns: Promise<Result<unit, string>>

this.Release

Full Usage: this.Release

Returns: Promise<unit>
Modifiers: abstract

Drop the simulation and whatever it holds.

Returns: Promise<unit>

this.RunTo

Full Usage: this.RunTo

Parameters:
    cycle : int
    onProgress : int -> unit

Returns: Promise<Result<int, string>>
Modifiers: abstract

Advance towards `cycle`, in chunks, reporting the clock reached after each so that a progress bar can move and a Cancel can be answered.

cycle : int
onProgress : int -> unit
Returns: Promise<Result<int, string>>

this.SetInput

Full Usage: this.SetInput

Parameters:
Returns: Promise<Result<unit, string>>
Modifiers: abstract
comp : ComponentId
value : bigint
cycle : int
Returns: Promise<Result<unit, string>>

this.SheetOfInstance

Full Usage: this.SheetOfInstance

Parameters:
Returns: Promise<SheetName option>
Modifiers: abstract
arg0 : InstancePath
Returns: Promise<SheetName option>

this.TopInstance

Full Usage: this.TopInstance

Returns: InstancePath
Modifiers: abstract
Returns: InstancePath

Type something to start searching.