Additional changes, almost all stylistic, to make the resis/ section
style conform to the rest of the database. It is difficult to work with code written in a sloppy, random style.
This commit is contained in:
parent
9aa39f820f
commit
7f11020ab4
|
|
@ -72,7 +72,7 @@ ResSanityChecks(nodename,resistorList,nodeList,devlist)
|
||||||
resistor->rr_status &= ~RES_REACHED_RESISTOR;
|
resistor->rr_status &= ~RES_REACHED_RESISTOR;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check 1- Are the resistors and nodes all connected? */
|
/* Check: Are the resistors and nodes all connected? */
|
||||||
while (!StackEmpty(resSanityStack))
|
while (!StackEmpty(resSanityStack))
|
||||||
{
|
{
|
||||||
node = (resNode *)STACKPOP(resSanityStack);
|
node = (resNode *)STACKPOP(resSanityStack);
|
||||||
|
|
@ -86,7 +86,8 @@ ResSanityChecks(nodename,resistorList,nodeList,devlist)
|
||||||
if (resistor->rr_connection1 != node &&
|
if (resistor->rr_connection1 != node &&
|
||||||
resistor->rr_connection2 != node)
|
resistor->rr_connection2 != node)
|
||||||
{
|
{
|
||||||
TxError("Stray resElement pointer- node %s, pointer %d\n",nodename,rcell);
|
TxError("Stray resElement pointer- node %s, pointer %d\n",
|
||||||
|
nodename, rcell);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if ((resistor->rr_connection1->rn_status & RES_REACHED_NODE) == 0)
|
if ((resistor->rr_connection1->rn_status & RES_REACHED_NODE) == 0)
|
||||||
|
|
@ -137,7 +138,8 @@ ResSanityChecks(nodename,resistorList,nodeList,devlist)
|
||||||
{
|
{
|
||||||
if ((node->rn_status & RES_REACHED_NODE) == 0)
|
if ((node->rn_status & RES_REACHED_NODE) == 0)
|
||||||
{
|
{
|
||||||
TxError("Unreached node in %s at %d, %d\n",nodename,node->rn_loc.p_x,node->rn_loc.p_y);
|
TxError("Unreached node in %s at %d, %d\n", nodename,
|
||||||
|
node->rn_loc.p_x, node->rn_loc.p_y);
|
||||||
}
|
}
|
||||||
node->rn_status &= ~RES_REACHED_NODE;
|
node->rn_status &= ~RES_REACHED_NODE;
|
||||||
if (node->rn_why & RES_NODE_ORIGIN)
|
if (node->rn_why & RES_NODE_ORIGIN)
|
||||||
|
|
|
||||||
|
|
@ -65,7 +65,6 @@ int
|
||||||
dbcConnectFuncDCS(tile, cx)
|
dbcConnectFuncDCS(tile, cx)
|
||||||
Tile *tile;
|
Tile *tile;
|
||||||
TreeContext *cx;
|
TreeContext *cx;
|
||||||
|
|
||||||
{
|
{
|
||||||
struct conSrArg2 *csa2;
|
struct conSrArg2 *csa2;
|
||||||
Rect tileArea, *srArea, devArea, newarea;
|
Rect tileArea, *srArea, devArea, newarea;
|
||||||
|
|
@ -104,13 +103,14 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
{
|
{
|
||||||
TiToRect(tp, &devArea);
|
TiToRect(tp, &devArea);
|
||||||
thisDev = (ResDevTile *) mallocMagic((unsigned)(sizeof(ResDevTile)));
|
thisDev = (ResDevTile *) mallocMagic((unsigned)(sizeof(ResDevTile)));
|
||||||
ResCalcPerimOverlap(thisDev,tp);
|
|
||||||
GeoTransRect(&scx->scx_trans, &devArea, &thisDev->area);
|
GeoTransRect(&scx->scx_trans, &devArea, &thisDev->area);
|
||||||
thisDev->type = TiGetType(tp);
|
thisDev->type = TiGetType(tp);
|
||||||
thisDev->nextDev = DevList;
|
thisDev->nextDev = DevList;
|
||||||
DevList = thisDev;
|
DevList = thisDev;
|
||||||
|
ResCalcPerimOverlap(thisDev, tp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* right */
|
/* right */
|
||||||
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
||||||
{
|
{
|
||||||
|
|
@ -128,6 +128,7 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
ResCalcPerimOverlap(thisDev, tp);
|
ResCalcPerimOverlap(thisDev, tp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* top */
|
/* top */
|
||||||
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp = BL(tp))
|
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp = BL(tp))
|
||||||
{
|
{
|
||||||
|
|
@ -145,6 +146,7 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
ResCalcPerimOverlap(thisDev, tp);
|
ResCalcPerimOverlap(thisDev, tp);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* bottom */
|
/* bottom */
|
||||||
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp = TR(tp))
|
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp = TR(tp))
|
||||||
{
|
{
|
||||||
|
|
@ -173,9 +175,10 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
thisDev->nextDev = DevList;
|
thisDev->nextDev = DevList;
|
||||||
DevList = thisDev;
|
DevList = thisDev;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* in some cases (primarily bipolar technology), we'll want to extract
|
/* in some cases (primarily bipolar technology), we'll want to extract
|
||||||
devices whose substrate terminals are part of the given region.
|
* devices whose substrate terminals are part of the given region.
|
||||||
The following does that check. (10-11-88)
|
* The following does that check. (10-11-88)
|
||||||
*/
|
*/
|
||||||
#ifdef ARIEL
|
#ifdef ARIEL
|
||||||
if (TTMaskHasType(&ResSubsTypeBitMask,t1) && (ResOptionsFlags & ResOpt_DoSubstrate))
|
if (TTMaskHasType(&ResSubsTypeBitMask,t1) && (ResOptionsFlags & ResOpt_DoSubstrate))
|
||||||
|
|
@ -186,7 +189,7 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
{
|
{
|
||||||
if (TTMaskIntersect(&DBPlaneTypes[pNum], mask))
|
if (TTMaskIntersect(&DBPlaneTypes[pNum], mask))
|
||||||
{
|
{
|
||||||
(void)DBSrPaintArea((Tile *) NULL,
|
DBSrPaintArea((Tile *) NULL,
|
||||||
scx->scx_use->cu_def->cd_planes[pNum],
|
scx->scx_use->cu_def->cd_planes[pNum],
|
||||||
&tileArea, mask, resSubSearchFunc, (ClientData)cx);
|
&tileArea, mask, resSubSearchFunc, (ClientData)cx);
|
||||||
}
|
}
|
||||||
|
|
@ -248,7 +251,6 @@ dbcConnectFuncDCS(tile, cx)
|
||||||
DBTreeSrLabels(&scx2, connectMask, csa2->csa2_xMask, &tpath,
|
DBTreeSrLabels(&scx2, connectMask, csa2->csa2_xMask, &tpath,
|
||||||
TF_LABEL_ATTACH, dbcConnectLabelFunc,
|
TF_LABEL_ATTACH, dbcConnectLabelFunc,
|
||||||
(ClientData)csa2);
|
(ClientData)csa2);
|
||||||
// DBCellCopyLabels(&scx2, connectMask, csa2->csa2_xMask, csa2->csa2_use, NULL);
|
|
||||||
|
|
||||||
/* Only extend those sides bordering the diagonal tile */
|
/* Only extend those sides bordering the diagonal tile */
|
||||||
|
|
||||||
|
|
@ -322,7 +324,6 @@ void
|
||||||
ResCalcPerimOverlap(dev, tile)
|
ResCalcPerimOverlap(dev, tile)
|
||||||
ResDevTile *dev;
|
ResDevTile *dev;
|
||||||
Tile *tile;
|
Tile *tile;
|
||||||
|
|
||||||
{
|
{
|
||||||
Tile *tp;
|
Tile *tp;
|
||||||
int t1;
|
int t1;
|
||||||
|
|
@ -332,45 +333,34 @@ ResCalcPerimOverlap(dev, tile)
|
||||||
overlap =0;
|
overlap =0;
|
||||||
|
|
||||||
t1 = TiGetType(tile);
|
t1 = TiGetType(tile);
|
||||||
|
|
||||||
/* left */
|
/* left */
|
||||||
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp = RT(tp))
|
for (tp = BL(tile); BOTTOM(tp) < TOP(tile); tp = RT(tp))
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_nodeConn[t1]), TiGetType(tp))
|
if TTMaskHasType(&(ExtCurStyle->exts_nodeConn[t1]), TiGetType(tp))
|
||||||
{
|
|
||||||
overlap += MIN(TOP(tile), TOP(tp)) -
|
overlap += MIN(TOP(tile), TOP(tp)) -
|
||||||
MAX(BOTTOM(tile), BOTTOM(tp));
|
MAX(BOTTOM(tile), BOTTOM(tp));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
/* right */
|
/* right */
|
||||||
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
for (tp = TR(tile); TOP(tp) > BOTTOM(tile); tp=LB(tp))
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_nodeConn[t1]), TiGetType(tp))
|
if TTMaskHasType(&(ExtCurStyle->exts_nodeConn[t1]), TiGetType(tp))
|
||||||
{
|
overlap += MIN(TOP(tile), TOP(tp)) - MAX(BOTTOM(tile), BOTTOM(tp));
|
||||||
overlap += MIN(TOP(tile),TOP(tp))-
|
|
||||||
MAX(BOTTOM(tile),BOTTOM(tp));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
/* top */
|
/* top */
|
||||||
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp = BL(tp))
|
for (tp = RT(tile); RIGHT(tp) > LEFT(tile); tp = BL(tp))
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_nodeConn[t1]), TiGetType(tp))
|
if TTMaskHasType(&(ExtCurStyle->exts_nodeConn[t1]), TiGetType(tp))
|
||||||
{
|
overlap += MIN(RIGHT(tile), RIGHT(tp)) - MAX(LEFT(tile), LEFT(tp));
|
||||||
overlap += MIN(RIGHT(tile),RIGHT(tp))-
|
|
||||||
MAX(LEFT(tile),LEFT(tp));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
|
||||||
/* bottom */
|
/* bottom */
|
||||||
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp))
|
for (tp = LB(tile); LEFT(tp) < RIGHT(tile); tp=TR(tp))
|
||||||
{
|
{
|
||||||
if TTMaskHasType(&(ExtCurStyle->exts_nodeConn[t1]), TiGetType(tp))
|
if TTMaskHasType(&(ExtCurStyle->exts_nodeConn[t1]), TiGetType(tp))
|
||||||
{
|
overlap += MIN(RIGHT(tile), RIGHT(tp)) - MAX(LEFT(tile), LEFT(tp));
|
||||||
overlap += MIN(RIGHT(tile),RIGHT(tp))-
|
|
||||||
MAX(LEFT(tile),LEFT(tp));
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
dev->overlap = overlap;
|
dev->overlap = overlap;
|
||||||
}
|
}
|
||||||
|
|
@ -519,8 +509,6 @@ int
|
||||||
resSubSearchFunc(tile, cx)
|
resSubSearchFunc(tile, cx)
|
||||||
Tile *tile;
|
Tile *tile;
|
||||||
TreeContext *cx;
|
TreeContext *cx;
|
||||||
|
|
||||||
|
|
||||||
{
|
{
|
||||||
ResDevTile *thisDev;
|
ResDevTile *thisDev;
|
||||||
Rect devArea;
|
Rect devArea;
|
||||||
|
|
@ -528,10 +516,10 @@ resSubSearchFunc(tile,cx)
|
||||||
ExtDevice *devptr;
|
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.
|
||||||
*/
|
*/
|
||||||
devptr = ExtCurStyle->exts_device[t]
|
devptr = ExtCurStyle->exts_device[t];
|
||||||
if (devptr->exts_deviceSDCount > 1) return 0;
|
if (devptr->exts_deviceSDCount > 1) return 0;
|
||||||
TiToRect(tile, &devArea);
|
TiToRect(tile, &devArea);
|
||||||
thisDev = (ResDevTile *) mallocMagic((unsigned)(sizeof(ResDevTile)));
|
thisDev = (ResDevTile *) mallocMagic((unsigned)(sizeof(ResDevTile)));
|
||||||
|
|
|
||||||
|
|
@ -49,7 +49,6 @@ void
|
||||||
ResPrintNodeList(fp, list)
|
ResPrintNodeList(fp, list)
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
resNode *list;
|
resNode *list;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
for (; list != NULL; list = list->rn_more)
|
for (; list != NULL; list = list->rn_more)
|
||||||
|
|
|
||||||
|
|
@ -105,7 +105,6 @@ enumerate:
|
||||||
resTopTile=BL(resTopTile);
|
resTopTile=BL(resTopTile);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tpnew = TR(resSrTile);
|
tpnew = TR(resSrTile);
|
||||||
|
|
@ -134,7 +133,8 @@ enumerate:
|
||||||
}
|
}
|
||||||
|
|
||||||
/* At left edge -- walk down to next tile along the left edge */
|
/* At left edge -- walk down to next tile along the left edge */
|
||||||
for (resSrTile = LB(resSrTile); RIGHT(resSrTile) <= rect->r_xbot; resSrTile = TR(resSrTile))
|
for (resSrTile = LB(resSrTile); RIGHT(resSrTile) <= rect->r_xbot;
|
||||||
|
resSrTile = TR(resSrTile))
|
||||||
/* Nothing */;
|
/* Nothing */;
|
||||||
}
|
}
|
||||||
return (0);
|
return (0);
|
||||||
|
|
@ -164,11 +164,13 @@ ResCheckConcavity(bot,top,tt)
|
||||||
{
|
{
|
||||||
Tile *tp;
|
Tile *tp;
|
||||||
int xlen, ylen;
|
int xlen, ylen;
|
||||||
|
|
||||||
/* corner #1:
|
/* corner #1:
|
||||||
XXXXXXX
|
* XXXXXXX
|
||||||
YYYYYYY
|
* YYYYYYY
|
||||||
^--here
|
* ^--here
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (RIGHT(top) > RIGHT(bot) && TiGetType(TR(bot)) != tt)
|
if (RIGHT(top) > RIGHT(bot) && TiGetType(TR(bot)) != tt)
|
||||||
{
|
{
|
||||||
int xpos = RIGHT(bot);
|
int xpos = RIGHT(bot);
|
||||||
|
|
@ -181,11 +183,13 @@ ResCheckConcavity(bot,top,tt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (resTopTile == NULL) return;
|
if (resTopTile == NULL) return;
|
||||||
|
|
||||||
/* corner #2:
|
/* corner #2:
|
||||||
v--here
|
* v--here
|
||||||
XXXXXXX
|
* XXXXXXX
|
||||||
YYYYYYY
|
* YYYYYYY
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (RIGHT(top) < RIGHT(bot))
|
if (RIGHT(top) < RIGHT(bot))
|
||||||
{
|
{
|
||||||
for (tp = TR(top); BOTTOM(tp) > BOTTOM(top); tp = LB(tp));
|
for (tp = TR(top); BOTTOM(tp) > BOTTOM(top); tp = LB(tp));
|
||||||
|
|
@ -202,11 +206,13 @@ ResCheckConcavity(bot,top,tt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (resTopTile == NULL) return;
|
if (resTopTile == NULL) return;
|
||||||
|
|
||||||
/* corner #3:
|
/* corner #3:
|
||||||
XXXXXXX
|
* XXXXXXX
|
||||||
YYYYYYY
|
* YYYYYYY
|
||||||
^--here
|
* ^--here
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (LEFT(top) < LEFT(bot))
|
if (LEFT(top) < LEFT(bot))
|
||||||
{
|
{
|
||||||
for (tp = BL(bot); TOP(tp) < TOP(bot); tp = RT(tp));
|
for (tp = BL(bot); TOP(tp) < TOP(bot); tp = RT(tp));
|
||||||
|
|
@ -223,11 +229,13 @@ ResCheckConcavity(bot,top,tt)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (resTopTile == NULL) return;
|
if (resTopTile == NULL) return;
|
||||||
|
|
||||||
/* corner #4:
|
/* corner #4:
|
||||||
v--here
|
* v--here
|
||||||
XXXXXXX
|
* XXXXXXX
|
||||||
YYYYYYY
|
* YYYYYYY
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if (LEFT(top) > LEFT(bot) && TiGetType(BL(top)) != tt)
|
if (LEFT(top) > LEFT(bot) && TiGetType(BL(top)) != tt)
|
||||||
{
|
{
|
||||||
int xpos = LEFT(top);
|
int xpos = LEFT(top);
|
||||||
|
|
@ -419,6 +427,7 @@ resWalkleft(tile,tt,xpos,ypos,func)
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
Tile *
|
Tile *
|
||||||
ResSplitX(tile, x)
|
ResSplitX(tile, x)
|
||||||
Tile *tile;
|
Tile *tile;
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
||||||
#include "textio/txcommands.h"
|
#include "textio/txcommands.h"
|
||||||
#include "resis/resis.h"
|
#include "resis/resis.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -152,10 +150,10 @@ ResProcessJunction(tile, tp, xj, yj, NodeList)
|
||||||
junction->rj_nextjunction[1] = j2->junctionList;
|
junction->rj_nextjunction[1] = j2->junctionList;
|
||||||
j2->junctionList = junction;
|
j2->junctionList = junction;
|
||||||
|
|
||||||
NEWBREAK(junction->rj_jnode,tile,
|
NEWBREAK(junction->rj_jnode,tile, junction->rj_loc.p_x,
|
||||||
junction->rj_loc.p_x,junction->rj_loc.p_y,NULL);
|
junction->rj_loc.p_y, NULL);
|
||||||
|
|
||||||
NEWBREAK(junction->rj_jnode,tp,
|
NEWBREAK(junction->rj_jnode,tp, junction->rj_loc.p_x,
|
||||||
junction->rj_loc.p_x,junction->rj_loc.p_y,NULL);
|
junction->rj_loc.p_y, NULL);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -574,18 +574,18 @@ ResProcessTiles(goodies, origin)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ResExtractNet(startlist, goodies, cellname)
|
ResExtractNet(fix, goodies, cellname)
|
||||||
ResFixPoint *startlist;
|
ResFixPoint *fix;
|
||||||
ResGlobalParams *goodies;
|
ResGlobalParams *goodies;
|
||||||
char *cellname;
|
char *cellname;
|
||||||
{
|
{
|
||||||
SearchContext scx;
|
SearchContext scx;
|
||||||
int pNum;
|
int pNum;
|
||||||
ResDevTile *DevTiles, *lasttile;
|
ResDevTile *DevTiles;
|
||||||
TileTypeBitMask FirstTileMask;
|
TileTypeBitMask FirstTileMask;
|
||||||
Point startpoint;
|
Point startpoint;
|
||||||
ResFixPoint *fix;
|
|
||||||
static int first = 1;
|
static int first = 1;
|
||||||
|
ResDevTile *newdevtiles, *tmp;
|
||||||
|
|
||||||
/* Make sure all global network variables are reset */
|
/* Make sure all global network variables are reset */
|
||||||
|
|
||||||
|
|
@ -601,7 +601,7 @@ ResExtractNet(startlist, goodies, cellname)
|
||||||
goodies->rg_maxres = 0;
|
goodies->rg_maxres = 0;
|
||||||
goodies->rg_tilecount = 0;
|
goodies->rg_tilecount = 0;
|
||||||
|
|
||||||
/*set up internal stuff if this is the first time through */
|
/* Set up internal stuff if this is the first time through */
|
||||||
|
|
||||||
if (first)
|
if (first)
|
||||||
{
|
{
|
||||||
|
|
@ -640,10 +640,6 @@ ResExtractNet(startlist, goodies, cellname)
|
||||||
|
|
||||||
/* Copy Paint */
|
/* Copy Paint */
|
||||||
DevTiles = NULL;
|
DevTiles = NULL;
|
||||||
lasttile = NULL;
|
|
||||||
for (fix = startlist; fix != NULL; fix = fix->fp_next)
|
|
||||||
{
|
|
||||||
ResDevTile *newdevtiles, *tmp;
|
|
||||||
|
|
||||||
#ifdef ARIEL
|
#ifdef ARIEL
|
||||||
if ((ResOptionsFlags & ResOpt_Power) &&
|
if ((ResOptionsFlags & ResOpt_Power) &&
|
||||||
|
|
@ -663,20 +659,9 @@ ResExtractNet(startlist, goodies, cellname)
|
||||||
TTMaskZero(&FirstTileMask);
|
TTMaskZero(&FirstTileMask);
|
||||||
TTMaskSetMask(&FirstTileMask, &DBConnectTbl[fix->fp_ttype]);
|
TTMaskSetMask(&FirstTileMask, &DBConnectTbl[fix->fp_ttype]);
|
||||||
|
|
||||||
newdevtiles = DBTreeCopyConnectDCS(&scx, &FirstTileMask, 0,
|
DevTiles = DBTreeCopyConnectDCS(&scx, &FirstTileMask, 0,
|
||||||
ResCopyMask, &TiPlaneRect, ResUse);
|
ResCopyMask, &TiPlaneRect, ResUse);
|
||||||
|
|
||||||
for (tmp = newdevtiles; tmp && tmp->nextDev; tmp = tmp->nextDev);
|
|
||||||
if (newdevtiles)
|
|
||||||
{
|
|
||||||
if (DevTiles)
|
|
||||||
lasttile->nextDev = newdevtiles;
|
|
||||||
else
|
|
||||||
DevTiles = newdevtiles;
|
|
||||||
lasttile = tmp;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtResetTiles(scx.scx_use->cu_def, extUnInit);
|
ExtResetTiles(scx.scx_use->cu_def, extUnInit);
|
||||||
|
|
||||||
/* Find all contacts in design and note their position */
|
/* Find all contacts in design and note their position */
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,8 @@ extern ResSimNode *ResOriginalNodes; /*Linked List of Nodes */
|
||||||
int resNodeNum;
|
int resNodeNum;
|
||||||
|
|
||||||
#ifdef LAPLACE
|
#ifdef LAPLACE
|
||||||
int ResOptionsFlags = ResOpt_Simplify|ResOpt_Tdi|ResOpt_DoExtFile|ResOpt_CacheLaplace;
|
int ResOptionsFlags = ResOpt_Simplify | ResOpt_Tdi | ResOpt_DoExtFile
|
||||||
|
| ResOpt_CacheLaplace;
|
||||||
#else
|
#else
|
||||||
int ResOptionsFlags = ResOpt_Simplify | ResOpt_Tdi | ResOpt_DoExtFile;
|
int ResOptionsFlags = ResOpt_Simplify | ResOpt_Tdi | ResOpt_DoExtFile;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -480,7 +481,8 @@ typedef enum {
|
||||||
oldoptions = ResOptionsFlags;
|
oldoptions = ResOptionsFlags;
|
||||||
ResOptionsFlags = ResOpt_DoSubstrate | ResOpt_Signal | ResOpt_Box;
|
ResOptionsFlags = ResOpt_DoSubstrate | ResOpt_Signal | ResOpt_Box;
|
||||||
#ifdef LAPLACE
|
#ifdef LAPLACE
|
||||||
ResOptionsFlags |= (oldoptions & (ResOpt_CacheLaplace|ResOpt_DoLaplace));
|
ResOptionsFlags |= (oldoptions &
|
||||||
|
(ResOpt_CacheLaplace | ResOpt_DoLaplace));
|
||||||
LaplaceMatchCount = 0;
|
LaplaceMatchCount = 0;
|
||||||
LaplaceMissCount = 0;
|
LaplaceMissCount = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -610,8 +612,6 @@ resSubcircuitFunc(cellDef, rdata)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -1071,8 +1071,8 @@ ResCheckSimNodes(celldef, resisdata)
|
||||||
fp.fp_next = NULL;
|
fp.fp_next = NULL;
|
||||||
if (ResExtractNet(&fp, &gparams, outfile) != 0)
|
if (ResExtractNet(&fp, &gparams, outfile) != 0)
|
||||||
{
|
{
|
||||||
|
/* On error, don't output this net, but keep going */
|
||||||
TxError("Error in extracting node %s\n", node->name);
|
TxError("Error in extracting node %s\n", node->name);
|
||||||
// break; // Don't stop for one error. . .
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -1429,7 +1429,8 @@ ResSortByGate(DevpointerList)
|
||||||
{
|
{
|
||||||
int changed = TRUE;
|
int changed = TRUE;
|
||||||
int localchange = TRUE;
|
int localchange = TRUE;
|
||||||
devPtr *working, *last=NULL, *current, *gatelist=NULL;
|
devPtr *working, *current;
|
||||||
|
devPtr *last = NULL, *gatelist = NULL;
|
||||||
|
|
||||||
working = *DevpointerList;
|
working = *DevpointerList;
|
||||||
while (working != NULL)
|
while (working != NULL)
|
||||||
|
|
|
||||||
|
|
@ -111,7 +111,7 @@ ResEach(tile, pNum, arg)
|
||||||
|
|
||||||
if (((ResContactPoint *)(arg->fra_region))->cp_contactTile != tile)
|
if (((ResContactPoint *)(arg->fra_region))->cp_contactTile != tile)
|
||||||
{
|
{
|
||||||
(void) ResFirst(tile, arg);
|
ResFirst(tile, arg);
|
||||||
}
|
}
|
||||||
return(0);
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
@ -137,7 +137,6 @@ int
|
||||||
ResAddPlumbing(tile, arg)
|
ResAddPlumbing(tile, arg)
|
||||||
Tile *tile;
|
Tile *tile;
|
||||||
ClientData *arg;
|
ClientData *arg;
|
||||||
|
|
||||||
{
|
{
|
||||||
tileJunk *Junk, *junk2;
|
tileJunk *Junk, *junk2;
|
||||||
static Stack *resDevStack = NULL;
|
static Stack *resDevStack = NULL;
|
||||||
|
|
@ -273,7 +272,7 @@ ResAddPlumbing(tile, arg)
|
||||||
|
|
||||||
if (source != (Tile *) NULL)
|
if (source != (Tile *) NULL)
|
||||||
{
|
{
|
||||||
STACKPUSH((ClientData) (source),resDevStack);
|
STACKPUSH((ClientData)source, resDevStack);
|
||||||
}
|
}
|
||||||
while (!StackEmpty(resDevStack))
|
while (!StackEmpty(resDevStack))
|
||||||
{
|
{
|
||||||
|
|
@ -308,7 +307,7 @@ ResAddPlumbing(tile, arg)
|
||||||
if ((j->tj_status & RES_TILE_SD) == 0)
|
if ((j->tj_status & RES_TILE_SD) == 0)
|
||||||
{
|
{
|
||||||
j->tj_status |= RES_TILE_SD;
|
j->tj_status |= RES_TILE_SD;
|
||||||
STACKPUSH((ClientData) (tp2),resDevStack);
|
STACKPUSH((ClientData)tp2, resDevStack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -321,7 +320,7 @@ ResAddPlumbing(tile, arg)
|
||||||
if ((j->tj_status & RES_TILE_SD) == 0)
|
if ((j->tj_status & RES_TILE_SD) == 0)
|
||||||
{
|
{
|
||||||
j->tj_status |= RES_TILE_SD;
|
j->tj_status |= RES_TILE_SD;
|
||||||
STACKPUSH((ClientData) (tp2),resDevStack);
|
STACKPUSH((ClientData)tp2, resDevStack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -334,7 +333,7 @@ ResAddPlumbing(tile, arg)
|
||||||
if ((j->tj_status & RES_TILE_SD) == 0)
|
if ((j->tj_status & RES_TILE_SD) == 0)
|
||||||
{
|
{
|
||||||
j->tj_status |= RES_TILE_SD;
|
j->tj_status |= RES_TILE_SD;
|
||||||
STACKPUSH((ClientData) (tp2),resDevStack);
|
STACKPUSH((ClientData)tp2, resDevStack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -342,7 +341,7 @@ ResAddPlumbing(tile, arg)
|
||||||
|
|
||||||
/* find rest of device; search for source edges */
|
/* find rest of device; search for source edges */
|
||||||
|
|
||||||
STACKPUSH((ClientData) (tile), resDevStack);
|
STACKPUSH((ClientData)tile, resDevStack);
|
||||||
while (!StackEmpty(resDevStack))
|
while (!StackEmpty(resDevStack))
|
||||||
{
|
{
|
||||||
tileJunk *j0;
|
tileJunk *j0;
|
||||||
|
|
@ -365,7 +364,7 @@ ResAddPlumbing(tile, arg)
|
||||||
(tp2->ti_client == (ClientData) CLIENTDEFAULT))
|
(tp2->ti_client == (ClientData) CLIENTDEFAULT))
|
||||||
{
|
{
|
||||||
Junk = resAddField(tp2);
|
Junk = resAddField(tp2);
|
||||||
STACKPUSH((ClientData)(tp2),resDevStack);
|
STACKPUSH((ClientData)tp2, resDevStack);
|
||||||
Junk->deviceList = resDev;
|
Junk->deviceList = resDev;
|
||||||
Junk->tj_status |= RES_TILE_DEV;
|
Junk->tj_status |= RES_TILE_DEV;
|
||||||
|
|
||||||
|
|
@ -385,7 +384,7 @@ ResAddPlumbing(tile, arg)
|
||||||
(tp2->ti_client == (ClientData) CLIENTDEFAULT))
|
(tp2->ti_client == (ClientData) CLIENTDEFAULT))
|
||||||
{
|
{
|
||||||
Junk = resAddField(tp2);
|
Junk = resAddField(tp2);
|
||||||
STACKPUSH((ClientData)(tp2),resDevStack);
|
STACKPUSH((ClientData)tp2, resDevStack);
|
||||||
Junk->deviceList = resDev;
|
Junk->deviceList = resDev;
|
||||||
Junk->tj_status |= RES_TILE_DEV;
|
Junk->tj_status |= RES_TILE_DEV;
|
||||||
}
|
}
|
||||||
|
|
@ -404,7 +403,7 @@ ResAddPlumbing(tile, arg)
|
||||||
(tp2->ti_client == (ClientData) CLIENTDEFAULT))
|
(tp2->ti_client == (ClientData) CLIENTDEFAULT))
|
||||||
{
|
{
|
||||||
Junk = resAddField(tp2);
|
Junk = resAddField(tp2);
|
||||||
STACKPUSH((ClientData)(tp2),resDevStack);
|
STACKPUSH((ClientData)tp2, resDevStack);
|
||||||
Junk->deviceList = resDev;
|
Junk->deviceList = resDev;
|
||||||
Junk->tj_status |= RES_TILE_DEV;
|
Junk->tj_status |= RES_TILE_DEV;
|
||||||
}
|
}
|
||||||
|
|
@ -423,7 +422,7 @@ ResAddPlumbing(tile, arg)
|
||||||
(tp2->ti_client == (ClientData) CLIENTDEFAULT))
|
(tp2->ti_client == (ClientData) CLIENTDEFAULT))
|
||||||
{
|
{
|
||||||
Junk = resAddField(tp2);
|
Junk = resAddField(tp2);
|
||||||
STACKPUSH((ClientData)(tp2),resDevStack);
|
STACKPUSH((ClientData)tp2, resDevStack);
|
||||||
Junk->deviceList = resDev;
|
Junk->deviceList = resDev;
|
||||||
Junk->tj_status |= RES_TILE_DEV;
|
Junk->tj_status |= RES_TILE_DEV;
|
||||||
}
|
}
|
||||||
|
|
@ -443,7 +442,7 @@ ResAddPlumbing(tile, arg)
|
||||||
{
|
{
|
||||||
tileJunk *j = (tileJunk *) source->ti_client;
|
tileJunk *j = (tileJunk *) source->ti_client;
|
||||||
|
|
||||||
STACKPUSH((ClientData) (source),resDevStack);
|
STACKPUSH((ClientData)source, resDevStack);
|
||||||
j->tj_status &= ~RES_TILE_SD;
|
j->tj_status &= ~RES_TILE_SD;
|
||||||
}
|
}
|
||||||
while (!StackEmpty(resDevStack))
|
while (!StackEmpty(resDevStack))
|
||||||
|
|
@ -666,18 +665,17 @@ ResPreProcessDevices(TileList, DeviceList, Def)
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void
|
void
|
||||||
ResAddToQueue(node, list)
|
ResAddToQueue(node, list)
|
||||||
resNode *node, **list;
|
resNode *node, **list;
|
||||||
{
|
{
|
||||||
|
|
||||||
node->rn_more = *list;
|
node->rn_more = *list;
|
||||||
node->rn_less = NULL;
|
node->rn_less = NULL;
|
||||||
if (*list) (*list)->rn_less = node;
|
if (*list) (*list)->rn_less = node;
|
||||||
*list = node;
|
*list = node;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -694,9 +692,7 @@ ResAddToQueue(node,list)
|
||||||
void
|
void
|
||||||
ResRemoveFromQueue(node, list)
|
ResRemoveFromQueue(node, list)
|
||||||
resNode *node, **list;
|
resNode *node, **list;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
||||||
if (node->rn_less != NULL)
|
if (node->rn_less != NULL)
|
||||||
{
|
{
|
||||||
node->rn_less->rn_more = node->rn_more;
|
node->rn_less->rn_more = node->rn_more;
|
||||||
|
|
@ -719,10 +715,10 @@ ResRemoveFromQueue(node,list)
|
||||||
node->rn_more = NULL;
|
node->rn_more = NULL;
|
||||||
node->rn_less = NULL;
|
node->rn_less = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
tileJunk *
|
tileJunk *
|
||||||
resAddField(tile)
|
resAddField(tile)
|
||||||
Tile *tile;
|
Tile *tile;
|
||||||
|
|
||||||
{
|
{
|
||||||
tileJunk *Junk;
|
tileJunk *Junk;
|
||||||
if ((Junk = (tileJunk *)tile->ti_client) == (tileJunk *) CLIENTDEFAULT)
|
if ((Junk = (tileJunk *)tile->ti_client) == (tileJunk *) CLIENTDEFAULT)
|
||||||
|
|
|
||||||
|
|
@ -48,7 +48,6 @@ ResPrintNetwork(filename, reslist)
|
||||||
|
|
||||||
{
|
{
|
||||||
char bigname[255], name1[255], name2[255];
|
char bigname[255], name1[255], name2[255];
|
||||||
|
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
int i = 1;
|
int i = 1;
|
||||||
|
|
||||||
|
|
@ -118,7 +117,6 @@ ResPrintCurrents(filename,extension,node)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*
|
*
|
||||||
|
|
@ -151,7 +149,6 @@ resCurrentPrintFunc(node,resistor,filename)
|
||||||
if (node->rn_why == RES_NODE_ORIGIN)
|
if (node->rn_why == RES_NODE_ORIGIN)
|
||||||
{
|
{
|
||||||
fprintf(filename, "i gnd %f\n", i_sum);
|
fprintf(filename, "i gnd %f\n", i_sum);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
@ -159,7 +156,6 @@ resCurrentPrintFunc(node,resistor,filename)
|
||||||
node->rn_loc.p_y, i_sum);
|
node->rn_loc.p_y, i_sum);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
@ -218,9 +214,9 @@ ResWriteECLFile(filename,reslist,nodelist)
|
||||||
}
|
}
|
||||||
for (; reslist; reslist = reslist->rr_nextResistor)
|
for (; reslist; reslist = reslist->rr_nextResistor)
|
||||||
{
|
{
|
||||||
|
|
||||||
fprintf(fp, "r %s %s %f %s %d\n",
|
fprintf(fp, "r %s %s %f %s %d\n",
|
||||||
reslist->rr_node[0]->rn_name,reslist->rr_node[1]->rn_name,
|
reslist->rr_node[0]->rn_name,
|
||||||
|
reslist->rr_node[1]->rn_name,
|
||||||
/* /1000.0 gets ohms from milliohms */
|
/* /1000.0 gets ohms from milliohms */
|
||||||
(float)(reslist->rr_value) / 1000.0,
|
(float)(reslist->rr_value) / 1000.0,
|
||||||
DBTypeShortName(reslist->rr_tt), reslist->rr_csArea);
|
DBTypeShortName(reslist->rr_tt), reslist->rr_csArea);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue