SimulatedDesign Type
The design a simulation was built FROM, as opposed to the simulation built from it. **Everything here is the size of the design somebody drew.** A design of seven sheets is seven sheets here however many instances it expands to - and a design that expands to 49,152 sheet instances is exactly the case this exists for. The renderer needs the design to draw a selector, a hierarchy and a set of names; it does not need the expansion, and holding one to get at the other is what made the renderer's memory grow with a simulation running elsewhere. The instance queries below are the point of the type. An instance is an `InstancePath`, a list of the custom-component ids entered on the way down to it, and every question anyone asks about one - which sheet is it a copy of, what is it labelled, what is inside it - is answered by walking that path through the DESIGN. Each step is a lookup in one sheet's components, so a query costs the depth of the path and the size of a sheet, and never the expansion. They used to be answered from maps built over every instance in the simulation: 208,896 entries on largeTest, for questions only ever asked about the handful of instances on screen. The design the simulation was BUILT from, not the one on the canvas now. An edit to the schematic is meant to change nothing in a running waveform simulation until it is restarted or refreshed, and reading the live project instead moved half the selector and left the rest.
Record fields
| Record Field | Description |
|
The same design as the PROJECT held it, before any array component was expanded. The only question it answers is whether the design has been edited since the simulation was built, which is what puts the Refresh button up. That has to be asked of sheets the project actually has: an expanded design contains a body sheet the project has never heard of and a wrapper that is not what its array component looks like, so asking it of DesignSheets said "edited" every time, and every simulation of a design containing an array component offered a Refresh it did not need.
|
|
|
|
|
|
Circuit simulated: the top sheet and every sheet it depends on. The sheets as SIMULATED, which for a design holding an array component is not the set of sheets the project holds: each array component has become a wrapper and a body. Read it to say what the simulation contains - the waveform selector's hierarchy is exactly this. To ask whether the design has since been edited, read DesignAsDrawn.
|
Full Usage:
DesignTopSheet
Field type: string
|
Instance members
| Instance member | Description |
|
|
|
|
Full Usage:
this.ExpandedComponentCount
Returns: int
|
|
|
The dot-separated component labels naming one component of one instance - the labels of the custom components entered, then the component's own. This is what `FastComponent.FullName` holds, and what the RAM selector lists RAMs under, so it must stay the same string: the selection saved against it is keyed by it.
|
Full Usage:
this.InstancesInside
Parameters:
InstancePath
sheet : string
Returns: InstancePath list
|
The instances of `sheet` directly inside `parent`, alphabetically by id - so the head is what a selector node with nothing recorded about it shows. Read off the custom components of the parent's own sheet: one of those IS an instance of the sheet it names, and its id goes on the near end of the parent's path to name the instance it introduces. One sheet's components, whatever the parent is an instance of.
|
Full Usage:
this.InstancesOfComponents
Parameters:
Component -> bool
Returns: (Component * InstancePath) list
|
Every INSTANCE of every component the design draws that `chosen` accepts, as the component as drawn and the instance it is in. This is how a list the whole simulation contributes to - every memory in it, every viewer - is worked out without the simulation. The cost is the design plus the instances that actually hold one of these, because a subtree holding none is not descended into: a design whose 49,152 sheet instances contain four memories costs the route to those four, not the expansion. Walking the FastComponents instead cost every component of every instance - 480,000 of them on main6 of largeTest - to find the same four. In the order the design draws them: each sheet's own matches, by id, then the subsheets in id order. Callers wanting something else sort.
|
|
|
|
An instance path as a person reads it: the labels of the custom components entered, dot separated, and the top sheet's own name for the instance nothing contains. A rendering, not an identity - which is why it may be ambiguous without consequence. Two instances can share a label path only if a label repeats on one canvas, and what decides which wave is which is the path itself.
|
Full Usage:
this.LabelsOfInstance
Parameters:
InstancePath
missing : string
Returns: string list
|
The labels of the custom component instances a path passes through, ROOT FIRST - which is the order a path is read in, and so the one place the innermost-first order is turned round. The ancestors of an instance are the tails of its path, which is what makes this a walk rather than a prefix per level. `missing` stands for an instance the design no longer holds.
|
|
How many instances of each sheet the design expands to. Counted on the SHEET graph rather than by expanding it: a sheet appears once for every time each of its parents appears, so one walk of the sheets somebody drew gives a number it would take 49,152 instances to reach by enumeration. Sheets nothing instantiates are absent. The sum is held below a ceiling so that a deep design cannot overflow it. Nothing asks the count of a sheet with thousands of instances - what is asked is whether there is exactly one - so a saturating count answers every question anyone puts to it.
|
|
|
|
The design-time name of the sheet an instance is a copy of: what the user called it, and what they see in the Sheets menu. Walked from the top sheet down, each id read as a custom component on the sheet reached so far - so foldBack, the path being innermost first. A path that does not lead anywhere in this design - one left over from a simulation of an earlier version of it - stops at the sheet it got to, which is the same answer the expansion-sized version gave for an instance it did not hold.
|
|
Which sheets hold a component `chosen` accepts, at any depth. What `InstancesOfComponents` prunes with: a sheet outside this set contains none of what is being looked for and nothing that contains any, so no instance of it need be visited. Settled in one pass over sheets ordered so that each comes after everything inside it.
|
|
The one instance of a sheet, where the design has exactly one; None where it has none or several. Everything inside a sheet placed twice is itself there twice, so the sheets with a single instance form a tree and the route down to one of them is unique. Following only those is what keeps this the size of the design.
|
|