diff --git a/base/netcmp.c b/base/netcmp.c index 5f458dd..8a92bd4 100644 --- a/base/netcmp.c +++ b/base/netcmp.c @@ -5078,7 +5078,6 @@ PropertyMatch(struct objlist *ob1, struct objlist *ob2, int do_print, // t1 has no properties. See if t2's properties are required // to be checked. If so, flag t2 instance as unmatched - mismatches++; for (i = 0;; i++) { vl2 = &(tp2->instance.props[i]); if (vl2->type == PROP_ENDLIST) break; @@ -5088,6 +5087,7 @@ PropertyMatch(struct objlist *ob1, struct objlist *ob2, int do_print, if (kl2 != NULL) break; // Property is required } if (vl2->type != PROP_ENDLIST) { + mismatches++; if (do_print) Fprintf(stdout, "Circuit 2 %s instance %s has no" " property match in circuit 1.\n", Circuit2->name, inst2); @@ -6597,8 +6597,14 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist) obn->model.port = -1; obn->instance.name = NULL; obn->node = -1; - obn->next = ob1->next; - ob1->next = obn; + if (ob1 == tc1->cell) { + obn->next = ob1; + tc1->cell = obn; + } + else { + obn->next = ob1->next; + ob1->next = obn; + } ob1 = obn; hasproxy1 = 1; diff --git a/base/netgen.c b/base/netgen.c index 6e5085b..7914965 100644 --- a/base/netgen.c +++ b/base/netgen.c @@ -3387,11 +3387,10 @@ int CombineSerial(char *model, int file) /* a parameter '_tag', string value set to "+". */ for (obn = instlist[i][1]; obn->next && - obn->next->type != PROPERTY && - obn->next->type != FIRSTPIN; obn = obn->next); + obn->next->type > FIRSTPIN; obn = obn->next); obp = obn->next; - if (obp == NULL || obp->type == FIRSTPIN) { + if (obp == NULL || obp->type != PROPERTY) { struct objlist *nob; /* No property record, so insert one */ nob = GetObject(); @@ -3466,8 +3465,8 @@ int CombineSerial(char *model, int file) for (obp = instlist[i][0]; obp->next->type > FIRSTPIN || obp->next->type == PROPERTY; obp = obp->next); for (ob2 = obp; ob2->next != instlist[i][1]; ob2 = ob2->next); - for (obs = ob2->next; obs->next && obs->next->type != FIRSTPIN; - obs = obs->next); + for (obs = ob2->next; obs->next && (obs->next->type > FIRSTPIN + || obs->next->type == PROPERTY); obs = obs->next); ob2->next = obs->next; if (obs->next) obs->next = NULL; // Terminate 2nd instance record