A net list. More...
| string | cellname |
| int | devicesCount() |
| netListDevice* | getDevice(int num) |
| stringList | getExternalNodes() |
| stringList | getNodes() |
| int | getNode(string node) |
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();
Name of the cell this netlist was extracted from or loaded for.
Returns: the number of devices in this netlist.
Returns: a pointer to device num (counted from 0), or NULL if num is out of range. See netListDevice.
Returns: a stringList of all external nodes (ports).
Returns: a stringList of all node names in this netlist.
Returns: the id of node, or -1 if the name does not exist.