From f428b7c792d01f639aa06c5dfb338fc09020b889 Mon Sep 17 00:00:00 2001 From: Tim Edwards Date: Mon, 23 Aug 2021 13:46:19 -0400 Subject: [PATCH] Corrected a scaling error that causes all extraction dimension values to be scaled twice when using the "extract style" command and with an extraction style that uses micron units. The microns-to-internal units conversion expects an unscaled result when calling CIFGetOutputScale(), but except when loading a tech file for the first time, this value is scaled, and causes the double scaling. Fixed by unscaling the CIF output before reloading the extraction style, then scaling it afterward. --- VERSION | 2 +- extract/ExtTech.c | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 22f8d41e..7145cd3a 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -8.3.197 +8.3.198 diff --git a/extract/ExtTech.c b/extract/ExtTech.c index 483efa59..3225bf8d 100644 --- a/extract/ExtTech.c +++ b/extract/ExtTech.c @@ -925,8 +925,19 @@ ExtLoadStyle(stylename) /* no other tech client sections depend on the extract section. */ invext = TechSectionGetMask("extract", NULL); + + /* If microns are used as units, then the TechLoad needs to convert */ + /* units based on *unscaled* dimensions. Since it gets the scale */ + /* factor from CIFGetOutputScale(), the CIF units need to be */ + /* unscaled. This is cumbersome but ensures that the right units */ + /* are obtained. */ + CIFTechOutputScale(DBLambda[1], DBLambda[0]); + TechLoad(NULL, invext); + /* Put the CIF output scale units back to what they were */ + CIFTechOutputScale(DBLambda[0], DBLambda[1]); + /* extTechFinalStyle(ExtCurStyle); */ /* Taken care of by TechLoad() */ ExtTechScale(DBLambda[0], DBLambda[1]); }