(1) Corrected output of "nodes" command, which was not handling the

leading '/' of pin names and therefore failing to print anything;
(2) Corrected 'addproxies', which was ending abruptly at the end of
a circuit's object list, such that if an instance needing proxy pins
added was the last object in the circuit, it would not get the proxy
pins added, and therefore would fail LVS.
This commit is contained in:
Tim Edwards 2016-09-09 09:45:32 -04:00
parent b7363862b3
commit 950bb976e6
3 changed files with 30 additions and 10 deletions

View File

@ -618,6 +618,9 @@ struct FormattedList *FormatBadElementFragment(struct Element *E)
count++;
elemlist->flist[k].count = count;
if (*ob->name != *ob->instance.name) // e.g., "port_match_error"
elemlist->flist[k].name = ob->name;
else
elemlist->flist[k].name = ob->name + strlen(ob->instance.name) + 1;
elemlist->flist[k].permute = (char)1;
k++;
@ -632,6 +635,9 @@ struct FormattedList *FormatBadElementFragment(struct Element *E)
m = k;
for (j = i; j < fanout; j++) {
if (nodes[j] != NULL && nodes[i]->pin_magic == nodes[j]->pin_magic) {
if (*ob2->name != *ob2->instance.name) // e.g., "port_match_error"
elemlist->flist[k].name = ob2->name;
else
elemlist->flist[k].name = ob2->name + strlen(ob2->instance.name) + 1;
elemlist->flist[k].permute = (char)0;
elemlist->flist[k].count = -1; // Put total count at end
@ -4798,7 +4804,7 @@ struct nlist *addproxies(struct hashlist *p, void *clientdata)
tob = tc->cell;
i = FIRSTPIN;
firstpin = ob;
while (ob && (tob->type == PORT || tob->type == UNKNOWN)) {
while (tob && (tob->type == PORT || tob->type == UNKNOWN)) {
if (tob->type == UNKNOWN) {
obn = (struct objlist *)CALLOC(1, sizeof(struct objlist));
obn->name = (char *)MALLOC(strlen(firstpin->instance.name)
@ -4820,6 +4826,12 @@ struct nlist *addproxies(struct hashlist *p, void *clientdata)
HashPtrInstall(firstpin->instance.name, firstpin, &(ptr->instdict));
}
}
else if (ob == NULL) {
// This should not happen. . .
Fprintf(stdout, "Error: Premature end of pin list on instance %s.\n",
firstpin->instance.name);
break;
}
else {
lob = ob;
ob->type = i++;

View File

@ -345,7 +345,7 @@ void ElementNodes(char *cell, char *element, int fnum)
struct nlist *np;
struct objlist *ob, *nob, *nob2;
int ckto;
char *elementname;
char *elementname, *obname;
if ((fnum == -1) && (Circuit1 != NULL) && (Circuit2 != NULL)) {
ElementNodes(cell, element, Circuit1->file);
@ -368,8 +368,10 @@ void ElementNodes(char *cell, char *element, int fnum)
ckto = strlen(elementname);
for (ob = np->cell; ob != NULL; ob = ob->next) {
if (!strncmp(elementname, ob->name, ckto))
if (*(ob->name + ckto) == '/' || *(ob->name + ckto) == '\0')
obname = ob->name;
if (*obname == '/') obname++;
if (!strncmp(elementname, obname, ckto))
if (*(obname + ckto) == '/' || *(obname + ckto) == '\0')
break;
}
if (ob == NULL) {
@ -379,13 +381,15 @@ void ElementNodes(char *cell, char *element, int fnum)
Printf("Device '%s' Pins:\n", elementname);
for (; ob != NULL; ob = ob->next) {
if (!strncmp(elementname, ob->name, ckto)) {
if (*(ob->name + ckto) != '/' && *(ob->name + ckto) != '\0')
obname = ob->name;
if (*obname == '/') obname++;
if (!strncmp(elementname, obname, ckto)) {
if (*(obname + ckto) != '/' && *(obname + ckto) != '\0')
continue;
Printf(" ");
PrintObjectType(ob->type);
Printf(" (%s)", ob->name + ckto + 1);
Printf(" (%s)", obname + ckto + 1);
for (nob = np->cell; nob != NULL; nob = nob->next) {
if (nob->node == ob->node) {
if (nob->type == NODE) {

View File

@ -20,7 +20,11 @@ foreach i $nlist {
}
}
load TCL_DIR/tclnetgenSHDLIB_EXT
if {${tcl_version} >= 8.6} {
load -lazy TCL_DIR/tclnetgenSHDLIB_EXT
} else {
load TCL_DIR/tclnetgenSHDLIB_EXT
}
#----------------------------------------------------------------
# Define the "lvs" command as a way of calling the netgen options