Port¶
- class spydrnet_physical.ir.port.Port(name=None, properties=None, is_downto=None, is_scalar=None, lower_index=None, direction=None)[source]¶
Bases:
Port
This class extends the default Port class
Methods:
Setup an empty port
split
add_pin
Add a pin to the port at the given position.
Change name of the port and corrosponding cable
clone
Clone the port in an api safe way.
create_pin
Create a pin and add it to the port.
create_pins
Create pin_count pins in the given port a downto style syntax is assumed.
get
get the item from the data structure
get_cables
get_cables(...)
get_definitions
get_definitions(...)
get_hcables
get_hcables(...)
get_hinstances
get_hinstances(...)
get_hpins
get_hpins(...)
get_hports
get_hports(...)
get_hwires
get_hwires(...)
get_index
Returns the python index of element
get_instances
get_instances(...)
get_libraries
get_libraries(...)
get_netlists
get_netlists(...)
get_pins
get_pins(...)
get_ports
get_ports(...)
get_verilog_index
Returns the verilog index of element
get_wires
get_wires(...)
pop
pop the object from the data structure
remove_pin
Remove the given pin from the port.
remove_pins_from
Remove several pins from the port at once.
somhing
Attributes:
is_input
is_output
is_inout
Returns number of pins in the port
data
Data stores information about the element
definition
Get the definition that this bundle belongs to.
direction
Gets the direction of the port.
is_array
This is the logical inverse of is_scalar.
is_downto
Get the downto status of the bundle.
is_scalar
Return True if the item is a scalar False otherwise.
lower_index
Get the value of the lower index of the array.
name
The name of this element
pins
Get a list of the pins that are in the port
properties
Returns properties of the object
Classes:
Direction
Define 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