Class Reference netListDevice

A net list device. More...

Member

string cellname
int connectionsCount()
string devicename
stringList getConnectionNames()
int getNode(string pin)

Detailed Description

graph LR nl(netList)--getDevice-->nd(netListDevice) click nl "/layoutscript/api/netlist" click nd "/layoutscript/api/netlistdevice" classDef thisClas fill:#eaf5fc,stroke:#3c7faa,stroke-width:4px; classDef clas fill:#eaf5fc,stroke:#3c7faa,stroke-width:1px; class nd thisClas class nl clas

A netListDevice is one instance in a netList: a placed transistor, resistor or subcircuit with its pin connections. You get it from netList->getDevice(num); you do not construct it. devicename is the instance name on the schematic or in the extracted list. cellname is the master cell or device type. connectionsCount is how many pins are wired. getConnectionNames lists those pin names, and getNode maps a pin to the node id used in the parent netlist, or -1 if the pin is missing. Typical code loops from 0 to devicesCount()-1 on the parent list and then reads the pins of each device.

Example:

netList *nl = layout->netlistTool->getExtractedNetList(layout->drawing->currentCell->cellName);
if (nl == NULL)
 return 1;
netListDevice *d = nl->getDevice(0);
if (d == NULL)
 return 1;
string inst = d->devicename;
string master = d->cellname;
stringList pins = d->getConnectionNames();
int id = d->getNode("D");

Member Function Documentation


string netListDevice::cellname

Name of the cell or device type used for this instance.


int netListDevice::connectionsCount()

Returns: the number of pins connected on this device.


string netListDevice::devicename

Instance name of the device.


stringList netListDevice::getConnectionNames()

Returns: a stringList of all connected pin names.


int netListDevice::getNode(string pin)

Returns: the node id connected to pin, or -1 if pin does not exist.