Compare commits

...
6 Commits
Author SHA1 Message Date
Tim Edwards eefdb61e14 Merge branch 'master' into work 2018-04-05 10:10:47 -04:00
Tim Edwards 1d1ad3c833 Update at Thu Apr 5 10:10:44 EDT 2018 by tim 2018-04-05 10:10:44 -04:00
Tim Edwards 4166408576 Discovered a subtle error caused by running a setup script that
calls "equate pins".  This could fail because the routine that forces
uniqueness of pins was being called by the "compare" command but
outside of PinMatch.  Fixed by duplicating the call to force uniqueness
of pins inside the "equate" function.  Redundant calls should not
matter as uniqueness is resolved on the first call and subsequent calls
will need no further action.
2018-04-05 10:06:32 -04:00
Tim Edwards 2b15b731bb Merge branch 'master' into work 2018-03-28 12:40:17 -04:00
Tim Edwards 9ad6ad3338 Update at Wed Mar 28 12:40:15 EDT 2018 by tim 2018-03-28 12:40:15 -04:00
Tim Edwards 0fb5efd914 Corrected a crash condition during pin matching if any subcell has
no pins at all.
2018-03-28 12:39:40 -04:00
3 changed files with 23 additions and 6 deletions
+1 -1
View File
@@ -1 +1 @@
1.5.92
1.5.94
+8 -2
View File
@@ -6393,9 +6393,13 @@ struct nlist *addproxies(struct hashlist *p, void *clientdata)
/* circuit pair has been matched with automorphisms, */
/* then some pins may be matched arbitrarily. */
/* */
/* Return 1 on success, 0 on failure. */
/* If "dolist" is 1, append the list representing the */
/* output (if any) to variable tcl_out, if it exists. */
/* */
/* Return codes: */
/* 2: Neither cell had pins, so matching is unnecessary */
/* 1: Exact match */
/* 0: Inexact match resolved by proxy pin insertion */
/*------------------------------------------------------*/
int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
@@ -6432,7 +6436,7 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
if (haspins == 0) {
// Neither cell has any ports, so this is probably a top-level
// cell and there is nothing to do.
return 1;
return 2;
}
cover = (char *)CALLOC(numnodes, sizeof(char));
@@ -6675,6 +6679,7 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
if (ob1 && ob1->next && ob1->next->type != PORT)
break;
}
if (ob1 == NULL) ob1 = tc1->cell; /* No ports */
/* Assign non-matching pins in tc2 with real node */
/* connections in the cell to the end. Create pins */
@@ -6760,6 +6765,7 @@ int MatchPins(struct nlist *tc1, struct nlist *tc2, int dolist)
if (ob2 && ob2->next && ob2->next->type != PORT)
break;
}
if (ob2 == NULL) ob2 = tc2->cell; /* No ports */
/* If cell 2 has fewer nodes than cell 1, then add dummy (unconnected) */
/* pins to cell 2. If these correspond to numbers missing in the match */
+14 -3
View File
@@ -2910,15 +2910,26 @@ _netcmp_equate(ClientData clientData,
Circuit1 = tp1;
Circuit2 = tp2;
}
if (MatchPins(tp1, tp2, dolist)) {
// Check for and remove duplicate pins. Normally this is called
// from "compare", but since "equate pins" may be called outside
// of and before "compare", pin uniqueness needs to be ensured.
UniquePins(tp1->name, tp1->file);
UniquePins(tp2->name, tp2->file);
result = MatchPins(tp1, tp2, dolist);
if (result == 2) {
Fprintf(stdout, "Cells have no pins; pin matching not needed.\n");
}
else if (result > 0) {
Fprintf(stdout, "Cell pin lists are equivalent.\n");
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(1));
}
else {
Fprintf(stdout, "Cell pin lists for %s and %s altered to match.\n",
name1, name2);
Tcl_SetObjResult(interp, Tcl_NewBooleanObj(0));
}
Tcl_SetObjResult(interp, Tcl_NewIntObj(result));
if (ElementClasses == NULL) {
/* Recover temporarily set global variables (see above) */
Circuit1 = SaveC1;