prga.netlist.net.bus module¶
Port & Pin classes.
-
class
prga.netlist.net.bus.HierarchicalPin(instance, model)¶ Bases:
prga.netlist.net.common.AbstractNetReference to a pin of a hierarchical instance.
Parameters: - instance (
HierarchicalInstance) – The instance that this pin belongs to - model (
Port) – The port in the model ofinstancethat this pin corresponds to
-
_instance¶
-
_model¶
-
instance¶ The instance that this pin belongs to.
Type: HierarchicalInstance
-
is_clock¶ Test if this net is part of a clock network.
Type: bool
-
model¶ The port in the model of
Pin.instancethat this pin corresponds to.Type: Port
- instance (
-
class
prga.netlist.net.bus.Pin(instance, model, **kwargs)¶ Bases:
prga.netlist.net.bus._BusPins of instances.
Parameters: Keyword Arguments: **kwargs – Custom key-value arguments. These attributes are added to
__dict__of this object and accessible as dynamic attributes-
_instance¶
-
_model¶
-
is_clock¶ Test if this net is part of a clock network.
Type: bool
-
is_sink¶ Test if this net can be driven by other nets.
Type: bool
-
is_source¶ Test if this net can be used as drivers of other nets.
Type: bool
-
model¶ The port in the model of
Pin.instancethat this pin corresponds to.Type: Port
-
-
class
prga.netlist.net.bus.Port(parent, name, width, direction, *, is_clock=False, key=None, **kwargs)¶ Bases:
prga.netlist.net.bus._BusPorts of modules.
Parameters: - parent (
Module) – Parent module of this port - name (
str) – Name of this port - width (
int) – Width of this port - direction (
PortDirectionorstr) – Direction of the port
Keyword Arguments: - is_clock (
bool) – Set if this port is a clock - key (
Hashable) – A hashable key used to index this port in the ports mapping in the parent module. If not set (default argument:None),nameis used by default - **kwargs – Custom key-value arguments. These attributes are added to
__dict__of this object and accessible as dynamic attributes
-
_direction¶
-
_is_clock¶
-
_key¶
-
_name¶
-
_parent¶
-
_width¶
-
direction¶ Direction of this port.
Type: PortDirection
-
is_clock¶ Test if this net is part of a clock network.
Type: bool
-
is_sink¶ Test if this net can be driven by other nets.
Type: bool
-
is_source¶ Test if this net can be used as drivers of other nets.
Type: bool
-
key¶ A hashable key to index this port in its parent module’s ports mapping.
Type: Hashable
-
name¶ Name of this port
Type: str
- parent (
-
class
prga.netlist.net.bus._Bit(bus, index, **kwargs)¶ Bases:
prga.netlist.net.common.AbstractNonReferenceNetA single, persistent bit in a bus.
Parameters: - bus (
AbstractNonReferenceNet) – The bus that this bit belongs to - index (
int) – The index of this bit in the bus
Keyword Arguments: **kwargs – Custom key-value arguments. These attributes are added to
__dict__of this object and accessible as dynamic attributes-
_bus¶
-
_connections¶
-
_index¶
-
bus¶ The bus that this bit belongs to.
Type: AbstractNonReferenceNet
-
index¶ The index of this bit in the bus.
Type: int
-
is_clock¶ Test if this net is part of a clock network.
Type: bool
-
is_sink¶ Test if this net can be driven by other nets.
Type: bool
-
is_source¶ Test if this net can be used as drivers of other nets.
Type: bool
- bus (
-
class
prga.netlist.net.bus._Bus(**kwargs)¶ Bases:
prga.netlist.net.common.AbstractNonReferenceNet-
_bits¶
-
_break_bits()¶ Break bus coalescence into bits. This method should only be used in
NetUtils._break_bits. Beware that this method doesn’t update the connections in the_connectionsmapping.Returns: The current _connectionsvalue.Return type: dictRaises: AttributeError– If_connectionsis undefined, i.e. the bus is already broken into bits.
-
_coalesce_connections¶
-
_connections¶
-