Merge 309d865318 into d2acdac901
This commit is contained in:
commit
ce25a55d06
|
|
@ -184,9 +184,9 @@ drcSubstitute (cptr)
|
||||||
DRCCookie * cptr; /* Design rule violated */
|
DRCCookie * cptr; /* Design rule violated */
|
||||||
{
|
{
|
||||||
static char *why_out = NULL;
|
static char *why_out = NULL;
|
||||||
char *whyptr, *sptr, *wptr;
|
char *whyptr, *sptr, *wptr, *unit;
|
||||||
int subscnt = 0, whylen;
|
int subscnt = 0, whylen;
|
||||||
float oscale, value;
|
float oscale, dscale, value;
|
||||||
extern float CIFGetOutputScale();
|
extern float CIFGetOutputScale();
|
||||||
|
|
||||||
whyptr = DRCCurStyle->DRCWhyList[cptr->drcc_tag];
|
whyptr = DRCCurStyle->DRCWhyList[cptr->drcc_tag];
|
||||||
|
|
@ -203,10 +203,22 @@ drcSubstitute (cptr)
|
||||||
why_out = (char *)mallocMagic(whylen * sizeof(char));
|
why_out = (char *)mallocMagic(whylen * sizeof(char));
|
||||||
strcpy(why_out, whyptr);
|
strcpy(why_out, whyptr);
|
||||||
|
|
||||||
|
if (DRCPrintConvert)
|
||||||
|
{
|
||||||
|
unit = "um";
|
||||||
if (cptr->drcc_flags & DRC_CIFRULE)
|
if (cptr->drcc_flags & DRC_CIFRULE)
|
||||||
oscale = CIFGetScale(100); /* 100 = microns to centimicrons */
|
oscale = CIFGetScale(100); /* 100 = microns to centimicrons */
|
||||||
else
|
else
|
||||||
oscale = CIFGetOutputScale(1000); /* 1000 for conversion to um */
|
oscale = CIFGetOutputScale(1000); /* 1000 for conversion to um */
|
||||||
|
dscale = 1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
unit = "lambda";
|
||||||
|
oscale = 1;
|
||||||
|
dscale = CIFGetOutputScale(1);
|
||||||
|
}
|
||||||
|
|
||||||
wptr = why_out;
|
wptr = why_out;
|
||||||
|
|
||||||
while ((sptr = strchr(whyptr, '%')) != NULL)
|
while ((sptr = strchr(whyptr, '%')) != NULL)
|
||||||
|
|
@ -218,21 +230,21 @@ drcSubstitute (cptr)
|
||||||
switch (*(sptr + 1))
|
switch (*(sptr + 1))
|
||||||
{
|
{
|
||||||
case 'd':
|
case 'd':
|
||||||
/* Replace with "dist" value in microns */
|
/* Replace with "dist" value in microns or lambda */
|
||||||
value = (float)cptr->drcc_dist * oscale;
|
value = (float)cptr->drcc_dist * oscale / dscale;
|
||||||
snprintf(wptr, 20, "%01.3gum", value);
|
snprintf(wptr, 20, "%01.3g%s", value, unit);
|
||||||
wptr += strlen(wptr);
|
wptr += strlen(wptr);
|
||||||
break;
|
break;
|
||||||
case 'c':
|
case 'c':
|
||||||
/* Replace with "cdist" value in microns */
|
/* Replace with "cdist" value in microns or lambda */
|
||||||
value = (float)cptr->drcc_cdist * oscale;
|
value = (float)cptr->drcc_cdist * oscale / dscale;
|
||||||
snprintf(wptr, 20, "%01.3gum", value);
|
snprintf(wptr, 20, "%01.3g%s", value, unit);
|
||||||
wptr += strlen(wptr);
|
wptr += strlen(wptr);
|
||||||
break;
|
break;
|
||||||
case 'a':
|
case 'a':
|
||||||
/* Replace with "cdist" value in microns squared */
|
/* Replace with "cdist" value in microns or lambda squared */
|
||||||
value = (float)cptr->drcc_cdist * oscale * oscale;
|
value = (float)cptr->drcc_cdist * oscale * oscale / (dscale * dscale);
|
||||||
snprintf(wptr, 20, "%01.4gum^2", value);
|
snprintf(wptr, 20, "%01.4g%s^2", value, unit);
|
||||||
wptr += strlen(wptr);
|
wptr += strlen(wptr);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
||||||
|
|
@ -60,6 +60,9 @@ global int DRCStepSize;
|
||||||
|
|
||||||
global int DRCRuleOptimization = TRUE;
|
global int DRCRuleOptimization = TRUE;
|
||||||
|
|
||||||
|
/* Whether we are converting units printed from lambda to microns */
|
||||||
|
global bool DRCPrintConvert;
|
||||||
|
|
||||||
/* The following variables count how many rules were specified by
|
/* The following variables count how many rules were specified by
|
||||||
* the technology file and how many edge rules were optimized away.
|
* the technology file and how many edge rules were optimized away.
|
||||||
*/
|
*/
|
||||||
|
|
@ -554,6 +557,9 @@ DRCTechStyleInit()
|
||||||
drcRulesOptimized = 0;
|
drcRulesOptimized = 0;
|
||||||
drcRulesSpecified = 0;
|
drcRulesSpecified = 0;
|
||||||
|
|
||||||
|
/* default to printing in microns */
|
||||||
|
DRCPrintConvert = TRUE;
|
||||||
|
|
||||||
if (DRCCurStyle == NULL)
|
if (DRCCurStyle == NULL)
|
||||||
{
|
{
|
||||||
DRCCurStyle = (DRCStyle *) mallocMagic(sizeof(DRCStyle));
|
DRCCurStyle = (DRCStyle *) mallocMagic(sizeof(DRCStyle));
|
||||||
|
|
@ -855,6 +861,19 @@ DRCTechLine(sectionName, argc, argv)
|
||||||
(DRCCurStyle->ds_status != TECH_SUSPENDED))
|
(DRCCurStyle->ds_status != TECH_SUSPENDED))
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
||||||
|
/* Process "print" line next (if any) */
|
||||||
|
|
||||||
|
if (strcmp(argv[0], "print") == 0)
|
||||||
|
{
|
||||||
|
if (!strcmp(argv[1], "microns"))
|
||||||
|
DRCPrintConvert = TRUE;
|
||||||
|
else if (!strcmp(argv[1], "um"))
|
||||||
|
DRCPrintConvert = TRUE;
|
||||||
|
else if (strcmp(argv[1], "lambda"))
|
||||||
|
TechError("print must be microns or lambda. Using the "
|
||||||
|
"default value (microns).\n");
|
||||||
|
}
|
||||||
|
|
||||||
/* Process "scalefactor" line next (if any) */
|
/* Process "scalefactor" line next (if any) */
|
||||||
|
|
||||||
if (strcmp(argv[0], "scalefactor") == 0)
|
if (strcmp(argv[0], "scalefactor") == 0)
|
||||||
|
|
|
||||||
|
|
@ -222,6 +222,7 @@ extern int DRCstatVRulesHisto[DRC_MAXRULESHISTO];
|
||||||
|
|
||||||
extern int DRCTechHalo; /* Current halo being used */
|
extern int DRCTechHalo; /* Current halo being used */
|
||||||
extern int DRCStepSize; /* Current step size being used */
|
extern int DRCStepSize; /* Current step size being used */
|
||||||
|
extern bool DRCPrintConvert; /* print as lambda or microns */
|
||||||
extern DRCPendingCookie * DRCPendingRoot;
|
extern DRCPendingCookie * DRCPendingRoot;
|
||||||
|
|
||||||
extern unsigned char DRCBackGround; /* global flag to enable/disable
|
extern unsigned char DRCBackGround; /* global flag to enable/disable
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue