Compare commits

..
9 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
Tim Edwards 763117aabe Merge branch 'master' into work 2018-01-29 13:26:41 -05:00
Tim Edwards 96a95d337f Update at Mon Jan 29 13:26:39 EST 2018 by tim 2018-01-29 13:26:39 -05:00
Tim Edwards 393788a039 Changed behavior of the "lvs" script so that the setup file can
be specified as "nosetup" if the "lvs" command is being called
interactively from a terminal or as part of a larger script where
setup commands have been issued prior to running the "lvs" script.
Similarly, the log file can be specified as "nolog" to prevent any
log file from being generated.
2018-01-29 13:24:54 -05:00
4 changed files with 38 additions and 12 deletions
+1 -1
View File
@@ -1 +1 @@
1.5.91
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 */
+15 -6
View File
@@ -475,15 +475,22 @@ proc netgen::lvs { name1 name2 {setupfile setup.tcl} {logfile comp.out} args} {
if {$perrors > 0} {
puts stdout "Warning: There were errors reading the setup file"
}
} else {
} elseif {[string first nosetup $setupfile] < 0} {
netgen::permute default ;# transistors and resistors
netgen::property default
}
puts stdout "Comparison output logged to file $logfile"
netgen::log file $logfile
netgen::log start
netgen::log echo off
if {[string first nolog $logfile] < 0} {
puts stdout "Comparison output logged to file $logfile"
netgen::log file $logfile
netgen::log start
netgen::log echo off
set dolog true
} else {
set dolog false
}
if {$dolist == 1} {
set endval [netgen::compare -list hierarchical "$fnum1 $cell1" "$fnum2 $cell2"]
} else {
@@ -566,7 +573,9 @@ proc netgen::lvs { name1 name2 {setupfile setup.tcl} {logfile comp.out} args} {
if {$properr != {}} {
netgen::log put "The following cells had property errors: $properr\n"
}
netgen::log end
if {$dolog} {
netgen::log end
}
puts stdout "LVS Done."
if {$dojson == 1} {
netgen::convert_to_json $logfile $lvs_final
+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;