kqcircuits.util.instance_hierarchy_helpers
- class kqcircuits.util.instance_hierarchy_helpers.InstanceHierarchy(instance: Instance, trans: DCplxTrans, parent_instances: List[Instance], top_cell: Cell)[source]
Bases:
object
Data structure holding the instance hierarchy of a single cell instance
- instance: Instance
- trans: DCplxTrans
- parent_instances: List[Instance]
- top_cell: Cell
- kqcircuits.util.instance_hierarchy_helpers.get_cell_instance_hierarchy(layout: Layout, cell_index: int) List[InstanceHierarchy] [source]
Find all instances of a cell and their transforms (DCplxTrans) in the global coordinate system. Resolves the full cell hierarchy.
- Parameters:
layout – Layout object
cell_index – Cell index of the cell to find instances of
Returns: list of
InstanceHierarchy
structrures describing the cell hierarchy of each instance
- kqcircuits.util.instance_hierarchy_helpers.formatted_cell_instance_hierarchy(inst_data: InstanceHierarchy) str [source]
Create formatted list showing the instance hierarchy of all instances of a cell, including the global transformation of the instance and the instance names along the hierarchy if they are defined.
- Parameters:
layout – Layout object
cell_index – Cell index of the cell to find instances of
Returns: formatted string (multiple lines)
