Found an error that causes the worst of the problem in long

extraction times, which is an incorrect units conversion of the
"step" parameter in the extract section.  It was converting based
on the "lambda" parameter in the same section, which has to do with
the scaling of values in the output file, not the scale factor of
the database to be extracted, which is set by the current CIF output
scale.  Once fixed, extraction times are minimized using the rule of
thumb mentioned in the techfile reference, which is 50 times the
minimum feature size.  Also:  Give the lengthy nature of extraction
on large designs no matter how well optimized, added a feature to
mark the progress of the extraction in increments of 5%.  Does not
output progress for small cells that extract quickly.
This commit is contained in:
Tim Edwards 2019-01-29 16:41:48 -05:00
parent 39695aecb0
commit 57cded900f
2 changed files with 40 additions and 8 deletions

View File

@ -29,6 +29,7 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
#include <stdio.h>
#include <string.h>
#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 */

View File

@ -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! */