NetlistSchematicAdapter class
Adapter that builds ROHD schematic data directly from documented Yosys JSON concepts: modules, ports, cells, connections, and netnames.
ROHD netlists (creator: "NetlistSynthesizer (rohd)") add a small set
of fields beyond standard Yosys JSON -- e.g. logic_type on ports and
netnames, attributes.rohd.src_trace on modules, and the
$struct_pack/$struct_unpack cell types. See
doc/netlist_json_format.md in this repository for the full list.
Constructors
- NetlistSchematicAdapter.fromJson(String netlistJson, {HierarchyService? externalHierarchy})
-
Parse a Yosys-compatible JSON netlist into hierarchy and schematic data.
factory
Properties
- embeddedFlcData → FlcData
-
Source locations embedded in the netlist's
rohd.src_traceattributes.final - hashCode → int
-
The hash code for this object.
no setterinherited
- hierarchy → HierarchyService
-
Hierarchy service used for search/navigation.
final
- netlistCreator → String?
-
The
creatorfield from the parsed netlist JSON, ornullif absent.final - netlistVersion → String?
-
The scalar
versionfield from the parsed netlist JSON.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- schematic → SchematicGraph
-
ELK-ready schematic graph.
final
Methods
-
collapsePartialExpansion(
String nodeId) → bool - Clear partial expansion state from a node.
-
collapsePort(
String nodeId, String portId) → bool - Collapse a transparent port expansion.
-
collapsePortRecursive(
String nodeId, String portId) → bool - Collapse a recursively expanded transparent port path.
-
collapsePortWithRemoved(
String nodeId, String portId) → (bool, Set< String> ) - Collapse a transparent port expansion and return removed gates.
-
convertToBlocksOnly(
String nodeId) → bool - Convert an expanded node to blocks-only mode.
-
convertToBlocksOnlyRecursive(
String nodeId) → bool - Recursively convert to blocks-only mode.
-
expandChild(
String nodeId, String childName) → bool - Partially reveal a child by instance name.
-
expandNonPrimitives(
String nodeId) → bool - Reveal non-primitive children without edges.
-
expandNonPrimitivesRecursive(
String nodeId) → bool - Recursively reveal non-primitive children in blocks-only mode.
-
expandPath(
List< String> pathSegments, {String? targetWireName}) → bool - Batch-expand a hierarchy path.
-
expandPort(
String nodeId, String portId) → bool - Reveal one collapsed-module port's connected interior path.
-
expandPortThrough(
String nodeId, String portId) → bool - Reveal a port path through transparent primitive gates.
-
expandPortThroughRecursive(
String nodeId, String portId) → bool - Reveal a port path recursively across opened hierarchy boundaries.
-
expandWire(
String nodeId, String wireName) → bool - Partially reveal a wire by name.
-
isExpanded(
String nodeId) → bool - Whether a node is currently expanded.
-
isRohdNetlistVersion(
String version) → bool -
Whether this is a ROHD-authored netlist with the specified
version. -
lookupEmbeddedInstance(
String moduleName, String instanceName) → FlcEntry? -
Look up an embedded source entry for an instance in
moduleName. -
lookupEmbeddedSignal(
String moduleName, String signalName) → FlcEntry? -
Look up an embedded source entry for a signal in
moduleName. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toggleNode(
String nodeId) → bool - Toggle a node's expansion state.
-
toggleNodeRecursive(
String nodeId) → bool - Recursively toggle a node and descendants.
-
toJsGraph(
) → String - Serialize the current visible schematic state as ELK JSON.
-
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Constants
- latestKnownRohdNetlistVersion → const String
- The newest ROHD netlist schema version known to this adapter.