Cable¶
- class spydrnet_physical.ir.cable.Cable(name=None, properties=None, is_downto=None, is_scalar=None, lower_index=None)[source]¶
Bases:
Cable
This class extends the default Cable class
Attributes:
Returns number of wires in the cable
Checks if the wire is connected to any definition port (InnerConnection)
data
Data stores information about the element
definition
Get the definition that this bundle belongs to.
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
properties
Returns properties of the object
wires
Gets a list of wires that are in this cable
Methods:
Connects cable to the port of definition.
Connects cable to the port of the given instance.
Create assignment beetween self and provided cable
split
__init__
Create a cable with no wires and default values for a bundle.
add_wire
Adds a wire to the cable at the given position.
This fucntion check if the cable is concatenated while connecting to other ports
clone
Clone the Cable and all of its wires in an api safe way the following will be true of the returned cable
create_wire
Creates a wire and adds it to the cable.
create_wires
Creates wire_count wires for this cable and adds them to it.
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_wire
removes the given wire from the cable and return it.
remove_wires_from
Remove all wires given from the cable.
somhing
- property size¶
Returns number of wires in the cable
- Returns:
Returns size of cable
- Return type:
int
- property is_port_cable¶
Checks if the wire is connected to any definition port (InnerConnection)
- Returns:
true if wire belongs to definition port
- Return type:
bool
- connect_port(port, reverse=False)[source]¶
Connects cable to the port of definition.
This is internal connection to the InnerPins of the definition
- Parameters:
port (Port) – Port to connect
- connect_instance_port(instance, port)[source]¶
Connects cable to the port of the given instance.
- Parameters:
instance (Instance) – Instance to consider
port (Port) – Port to connect