Mitch Bailey
10/20/2021, 1:28 AMFlattenUnmatched
from netcmp.c
with some debug statements I added
Fprintf(stdout, "DEBUG: FlattenUnmatched recursing\n");
changed = 1;
struct objlist * next_ob = tc->cell;
while (changed) {
changed = 0;
for (ob = tc->cell; ob != NULL; ob = ob->next) {
next_ob = ob->next;
tcsub = NULL;
if (ob->type == FIRSTPIN) {
/* First check if there is a class equivalent */
tcsub = LookupCellFile(ob->model.class, tc->file);
if (!tcsub || (tcsub->class != CLASS_SUBCKT)) continue;
else if (tcsub == tc) continue;
if (FlattenUnmatched(tcsub, tc->name, stoplevel, loclevel + 1)) {
changed = 1;
break;
}
}
if (next_ob != ob->next) {
Fprintf(stdout, "DEBUG2: %p %p %d\n", (void *) next_ob, (void *) ob->next, ob->type);
Fprintf(stdout, "DEBUG2: ob overwrite %s\n", ob->model.class);
}
}
}
Fprintf(stdout, "DEBUG: FlattenUnmatched done %d\n", loclevel);
I added the DEBUG2
statements to see if the next pointer unexpectedly changed after recursing. Unfortunately, it does. Looking for a solution now.