prga.netlist.module.instance module¶
Netlist module instances, i.e. sub-modules.
-
class
prga.netlist.module.instance.AbstractInstance¶ Bases:
prga.util.ObjectAbstract base class for instances.
-
_extend_hierarchy(*, above=None, below=None)¶ Extend the hierarchy.
Keyword Arguments: - above (
AbstractInstanceortuple[Instance]) – Append above the current hierarchy - below (
AbstractInstanceortuple[Instance]) – Append below the current hierarchy
Returns: Return type: - above (
-
_shrink_hierarchy(*, low=None, high=None)¶ Shrink the hierarchy.
Keyword Arguments: - low (
int) – The lowest hierarchy (INCLUSIVE) to be kept - high (
int) – The highest hierarchy (EXCLUSIVE) to be kept
Returns: Return type: Notes
The difference in the inclusiveness of args
lowandhighis intended to match the list indexing mechanism in Python.- low (
-
is_hierarchical¶ Test if this is a hierarchical instance.
Type: bool
-
model¶ The module instantiated. For a hierarchical instance, this is the model of the leaf instance.
Type: Module
-
parent¶ Module which instance belongs to. For a hierarchical instance, this means the top-level module.
Type: Module
-
pins¶ Pins of this instance.
Type: Mapping[Hashable,PinorHierarchicalPin]
-
-
class
prga.netlist.module.instance.HierarchicalInstance(hierarchy)¶ Bases:
prga.netlist.module.instance.AbstractInstanceHierarchical instance in a module.
Parameters: hierarchy ( tuple[Instance]) – Hierarchy in bottom-up order.Notes
Direct instantiation of this class is not recommended. Use
AbstractInstance._shrink_hierarchy,AbstractInstance._extend_hierarchy, orModuleUtils._dereferenceinstead.-
_hierarchy¶
-
_pins_proxy¶
-
is_hierarchical¶ Test if this is a hierarchical instance.
Type: bool
-
model¶ The module instantiated. For a hierarchical instance, this is the model of the leaf instance.
Type: Module
-
parent¶ Module which instance belongs to. For a hierarchical instance, this means the top-level module.
Type: Module
-
pins¶ Pins of this instance.
Type: Mapping[Hashable,PinorHierarchicalPin]
-
-
class
prga.netlist.module.instance.Instance(parent, model, name, *, key=None, **kwargs)¶ Bases:
prga.netlist.module.instance.AbstractInstanceDirect sub-instance in a module.
Parameters: Keyword Arguments: - key (
Hashable) – A hashable key used to index this instance in the instances mapping in the parent module. If not set (default argument:None),nameis used by default - **kwargs – Custom attributes associated with this instance
-
_key¶
-
_model¶
-
_name¶
-
_parent¶
-
_pins¶
-
_pins_proxy¶
-
is_hierarchical¶ Test if this is a hierarchical instance.
Type: bool
-
key¶ A hashable key used to index this instance in the parent module’s isntance mapping.
Type: Hashable
-
model¶ The module instantiated. For a hierarchical instance, this is the model of the leaf instance.
Type: Module
-
name¶ Name of this instance.
Type: str
-
parent¶ Module which instance belongs to. For a hierarchical instance, this means the top-level module.
Type: Module
-
pins¶ Pins of this instance.
Type: Mapping[Hashable,PinorHierarchicalPin]
- key (
-
class
prga.netlist.module.instance._InstancePinsProxy(instance)¶ Bases:
collections.abc.MappingHelper class for
AbstractInstance.pinsproperty.Parameters: instance ( AbstractInstance) –-
instance¶
-