skidl.schematics.sch_node module¶
- class skidl.schematics.sch_node.SchNode(circuit=None, tool_module=None, filepath='.', top_name='', title='', flatness=0.0)[source]¶
-
Data structure for holding information about a node in the circuit hierarchy.
- add_circuit(circuit)[source]¶
Add parts in circuit to node and its children.
- Parameters:
circuit (Circuit) – Circuit object.
- add_terminal(net)[source]¶
Add a terminal for this net to the node.
- Parameters:
net (Net) – The net to be added to this node.
- collect_stats(**options)[source]¶
Return comma-separated string with place & route statistics of a schematic.
- external_bbox()[source]¶
Return the bounding box of a hierarchical sheet as seen by its parent node.
- filename_sz = 20¶
- flatten(flatness=0.0)[source]¶
Flatten node hierarchy according to flatness parameter.
- Parameters:
flatness (float, optional) – Degree of hierarchical flattening (0=completely hierarchical, 1=totally flat). Defaults to 0.0.
Create hierarchical sheets for the node and its child nodes. Complexity (or size) of a node and its children is the total number of part pins they contain. The sum of all the child sizes multiplied by the flatness is the number of part pins that can be shown on the schematic page before hierarchy is used. The instances of each type of child are flattened and placed directly in the sheet as long as the sum of their sizes is below the slack. Otherwise, the children are included using hierarchical sheets. The children are handled in order of increasing size so small children are more likely to be flattened while large, complicated children are included using hierarchical sheets.
- get_boundary_nets()[source]¶
Return nets that connect parts inside this node to parts outside.
A boundary net has at least one pin on a part in this node and at least one pin on a part NOT in this node. These nets need hierarchical labels/pins when the node becomes a hierarchical sheet.
- Returns:
List of boundary Net objects.
- Return type:
- get_internal_nets()[source]¶
Return a list of nets that have at least one pin on a part in this node.
- get_or_add_child(name)[source]¶
Get or create a child node with the given name and attach it to the parent node.
- name_sz = 40¶
