Merge branch 'master' into magic-8.2
This commit is contained in:
commit
5c614c3d64
File diff suppressed because it is too large
Load Diff
|
|
@ -299,36 +299,41 @@ ExtGetDevInfo(idx, devnameptr, sd_rclassptr, sub_rclassptr, subnameptr)
|
||||||
TileTypeBitMask *rmask, *tmask;
|
TileTypeBitMask *rmask, *tmask;
|
||||||
int n, i = 0, j;
|
int n, i = 0, j;
|
||||||
bool repeat;
|
bool repeat;
|
||||||
|
ExtDevice *devptr;
|
||||||
char *locdname;
|
char *locdname;
|
||||||
char **uniquenamelist = (char **)mallocMagic(DBNumTypes * sizeof(char *));
|
char **uniquenamelist = (char **)mallocMagic(DBNumTypes * sizeof(char *));
|
||||||
|
|
||||||
|
|
||||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||||
{
|
{
|
||||||
locdname = ExtCurStyle->exts_transName[t];
|
for (devptr = ExtCurStyle->exts_device[t]; devptr; devptr = devptr->exts_next)
|
||||||
if (locdname != NULL)
|
|
||||||
{
|
{
|
||||||
repeat = FALSE;
|
locdname = devptr->exts_deviceName;
|
||||||
for (j = 0; j < i; j++)
|
if (locdname != NULL)
|
||||||
if (!strcmp(uniquenamelist[j], locdname))
|
|
||||||
{
|
|
||||||
repeat = TRUE;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (repeat == FALSE)
|
|
||||||
{
|
{
|
||||||
if (i == idx) break;
|
repeat = FALSE;
|
||||||
uniquenamelist[i] = locdname;
|
for (j = 0; j < i; j++)
|
||||||
i++;
|
if (!strcmp(uniquenamelist[j], locdname))
|
||||||
|
{
|
||||||
|
repeat = TRUE;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (repeat == FALSE)
|
||||||
|
{
|
||||||
|
if (i == idx) break;
|
||||||
|
uniquenamelist[i] = locdname;
|
||||||
|
i++;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (t == DBNumTypes) return FALSE;
|
if (t == DBNumTypes) return FALSE;
|
||||||
|
if (devptr == NULL) return FALSE;
|
||||||
|
|
||||||
*devnameptr = locdname;
|
*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 */
|
*sd_rclassptr = (short)(-1); /* NO_RESCLASS */
|
||||||
|
|
||||||
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
||||||
|
|
@ -341,7 +346,7 @@ ExtGetDevInfo(idx, devnameptr, sd_rclassptr, sub_rclassptr, subnameptr)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tmask = &ExtCurStyle->exts_transSubstrateTypes[t];
|
tmask = &devptr->exts_deviceSubstrateTypes;
|
||||||
*sub_rclassptr = (short)(-1); /* NO_RESCLASS */
|
*sub_rclassptr = (short)(-1); /* NO_RESCLASS */
|
||||||
|
|
||||||
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
||||||
|
|
@ -538,23 +543,10 @@ extTechStyleAlloc()
|
||||||
TileType r;
|
TileType r;
|
||||||
|
|
||||||
style = (ExtStyle *) mallocMagic(sizeof (ExtStyle));
|
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;
|
return style;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* ----------------------------------------------------------------------------
|
* ----------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -575,7 +567,7 @@ extTechStyleInit(style)
|
||||||
style->exts_status = TECH_NOT_LOADED;
|
style->exts_status = TECH_NOT_LOADED;
|
||||||
|
|
||||||
style->exts_sidePlanes = style->exts_overlapPlanes = 0;
|
style->exts_sidePlanes = style->exts_overlapPlanes = 0;
|
||||||
TTMaskZero(&style->exts_transMask);
|
TTMaskZero(&style->exts_deviceMask);
|
||||||
style->exts_activeTypes = DBAllButSpaceAndDRCBits;
|
style->exts_activeTypes = DBAllButSpaceAndDRCBits;
|
||||||
|
|
||||||
for (r = 0; r < NP; r++)
|
for (r = 0; r < NP; r++)
|
||||||
|
|
@ -589,7 +581,7 @@ extTechStyleInit(style)
|
||||||
{
|
{
|
||||||
TTMaskZero(&style->exts_nodeConn[r]);
|
TTMaskZero(&style->exts_nodeConn[r]);
|
||||||
TTMaskZero(&style->exts_resistConn[r]);
|
TTMaskZero(&style->exts_resistConn[r]);
|
||||||
TTMaskZero(&style->exts_transConn[r]);
|
TTMaskZero(&style->exts_deviceConn[r]);
|
||||||
style->exts_allConn[r] = DBAllTypeBits;
|
style->exts_allConn[r] = DBAllTypeBits;
|
||||||
|
|
||||||
style->exts_sheetResist[r] = 0;
|
style->exts_sheetResist[r] = 0;
|
||||||
|
|
@ -620,43 +612,41 @@ extTechStyleInit(style)
|
||||||
#ifdef ARIEL
|
#ifdef ARIEL
|
||||||
TTMaskZero(&style->exts_subsTransistorTypes[r]);
|
TTMaskZero(&style->exts_subsTransistorTypes[r]);
|
||||||
#endif
|
#endif
|
||||||
if (style->exts_transSDTypes[r] != NULL)
|
if (style->exts_device[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)
|
|
||||||
{
|
{
|
||||||
freeMagic(style->exts_transSubstrateName[r]);
|
ExtDevice *devptr;
|
||||||
style->exts_transSubstrateName[r] = (char *) NULL;
|
for (devptr = style->exts_device[r]; devptr; devptr = devptr->exts_next)
|
||||||
}
|
{
|
||||||
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! */
|
|
||||||
|
|
||||||
if (style->exts_deviceParams[r]->pl_count > 1)
|
if (devptr->exts_deviceSDTypes != NULL)
|
||||||
{
|
freeMagic(devptr->exts_deviceSDTypes);
|
||||||
style->exts_deviceParams[r]->pl_count--;
|
if (devptr->exts_deviceSubstrateName != (char *) NULL)
|
||||||
style->exts_deviceParams[r] = (ParamList *)NULL;
|
freeMagic(devptr->exts_deviceSubstrateName);
|
||||||
}
|
if (devptr->exts_deviceName != (char *) NULL)
|
||||||
else
|
freeMagic(devptr->exts_deviceName);
|
||||||
{
|
while (devptr->exts_deviceParams != (ParamList *) NULL)
|
||||||
freeMagic(style->exts_deviceParams[r]->pl_name);
|
{
|
||||||
freeMagic(style->exts_deviceParams[r]);
|
/* Parameter lists are shared. Only free the last one! */
|
||||||
style->exts_deviceParams[r] = style->exts_deviceParams[r]->pl_next;
|
|
||||||
|
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;
|
style->exts_sideCoupleHalo = 0;
|
||||||
|
|
@ -798,14 +788,6 @@ ExtTechInit()
|
||||||
if (ExtCurStyle != NULL)
|
if (ExtCurStyle != NULL)
|
||||||
{
|
{
|
||||||
extTechStyleInit(ExtCurStyle);
|
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;
|
ExtCurStyle = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1569,7 +1551,7 @@ ExtTechLine(sectionName, argc, argv)
|
||||||
PlaneMask pshield, pov;
|
PlaneMask pshield, pov;
|
||||||
CapValue capVal, gscap, gccap;
|
CapValue capVal, gscap, gccap;
|
||||||
TileTypeBitMask types1, types2, termtypes[MAXSD];
|
TileTypeBitMask types1, types2, termtypes[MAXSD];
|
||||||
TileTypeBitMask near, far, ov, shield, subsTypes;
|
TileTypeBitMask near, far, ov, shield, subsTypes, idTypes;
|
||||||
char *subsName, *transName, *cp, *endptr, *paramName;
|
char *subsName, *transName, *cp, *endptr, *paramName;
|
||||||
TileType s, t, r, o;
|
TileType s, t, r, o;
|
||||||
keydesc *kp, *dv;
|
keydesc *kp, *dv;
|
||||||
|
|
@ -1578,6 +1560,7 @@ ExtTechLine(sectionName, argc, argv)
|
||||||
EdgeCap *cnew;
|
EdgeCap *cnew;
|
||||||
ExtKeep *es, *newStyle;
|
ExtKeep *es, *newStyle;
|
||||||
ParamList *subcktParams, *newParam;
|
ParamList *subcktParams, *newParam;
|
||||||
|
ExtDevice *devptr;
|
||||||
int refcnt;
|
int refcnt;
|
||||||
double dhalo;
|
double dhalo;
|
||||||
bool bad;
|
bool bad;
|
||||||
|
|
@ -1888,24 +1871,32 @@ ExtTechLine(sectionName, argc, argv)
|
||||||
gccap = (argc > 7) ? aToCap(argv[7]) : (CapValue) 0;
|
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++)
|
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||||
if (TTMaskHasType(&types1, t))
|
if (TTMaskHasType(&types1, t))
|
||||||
{
|
{
|
||||||
TTMaskSetMask(ExtCurStyle->exts_transConn+t,&types1);
|
devptr = (ExtDevice *)mallocMagic(sizeof(ExtDevice));
|
||||||
ExtCurStyle->exts_transSDTypes[t] = (TileTypeBitMask *)
|
devptr->exts_deviceSDTypes = (TileTypeBitMask *)
|
||||||
mallocMagic(2 * sizeof(TileTypeBitMask));
|
mallocMagic(2 * sizeof(TileTypeBitMask));
|
||||||
ExtCurStyle->exts_transSDTypes[t][0] = termtypes[0];
|
devptr->exts_deviceSDTypes[0] = termtypes[0];
|
||||||
ExtCurStyle->exts_transSDTypes[t][1] = DBZeroTypeBits;
|
devptr->exts_deviceSDTypes[1] = DBZeroTypeBits;
|
||||||
ExtCurStyle->exts_transSDCount[t] = nterm;
|
devptr->exts_deviceSDCount = nterm;
|
||||||
ExtCurStyle->exts_transSDCap[t] = gscap;
|
devptr->exts_deviceSDCap = gscap;
|
||||||
ExtCurStyle->exts_transGateCap[t] = gccap;
|
devptr->exts_deviceGateCap = gccap;
|
||||||
ExtCurStyle->exts_deviceClass[t] = DEV_FET;
|
devptr->exts_deviceClass = DEV_FET;
|
||||||
ExtCurStyle->exts_transName[t] =
|
devptr->exts_deviceName = StrDup((char **) NULL, transName);
|
||||||
StrDup((char **) NULL, transName);
|
devptr->exts_deviceSubstrateName =
|
||||||
ExtCurStyle->exts_transSubstrateName[t] =
|
|
||||||
StrDup((char **) NULL, subsName);
|
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
|
#ifdef ARIEL
|
||||||
{
|
{
|
||||||
int z;
|
int z;
|
||||||
|
|
@ -1941,7 +1932,7 @@ ExtTechLine(sectionName, argc, argv)
|
||||||
|
|
||||||
/* Parse second argument for device type */
|
/* 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)
|
if (n < 0)
|
||||||
{
|
{
|
||||||
TechError("Illegal device. Legal devices are:\n\t");
|
TechError("Illegal device. Legal devices are:\n\t");
|
||||||
|
|
@ -1999,6 +1990,18 @@ ExtTechLine(sectionName, argc, argv)
|
||||||
argc--;
|
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 */
|
/* Check the number of arguments after splitting out */
|
||||||
/* parameter entries. There is no limit on arguments in */
|
/* parameter entries. There is no limit on arguments in */
|
||||||
/* DEV_SUBCKT and DEV_MSUBCKT. */
|
/* DEV_SUBCKT and DEV_MSUBCKT. */
|
||||||
|
|
@ -2194,31 +2197,45 @@ ExtTechLine(sectionName, argc, argv)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
TTMaskSetMask(&ExtCurStyle->exts_transMask, &types1);
|
TTMaskSetMask(&ExtCurStyle->exts_deviceMask, &types1);
|
||||||
|
|
||||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&types1, t))
|
if (TTMaskHasType(&types1, t))
|
||||||
{
|
{
|
||||||
TTMaskSetMask(ExtCurStyle->exts_transConn + t, &types1);
|
devptr = (ExtDevice *)mallocMagic(sizeof(ExtDevice));
|
||||||
|
|
||||||
for (i = 0; !TTMaskIsZero(&termtypes[i]); i++);
|
for (i = 0; !TTMaskIsZero(&termtypes[i]); i++);
|
||||||
ExtCurStyle->exts_transSDTypes[t] = (TileTypeBitMask *)
|
devptr->exts_deviceSDTypes = (TileTypeBitMask *)
|
||||||
mallocMagic((i + 1) * sizeof(TileTypeBitMask));
|
mallocMagic((i + 1) * sizeof(TileTypeBitMask));
|
||||||
|
|
||||||
for (i = 0; !TTMaskIsZero(&termtypes[i]); i++)
|
for (i = 0; !TTMaskIsZero(&termtypes[i]); i++)
|
||||||
ExtCurStyle->exts_transSDTypes[t][i] = termtypes[i];
|
devptr->exts_deviceSDTypes[i] = termtypes[i];
|
||||||
ExtCurStyle->exts_transSDTypes[t][i] = DBZeroTypeBits;
|
devptr->exts_deviceSDTypes[i] = DBZeroTypeBits;
|
||||||
|
|
||||||
ExtCurStyle->exts_transSDCount[t] = nterm;
|
devptr->exts_deviceSDCount = nterm;
|
||||||
ExtCurStyle->exts_transSDCap[t] = gscap;
|
devptr->exts_deviceSDCap = gscap;
|
||||||
ExtCurStyle->exts_transGateCap[t] = gccap;
|
devptr->exts_deviceGateCap = gccap;
|
||||||
ExtCurStyle->exts_deviceClass[t] = class;
|
devptr->exts_deviceClass = class;
|
||||||
ExtCurStyle->exts_transName[t] =
|
devptr->exts_deviceName = StrDup((char **) NULL, transName);
|
||||||
StrDup((char **) NULL, transName);
|
|
||||||
if (subsName != NULL)
|
if (subsName != NULL)
|
||||||
ExtCurStyle->exts_transSubstrateName[t] =
|
devptr->exts_deviceSubstrateName =
|
||||||
StrDup((char **) NULL, subsName);
|
StrDup((char **) NULL, subsName);
|
||||||
ExtCurStyle->exts_transSubstrateTypes[t] = subsTypes;
|
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
|
#ifdef ARIEL
|
||||||
{
|
{
|
||||||
int z;
|
int z;
|
||||||
|
|
@ -2231,11 +2248,6 @@ ExtTechLine(sectionName, argc, argv)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (subcktParams != NULL)
|
|
||||||
{
|
|
||||||
ExtCurStyle->exts_deviceParams[t] = subcktParams;
|
|
||||||
subcktParams->pl_count++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -2249,13 +2261,19 @@ ExtTechLine(sectionName, argc, argv)
|
||||||
val = atoi(argv[3]);
|
val = atoi(argv[3]);
|
||||||
isLinear = (strcmp(argv[2], "linear") == 0);
|
isLinear = (strcmp(argv[2], "linear") == 0);
|
||||||
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
for (t = TT_TECHDEPBASE; t < DBNumTypes; t++)
|
||||||
|
{
|
||||||
|
ExtDevice *devptr;
|
||||||
if (TTMaskHasType(&types1, t))
|
if (TTMaskHasType(&types1, t))
|
||||||
{
|
{
|
||||||
he = HashFind(&ExtCurStyle->exts_transResist[t], argv[2]);
|
for (devptr = ExtCurStyle->exts_device[t]; devptr; devptr = devptr->exts_next)
|
||||||
HashSetValue(he, (spointertype)val);
|
{
|
||||||
if (isLinear)
|
he = HashFind(&devptr->exts_deviceResist, argv[2]);
|
||||||
ExtCurStyle->exts_linearResist[t] = val;
|
HashSetValue(he, (spointertype)val);
|
||||||
|
if (isLinear)
|
||||||
|
devptr->exts_linearResist = val;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case HEIGHT: {
|
case HEIGHT: {
|
||||||
float height, thick;
|
float height, thick;
|
||||||
|
|
@ -2619,7 +2637,7 @@ diffplane:
|
||||||
*
|
*
|
||||||
* Postprocess the technology specific information for extraction.
|
* Postprocess the technology specific information for extraction.
|
||||||
* Builds the connectivity tables exts_nodeConn[], exts_resistConn[],
|
* Builds the connectivity tables exts_nodeConn[], exts_resistConn[],
|
||||||
* and exts_transConn[].
|
* and exts_deviceConn[].
|
||||||
*
|
*
|
||||||
* Results:
|
* Results:
|
||||||
* None.
|
* None.
|
||||||
|
|
@ -2664,9 +2682,9 @@ extTechFinalStyle(style)
|
||||||
for (r = TT_TECHDEPBASE; r < DBNumTypes; r++)
|
for (r = TT_TECHDEPBASE; r < DBNumTypes; r++)
|
||||||
{
|
{
|
||||||
maskBits = style->exts_nodeConn[r] = DBConnectTbl[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++)
|
for (s = TT_TECHDEPBASE; s < DBNumTypes; s++)
|
||||||
{
|
{
|
||||||
|
|
@ -2870,10 +2888,15 @@ zinit:
|
||||||
|
|
||||||
for (r = 0; r < DBNumTypes; r++)
|
for (r = 0; r < DBNumTypes; r++)
|
||||||
{
|
{
|
||||||
style->exts_areaCap[r] *= sqfac;
|
ExtDevice *devptr;
|
||||||
style->exts_transSDCap[r] *= sqfac;
|
|
||||||
style->exts_transGateCap[r] *= sqfac;
|
|
||||||
|
|
||||||
|
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++)
|
for (s = 0; s < DBNumTypes; s++)
|
||||||
{
|
{
|
||||||
EdgeCap *ec;
|
EdgeCap *ec;
|
||||||
|
|
@ -2953,13 +2976,18 @@ ExtTechScale(scalen, scaled)
|
||||||
|
|
||||||
for (i = 0; i < DBNumTypes; i++)
|
for (i = 0; i < DBNumTypes; i++)
|
||||||
{
|
{
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
style->exts_areaCap[i] *= sqn;
|
style->exts_areaCap[i] *= sqn;
|
||||||
style->exts_areaCap[i] /= sqd;
|
style->exts_areaCap[i] /= sqd;
|
||||||
|
|
||||||
style->exts_transSDCap[i] *= sqn;
|
for (devptr = style->exts_device[i]; devptr; devptr = devptr->exts_next)
|
||||||
style->exts_transSDCap[i] /= sqd;
|
{
|
||||||
style->exts_transGateCap[i] *= sqn;
|
devptr->exts_deviceSDCap *= sqn;
|
||||||
style->exts_transGateCap[i] /= sqd;
|
devptr->exts_deviceSDCap /= sqd;
|
||||||
|
devptr->exts_deviceGateCap *= sqn;
|
||||||
|
devptr->exts_deviceGateCap /= sqd;
|
||||||
|
}
|
||||||
|
|
||||||
style->exts_height[i] *= scaled;
|
style->exts_height[i] *= scaled;
|
||||||
style->exts_height[i] /= scalen;
|
style->exts_height[i] /= scalen;
|
||||||
|
|
|
||||||
|
|
@ -361,7 +361,7 @@ extShowTech(name)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
extShowTrans("Transistor", &ExtCurStyle->exts_transMask, out);
|
extShowTrans("Transistor", &ExtCurStyle->exts_deviceMask, out);
|
||||||
|
|
||||||
fprintf(out, "\nNode resistance and capacitance:\n");
|
fprintf(out, "\nNode resistance and capacitance:\n");
|
||||||
fprintf(out, "type R-ohm/sq AreaC-ff/l**2\n");
|
fprintf(out, "type R-ohm/sq AreaC-ff/l**2\n");
|
||||||
|
|
@ -472,7 +472,7 @@ extShowTech(name)
|
||||||
|
|
||||||
extShowConnect("\nNode connectivity", ExtCurStyle->exts_nodeConn, out);
|
extShowConnect("\nNode connectivity", ExtCurStyle->exts_nodeConn, out);
|
||||||
extShowConnect("\nResistive region connectivity", ExtCurStyle->exts_resistConn, out);
|
extShowConnect("\nResistive region connectivity", ExtCurStyle->exts_resistConn, out);
|
||||||
extShowConnect("\nTransistor connectivity", ExtCurStyle->exts_transConn, out);
|
extShowConnect("\nTransistor connectivity", ExtCurStyle->exts_deviceConn, out);
|
||||||
|
|
||||||
if (out != stdout)
|
if (out != stdout)
|
||||||
(void) fclose(out);
|
(void) fclose(out);
|
||||||
|
|
@ -493,12 +493,17 @@ extShowTrans(name, mask, out)
|
||||||
for (t = 0; t < DBNumTypes; t++)
|
for (t = 0; t < DBNumTypes; t++)
|
||||||
if (TTMaskHasType(mask, t))
|
if (TTMaskHasType(mask, t))
|
||||||
{
|
{
|
||||||
fprintf(out, " %-8.8s %d terminals: ",
|
ExtDevice *devptr;
|
||||||
DBTypeShortName(t), ExtCurStyle->exts_transSDCount[t]);
|
|
||||||
extShowMask(&ExtCurStyle->exts_transSDTypes[t][0], out);
|
for (devptr = ExtCurStyle->exts_device[t]; devptr; devptr = devptr->exts_next)
|
||||||
fprintf(out, "\n\tcap (gate-sd/gate-ch) = %lf/%lf\n",
|
{
|
||||||
ExtCurStyle->exts_transSDCap[t],
|
fprintf(out, " %-8.8s %d terminals: ",
|
||||||
ExtCurStyle->exts_transGateCap[t]);
|
DBTypeShortName(t), devptr->exts_deviceSDCount);
|
||||||
|
extShowMask(&devptr->exts_deviceSDTypes[0], out);
|
||||||
|
fprintf(out, "\n\tcap (gate-sd/gate-ch) = %lf/%lf\n",
|
||||||
|
devptr->exts_deviceSDCap,
|
||||||
|
devptr->exts_deviceGateCap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -348,7 +348,7 @@ extTimesCellFunc(cs)
|
||||||
|
|
||||||
/* Count the number of transistors */
|
/* Count the number of transistors */
|
||||||
transList = (TransRegion *) ExtFindRegions(def, &TiPlaneRect,
|
transList = (TransRegion *) ExtFindRegions(def, &TiPlaneRect,
|
||||||
&ExtCurStyle->exts_transMask, ExtCurStyle->exts_transConn,
|
&ExtCurStyle->exts_deviceMask, ExtCurStyle->exts_deviceConn,
|
||||||
extUnInit, extTransFirst, extTransEach);
|
extUnInit, extTransFirst, extTransEach);
|
||||||
ExtResetTiles(def, extUnInit);
|
ExtResetTiles(def, extUnInit);
|
||||||
for (tl = transList; tl; tl = tl->treg_next)
|
for (tl = transList; tl; tl = tl->treg_next)
|
||||||
|
|
|
||||||
|
|
@ -483,6 +483,82 @@ typedef struct extkeep
|
||||||
char *exts_name;
|
char *exts_name;
|
||||||
} ExtKeep;
|
} ExtKeep;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Structure used to define transistors and other extracted devices
|
||||||
|
* One of these records is kept per tile type. However, the record
|
||||||
|
* can link to additional records through the "exts_next" record,
|
||||||
|
* so that multiple extraction devices can be defined for the same
|
||||||
|
* tile type, provided that each definition has a unique combination
|
||||||
|
* of exts_deviceSDTypes and exts_deviceSubstrateTypes.
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct extDevice
|
||||||
|
{
|
||||||
|
/* Name of each transistor type as output in .ext file */
|
||||||
|
char *exts_deviceName;
|
||||||
|
|
||||||
|
/* List of parameter names for each subcircuit type */
|
||||||
|
ParamList *exts_deviceParams;
|
||||||
|
|
||||||
|
/* Device class for each layer type */
|
||||||
|
char exts_deviceClass;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Per-square resistances for each possible transistor type,
|
||||||
|
* in the various regions that such a type might operate.
|
||||||
|
* The only operating region currently used is "linear",
|
||||||
|
* which the resistance extractor uses in its thresholding
|
||||||
|
* operation. NOTE: resistances in this table are in OHMS
|
||||||
|
* per square, not MILLIOHMS!
|
||||||
|
*/
|
||||||
|
|
||||||
|
HashTable exts_deviceResist;
|
||||||
|
ResValue exts_linearResist;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Mask of the types of tiles that connect to the channel terminals
|
||||||
|
* of a transistor type. The intent is that these will be the
|
||||||
|
* diffusion terminals of a transistor, ie, its source and drain.
|
||||||
|
* UPDATED May, 2008: Record is a list of type masks, allowing
|
||||||
|
* multiple terminal types in the case of, e.g., high-voltage
|
||||||
|
* or other asymmetric devices. The last entry in the list should
|
||||||
|
* be equal to DBSpaceBits.
|
||||||
|
*/
|
||||||
|
TileTypeBitMask *exts_deviceSDTypes;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Maximum number of terminals (source/drains) per transistor type.
|
||||||
|
* This table exists to allow the possibility of transistors with
|
||||||
|
* more than two diffusion terminals at some point in the future.
|
||||||
|
*/
|
||||||
|
int exts_deviceSDCount;
|
||||||
|
|
||||||
|
/* Currently unused: gate-source capacitance per unit perimeter */
|
||||||
|
CapValue exts_deviceSDCap;
|
||||||
|
|
||||||
|
/* Currently unused: gate-channel capacitance per unit area */
|
||||||
|
CapValue exts_deviceGateCap;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Each type of transistor has a substrate node. By default,
|
||||||
|
* it is the one given by exts_deviceSubstrateName[t]. However,
|
||||||
|
* if the mask exts_deviceSubstrateTypes is non-zero, and if
|
||||||
|
* the transistor overlaps material of one of the types in the
|
||||||
|
* mask, then the transistor substrate node is the node of the
|
||||||
|
* material it overlaps.
|
||||||
|
*/
|
||||||
|
char *exts_deviceSubstrateName;
|
||||||
|
TileTypeBitMask exts_deviceSubstrateTypes;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Each device type can have any number of extract models based
|
||||||
|
* on identifier layers (such as thickox, esd, etc.)
|
||||||
|
*/
|
||||||
|
TileTypeBitMask exts_deviceIdentifierTypes;
|
||||||
|
|
||||||
|
struct extDevice *exts_next;
|
||||||
|
} ExtDevice;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Parameters for the process being extracted.
|
* Parameters for the process being extracted.
|
||||||
* We try to use use integers here, rather than floats, to be nice to
|
* We try to use use integers here, rather than floats, to be nice to
|
||||||
|
|
@ -524,11 +600,11 @@ typedef struct extstyle
|
||||||
TileTypeBitMask exts_resistConn[NT];
|
TileTypeBitMask exts_resistConn[NT];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Connectivity for determining transistors.
|
* Connectivity for determining devices.
|
||||||
* Each transistor type should connect only to itself.
|
* Each devices type should connect only to itself.
|
||||||
* Nothing else should connect to anything else.
|
* Nothing else should connect to anything else.
|
||||||
*/
|
*/
|
||||||
TileTypeBitMask exts_transConn[NT];
|
TileTypeBitMask exts_deviceConn[NT];
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set of types to be considered for extraction. Types not in
|
* Set of types to be considered for extraction. Types not in
|
||||||
|
|
@ -779,65 +855,14 @@ typedef struct extstyle
|
||||||
*/
|
*/
|
||||||
TileTypeBitMask exts_sideEdges[NT];
|
TileTypeBitMask exts_sideEdges[NT];
|
||||||
|
|
||||||
/* Transistors */
|
/* Devices */
|
||||||
|
|
||||||
/* Name of each transistor type as output in .ext file */
|
/* Contains one for each type of device, zero for all other tile types */
|
||||||
char *exts_transName[NT];
|
TileTypeBitMask exts_deviceMask;
|
||||||
|
|
||||||
/* List of parameter names for each subcircuit type */
|
/* All information about a device goes in this record (see above) */
|
||||||
ParamList *exts_deviceParams[NT];
|
ExtDevice *exts_device[NT];
|
||||||
|
|
||||||
/* Device class for each layer type */
|
|
||||||
char exts_deviceClass[NT];
|
|
||||||
|
|
||||||
/* Contains one for each type of fet, zero for all other types */
|
|
||||||
TileTypeBitMask exts_transMask;
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Per-square resistances for each possible transistor type,
|
|
||||||
* in the various regions that such a type might operate.
|
|
||||||
* The only operating region currently used is "linear",
|
|
||||||
* which the resistance extractor uses in its thresholding
|
|
||||||
* operation. NOTE: resistances in this table are in OHMS
|
|
||||||
* per square, not MILLIOHMS!
|
|
||||||
*/
|
|
||||||
HashTable exts_transResist[NT];
|
|
||||||
ResValue exts_linearResist[NT];
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Mask of the types of tiles that connect to the channel terminals
|
|
||||||
* of a transistor type. The intent is that these will be the
|
|
||||||
* diffusion terminals of a transistor, ie, its source and drain.
|
|
||||||
* UPDATED May, 2008: Record is a list of type masks, allowing
|
|
||||||
* multiple terminal types in the case of, e.g., high-voltage
|
|
||||||
* or other asymmetric devices. The last entry in the list should
|
|
||||||
* be equal to DBSpaceBits.
|
|
||||||
*/
|
|
||||||
TileTypeBitMask *exts_transSDTypes[NT];
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Maximum number of terminals (source/drains) per transistor type.
|
|
||||||
* This table exists to allow the possibility of transistors with
|
|
||||||
* more than two diffusion terminals at some point in the future.
|
|
||||||
*/
|
|
||||||
int exts_transSDCount[NT];
|
|
||||||
|
|
||||||
/* Currently unused: gate-source capacitance per unit perimeter */
|
|
||||||
CapValue exts_transSDCap[NT];
|
|
||||||
|
|
||||||
/* Currently unused: gate-channel capacitance per unit area */
|
|
||||||
CapValue exts_transGateCap[NT];
|
|
||||||
|
|
||||||
/*
|
|
||||||
* Each type of transistor has a substrate node. By default,
|
|
||||||
* it is the one given by exts_transSubstrateName[t]. However,
|
|
||||||
* if the mask exts_transSubstrateTypes[t] is non-zero, and if
|
|
||||||
* the transistor overlaps material of one of the types in the
|
|
||||||
* mask, then the transistor substrate node is the node of the
|
|
||||||
* material it overlaps. If exts_transSub
|
|
||||||
*/
|
|
||||||
char *exts_transSubstrateName[NT];
|
|
||||||
TileTypeBitMask exts_transSubstrateTypes[NT];
|
|
||||||
#ifdef ARIEL
|
#ifdef ARIEL
|
||||||
TileTypeBitMask exts_subsTransistorTypes[NT];
|
TileTypeBitMask exts_subsTransistorTypes[NT];
|
||||||
#endif /* ARIEL */
|
#endif /* ARIEL */
|
||||||
|
|
|
||||||
|
|
@ -139,6 +139,7 @@ ResEachTile(tile, startpoint)
|
||||||
bool merged;
|
bool merged;
|
||||||
tElement *tcell;
|
tElement *tcell;
|
||||||
tileJunk *tstructs= (tileJunk *)(tile->ti_client);
|
tileJunk *tstructs= (tileJunk *)(tile->ti_client);
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
ResTileCount++;
|
ResTileCount++;
|
||||||
|
|
||||||
|
|
@ -165,7 +166,7 @@ ResEachTile(tile, startpoint)
|
||||||
resNodeIsPort(resptr, x, y, tile);
|
resNodeIsPort(resptr, x, y, tile);
|
||||||
}
|
}
|
||||||
|
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_transMask), t1)
|
if TTMaskHasType(&(ExtCurStyle->exts_deviceMask), t1)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* The transistor is put in the center of the tile. This is fine
|
* The transistor is put in the center of the tile. This is fine
|
||||||
|
|
@ -250,8 +251,9 @@ ResEachTile(tile, startpoint)
|
||||||
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp=RT(tp))
|
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp=RT(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetRightType(tp);
|
t2 = TiGetRightType(tp);
|
||||||
if(TTMaskHasType(&(ExtCurStyle->exts_transMask), t2) &&
|
devptr = ExtCurStyle->exts_device[t2];
|
||||||
TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t2][0]), t1))
|
if(TTMaskHasType(&(ExtCurStyle->exts_deviceMask), t2) &&
|
||||||
|
TTMaskHasType(&(devptr->exts_deviceSDTypes[0]), t1))
|
||||||
/* found transistor */
|
/* found transistor */
|
||||||
{
|
{
|
||||||
xj = LEFT(tile);
|
xj = LEFT(tile);
|
||||||
|
|
@ -272,8 +274,9 @@ ResEachTile(tile, startpoint)
|
||||||
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetLeftType(tp);
|
t2 = TiGetLeftType(tp);
|
||||||
if(TTMaskHasType(&(ExtCurStyle->exts_transMask), t2) &&
|
devptr = ExtCurStyle->exts_device[t2];
|
||||||
TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t2][0]), t1))
|
if(TTMaskHasType(&(ExtCurStyle->exts_deviceMask), t2) &&
|
||||||
|
TTMaskHasType(&(devptr->exts_deviceSDTypes[0]), t1))
|
||||||
/* found transistor */
|
/* found transistor */
|
||||||
{
|
{
|
||||||
xj = RIGHT(tile);
|
xj = RIGHT(tile);
|
||||||
|
|
@ -294,8 +297,9 @@ ResEachTile(tile, startpoint)
|
||||||
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp=BL(tp))
|
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp=BL(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetBottomType(tp);
|
t2 = TiGetBottomType(tp);
|
||||||
if(TTMaskHasType(&(ExtCurStyle->exts_transMask),t2) &&
|
devptr = ExtCurStyle->exts_device[t2];
|
||||||
TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t2][0]),t1))
|
if(TTMaskHasType(&(ExtCurStyle->exts_deviceMask),t2) &&
|
||||||
|
TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t1))
|
||||||
/* found transistor */
|
/* found transistor */
|
||||||
{
|
{
|
||||||
yj = TOP(tile);
|
yj = TOP(tile);
|
||||||
|
|
@ -315,8 +319,9 @@ ResEachTile(tile, startpoint)
|
||||||
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp))
|
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetTopType(tp);
|
t2 = TiGetTopType(tp);
|
||||||
if(TTMaskHasType(&(ExtCurStyle->exts_transMask), t2) &&
|
devptr = ExtCurStyle->exts_device[t2];
|
||||||
TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t2][0]), t1))
|
if(TTMaskHasType(&(ExtCurStyle->exts_deviceMask), t2) &&
|
||||||
|
TTMaskHasType(&(devptr->exts_deviceSDTypes[0]), t1))
|
||||||
/* found transistor */
|
/* found transistor */
|
||||||
{
|
{
|
||||||
yj = BOTTOM(tile);
|
yj = BOTTOM(tile);
|
||||||
|
|
|
||||||
|
|
@ -102,6 +102,7 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
SearchContext scx2;
|
SearchContext scx2;
|
||||||
int pNum;
|
int pNum;
|
||||||
CellDef *def;
|
CellDef *def;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
TiToRect(tile, &tileArea);
|
TiToRect(tile, &tileArea);
|
||||||
srArea = &scx->scx_area;
|
srArea = &scx->scx_area;
|
||||||
|
|
@ -121,8 +122,9 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp=RT(tp))
|
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp=RT(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetType(tp);
|
t2 = TiGetType(tp);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transMask),t2) &&
|
devptr = ExtCurStyle->exts_device[t2];
|
||||||
TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t2][0]),t1))
|
if (TTMaskHasType(&(ExtCurStyle->exts_deviceMask),t2) &&
|
||||||
|
TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t1))
|
||||||
{
|
{
|
||||||
TiToRect(tp, &tranArea);
|
TiToRect(tp, &tranArea);
|
||||||
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
||||||
|
|
@ -137,8 +139,9 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetType(tp);
|
t2 = TiGetType(tp);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transMask),t2) &&
|
devptr = ExtCurStyle->exts_device[t2];
|
||||||
TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t2][0]),t1))
|
if (TTMaskHasType(&(ExtCurStyle->exts_deviceMask),t2) &&
|
||||||
|
TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t1))
|
||||||
{
|
{
|
||||||
TiToRect(tp, &tranArea);
|
TiToRect(tp, &tranArea);
|
||||||
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
||||||
|
|
@ -153,8 +156,9 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp=BL(tp))
|
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp=BL(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetType(tp);
|
t2 = TiGetType(tp);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transMask),t2) &&
|
devptr = ExtCurStyle->exts_device[t2];
|
||||||
TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t2][0]),t1))
|
if (TTMaskHasType(&(ExtCurStyle->exts_deviceMask),t2) &&
|
||||||
|
TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t1))
|
||||||
{
|
{
|
||||||
TiToRect(tp, &tranArea);
|
TiToRect(tp, &tranArea);
|
||||||
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
||||||
|
|
@ -169,8 +173,9 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp))
|
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetType(tp);
|
t2 = TiGetType(tp);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transMask),t2) &&
|
devptr = ExtCurStyle->exts_device[t2];
|
||||||
TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t2][0]),t1))
|
if (TTMaskHasType(&(ExtCurStyle->exts_deviceMask),t2) &&
|
||||||
|
TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t1))
|
||||||
{
|
{
|
||||||
TiToRect(tp, &tranArea);
|
TiToRect(tp, &tranArea);
|
||||||
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
||||||
|
|
@ -182,7 +187,7 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if TTMaskHasType(&(ExtCurStyle->exts_transMask),t1)
|
else if TTMaskHasType(&(ExtCurStyle->exts_deviceMask),t1)
|
||||||
{
|
{
|
||||||
TiToRect(tile, &tranArea);
|
TiToRect(tile, &tranArea);
|
||||||
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
||||||
|
|
@ -425,6 +430,7 @@ DBTreeCopyConnectDCS(scx, mask, xMask, connect, area, destUse)
|
||||||
ResTranTile *CurrentT;
|
ResTranTile *CurrentT;
|
||||||
CellDef *def = destUse->cu_def;
|
CellDef *def = destUse->cu_def;
|
||||||
TileType newtype;
|
TileType newtype;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
csa2.csa2_use = destUse;
|
csa2.csa2_use = destUse;
|
||||||
csa2.csa2_xMask = xMask;
|
csa2.csa2_xMask = xMask;
|
||||||
|
|
@ -443,13 +449,14 @@ DBTreeCopyConnectDCS(scx, mask, xMask, connect, area, destUse)
|
||||||
TTMaskZero(&ResSubsTypeBitMask);
|
TTMaskZero(&ResSubsTypeBitMask);
|
||||||
for (tran = TT_TECHDEPBASE; tran < TT_MAXTYPES; tran++)
|
for (tran = TT_TECHDEPBASE; tran < TT_MAXTYPES; tran++)
|
||||||
{
|
{
|
||||||
tran_name = (ExtCurStyle->exts_transName)[tran];
|
devptr = ExtCurStyle->exts_device[tran];
|
||||||
|
tran_name = devptr->exts_deviceName;
|
||||||
if ((tran_name != NULL) && (strcmp(tran_name, "None")))
|
if ((tran_name != NULL) && (strcmp(tran_name, "None")))
|
||||||
{
|
{
|
||||||
TTMaskSetMask(&DiffTypeBitMask,
|
TTMaskSetMask(&DiffTypeBitMask,
|
||||||
&(ExtCurStyle->exts_transSDTypes[tran][0]));
|
&(devptr->exts_deviceSDTypes[0]));
|
||||||
TTMaskSetMask(&ResSubsTypeBitMask,
|
TTMaskSetMask(&ResSubsTypeBitMask,
|
||||||
&(ExtCurStyle->exts_transSubstrateTypes[tran]));
|
&(devptr->exts_deviceSubstrateTypes));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
first = 0;
|
first = 0;
|
||||||
|
|
@ -520,12 +527,14 @@ resSubSearchFunc(tile,cx)
|
||||||
ResTranTile *thisTran;
|
ResTranTile *thisTran;
|
||||||
Rect tranArea;
|
Rect tranArea;
|
||||||
TileType t = TiGetType(tile);
|
TileType t = TiGetType(tile);
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
/* Right now, we're only going to extract substrate terminals for
|
/* Right now, we're only going to extract substrate terminals for
|
||||||
devices with only one diffusion terminal, principally bipolar
|
devices with only one diffusion terminal, principally bipolar
|
||||||
devices.
|
devices.
|
||||||
*/
|
*/
|
||||||
if (ExtCurStyle->exts_transSDCount[t] >1) return 0;
|
devptr = ExtCurStyle->exts_device[t]
|
||||||
|
if (devptr->exts_deviceSDCount >1) return 0;
|
||||||
TiToRect(tile, &tranArea);
|
TiToRect(tile, &tranArea);
|
||||||
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
thisTran = (ResTranTile *) mallocMagic((unsigned)(sizeof(ResTranTile)));
|
||||||
GeoTransRect(&cx->tc_scx->scx_trans, &tranArea, &thisTran->area);
|
GeoTransRect(&cx->tc_scx->scx_trans, &tranArea, &thisTran->area);
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ extern HashTable ResNodeTable;
|
||||||
* ResInitializeConn--
|
* ResInitializeConn--
|
||||||
*
|
*
|
||||||
* Sets up mask by Source/Drain type of transistors. This is
|
* Sets up mask by Source/Drain type of transistors. This is
|
||||||
* exts_transSDtypes turned inside out.
|
* exts_deviceSDtypes turned inside out.
|
||||||
*
|
*
|
||||||
* Results: none
|
* Results: none
|
||||||
*
|
*
|
||||||
|
|
@ -67,18 +67,20 @@ ResInitializeConn()
|
||||||
{
|
{
|
||||||
TileType tran, diff;
|
TileType tran, diff;
|
||||||
char *tran_name;
|
char *tran_name;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
for (tran = TT_TECHDEPBASE; tran < TT_MAXTYPES; tran++)
|
for (tran = TT_TECHDEPBASE; tran < TT_MAXTYPES; tran++)
|
||||||
{
|
{
|
||||||
tran_name = (ExtCurStyle->exts_transName)[tran];
|
devptr = ExtCurStyle->exts_device[tran];
|
||||||
|
tran_name = devptr->exts_deviceName;
|
||||||
if ((tran_name != NULL) && (strcmp(tran_name, "None")))
|
if ((tran_name != NULL) && (strcmp(tran_name, "None")))
|
||||||
{
|
{
|
||||||
for (diff = TT_TECHDEPBASE; diff < TT_MAXTYPES; diff++)
|
for (diff = TT_TECHDEPBASE; diff < TT_MAXTYPES; diff++)
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[tran][0]), diff)
|
if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]), diff)
|
||||||
TTMaskSetType(&ResConnectWithSD[diff],tran);
|
TTMaskSetType(&ResConnectWithSD[diff],tran);
|
||||||
|
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_transSubstrateTypes[tran]),diff)
|
if TTMaskHasType(&(devptr->exts_deviceSubstrateTypes),diff)
|
||||||
TTMaskSetType(&ResConnectWithSD[diff],tran);
|
TTMaskSetType(&ResConnectWithSD[diff],tran);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -163,7 +165,7 @@ ResDissolveContacts(contacts)
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&residues, t))
|
if (TTMaskHasType(&residues, t))
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&ExtCurStyle->exts_transMask, t))
|
if (TTMaskHasType(&ExtCurStyle->exts_deviceMask, t))
|
||||||
continue;
|
continue;
|
||||||
DBPaint(ResUse->cu_def, &(contacts->cp_rect), t);
|
DBPaint(ResUse->cu_def, &(contacts->cp_rect), t);
|
||||||
}
|
}
|
||||||
|
|
@ -824,6 +826,7 @@ FindStartTile(goodies, SourcePoint)
|
||||||
Point workingPoint;
|
Point workingPoint;
|
||||||
Tile *tile, *tp;
|
Tile *tile, *tp;
|
||||||
int pnum, t1, t2;
|
int pnum, t1, t2;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
workingPoint.p_x = goodies->rg_tranloc->p_x;
|
workingPoint.p_x = goodies->rg_tranloc->p_x;
|
||||||
workingPoint.p_y = goodies->rg_tranloc->p_y;
|
workingPoint.p_y = goodies->rg_tranloc->p_y;
|
||||||
|
|
@ -868,12 +871,12 @@ FindStartTile(goodies, SourcePoint)
|
||||||
|
|
||||||
if (IsSplit(tile))
|
if (IsSplit(tile))
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&ExtCurStyle->exts_transMask, TiGetLeftType(tile)) != 0)
|
if (TTMaskHasType(&ExtCurStyle->exts_deviceMask, TiGetLeftType(tile)) != 0)
|
||||||
{
|
{
|
||||||
t1 = TiGetLeftType(tile);
|
t1 = TiGetLeftType(tile);
|
||||||
TiSetBody(tile, t1 & ~TT_SIDE);
|
TiSetBody(tile, t1 & ~TT_SIDE);
|
||||||
}
|
}
|
||||||
else if (TTMaskHasType(&ExtCurStyle->exts_transMask, TiGetRightType(tile)) != 0)
|
else if (TTMaskHasType(&ExtCurStyle->exts_deviceMask, TiGetRightType(tile)) != 0)
|
||||||
{
|
{
|
||||||
t1 = TiGetRightType(tile);
|
t1 = TiGetRightType(tile);
|
||||||
TiSetBody(tile, t1 & TT_SIDE);
|
TiSetBody(tile, t1 & TT_SIDE);
|
||||||
|
|
@ -885,7 +888,7 @@ FindStartTile(goodies, SourcePoint)
|
||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (TTMaskHasType(&ExtCurStyle->exts_transMask, TiGetType(tile)) == 0)
|
else if (TTMaskHasType(&ExtCurStyle->exts_deviceMask, TiGetType(tile)) == 0)
|
||||||
{
|
{
|
||||||
TxError("Couldn't find transistor at %d %d\n",
|
TxError("Couldn't find transistor at %d %d\n",
|
||||||
goodies->rg_tranloc->p_x, goodies->rg_tranloc->p_y);
|
goodies->rg_tranloc->p_x, goodies->rg_tranloc->p_y);
|
||||||
|
|
@ -894,11 +897,12 @@ FindStartTile(goodies, SourcePoint)
|
||||||
else
|
else
|
||||||
t1 = TiGetType(tile);
|
t1 = TiGetType(tile);
|
||||||
|
|
||||||
|
devptr = ExtCurStyle->exts_device[t1];
|
||||||
/* left */
|
/* left */
|
||||||
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp=RT(tp))
|
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp=RT(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetRightType(tp);
|
t2 = TiGetRightType(tp);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t1][0]),t2))
|
if (TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t2))
|
||||||
{
|
{
|
||||||
SourcePoint->p_x = LEFT(tile);
|
SourcePoint->p_x = LEFT(tile);
|
||||||
SourcePoint->p_y = (MIN(TOP(tile),TOP(tp))+
|
SourcePoint->p_y = (MIN(TOP(tile),TOP(tp))+
|
||||||
|
|
@ -911,7 +915,7 @@ FindStartTile(goodies, SourcePoint)
|
||||||
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetLeftType(tp);
|
t2 = TiGetLeftType(tp);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t1][0]),t2))
|
if (TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t2))
|
||||||
{
|
{
|
||||||
SourcePoint->p_x = RIGHT(tile);
|
SourcePoint->p_x = RIGHT(tile);
|
||||||
SourcePoint->p_y = (MIN(TOP(tile),TOP(tp))+
|
SourcePoint->p_y = (MIN(TOP(tile),TOP(tp))+
|
||||||
|
|
@ -924,7 +928,7 @@ FindStartTile(goodies, SourcePoint)
|
||||||
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp=BL(tp))
|
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp=BL(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetBottomType(tp);
|
t2 = TiGetBottomType(tp);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t1][0]),t2))
|
if (TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t2))
|
||||||
{
|
{
|
||||||
SourcePoint->p_y = TOP(tile);
|
SourcePoint->p_y = TOP(tile);
|
||||||
SourcePoint->p_x = (MIN(RIGHT(tile),RIGHT(tp))+
|
SourcePoint->p_x = (MIN(RIGHT(tile),RIGHT(tp))+
|
||||||
|
|
@ -937,7 +941,7 @@ FindStartTile(goodies, SourcePoint)
|
||||||
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp))
|
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp))
|
||||||
{
|
{
|
||||||
t2 = TiGetTopType(tp);
|
t2 = TiGetTopType(tp);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t1][0]),t2))
|
if (TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),t2))
|
||||||
{
|
{
|
||||||
SourcePoint->p_y = BOTTOM(tile);
|
SourcePoint->p_y = BOTTOM(tile);
|
||||||
SourcePoint->p_x = (MIN(RIGHT(tile),RIGHT(tp))+
|
SourcePoint->p_x = (MIN(RIGHT(tile),RIGHT(tp))+
|
||||||
|
|
@ -977,7 +981,7 @@ ResGetTransistor(pt)
|
||||||
|
|
||||||
for (pnum= PL_TECHDEPBASE; pnum < DBNumPlanes; pnum++)
|
for (pnum= PL_TECHDEPBASE; pnum < DBNumPlanes; pnum++)
|
||||||
{
|
{
|
||||||
if (TTMaskIntersect(&ExtCurStyle->exts_transMask,&DBPlaneTypes[pnum]) == 0)
|
if (TTMaskIntersect(&ExtCurStyle->exts_deviceMask,&DBPlaneTypes[pnum]) == 0)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
@ -987,11 +991,11 @@ ResGetTransistor(pt)
|
||||||
|
|
||||||
if (IsSplit(tile))
|
if (IsSplit(tile))
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&ExtCurStyle->exts_transMask, TiGetLeftType(tile))
|
if (TTMaskHasType(&ExtCurStyle->exts_deviceMask, TiGetLeftType(tile))
|
||||||
|| TTMaskHasType(&ExtCurStyle->exts_transMask, TiGetRightType(tile)))
|
|| TTMaskHasType(&ExtCurStyle->exts_deviceMask, TiGetRightType(tile)))
|
||||||
return(((tileJunk *)tile->ti_client)->transistorList);
|
return(((tileJunk *)tile->ti_client)->transistorList);
|
||||||
}
|
}
|
||||||
else if (TTMaskHasType(&ExtCurStyle->exts_transMask, TiGetType(tile)))
|
else if (TTMaskHasType(&ExtCurStyle->exts_deviceMask, TiGetType(tile)))
|
||||||
{
|
{
|
||||||
return(((tileJunk *)tile->ti_client)->transistorList);
|
return(((tileJunk *)tile->ti_client)->transistorList);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -114,6 +114,7 @@ ResPrintExtTran(outextfile, transistors)
|
||||||
{
|
{
|
||||||
TileType t;
|
TileType t;
|
||||||
char *subsName;
|
char *subsName;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
for (; transistors != NULL; transistors = transistors->nextTran)
|
for (; transistors != NULL; transistors = transistors->nextTran)
|
||||||
{
|
{
|
||||||
|
|
@ -122,7 +123,8 @@ ResPrintExtTran(outextfile, transistors)
|
||||||
if (ResOptionsFlags & ResOpt_DoExtFile)
|
if (ResOptionsFlags & ResOpt_DoExtFile)
|
||||||
{
|
{
|
||||||
t = transistors->layout->rt_trantype;
|
t = transistors->layout->rt_trantype;
|
||||||
subsName = ExtCurStyle->exts_transSubstrateName[t];
|
devptr = ExtCurStyle->exts_device[t];
|
||||||
|
subsName = devptr->exts_deviceSubstrateName;
|
||||||
|
|
||||||
#ifdef MAGIC_WRAPPER
|
#ifdef MAGIC_WRAPPER
|
||||||
/* Substrate variable name substitution */
|
/* Substrate variable name substitution */
|
||||||
|
|
@ -139,7 +141,7 @@ ResPrintExtTran(outextfile, transistors)
|
||||||
/* fet type xl yl xh yh area perim sub gate t1 t2 */
|
/* fet type xl yl xh yh area perim sub gate t1 t2 */
|
||||||
fprintf(outextfile,"fet %s %d %d %d %d %d %d "
|
fprintf(outextfile,"fet %s %d %d %d %d %d %d "
|
||||||
"%s \"%s\" %d %s \"%s\" %d %s \"%s\" %d %s\n",
|
"%s \"%s\" %d %s \"%s\" %d %s \"%s\" %d %s\n",
|
||||||
ExtCurStyle->exts_transName[t],
|
devptr->exts_deviceName,
|
||||||
transistors->layout->rt_inside.r_ll.p_x,
|
transistors->layout->rt_inside.r_ll.p_x,
|
||||||
transistors->layout->rt_inside.r_ll.p_y,
|
transistors->layout->rt_inside.r_ll.p_y,
|
||||||
transistors->layout->rt_inside.r_ll.p_x + 1,
|
transistors->layout->rt_inside.r_ll.p_x + 1,
|
||||||
|
|
|
||||||
|
|
@ -187,8 +187,10 @@ ResReadSim(simfile,fetproc,capproc,resproc,attrproc,mergeproc)
|
||||||
else if (fettype != MINFINITY)
|
else if (fettype != MINFINITY)
|
||||||
{
|
{
|
||||||
float sheetr;
|
float sheetr;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
sheetr=(float)ExtCurStyle->exts_linearResist[fettype];
|
devptr = ExtCurStyle->exts_device[fettype];
|
||||||
|
sheetr=(float)devptr->exts_linearResist;
|
||||||
result = (*fetproc)(line,sheetr,fettype);
|
result = (*fetproc)(line,sheetr,fettype);
|
||||||
}
|
}
|
||||||
if (result != 0)
|
if (result != 0)
|
||||||
|
|
|
||||||
|
|
@ -732,6 +732,7 @@ ResCalculateChildCapacitance(me)
|
||||||
float childcap;
|
float childcap;
|
||||||
tElement *tptr;
|
tElement *tptr;
|
||||||
int t;
|
int t;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
|
|
||||||
if (me->rn_client != (ClientData) NULL) /* we have a loop */
|
if (me->rn_client != (ClientData) NULL) /* we have a loop */
|
||||||
|
|
@ -752,12 +753,13 @@ ResCalculateChildCapacitance(me)
|
||||||
t = TiGetType(tran->rt_tile);
|
t = TiGetType(tran->rt_tile);
|
||||||
if (tran->rt_gate == me)
|
if (tran->rt_gate == me)
|
||||||
{
|
{
|
||||||
|
devptr = ExtCurStyle->exts_device[t];
|
||||||
myC->rc_Cdownstream +=
|
myC->rc_Cdownstream +=
|
||||||
tran->rt_length*
|
tran->rt_length*
|
||||||
tran->rt_width*
|
tran->rt_width*
|
||||||
ExtCurStyle->exts_transGateCap[t]+
|
devptr->exts_deviceGateCap+
|
||||||
(tran->rt_width+tran->rt_width)*
|
(tran->rt_width+tran->rt_width)*
|
||||||
ExtCurStyle->exts_transSDCap[t];
|
devptr->exts_deviceSDCap;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -144,6 +144,7 @@ ResAddPlumbing(tile, arg)
|
||||||
TileType loctype, t1;
|
TileType loctype, t1;
|
||||||
Tile *tp1,*tp2,*source;
|
Tile *tp1,*tp2,*source;
|
||||||
resTransistor *resFet;
|
resTransistor *resFet;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
if (resTransStack == NULL)
|
if (resTransStack == NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -159,8 +160,9 @@ ResAddPlumbing(tile, arg)
|
||||||
else
|
else
|
||||||
loctype = TiGetTypeExact(tile);
|
loctype = TiGetTypeExact(tile);
|
||||||
|
|
||||||
|
devptr = ExtCurStyle->exts_device[loctype];
|
||||||
junk2 = resAddField(tile);
|
junk2 = resAddField(tile);
|
||||||
if (TTMaskHasType(&(ExtCurStyle->exts_transMask), loctype))
|
if (TTMaskHasType(&(ExtCurStyle->exts_deviceMask), loctype))
|
||||||
{
|
{
|
||||||
resFet = (resTransistor *) mallocMagic((unsigned)(sizeof(resTransistor)));
|
resFet = (resTransistor *) mallocMagic((unsigned)(sizeof(resTransistor)));
|
||||||
{
|
{
|
||||||
|
|
@ -191,7 +193,7 @@ ResAddPlumbing(tile, arg)
|
||||||
/* top */
|
/* top */
|
||||||
for (tp2= RT(tile); RIGHT(tp2) > LEFT(tile); tp2 = BL(tp2))
|
for (tp2= RT(tile); RIGHT(tp2) > LEFT(tile); tp2 = BL(tp2))
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[loctype][0]),
|
if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),
|
||||||
TiGetBottomType(tp2))
|
TiGetBottomType(tp2))
|
||||||
{
|
{
|
||||||
junk2->sourceEdge |= TOPEDGE;
|
junk2->sourceEdge |= TOPEDGE;
|
||||||
|
|
@ -206,7 +208,7 @@ ResAddPlumbing(tile, arg)
|
||||||
if (source == NULL)
|
if (source == NULL)
|
||||||
for (tp2= LB(tile); LEFT(tp2) < RIGHT(tile); tp2 = TR(tp2))
|
for (tp2= LB(tile); LEFT(tp2) < RIGHT(tile); tp2 = TR(tp2))
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[loctype][0]),
|
if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),
|
||||||
TiGetTopType(tp2))
|
TiGetTopType(tp2))
|
||||||
{
|
{
|
||||||
junk2->sourceEdge |= BOTTOMEDGE;
|
junk2->sourceEdge |= BOTTOMEDGE;
|
||||||
|
|
@ -221,7 +223,7 @@ ResAddPlumbing(tile, arg)
|
||||||
if (source == NULL)
|
if (source == NULL)
|
||||||
for (tp2= TR(tile); TOP(tp2) > BOTTOM(tile); tp2 = LB(tp2))
|
for (tp2= TR(tile); TOP(tp2) > BOTTOM(tile); tp2 = LB(tp2))
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[loctype][0]),
|
if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),
|
||||||
TiGetLeftType(tp2))
|
TiGetLeftType(tp2))
|
||||||
{
|
{
|
||||||
junk2->sourceEdge |= RIGHTEDGE;
|
junk2->sourceEdge |= RIGHTEDGE;
|
||||||
|
|
@ -236,7 +238,7 @@ ResAddPlumbing(tile, arg)
|
||||||
if (source == NULL)
|
if (source == NULL)
|
||||||
for (tp2= BL(tile); BOTTOM(tp2) < TOP(tile); tp2 = RT(tp2))
|
for (tp2= BL(tile); BOTTOM(tp2) < TOP(tile); tp2 = RT(tp2))
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[loctype][0]),
|
if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),
|
||||||
TiGetRightType(tp2))
|
TiGetRightType(tp2))
|
||||||
{
|
{
|
||||||
source = tp2;
|
source = tp2;
|
||||||
|
|
@ -339,6 +341,7 @@ ResAddPlumbing(tile, arg)
|
||||||
else
|
else
|
||||||
t1 = TiGetTypeExact(tp1);
|
t1 = TiGetTypeExact(tp1);
|
||||||
|
|
||||||
|
devptr = ExtCurStyle->exts_device[t1];
|
||||||
j0 = (tileJunk *) tp1->ti_client;
|
j0 = (tileJunk *) tp1->ti_client;
|
||||||
/* top */
|
/* top */
|
||||||
for (tp2= RT(tp1); RIGHT(tp2) > LEFT(tp1); tp2 = BL(tp2))
|
for (tp2= RT(tp1); RIGHT(tp2) > LEFT(tp1); tp2 = BL(tp2))
|
||||||
|
|
@ -352,7 +355,7 @@ ResAddPlumbing(tile, arg)
|
||||||
Junk->tj_status |= RES_TILE_TRAN;
|
Junk->tj_status |= RES_TILE_TRAN;
|
||||||
|
|
||||||
}
|
}
|
||||||
else if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t1][0]),
|
else if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),
|
||||||
TiGetBottomType(tp2))
|
TiGetBottomType(tp2))
|
||||||
{
|
{
|
||||||
Junk = resAddField(tp2);
|
Junk = resAddField(tp2);
|
||||||
|
|
@ -373,7 +376,7 @@ ResAddPlumbing(tile, arg)
|
||||||
Junk->transistorList = resFet;
|
Junk->transistorList = resFet;
|
||||||
Junk->tj_status |= RES_TILE_TRAN;
|
Junk->tj_status |= RES_TILE_TRAN;
|
||||||
}
|
}
|
||||||
else if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t1][0]),
|
else if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),
|
||||||
TiGetTopType(tp2))
|
TiGetTopType(tp2))
|
||||||
{
|
{
|
||||||
Junk = resAddField(tp2);
|
Junk = resAddField(tp2);
|
||||||
|
|
@ -394,7 +397,7 @@ ResAddPlumbing(tile, arg)
|
||||||
Junk->transistorList = resFet;
|
Junk->transistorList = resFet;
|
||||||
Junk->tj_status |= RES_TILE_TRAN;
|
Junk->tj_status |= RES_TILE_TRAN;
|
||||||
}
|
}
|
||||||
else if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t1][0]),
|
else if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),
|
||||||
TiGetLeftType(tp2))
|
TiGetLeftType(tp2))
|
||||||
{
|
{
|
||||||
Junk = resAddField(tp2);
|
Junk = resAddField(tp2);
|
||||||
|
|
@ -415,7 +418,7 @@ ResAddPlumbing(tile, arg)
|
||||||
Junk->transistorList = resFet;
|
Junk->transistorList = resFet;
|
||||||
Junk->tj_status |= RES_TILE_TRAN;
|
Junk->tj_status |= RES_TILE_TRAN;
|
||||||
}
|
}
|
||||||
else if TTMaskHasType(&(ExtCurStyle->exts_transSDTypes[t1][0]),
|
else if TTMaskHasType(&(devptr->exts_deviceSDTypes[0]),
|
||||||
TiGetRightType(tp2))
|
TiGetRightType(tp2))
|
||||||
{
|
{
|
||||||
Junk = resAddField(tp2);
|
Junk = resAddField(tp2);
|
||||||
|
|
@ -577,7 +580,7 @@ ResPreProcessTransistors(TileList, TransistorList, Def)
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&ttresidues, residue))
|
if (TTMaskHasType(&ttresidues, residue))
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&ExtCurStyle->exts_transMask, residue))
|
if (TTMaskHasType(&ExtCurStyle->exts_deviceMask, residue))
|
||||||
{
|
{
|
||||||
pNum = DBPlane(residue);
|
pNum = DBPlane(residue);
|
||||||
break;
|
break;
|
||||||
|
|
@ -594,7 +597,7 @@ ResPreProcessTransistors(TileList, TransistorList, Def)
|
||||||
tt = TiGetType(tile);
|
tt = TiGetType(tile);
|
||||||
tstruct = (tileJunk *) tile->ti_client;
|
tstruct = (tileJunk *) tile->ti_client;
|
||||||
|
|
||||||
if (!TTMaskHasType(&ExtCurStyle->exts_transMask, tt) ||
|
if (!TTMaskHasType(&ExtCurStyle->exts_deviceMask, tt) ||
|
||||||
tstruct->transistorList == NULL)
|
tstruct->transistorList == NULL)
|
||||||
{
|
{
|
||||||
TxError("Bad Transistor Location at %d,%d\n",
|
TxError("Bad Transistor Location at %d,%d\n",
|
||||||
|
|
|
||||||
|
|
@ -239,16 +239,18 @@ SimFreeNodeRegs()
|
||||||
int SimInitConnTables()
|
int SimInitConnTables()
|
||||||
{
|
{
|
||||||
int i, t, sd, p;
|
int i, t, sd, p;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
SimTransMask = ExtCurStyle->exts_transMask;
|
SimTransMask = ExtCurStyle->exts_deviceMask;
|
||||||
|
|
||||||
TTMaskZero( &SimSDMask );
|
TTMaskZero( &SimSDMask );
|
||||||
for( t = TT_TECHDEPBASE; t < DBNumTypes; t++ )
|
for( t = TT_TECHDEPBASE; t < DBNumTypes; t++ )
|
||||||
{
|
{
|
||||||
for (i = 0; !TTMaskHasType(&ExtCurStyle->exts_transSDTypes[t][i],
|
devptr = ExtCurStyle->exts_device[t];
|
||||||
|
for (i = 0; !TTMaskHasType(&devptr->exts_deviceSDTypes[i],
|
||||||
TT_SPACE); i++)
|
TT_SPACE); i++)
|
||||||
{
|
{
|
||||||
TTMaskSetMask( &SimSDMask, &ExtCurStyle->exts_transSDTypes[t][i] );
|
TTMaskSetMask( &SimSDMask, &devptr->exts_deviceSDTypes[i] );
|
||||||
TTMaskZero( &SimFetMask[t] );
|
TTMaskZero( &SimFetMask[t] );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -258,12 +260,13 @@ int SimInitConnTables()
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&SimTransMask, t))
|
if (TTMaskHasType(&SimTransMask, t))
|
||||||
{
|
{
|
||||||
|
devptr = ExtCurStyle->exts_device[t];
|
||||||
for (sd = TT_TECHDEPBASE; sd < DBNumTypes; sd++)
|
for (sd = TT_TECHDEPBASE; sd < DBNumTypes; sd++)
|
||||||
{
|
{
|
||||||
for (i = 0; !TTMaskHasType(&ExtCurStyle->exts_transSDTypes[t][i],
|
for (i = 0; !TTMaskHasType(&devptr->exts_deviceSDTypes[i],
|
||||||
TT_SPACE); i++)
|
TT_SPACE); i++)
|
||||||
{
|
{
|
||||||
if (TTMaskHasType(&ExtCurStyle->exts_transSDTypes[t][i], sd))
|
if (TTMaskHasType(&devptr->exts_deviceSDTypes[i], sd))
|
||||||
{
|
{
|
||||||
TTMaskSetType(&SimFetMask[sd], t);
|
TTMaskSetType(&SimFetMask[sd], t);
|
||||||
SimFetPlanes |= PlaneNumToMaskBit(DBPlane(t));
|
SimFetPlanes |= PlaneNumToMaskBit(DBPlane(t));
|
||||||
|
|
@ -471,14 +474,16 @@ SimTransistorTile(tile, pNum, arg)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
TileType t;
|
TileType t;
|
||||||
|
ExtDevice *devptr;
|
||||||
|
|
||||||
extSetNodeNum((LabRegion *)&transistor, pNum, tile);
|
extSetNodeNum((LabRegion *)&transistor, pNum, tile);
|
||||||
if (transistor.t_do_terms)
|
if (transistor.t_do_terms)
|
||||||
{
|
{
|
||||||
t = TiGetType(tile);
|
t = TiGetType(tile);
|
||||||
for (i = 0; !TTMaskHasType(&ExtCurStyle->exts_transSDTypes[t][i],
|
devptr = ExtCurStyle->exts_device[t];
|
||||||
|
for (i = 0; !TTMaskHasType(&devptr->exts_deviceSDTypes[i],
|
||||||
TT_SPACE); i++)
|
TT_SPACE); i++)
|
||||||
extEnumTilePerim(tile, ExtCurStyle->exts_transSDTypes[t][i],
|
extEnumTilePerim(tile, devptr->exts_deviceSDTypes[i],
|
||||||
SimTransTerms, (ClientData) &transistor );
|
SimTransTerms, (ClientData) &transistor );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue