mirror of
https://github.com/RTimothyEdwards/magic.git
synced 2026-09-07 03:21:20 +02:00
Merge branch 'master' into bplane
Conflicts: VERSION database/DBcellsrch.c database/DBconnect.c extract/ExtInter.c lef/Depend utils/Depend Updated bplane branch with all changes to master since the bplane branch was last modified.
This commit is contained in:
+340
-125
@@ -71,7 +71,7 @@ typedef enum
|
||||
AREAC, CONTACT, CSCALE,
|
||||
DEFAULTAREACAP, DEFAULTOVERLAP, DEFAULTPERIMETER, DEFAULTSIDEOVERLAP,
|
||||
DEFAULTSIDEWALL,
|
||||
DEVICE, FET, FETRESIST, HEIGHT, LAMBDA, OVERC,
|
||||
DEVICE, FET, FETRESIST, HEIGHT, ANTENNA, MODEL, TIEDOWN, LAMBDA, OVERC,
|
||||
PERIMC, PLANEORDER, NOPLANEORDER, RESIST, RSCALE, SIDEHALO, SIDEOVERLAP,
|
||||
SIDEWALL, STEP, STYLE, SUBSTRATE, UNITS, VARIANT
|
||||
} Key;
|
||||
@@ -122,6 +122,15 @@ static keydesc keyTable[] = {
|
||||
"height", HEIGHT, 4, 4,
|
||||
"type height-above-subtrate thickness",
|
||||
|
||||
"antenna", ANTENNA, 4, 6,
|
||||
"type [calc-type] [antenna-ratio-proportional] antenna-ratio-const",
|
||||
|
||||
"model", MODEL, 2, 3,
|
||||
"partial-cumulative [area-sidewall]",
|
||||
|
||||
"tiedown", TIEDOWN, 2, 2,
|
||||
"types",
|
||||
|
||||
"lambda", LAMBDA, 2, 2,
|
||||
"units-per-lambda",
|
||||
|
||||
@@ -157,7 +166,7 @@ static keydesc keyTable[] = {
|
||||
"style", STYLE, 2, 4,
|
||||
"stylename",
|
||||
|
||||
"substrate", SUBSTRATE, 3, 3,
|
||||
"substrate", SUBSTRATE, 3, 4,
|
||||
"types plane",
|
||||
|
||||
"units", UNITS, 2, 2,
|
||||
@@ -298,37 +307,47 @@ ExtGetDevInfo(idx, devnameptr, sd_rclassptr, sub_rclassptr, subnameptr)
|
||||
TileType t;
|
||||
TileTypeBitMask *rmask, *tmask;
|
||||
int n, i = 0, j;
|
||||
bool repeat;
|
||||
bool repeat, found;
|
||||
ExtDevice *devptr;
|
||||
char *locdname;
|
||||
char **uniquenamelist = (char **)mallocMagic(DBNumTypes * sizeof(char *));
|
||||
|
||||
|
||||
found = FALSE;
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
{
|
||||
locdname = ExtCurStyle->exts_transName[t];
|
||||
if (locdname != NULL)
|
||||
for (devptr = ExtCurStyle->exts_device[t]; devptr; devptr = devptr->exts_next)
|
||||
{
|
||||
repeat = FALSE;
|
||||
for (j = 0; j < i; j++)
|
||||
if (!strcmp(uniquenamelist[j], locdname))
|
||||
{
|
||||
repeat = TRUE;
|
||||
break;
|
||||
}
|
||||
if (repeat == FALSE)
|
||||
locdname = devptr->exts_deviceName;
|
||||
if (locdname != NULL)
|
||||
{
|
||||
if (i == idx) break;
|
||||
uniquenamelist[i] = locdname;
|
||||
i++;
|
||||
repeat = FALSE;
|
||||
for (j = 0; j < i; j++)
|
||||
if (!strcmp(uniquenamelist[j], locdname))
|
||||
{
|
||||
repeat = TRUE;
|
||||
break;
|
||||
}
|
||||
if (repeat == FALSE)
|
||||
{
|
||||
if (i == idx)
|
||||
{
|
||||
found = TRUE;
|
||||
break;
|
||||
}
|
||||
uniquenamelist[i] = locdname;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (found == TRUE) break;
|
||||
}
|
||||
if (t == DBNumTypes) return FALSE;
|
||||
if (devptr == NULL) return FALSE;
|
||||
|
||||
*devnameptr = locdname;
|
||||
*subnameptr = ExtCurStyle->exts_transSubstrateName[t];
|
||||
*subnameptr = devptr->exts_deviceSubstrateName;
|
||||
|
||||
tmask = &ExtCurStyle->exts_transSDTypes[t][0];
|
||||
tmask = &devptr->exts_deviceSDTypes[0];
|
||||
*sd_rclassptr = (short)(-1); /* NO_RESCLASS */
|
||||
|
||||
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
||||
@@ -341,7 +360,7 @@ ExtGetDevInfo(idx, devnameptr, sd_rclassptr, sub_rclassptr, subnameptr)
|
||||
}
|
||||
}
|
||||
|
||||
tmask = &ExtCurStyle->exts_transSubstrateTypes[t];
|
||||
tmask = &devptr->exts_deviceSubstrateTypes;
|
||||
*sub_rclassptr = (short)(-1); /* NO_RESCLASS */
|
||||
|
||||
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
||||
@@ -360,6 +379,35 @@ ExtGetDevInfo(idx, devnameptr, sd_rclassptr, sub_rclassptr, subnameptr)
|
||||
|
||||
#endif /* MAGIC_WRAPPER */
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
* extGetDevType --
|
||||
*
|
||||
* Given an extraction model device name (devname), return the associated
|
||||
* magic tiletype for the device.
|
||||
*
|
||||
* Results:
|
||||
* Tile type that represents the device "devname" in the magic database.
|
||||
*
|
||||
* ----------------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
TileType
|
||||
extGetDevType(devname)
|
||||
char *devname;
|
||||
{
|
||||
TileType t;
|
||||
ExtDevice *devptr;
|
||||
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
for (devptr = ExtCurStyle->exts_device[t]; devptr; devptr = devptr->exts_next)
|
||||
if (!strcmp(devptr->exts_deviceName, devname))
|
||||
return t;
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
#ifdef THREE_D
|
||||
/*
|
||||
@@ -538,23 +586,10 @@ extTechStyleAlloc()
|
||||
TileType r;
|
||||
|
||||
style = (ExtStyle *) mallocMagic(sizeof (ExtStyle));
|
||||
|
||||
/* Make sure that the memory for character strings is NULL, */
|
||||
/* because we want the Init section to free memory if it */
|
||||
/* has been previously allocated. */
|
||||
|
||||
for (r = 0; r < NT; r++)
|
||||
{
|
||||
style->exts_transSubstrateName[r] = (char *) NULL;
|
||||
style->exts_transName[r] = (char *) NULL;
|
||||
style->exts_transSDTypes[r] = (TileTypeBitMask *) NULL;
|
||||
style->exts_deviceParams[r] = (ParamList *) NULL;
|
||||
style->exts_deviceClass[r] = (char) 0;
|
||||
style->exts_transResist[r].ht_table = (HashEntry **) NULL;
|
||||
}
|
||||
return style;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
@@ -575,7 +610,7 @@ extTechStyleInit(style)
|
||||
style->exts_status = TECH_NOT_LOADED;
|
||||
|
||||
style->exts_sidePlanes = style->exts_overlapPlanes = 0;
|
||||
TTMaskZero(&style->exts_transMask);
|
||||
TTMaskZero(&style->exts_deviceMask);
|
||||
style->exts_activeTypes = DBAllButSpaceAndDRCBits;
|
||||
|
||||
for (r = 0; r < NP; r++)
|
||||
@@ -589,7 +624,7 @@ extTechStyleInit(style)
|
||||
{
|
||||
TTMaskZero(&style->exts_nodeConn[r]);
|
||||
TTMaskZero(&style->exts_resistConn[r]);
|
||||
TTMaskZero(&style->exts_transConn[r]);
|
||||
TTMaskZero(&style->exts_deviceConn[r]);
|
||||
style->exts_allConn[r] = DBAllTypeBits;
|
||||
|
||||
style->exts_sheetResist[r] = 0;
|
||||
@@ -620,43 +655,41 @@ extTechStyleInit(style)
|
||||
#ifdef ARIEL
|
||||
TTMaskZero(&style->exts_subsTransistorTypes[r]);
|
||||
#endif
|
||||
if (style->exts_transSDTypes[r] != NULL)
|
||||
freeMagic(style->exts_transSDTypes[r]);
|
||||
style->exts_transSDTypes[r] = NULL;
|
||||
style->exts_transSDCount[r] = 0;
|
||||
style->exts_transGateCap[r] = (CapValue) 0;
|
||||
style->exts_transSDCap[r] = (CapValue) 0;
|
||||
if (style->exts_transSubstrateName[r] != (char *) NULL)
|
||||
if (style->exts_device[r] != NULL)
|
||||
{
|
||||
freeMagic(style->exts_transSubstrateName[r]);
|
||||
style->exts_transSubstrateName[r] = (char *) NULL;
|
||||
}
|
||||
if (style->exts_transName[r] != (char *) NULL)
|
||||
{
|
||||
freeMagic(style->exts_transName[r]);
|
||||
style->exts_transName[r] = (char *) NULL;
|
||||
}
|
||||
while (style->exts_deviceParams[r] != (ParamList *) NULL)
|
||||
{
|
||||
/* Parameter lists are shared. Only free the last one! */
|
||||
ExtDevice *devptr;
|
||||
for (devptr = style->exts_device[r]; devptr; devptr = devptr->exts_next)
|
||||
{
|
||||
|
||||
if (style->exts_deviceParams[r]->pl_count > 1)
|
||||
{
|
||||
style->exts_deviceParams[r]->pl_count--;
|
||||
style->exts_deviceParams[r] = (ParamList *)NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
freeMagic(style->exts_deviceParams[r]->pl_name);
|
||||
freeMagic(style->exts_deviceParams[r]);
|
||||
style->exts_deviceParams[r] = style->exts_deviceParams[r]->pl_next;
|
||||
if (devptr->exts_deviceSDTypes != NULL)
|
||||
freeMagic(devptr->exts_deviceSDTypes);
|
||||
if (devptr->exts_deviceSubstrateName != (char *) NULL)
|
||||
freeMagic(devptr->exts_deviceSubstrateName);
|
||||
if (devptr->exts_deviceName != (char *) NULL)
|
||||
freeMagic(devptr->exts_deviceName);
|
||||
while (devptr->exts_deviceParams != (ParamList *) NULL)
|
||||
{
|
||||
/* Parameter lists are shared. Only free the last one! */
|
||||
|
||||
if (devptr->exts_deviceParams->pl_count > 1)
|
||||
{
|
||||
devptr->exts_deviceParams->pl_count--;
|
||||
devptr->exts_deviceParams = (ParamList *)NULL;
|
||||
}
|
||||
else
|
||||
{
|
||||
freeMagic(devptr->exts_deviceParams->pl_name);
|
||||
freeMagic(devptr->exts_deviceParams);
|
||||
devptr->exts_deviceParams = devptr->exts_deviceParams->pl_next;
|
||||
}
|
||||
}
|
||||
if (devptr->exts_deviceResist.ht_table != (HashEntry **) NULL)
|
||||
HashKill(&devptr->exts_deviceResist);
|
||||
|
||||
freeMagic(devptr);
|
||||
}
|
||||
style->exts_device[r] = (ExtDevice *)NULL;
|
||||
}
|
||||
style->exts_deviceClass[r] = (char)0;
|
||||
if (style->exts_transResist[r].ht_table != (HashEntry **) NULL)
|
||||
HashKill(&style->exts_transResist[r]);
|
||||
HashInit(&style->exts_transResist[r], 8, HT_STRINGKEYS);
|
||||
style->exts_linearResist[r] = 0;
|
||||
}
|
||||
|
||||
style->exts_sideCoupleHalo = 0;
|
||||
@@ -667,14 +700,20 @@ extTechStyleInit(style)
|
||||
style->exts_numResistClasses = 0;
|
||||
|
||||
style->exts_planeOrderStatus = needPlaneOrder ;
|
||||
TTMaskZero(&style->exts_antennaTieTypes);
|
||||
|
||||
for (r = 0; r < DBNumTypes; r++)
|
||||
{
|
||||
style->exts_antennaRatio[r].areaType = (char)0;
|
||||
style->exts_antennaRatio[r].ratioGate = 0.0;
|
||||
style->exts_antennaRatio[r].ratioDiffA = 0.0;
|
||||
style->exts_antennaRatio[r].ratioDiffB = 0.0;
|
||||
style->exts_resistByResistClass[r] = 0;
|
||||
TTMaskZero(&style->exts_typesByResistClass[r]);
|
||||
style->exts_typesResistChanged[r] = DBAllButSpaceAndDRCBits;
|
||||
TTMaskSetType(&style->exts_typesResistChanged[r], TT_SPACE);
|
||||
style->exts_typeToResistClass[r] = -1;
|
||||
|
||||
}
|
||||
doConvert = FALSE;
|
||||
|
||||
@@ -685,6 +724,7 @@ extTechStyleInit(style)
|
||||
|
||||
style->exts_globSubstratePlane = -1;
|
||||
TTMaskZero(&style->exts_globSubstrateTypes);
|
||||
TTMaskZero(&style->exts_globSubstrateShieldTypes);
|
||||
}
|
||||
|
||||
|
||||
@@ -798,14 +838,6 @@ ExtTechInit()
|
||||
if (ExtCurStyle != NULL)
|
||||
{
|
||||
extTechStyleInit(ExtCurStyle);
|
||||
|
||||
/* Everything has been freed except the hash tables, which */
|
||||
/* were just reinitialized by extTechStyleInit(). */
|
||||
for (r = 0; r < NT; r++)
|
||||
{
|
||||
if (ExtCurStyle->exts_transResist[r].ht_table != (HashEntry **) NULL)
|
||||
HashKill(&ExtCurStyle->exts_transResist[r]);
|
||||
}
|
||||
ExtCurStyle = NULL;
|
||||
}
|
||||
|
||||
@@ -1569,7 +1601,7 @@ ExtTechLine(sectionName, argc, argv)
|
||||
PlaneMask pshield, pov;
|
||||
CapValue capVal, gscap, gccap;
|
||||
TileTypeBitMask types1, types2, termtypes[MAXSD];
|
||||
TileTypeBitMask near, far, ov, shield, subsTypes;
|
||||
TileTypeBitMask near, far, ov, shield, subsTypes, idTypes;
|
||||
char *subsName, *transName, *cp, *endptr, *paramName;
|
||||
TileType s, t, r, o;
|
||||
keydesc *kp, *dv;
|
||||
@@ -1578,6 +1610,7 @@ ExtTechLine(sectionName, argc, argv)
|
||||
EdgeCap *cnew;
|
||||
ExtKeep *es, *newStyle;
|
||||
ParamList *subcktParams, *newParam;
|
||||
ExtDevice *devptr;
|
||||
int refcnt;
|
||||
double dhalo;
|
||||
bool bad;
|
||||
@@ -1796,6 +1829,8 @@ ExtTechLine(sectionName, argc, argv)
|
||||
case FET:
|
||||
case FETRESIST:
|
||||
case HEIGHT:
|
||||
case ANTENNA:
|
||||
case TIEDOWN:
|
||||
case OVERC:
|
||||
case PERIMC:
|
||||
case RESIST:
|
||||
@@ -1888,24 +1923,32 @@ ExtTechLine(sectionName, argc, argv)
|
||||
gccap = (argc > 7) ? aToCap(argv[7]) : (CapValue) 0;
|
||||
}
|
||||
|
||||
TTMaskSetMask(&ExtCurStyle->exts_transMask, &types1);
|
||||
TTMaskSetMask(&ExtCurStyle->exts_deviceMask, &types1);
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
if (TTMaskHasType(&types1, t))
|
||||
{
|
||||
TTMaskSetMask(ExtCurStyle->exts_transConn+t,&types1);
|
||||
ExtCurStyle->exts_transSDTypes[t] = (TileTypeBitMask *)
|
||||
devptr = (ExtDevice *)mallocMagic(sizeof(ExtDevice));
|
||||
devptr->exts_deviceSDTypes = (TileTypeBitMask *)
|
||||
mallocMagic(2 * sizeof(TileTypeBitMask));
|
||||
ExtCurStyle->exts_transSDTypes[t][0] = termtypes[0];
|
||||
ExtCurStyle->exts_transSDTypes[t][1] = DBZeroTypeBits;
|
||||
ExtCurStyle->exts_transSDCount[t] = nterm;
|
||||
ExtCurStyle->exts_transSDCap[t] = gscap;
|
||||
ExtCurStyle->exts_transGateCap[t] = gccap;
|
||||
ExtCurStyle->exts_deviceClass[t] = DEV_FET;
|
||||
ExtCurStyle->exts_transName[t] =
|
||||
StrDup((char **) NULL, transName);
|
||||
ExtCurStyle->exts_transSubstrateName[t] =
|
||||
devptr->exts_deviceSDTypes[0] = termtypes[0];
|
||||
devptr->exts_deviceSDTypes[1] = DBZeroTypeBits;
|
||||
devptr->exts_deviceSDCount = nterm;
|
||||
devptr->exts_deviceSDCap = gscap;
|
||||
devptr->exts_deviceGateCap = gccap;
|
||||
devptr->exts_deviceClass = DEV_FET;
|
||||
devptr->exts_deviceName = StrDup((char **) NULL, transName);
|
||||
devptr->exts_deviceSubstrateName =
|
||||
StrDup((char **) NULL, subsName);
|
||||
ExtCurStyle->exts_transSubstrateTypes[t] = subsTypes;
|
||||
devptr->exts_deviceSubstrateTypes = subsTypes;
|
||||
devptr->exts_deviceIdentifierTypes = DBZeroTypeBits;
|
||||
devptr->exts_deviceParams = (ParamList *) NULL;
|
||||
devptr->exts_deviceResist.ht_table = (HashEntry **) NULL;
|
||||
HashInit(&devptr->exts_deviceResist, 8, HT_STRINGKEYS);
|
||||
|
||||
TTMaskSetMask(ExtCurStyle->exts_deviceConn + t, &types1);
|
||||
|
||||
devptr->exts_next = ExtCurStyle->exts_device[t];
|
||||
ExtCurStyle->exts_device[t] = devptr;
|
||||
#ifdef ARIEL
|
||||
{
|
||||
int z;
|
||||
@@ -1936,12 +1979,11 @@ ExtTechLine(sectionName, argc, argv)
|
||||
case DEFAULTSIDEWALL:
|
||||
ExtTechSimpleSidewallCap(argv);
|
||||
break;
|
||||
|
||||
case DEVICE:
|
||||
|
||||
/* Parse second argument for device type */
|
||||
|
||||
n = LookupStruct(argv[1], (LookupTable *) devTable, sizeof devTable[0]);
|
||||
n = LookupStruct(argv[1], (LookupTable *)devTable, sizeof devTable[0]);
|
||||
if (n < 0)
|
||||
{
|
||||
TechError("Illegal device. Legal devices are:\n\t");
|
||||
@@ -1999,6 +2041,18 @@ ExtTechLine(sectionName, argc, argv)
|
||||
argc--;
|
||||
}
|
||||
|
||||
/* If the last entry before any parameters starts with '+', */
|
||||
/* then use it to set the identity marker. Otherwise, the */
|
||||
/* identity marker is NULL. */
|
||||
|
||||
idTypes = DBZeroTypeBits;
|
||||
if (*argv[argc - 1] == '+')
|
||||
{
|
||||
if ((DBTechNameMask(argv[argc - 1] + 1, &idTypes)) == 0)
|
||||
idTypes = DBZeroTypeBits;
|
||||
argc--;
|
||||
}
|
||||
|
||||
/* Check the number of arguments after splitting out */
|
||||
/* parameter entries. There is no limit on arguments in */
|
||||
/* DEV_SUBCKT and DEV_MSUBCKT. */
|
||||
@@ -2194,31 +2248,47 @@ ExtTechLine(sectionName, argc, argv)
|
||||
break;
|
||||
}
|
||||
|
||||
TTMaskSetMask(&ExtCurStyle->exts_transMask, &types1);
|
||||
TTMaskSetMask(&ExtCurStyle->exts_deviceMask, &types1);
|
||||
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
{
|
||||
if (TTMaskHasType(&types1, t))
|
||||
{
|
||||
TTMaskSetMask(ExtCurStyle->exts_transConn + t, &types1);
|
||||
devptr = (ExtDevice *)mallocMagic(sizeof(ExtDevice));
|
||||
|
||||
for (i = 0; !TTMaskIsZero(&termtypes[i]); i++);
|
||||
ExtCurStyle->exts_transSDTypes[t] = (TileTypeBitMask *)
|
||||
devptr->exts_deviceSDTypes = (TileTypeBitMask *)
|
||||
mallocMagic((i + 1) * sizeof(TileTypeBitMask));
|
||||
|
||||
for (i = 0; !TTMaskIsZero(&termtypes[i]); i++)
|
||||
ExtCurStyle->exts_transSDTypes[t][i] = termtypes[i];
|
||||
ExtCurStyle->exts_transSDTypes[t][i] = DBZeroTypeBits;
|
||||
devptr->exts_deviceSDTypes[i] = termtypes[i];
|
||||
devptr->exts_deviceSDTypes[i] = DBZeroTypeBits;
|
||||
|
||||
ExtCurStyle->exts_transSDCount[t] = nterm;
|
||||
ExtCurStyle->exts_transSDCap[t] = gscap;
|
||||
ExtCurStyle->exts_transGateCap[t] = gccap;
|
||||
ExtCurStyle->exts_deviceClass[t] = class;
|
||||
ExtCurStyle->exts_transName[t] =
|
||||
StrDup((char **) NULL, transName);
|
||||
devptr->exts_deviceSDCount = nterm;
|
||||
devptr->exts_deviceSDCap = gscap;
|
||||
devptr->exts_deviceGateCap = gccap;
|
||||
devptr->exts_deviceClass = class;
|
||||
devptr->exts_deviceName = StrDup((char **) NULL, transName);
|
||||
if (subsName != NULL)
|
||||
ExtCurStyle->exts_transSubstrateName[t] =
|
||||
devptr->exts_deviceSubstrateName =
|
||||
StrDup((char **) NULL, subsName);
|
||||
ExtCurStyle->exts_transSubstrateTypes[t] = subsTypes;
|
||||
else
|
||||
devptr->exts_deviceSubstrateName = (char *)NULL;
|
||||
devptr->exts_deviceSubstrateTypes = subsTypes;
|
||||
devptr->exts_deviceIdentifierTypes = idTypes;
|
||||
devptr->exts_deviceParams = (ParamList *) NULL;
|
||||
if (subcktParams != NULL)
|
||||
{
|
||||
devptr->exts_deviceParams = subcktParams;
|
||||
subcktParams->pl_count++;
|
||||
}
|
||||
devptr->exts_deviceResist.ht_table = (HashEntry **) NULL;
|
||||
HashInit(&devptr->exts_deviceResist, 8, HT_STRINGKEYS);
|
||||
|
||||
devptr->exts_next = ExtCurStyle->exts_device[t];
|
||||
ExtCurStyle->exts_device[t] = devptr;
|
||||
|
||||
TTMaskSetMask(ExtCurStyle->exts_deviceConn + t, &types1);
|
||||
#ifdef ARIEL
|
||||
{
|
||||
int z;
|
||||
@@ -2231,11 +2301,6 @@ ExtTechLine(sectionName, argc, argv)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if (subcktParams != NULL)
|
||||
{
|
||||
ExtCurStyle->exts_deviceParams[t] = subcktParams;
|
||||
subcktParams->pl_count++;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -2249,13 +2314,19 @@ ExtTechLine(sectionName, argc, argv)
|
||||
val = atoi(argv[3]);
|
||||
isLinear = (strcmp(argv[2], "linear") == 0);
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
{
|
||||
ExtDevice *devptr;
|
||||
if (TTMaskHasType(&types1, t))
|
||||
{
|
||||
he = HashFind(&ExtCurStyle->exts_transResist[t], argv[2]);
|
||||
HashSetValue(he, (spointertype)val);
|
||||
if (isLinear)
|
||||
ExtCurStyle->exts_linearResist[t] = val;
|
||||
for (devptr = ExtCurStyle->exts_device[t]; devptr; devptr = devptr->exts_next)
|
||||
{
|
||||
he = HashFind(&devptr->exts_deviceResist, argv[2]);
|
||||
HashSetValue(he, (spointertype)val);
|
||||
if (isLinear)
|
||||
devptr->exts_linearResist = val;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
case HEIGHT: {
|
||||
float height, thick;
|
||||
@@ -2280,6 +2351,122 @@ ExtTechLine(sectionName, argc, argv)
|
||||
}
|
||||
}
|
||||
break;
|
||||
case ANTENNA: {
|
||||
float antennaratio;
|
||||
char areaType;
|
||||
bool hasModel = FALSE;
|
||||
int argidx = 2;
|
||||
|
||||
if (!StrIsNumeric(argv[2]))
|
||||
{
|
||||
if (!strcmp(argv[2], "surface") || !strcmp(argv[2], "area"))
|
||||
{
|
||||
areaType = ANTENNAMODEL_SURFACE;
|
||||
hasModel = TRUE;
|
||||
}
|
||||
else if (!strcmp(argv[2], "sidewall") || !strcmp(argv[2], "perimeter"))
|
||||
{
|
||||
areaType = ANTENNAMODEL_SIDEWALL;
|
||||
hasModel = TRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
TechError("Error in layer antenna calculation type \"%s\"; "
|
||||
" must be \"surface\" or \"sidewall\"\n", argv[2]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (hasModel == FALSE)
|
||||
{
|
||||
if (ExtCurStyle->exts_antennaModel & ANTENNAMODEL_SURFACE)
|
||||
areaType = ANTENNAMODEL_SURFACE;
|
||||
else if (ExtCurStyle->exts_antennaModel & ANTENNAMODEL_SIDEWALL)
|
||||
areaType = ANTENNAMODEL_SIDEWALL;
|
||||
else
|
||||
TechError("No antenna calculation type given for layer(s) %s "
|
||||
" and no default calculation type found.\n", argv[1]);
|
||||
}
|
||||
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
if (TTMaskHasType(&types1, t))
|
||||
ExtCurStyle->exts_antennaRatio[t].areaType = areaType;
|
||||
|
||||
if (hasModel == TRUE) argidx = 3;
|
||||
|
||||
if (!StrIsNumeric(argv[argidx]))
|
||||
{
|
||||
TechError("Gate layer antenna ratio %s must be numeric\n", argv[argidx]);
|
||||
break;
|
||||
}
|
||||
antennaratio = (float)strtod(argv[argidx], NULL);
|
||||
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
if (TTMaskHasType(&types1, t))
|
||||
ExtCurStyle->exts_antennaRatio[t].ratioGate = antennaratio;
|
||||
|
||||
argidx++;
|
||||
if (!StrIsNumeric(argv[argidx]))
|
||||
{
|
||||
if (!strcasecmp(argv[argidx], "none"))
|
||||
antennaratio = INFINITY;
|
||||
else
|
||||
{
|
||||
TechError("Diff layer antenna ratio %s must be numeric\n",
|
||||
argv[argidx]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
antennaratio = (float)strtod(argv[argidx], NULL);
|
||||
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
if (TTMaskHasType(&types1, t))
|
||||
ExtCurStyle->exts_antennaRatio[t].ratioDiffB = antennaratio;
|
||||
|
||||
argidx++;
|
||||
if (argidx < argc)
|
||||
{
|
||||
if (!StrIsNumeric(argv[argidx]))
|
||||
{
|
||||
TechError("Diff layer antenna ratio %s must be numeric\n",
|
||||
argv[argidx]);
|
||||
break;
|
||||
}
|
||||
antennaratio = (float)strtod(argv[argidx], NULL);
|
||||
}
|
||||
else
|
||||
antennaratio = 0;
|
||||
|
||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||
if (TTMaskHasType(&types1, t))
|
||||
ExtCurStyle->exts_antennaRatio[t].ratioDiffA = antennaratio;
|
||||
|
||||
break;
|
||||
}
|
||||
case MODEL:
|
||||
if (!strcmp(argv[1], "partial"))
|
||||
ExtCurStyle->exts_antennaModel |= ANTENNAMODEL_PARTIAL;
|
||||
else if (!strcmp(argv[1], "cumulative"))
|
||||
ExtCurStyle->exts_antennaModel |= ANTENNAMODEL_CUMULATIVE;
|
||||
else
|
||||
TxError("Unknown antenna model \"%s\": Use \"partial\" or "
|
||||
"\"cumulative\"");
|
||||
|
||||
if (argc > 2)
|
||||
{
|
||||
if (!strcmp(argv[2], "surface") || !strcmp(argv[2], "area"))
|
||||
ExtCurStyle->exts_antennaModel |= ANTENNAMODEL_SURFACE;
|
||||
else if (!strcmp(argv[2], "sidewall") || !strcmp(argv[2], "perimeter"))
|
||||
ExtCurStyle->exts_antennaModel |= ANTENNAMODEL_SIDEWALL;
|
||||
else
|
||||
TxError("Unknown antenna model \"%s\": Use \"surface\" or "
|
||||
"\"sidewall\"");
|
||||
}
|
||||
break;
|
||||
|
||||
case TIEDOWN:
|
||||
TTMaskSetMask(&ExtCurStyle->exts_antennaTieTypes, &types1);
|
||||
break;
|
||||
case UNITS:
|
||||
if (!strcmp(argv[1], "microns"))
|
||||
doConvert = TRUE;
|
||||
@@ -2569,8 +2756,22 @@ ExtTechLine(sectionName, argc, argv)
|
||||
ExtCurStyle->exts_stepSize = val;
|
||||
break;
|
||||
case SUBSTRATE:
|
||||
/* If the last entry starts with '-', then use it to set */
|
||||
/* the shield types. Otherwise, the shield types mask is */
|
||||
/* NULL. */
|
||||
|
||||
idTypes = DBZeroTypeBits;
|
||||
if (*argv[argc - 1] == '-')
|
||||
{
|
||||
if ((DBTechNameMask(argv[argc - 1] + 1, &idTypes)) == 0)
|
||||
idTypes = DBZeroTypeBits;
|
||||
argc--;
|
||||
}
|
||||
|
||||
TTMaskZero(&ExtCurStyle->exts_globSubstrateTypes);
|
||||
TTMaskZero(&ExtCurStyle->exts_globSubstrateShieldTypes);
|
||||
TTMaskSetMask(&ExtCurStyle->exts_globSubstrateTypes, &types1);
|
||||
ExtCurStyle->exts_globSubstrateShieldTypes = idTypes;
|
||||
ExtCurStyle->exts_globSubstratePlane = DBTechNoisyNamePlane(argv[2]);
|
||||
break;
|
||||
case NOPLANEORDER: {
|
||||
@@ -2619,7 +2820,7 @@ diffplane:
|
||||
*
|
||||
* Postprocess the technology specific information for extraction.
|
||||
* Builds the connectivity tables exts_nodeConn[], exts_resistConn[],
|
||||
* and exts_transConn[].
|
||||
* and exts_deviceConn[].
|
||||
*
|
||||
* Results:
|
||||
* None.
|
||||
@@ -2664,9 +2865,9 @@ extTechFinalStyle(style)
|
||||
for (r = TT_TECHDEPBASE; r < DBNumTypes; r++)
|
||||
{
|
||||
maskBits = style->exts_nodeConn[r] = DBConnectTbl[r];
|
||||
if (!TTMaskHasType(&style->exts_transMask, r))
|
||||
if (!TTMaskHasType(&style->exts_deviceMask, r))
|
||||
{
|
||||
TTMaskZero(&style->exts_transConn[r]);
|
||||
TTMaskZero(&style->exts_deviceConn[r]);
|
||||
}
|
||||
for (s = TT_TECHDEPBASE; s < DBNumTypes; s++)
|
||||
{
|
||||
@@ -2870,10 +3071,15 @@ zinit:
|
||||
|
||||
for (r = 0; r < DBNumTypes; r++)
|
||||
{
|
||||
style->exts_areaCap[r] *= sqfac;
|
||||
style->exts_transSDCap[r] *= sqfac;
|
||||
style->exts_transGateCap[r] *= sqfac;
|
||||
ExtDevice *devptr;
|
||||
|
||||
for (devptr = style->exts_device[r]; devptr; devptr = devptr->exts_next)
|
||||
{
|
||||
devptr->exts_deviceSDCap *= sqfac;
|
||||
devptr->exts_deviceGateCap *= sqfac;
|
||||
}
|
||||
|
||||
style->exts_areaCap[r] *= sqfac;
|
||||
for (s = 0; s < DBNumTypes; s++)
|
||||
{
|
||||
EdgeCap *ec;
|
||||
@@ -2899,6 +3105,10 @@ zinit:
|
||||
ec = ec->ec_next)
|
||||
ec->ec_cap *= 0.5;
|
||||
}
|
||||
|
||||
/* Layer thickness and height are in microns, but are floating-point */
|
||||
style->exts_thick[r] /= dscale;
|
||||
style->exts_height[r] /= dscale;
|
||||
}
|
||||
|
||||
/* side halo and step size are also in microns */
|
||||
@@ -2953,13 +3163,18 @@ ExtTechScale(scalen, scaled)
|
||||
|
||||
for (i = 0; i < DBNumTypes; i++)
|
||||
{
|
||||
ExtDevice *devptr;
|
||||
|
||||
style->exts_areaCap[i] *= sqn;
|
||||
style->exts_areaCap[i] /= sqd;
|
||||
|
||||
style->exts_transSDCap[i] *= sqn;
|
||||
style->exts_transSDCap[i] /= sqd;
|
||||
style->exts_transGateCap[i] *= sqn;
|
||||
style->exts_transGateCap[i] /= sqd;
|
||||
for (devptr = style->exts_device[i]; devptr; devptr = devptr->exts_next)
|
||||
{
|
||||
devptr->exts_deviceSDCap *= sqn;
|
||||
devptr->exts_deviceSDCap /= sqd;
|
||||
devptr->exts_deviceGateCap *= sqn;
|
||||
devptr->exts_deviceGateCap /= sqd;
|
||||
}
|
||||
|
||||
style->exts_height[i] *= scaled;
|
||||
style->exts_height[i] /= scalen;
|
||||
|
||||
Reference in New Issue
Block a user