Cable

class spydrnet_physical.ir.cable.Cable(name=None, properties=None, is_downto=None, is_scalar=None, lower_index=None)[source]

Bases: spydrnet.ir.cable.Cable

This class extends the default Cable class

Attributes:

size

Returns number of wires in the cable

is_port_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:

connect_port

Connects cable to the port of definition.

connect_instance_port

Connects cable to the port of the given instance.

assign_cable

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.

check_concat

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

Shortcut to get_cables().

get_definitions

Shortcut to get_definitions().

get_hcables

Shortcut to get_hcables().

get_hinstances

Shortcut to get_hinstances().

get_hpins

Shortcut to get_hpins().

get_hports

Shortcut to get_hports().

get_hwires

Shortcut to get_hwires().

get_index

Returns the python index of element

get_instances

Shortcut to get_instances().

get_libraries

Shortcut to get_libraries().

get_netlists

Shortcut to get_netlists().

get_pins

Shortcut to get_pins().

get_ports

Shortcut to get_ports().

get_verilog_index

Returns the verilog index of element

get_wires

Shortcut to 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

assign_cable(cable: spydrnet_physical.ir.cable.Cable, upper=None, lower=None, reverse=False, assign_instance_name=None)[source]

Create assignment beetween self and provided cable

assign self = cable[upper:lower]

check_concat()[source]

This fucntion check if the cable is concatenated while connecting to other ports