diff --git a/extract/ExtSubtree.c b/extract/ExtSubtree.c index b58a128c..60484e7c 100644 --- a/extract/ExtSubtree.c +++ b/extract/ExtSubtree.c @@ -29,6 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/ #include #include +#include "tcltk/tclmagic.h" #include "utils/magic.h" #include "utils/geometry.h" #include "utils/geofast.h" @@ -142,6 +143,8 @@ extSubtree(parentUse, reg, f) Rect r, rlab, rbloat, *b; Label *lab; bool result; + int cuts, totcuts; + float pdone, plast; if ((ExtOptions & (EXT_DOCOUPLING|EXT_DOADJUST)) != (EXT_DOCOUPLING|EXT_DOADJUST)) @@ -172,7 +175,18 @@ extSubtree(parentUse, reg, f) * halo has been set above to reflect the maximum distance for * sidewall coupling capacitance). */ + b = &def->cd_bbox; + + /* Monitor progress, for large designs */ + totcuts = (b->r_ytop - b->r_ybot + ExtCurStyle->exts_stepSize - 1) + / ExtCurStyle->exts_stepSize; + totcuts *= ((b->r_xtop - b->r_xbot + ExtCurStyle->exts_stepSize - 1) + / ExtCurStyle->exts_stepSize); + cuts = 0; + pdone = 0.0; + plast = 0.0; + for (r.r_ybot = b->r_ybot; r.r_ybot < b->r_ytop; r.r_ybot = r.r_ytop) { r.r_ytop = r.r_ybot + ExtCurStyle->exts_stepSize; @@ -224,6 +238,19 @@ extSubtree(parentUse, reg, f) scx.scx_use = ha.ha_parentUse; DBCellSrArea(&scx, extSubstrateFunc, (ClientData)&ha); } + + cuts++; + pdone = 100.0 * ((float)cuts / (float)totcuts); + if ((((pdone - plast) > 5.0) || (cuts == totcuts)) && (cuts > 1)) { + TxPrintf("Completed %d%%\n", (int)(pdone + 0.5)); + plast = pdone; + TxFlushOut(); + +#ifdef MAGIC_WRAPPER + /* We need to let Tk paint the console display */ + while (Tcl_DoOneEvent(TCL_DONT_WAIT) != 0); +#endif + } } } #else /* exactinteractions */ diff --git a/extract/ExtTech.c b/extract/ExtTech.c index acf36c8e..c4744879 100644 --- a/extract/ExtTech.c +++ b/extract/ExtTech.c @@ -43,6 +43,7 @@ static char sccsid[] = "@(#)ExtTech.c 4.8 MAGIC (Berkeley) 10/26/85"; #include "extract/extract.h" #include "extract/extractInt.h" #include "cif/CIFint.h" +#include "cif/cif.h" /* Whether we are converting units from microns to lambda */ bool doConvert; @@ -2853,14 +2854,18 @@ zinit: } /* If global variable "doConvert" is TRUE, then we convert from */ - /* microns to lambda and microns^2 to lambda^2. */ + /* microns to lambda and microns^2 to lambda^2, based on the */ + /* current value of DBLambda and output scale. */ if (doConvert) { - /* exts_unitsPerLambda is in centimicrons, so divide by */ - /* 100 to get microns. */ + /* Convert from micron units in the file to the current */ + /* physical scalefactor as determined by the default CIF */ + /* output scale. */ - CapValue scalefac = (CapValue)style->exts_unitsPerLambda / 100.0; + float dscale = CIFGetOutputScale(1000); + + CapValue scalefac = (CapValue)dscale; CapValue sqfac = scalefac * scalefac; for (r = 0; r < DBNumTypes; r++) @@ -2898,10 +2903,10 @@ zinit: /* side halo and step size are also in microns */ - style->exts_sideCoupleHalo = (int)(((CapValue)style->exts_sideCoupleHalo - / scalefac) + 0.5); - style->exts_stepSize = (int)(((CapValue)style->exts_stepSize - / scalefac) + 0.5); + style->exts_sideCoupleHalo = (int)(((float)style->exts_sideCoupleHalo + / dscale) + 0.5); + style->exts_stepSize = (int)(((float)style->exts_stepSize + / dscale) + 0.5); } /* Avoid setting stepSize to zero, or extraction will hang! */