prga.netlist.module.module module

Netlist modules.

class prga.netlist.module.module.Module(name, *, key=None, is_cell=False, allow_multisource=False, coalesce_connections=False, instances=None, **kwargs)

Bases: prga.util.Object

A netlist module.

Parameters:

name (str) – Name of the module

Keyword Arguments:
 
  • key (Hashable) – A hashable key used to index this module in the database. If not set (default argument: None), name is used by default
  • is_cell (bool) – If set to True, this module is created as a cell module. A cell module does not contain information about connections. It contains information about timing arcs instead. A cell module may still contain sub-instances, but they are only used for tracking the hierarchy. When set, this argument overrides allow_multisource to False and coalesce_connections to True. coalesce_connections is forced to True because VPR does not support bitwise timing arcs for models.
  • allow_multisource (bool) – If set to True, a sink net may be driven by multiple source nets. Incompatible with coalesce_connections
  • coalesce_connections (bool) – If set to True, bit-wise connections are not allowed. Incompatible with allow_multisource
  • instances (MutableMapping [Hashable, Instance ]) – Custom instance mapping object. If not specified, a dict object will be created and used
  • **kwargs – Custom key-value arguments. These attributes are added to __dict__ of this object and accessible as dynamic attributes
class _FLAGS

Bases: enum.IntFlag

An enumeration.

ALLOW_MULTISOURCE = 2
COALESCE_CONNECTIONS = 4
IS_CELL = 1
NONE = 0
_add_child(child)

Add child into this module.

Parameters:child (Instance or Port) –
Returns:child
_children
_flags
_instances
_key
_name
_ports
allow_multisource

Test if sink nets in this module can be driven by more than one source nets.

Type:bool
children

A mapping from names to sub-instances or ports in this module.

Type:Mapping [str, Instance or Port ]
coalesce_connections

Test if bit-wise connections are disallowed in this module.

Type:bool
instances

A mapping from keys to sub-instances in this module.

Type:Mapping [Hashable, Instance ]
is_cell

Test if this module is a cell module.

Type:bool
key

Key of this module in the database.

Type:Hashable
name

Name of this module.

Type:str
ports

A mapping from keys to ports in this module.

Type:Mapping [Hashable, Port ]