Class Reference netList

A net list. More...

Member

string cellname
int devicesCount()
netListDevice* getDevice(int num)
stringList getExternalNodes()
stringList getNodes()
int getNode(string node)

Detailed Description

graph LR sd(schematicDisplay)--generateNetList-->st(string) la(layout)--netlistTool-->nm(netListModule) nm--getSchematicNetList-->nl(netList) nm--getExtractedNetList-->nl nl--getDevice-->nd(netListDevice) click sd "/layoutscript/api/schematicdisplay" click st "/layoutscript/api/string" click la "/layoutscript/api/layout" click nm "/layoutscript/api/netlistmodule" 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 nl thisClas class sd,st,la,nm,nd clas

A netList is the structured netlist of one cell: devices, nodes and external pins. It is not the text string from schematicDisplay generateNetList; that call writes a formatted deck for a simulator. The object documented here comes from netListModule on the layout window: getSchematicNetList after the schematic was updated, getExtractedNetList after buildConnect and extractNetList, or getLoadedNetList after a file load. cellname is the cell the list belongs to. devicesCount and getDevice walk the netListDevice entries. getNodes lists every node name; getExternalNodes lists only the ports. getNode maps a name to an id, or -1 if the name is unknown.

Example:

schematic->drawing->updateNetlist();
netList *nl = layout->netlistTool->getSchematicNetList(layout->drawing->currentCell->cellName);
if (nl == NULL)
 return 1;
int n = nl->devicesCount();
for (int i = 0; i < n; i++) {
 netListDevice *d = nl->getDevice(i);
 if (d != NULL) {
 string name = d->devicename;
 }
}
stringList ports = nl->getExternalNodes();

Member Function Documentation


string netList::cellname

Name of the cell this netlist was extracted from or loaded for.


int netList::devicesCount()

Returns: the number of devices in this netlist.


netListDevice* netList::getDevice(int num)

Returns: a pointer to device num (counted from 0), or NULL if num is out of range. See netListDevice.


stringList netList::getExternalNodes()

Returns: a stringList of all external nodes (ports).


stringList netList::getNodes()

Returns: a stringList of all node names in this netlist.


int netList::getNode(string node)

Returns: the id of node, or -1 if the name does not exist.