Port¶
- class spydrnet_physical.ir.port.Port(name=None, properties=None, is_downto=None, is_scalar=None, lower_index=None, direction=None)[source]¶
Bases:
PortThis class extends the default Port class
Methods:
Setup an empty port
splitadd_pinAdd a pin to the port at the given position.
Change name of the port and corrosponding cable
cloneClone the port in an api safe way.
create_pinCreate a pin and add it to the port.
create_pinsCreate pin_count pins in the given port a downto style syntax is assumed.
getget the item from the data structure
get_cablesget_cables(...)
get_definitionsget_definitions(...)
get_hcablesget_hcables(...)
get_hinstancesget_hinstances(...)
get_hpinsget_hpins(...)
get_hportsget_hports(...)
get_hwiresget_hwires(...)
get_indexReturns the python index of element
get_instancesget_instances(...)
get_librariesget_libraries(...)
get_netlistsget_netlists(...)
get_pinsget_pins(...)
get_portsget_ports(...)
get_verilog_indexReturns the verilog index of element
get_wiresget_wires(...)
poppop the object from the data structure
remove_pinRemove the given pin from the port.
remove_pins_fromRemove several pins from the port at once.
somhingAttributes:
is_inputis_outputis_inoutReturns number of pins in the port
dataData stores information about the element
definitionGet the definition that this bundle belongs to.
directionGets the direction of the port.
is_arrayThis is the logical inverse of is_scalar.
is_downtoGet the downto status of the bundle.
is_scalarReturn True if the item is a scalar False otherwise.
lower_indexGet the value of the lower index of the array.
nameThe name of this element
pinsGet a list of the pins that are in the port
propertiesReturns properties of the object
Classes:
DirectionDefine the possible directions for a given port.
- __init__(name=None, properties=None, is_downto=None, is_scalar=None, lower_index=None, direction=None)[source]¶
Setup an empty port
- Parameters:
name - (str) the name of this instance
properties - (dict) the dictionary which holds the properties
id_downto - (bool) set the downto status. Downto is False if the right index is higher than – the left one, True otherwise
is_scalar - (bool) set the scalar status. Return True if the item is a scalar False – otherwise.
lower_index - (int) get the value of the lower index of the array.
direction - (Enum) Define the possible directions for a given port. (UNDEFINED, INOUT, IN, – OUT)
- property size¶
Returns number of pins in the port
- Returns:
Returns size of port
- Return type:
int