-
Notifications
You must be signed in to change notification settings - Fork 76
Endpoint
SJulianS edited this page Oct 19, 2022
·
7 revisions
An endpoint represents the point where a net connects to a gate. Each endpoint comprises the associated gate, respective pin of the gate, and the connected net. In addition, it distinguishes between inputs (destinations) and outputs (sources).
New endpoints can only be created by assigning new sources and destinations to nets. Access to the gate, pin, and net are provided by get_gate
, get_pin
, and get_net
. To figure out whether an endpoint is a source or a destination, the functions is_source_pin
and is_destination_pin
are provided.
net = netlist.get_net_by_id(3) # get the net with ID 3
e = net.get_sources()[0] # get the first source endpoint of the net
print(e.get_gate().get_name()) # print the name of the associated gate
print(e.get_pin()) # print the name of the pin
print(e.get_net().get_name()) # print the name of the connected net
e.is_source_pin() # return True