Compare commits
No commits in common. "master" and "8.3.583" have entirely different histories.
|
|
@ -16,7 +16,6 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
- name: Get Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y tcl-dev tk-dev libcairo-dev
|
||||
- name: Build
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -10,8 +10,8 @@ on:
|
|||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
simple_build_macos15:
|
||||
runs-on: macos-15-intel # only and last supported intel MacOS
|
||||
simple_build_macos13:
|
||||
runs-on: macos-13
|
||||
timeout-minutes: 45 # x86_64 seems non-SSD based (slower)
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
|
@ -235,10 +235,10 @@ jobs:
|
|||
cp *.mak dist/BUILD-INFO/
|
||||
cp *.LOG dist/BUILD-INFO/
|
||||
|
||||
- name: Upload archive magic-macos15
|
||||
- name: Upload archive magic-macos13
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: magic-macos15
|
||||
name: magic-macos13
|
||||
path: |
|
||||
${{ github.workspace }}/dist
|
||||
|
||||
|
|
|
|||
|
|
@ -2432,7 +2432,6 @@ calmaProcessBoundary(
|
|||
freeMagic1(&mm1, lbref);
|
||||
lbref = lbref->lb_next;
|
||||
}
|
||||
freeMagic1(&mm1, lbref);
|
||||
freeMagic1_end(&mm1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1867,7 +1867,6 @@ calmaProcessBoundaryZ(
|
|||
freeMagic1(&mm1, lbref);
|
||||
lbref = lbref->lb_next;
|
||||
}
|
||||
freeMagic1(&mm1, lbref);
|
||||
freeMagic1_end(&mm1);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -487,6 +487,8 @@ enumerate:
|
|||
newType = (method == (unsigned char)PAINT_XOR) ?
|
||||
*resultTbl : resultTbl[oldType];
|
||||
|
||||
if (mergeFlags & MRG_RIGHT)
|
||||
tile = TiNMMergeRight(tile, plane); // was commented out?
|
||||
if (mergeFlags & MRG_LEFT)
|
||||
TiNMMergeLeft(LB(newtile), plane);
|
||||
}
|
||||
|
|
@ -494,6 +496,8 @@ enumerate:
|
|||
{
|
||||
if (mergeFlags & MRG_LEFT)
|
||||
TiNMMergeLeft(newtile, plane);
|
||||
if (mergeFlags & MRG_RIGHT)
|
||||
TiNMMergeRight(LB(tile), plane); // was commented out?
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
|||
179
drc/DRCsubcell.c
179
drc/DRCsubcell.c
|
|
@ -27,7 +27,6 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
|
||||
#include "utils/magic.h"
|
||||
#include "textio/textio.h"
|
||||
#include "utils/malloc.h"
|
||||
#include "utils/signals.h"
|
||||
#include "utils/geometry.h"
|
||||
#include "tiles/tile.h"
|
||||
|
|
@ -38,12 +37,18 @@ static char rcsid[] __attribute__ ((unused)) = "$Header: /usr/cvsroot/magic-8.0/
|
|||
#include "commands/commands.h"
|
||||
#include "utils/undo.h"
|
||||
|
||||
/* The variables below are made global so that they can be used to
|
||||
/* The variables below are made owns so that they can be used to
|
||||
* pass information to the various search functions.
|
||||
*/
|
||||
|
||||
static void (*drcSubFunc)(); /* Error function. */
|
||||
static ClientData drcSubClientData; /* To be passed to error function. */
|
||||
static Rect drcSubIntArea; /* Accumulates area of interactions. */
|
||||
static CellDef *drcSubDef; /* Cell definition we're checking. */
|
||||
static int drcSubRadius; /* Interaction radius. */
|
||||
static CellUse *drcCurSub; /* Holds current use while searching for interactions */
|
||||
static Rect drcSubLookArea; /* Area where we're looking for interactions */
|
||||
static void (*drcSubFunc)(); /* Error function. */
|
||||
static ClientData drcSubClientData;
|
||||
/* To be passed to error function. */
|
||||
|
||||
/* The cookie below is dummied up to provide an error message for
|
||||
* errors that occur because of inexact overlaps between subcells.
|
||||
|
|
@ -87,28 +92,6 @@ static DRCCookie drcOffGridCookie = {
|
|||
extern int DRCErrorType;
|
||||
extern CellDef *DRCErrorDef;
|
||||
|
||||
/* Structure used to hold information about child uses found in the
|
||||
* search area during DRCFindInteractions(), so these can be
|
||||
* subsequently searched for sibling interactions.
|
||||
*/
|
||||
|
||||
struct drcLinkedUse {
|
||||
CellUse *dlu_use; // Use being checked
|
||||
Rect dlu_area; // Area of use to check (w/halo)
|
||||
struct drcLinkedUse *dlu_next; // For linked list
|
||||
};
|
||||
|
||||
/* Structure used to pass information to and from drcSubcellFunc() */
|
||||
|
||||
struct drcSubcellArg {
|
||||
CellDef *dsa_def; /* Cell use being checked */
|
||||
int dsa_radius; /* Halo radius around area to check */
|
||||
Rect *dsa_searchArea; /* Area of cell use being searched */
|
||||
Rect *dsa_intArea; /* Total interaction area */
|
||||
bool dsa_found; /* At least one interacting cell was found */
|
||||
struct drcLinkedUse *dsa_dlu;
|
||||
};
|
||||
|
||||
/*
|
||||
* ----------------------------------------------------------------------------
|
||||
*
|
||||
|
|
@ -130,12 +113,12 @@ struct drcSubcellArg {
|
|||
*/
|
||||
|
||||
int
|
||||
drcFindOtherCells(use, dlu)
|
||||
drcFindOtherCells(use, area)
|
||||
CellUse *use;
|
||||
struct drcLinkedUse *dlu;
|
||||
Rect *area;
|
||||
{
|
||||
if (use != dlu->dlu_use)
|
||||
GeoInclude(&use->cu_bbox, &dlu->dlu_area);
|
||||
if (use != drcCurSub)
|
||||
GeoInclude(&use->cu_bbox, area);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -245,56 +228,68 @@ drcSubCopyFunc(scx, cdarg)
|
|||
*/
|
||||
|
||||
int
|
||||
drcSubcellFunc(subUse, dsa)
|
||||
CellUse *subUse; /* Subcell instance found in area. */
|
||||
struct drcSubcellArg *dsa; /* Information needed for funtion and to pass
|
||||
* back to the caller.
|
||||
*/
|
||||
drcSubcellFunc(subUse, flags)
|
||||
CellUse *subUse; /* Subcell instance. */
|
||||
int *flags; /* Information to propagate up */
|
||||
{
|
||||
Rect area, haloArea, intArea;
|
||||
Rect area, haloArea, intArea, subIntArea, locIntArea;
|
||||
int i;
|
||||
|
||||
/* Record that a subcell has been seen in the search area. */
|
||||
dsa->dsa_found = TRUE;
|
||||
/* A subcell has been seen, so set the "cell found" flag */
|
||||
*flags |= CELLFOUND_FLAG;
|
||||
|
||||
/* To determine interactions, find the bounding box of
|
||||
* all paint and other subcells within one halo of this
|
||||
* subcell (and also within the original area where
|
||||
* we're recomputing errors).
|
||||
*/
|
||||
|
||||
area = subUse->cu_bbox;
|
||||
|
||||
GEO_EXPAND(&area, dsa->dsa_radius, &haloArea);
|
||||
GeoClip(&haloArea, dsa->dsa_searchArea);
|
||||
GEO_EXPAND(&area, drcSubRadius, &haloArea);
|
||||
GeoClip(&haloArea, &drcSubLookArea);
|
||||
|
||||
intArea = GeoNullRect;
|
||||
for (i = PL_TECHDEPBASE; i < DBNumPlanes; i++)
|
||||
{
|
||||
(void) DBSrPaintArea((Tile *) NULL, dsa->dsa_def->cd_planes[i],
|
||||
&haloArea, &DBAllButSpaceBits, drcIncludeArea,
|
||||
(ClientData) &intArea);
|
||||
(void) DBSrPaintArea((Tile *) NULL, drcSubDef->cd_planes[i],
|
||||
&haloArea, &DBAllButSpaceBits, drcIncludeArea,
|
||||
(ClientData) &intArea);
|
||||
}
|
||||
|
||||
/* To check sibling interactions, DBSrCellPlaneArea() must not be
|
||||
* called from within itself, so save the information about this
|
||||
* cell and its area in a linked list. If haloArea is already
|
||||
* inside intArea, then do nothing.
|
||||
*/
|
||||
/* DRC error tiles in a subcell are automatically pulled into the */
|
||||
/* interaction area of the parent. Ultimately this is recursive as */
|
||||
/* all cells are checked and errors propagate to the top level. */
|
||||
|
||||
if (!GEO_SURROUND(&intArea, &haloArea))
|
||||
{
|
||||
struct drcLinkedUse *newdlu;
|
||||
newdlu = (struct drcLinkedUse *)mallocMagic(sizeof(struct drcLinkedUse));
|
||||
newdlu->dlu_use = subUse;
|
||||
newdlu->dlu_area = haloArea;
|
||||
newdlu->dlu_next = dsa->dsa_dlu;
|
||||
dsa->dsa_dlu = newdlu;
|
||||
}
|
||||
subIntArea = GeoNullRect;
|
||||
|
||||
#if (0)
|
||||
/* NOTE: DRC errors inside a subcell should be ignored for */
|
||||
/* the purpose of finding interactions. Errors should only */
|
||||
/* be copied up into the parent when in a non-interaction */
|
||||
/* area. This is done below in DRCFindInteractions(). */
|
||||
/* (Method added by Tim, 10/15/2020) */
|
||||
|
||||
/* Maybe S and PS errors should be pulled here? */
|
||||
|
||||
DBSrPaintArea((Tile *) NULL, subUse->cu_def->cd_planes[PL_DRC_ERROR],
|
||||
&TiPlaneRect, &DBAllButSpaceBits, drcIncludeArea,
|
||||
(ClientData) &subIntArea);
|
||||
|
||||
GeoTransRect(&(subUse->cu_transform), &subIntArea, &locIntArea);
|
||||
GeoInclude(&locIntArea, &intArea);
|
||||
#endif
|
||||
|
||||
if (!GEO_RECTNULL(&subIntArea)) *flags |= PROPAGATE_FLAG;
|
||||
|
||||
drcCurSub = subUse;
|
||||
(void) DBSrCellPlaneArea(drcSubDef->cd_cellPlane, &haloArea,
|
||||
drcFindOtherCells, (ClientData)(&intArea));
|
||||
if (GEO_RECTNULL(&intArea)) return 0;
|
||||
|
||||
GEO_EXPAND(&intArea, dsa->dsa_radius, &intArea);
|
||||
GEO_EXPAND(&intArea, drcSubRadius, &intArea);
|
||||
GeoClip(&intArea, &haloArea);
|
||||
(void) GeoInclude(&intArea, dsa->dsa_intArea);
|
||||
(void) GeoInclude(&intArea, &drcSubIntArea);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -418,11 +413,10 @@ DRCFindInteractions(def, area, radius, interaction)
|
|||
int i;
|
||||
CellUse *use;
|
||||
SearchContext scx;
|
||||
Rect searchArea, intArea;
|
||||
int flags;
|
||||
struct drcSubcellArg dsa;
|
||||
struct drcLinkedUse *curDLU;
|
||||
|
||||
drcSubDef = def;
|
||||
drcSubRadius = radius;
|
||||
DRCDummyUse->cu_def = def;
|
||||
|
||||
/* Find all the interactions in the area and compute the
|
||||
|
|
@ -432,53 +426,11 @@ DRCFindInteractions(def, area, radius, interaction)
|
|||
* each cell has material everywhere within its bounding box.
|
||||
*/
|
||||
|
||||
GEO_EXPAND(area, radius, &searchArea);
|
||||
intArea = GeoNullRect;
|
||||
|
||||
/* Copy drcSubLookArea to a local Rect structure because it
|
||||
* gets modified by drcSubcellFunc().
|
||||
*/
|
||||
|
||||
dsa.dsa_def = def;
|
||||
dsa.dsa_radius = radius;
|
||||
dsa.dsa_searchArea = &searchArea;
|
||||
dsa.dsa_intArea = &intArea;
|
||||
dsa.dsa_found = FALSE;
|
||||
dsa.dsa_dlu = (struct drcLinkedUse *)NULL;
|
||||
|
||||
(void) DBSrCellPlaneArea(def->cd_cellPlane, &searchArea,
|
||||
drcSubcellFunc, (ClientData)&dsa);
|
||||
|
||||
/* If no subcells were in the search area, there is nothing
|
||||
* more to do.
|
||||
*/
|
||||
if (dsa.dsa_found == FALSE) return -1;
|
||||
|
||||
/* If drcSubcellFunc() returned a list of uses, then check
|
||||
* the area of each use for interacting sibling uses, and
|
||||
* add the overlap to the potential interaction area.
|
||||
*/
|
||||
curDLU = dsa.dsa_dlu;
|
||||
while (curDLU != NULL)
|
||||
{
|
||||
Rect subIntArea, subSearchArea;
|
||||
struct drcLinkedUse *nextdlu = curDLU->dlu_next;
|
||||
|
||||
subSearchArea = curDLU->dlu_area;
|
||||
curDLU->dlu_area = GeoNullRect;
|
||||
|
||||
(void) DBSrCellPlaneArea(def->cd_cellPlane, &subSearchArea,
|
||||
drcFindOtherCells, (ClientData)curDLU);
|
||||
|
||||
/* Re-clip interaction area to subcell halo area */
|
||||
GEO_EXPAND(&curDLU->dlu_area, radius, &curDLU->dlu_area);
|
||||
GeoClip(&curDLU->dlu_area, &subSearchArea);
|
||||
(void) GeoInclude(&curDLU->dlu_area, &intArea);
|
||||
|
||||
/* Free entry and move to next entry in linked list */
|
||||
freeMagic((char *)curDLU);
|
||||
curDLU = nextdlu;
|
||||
}
|
||||
drcSubIntArea = GeoNullRect;
|
||||
GEO_EXPAND(area, radius, &drcSubLookArea);
|
||||
flags = 0;
|
||||
(void) DBSrCellPlaneArea(def->cd_cellPlane, &drcSubLookArea,
|
||||
drcSubcellFunc, (ClientData)(&flags));
|
||||
|
||||
/* If there seems to be an interaction area, make a second pass
|
||||
* to make sure there's more than one cell with paint in the
|
||||
|
|
@ -486,7 +438,8 @@ DRCFindInteractions(def, area, radius, interaction)
|
|||
* have overlapping bounding boxes without overlapping paint.
|
||||
*/
|
||||
|
||||
if (GEO_RECTNULL(&intArea)) return 0;
|
||||
if (!(flags & CELLFOUND_FLAG)) return -1;
|
||||
if (GEO_RECTNULL(&drcSubIntArea)) return 0;
|
||||
use = NULL;
|
||||
|
||||
/* If errors are being propagated up from child to parent, */
|
||||
|
|
@ -497,7 +450,7 @@ DRCFindInteractions(def, area, radius, interaction)
|
|||
for (i = PL_TECHDEPBASE; i < DBNumPlanes; i++)
|
||||
{
|
||||
if (DBSrPaintArea((Tile *) NULL, def->cd_planes[i],
|
||||
&intArea, &DBAllButSpaceBits, drcAlwaysOne,
|
||||
&drcSubIntArea, &DBAllButSpaceBits, drcAlwaysOne,
|
||||
(ClientData) NULL) != 0)
|
||||
{
|
||||
use = (CellUse *) -1;
|
||||
|
|
@ -506,14 +459,14 @@ DRCFindInteractions(def, area, radius, interaction)
|
|||
}
|
||||
scx.scx_use = DRCDummyUse;
|
||||
scx.scx_trans = GeoIdentityTransform;
|
||||
scx.scx_area = intArea;
|
||||
scx.scx_area = drcSubIntArea;
|
||||
if (DBTreeSrCells(&scx, 0, drcSubCheckPaint, (ClientData) &use) == 0)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* OK, no more excuses, there's really an interaction area here. */
|
||||
|
||||
*interaction = intArea;
|
||||
*interaction = drcSubIntArea;
|
||||
GeoClip(interaction, area);
|
||||
if (GEO_RECTNULL(interaction)) return 0;
|
||||
return 1;
|
||||
|
|
|
|||
|
|
@ -814,10 +814,7 @@ main(
|
|||
EFVisitDevs(simmergeVisit, PTR2CD(NULL));
|
||||
TxPrintf("Devices merged: %d\n", esDevsMerged);
|
||||
esFMIndex = 0;
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
for (p = devMergeList; p != NULL; p = p->next)
|
||||
freeMagic1(&mm1, (char *)p);
|
||||
freeMagic1_end(&mm1);
|
||||
for (p = devMergeList; p != NULL; p = p->next) freeMagic((char *)p);
|
||||
}
|
||||
|
||||
EFVisitDevs(simdevVisit, PTR2CD(NULL));
|
||||
|
|
|
|||
|
|
@ -378,7 +378,6 @@ spcHierWriteParams(
|
|||
else
|
||||
esSIvalue(esSpiceF, (dval + plist->parm_offset)
|
||||
* scale * esScale * 1.0E-6);
|
||||
/* Why is this here? */
|
||||
dparam->parm_name[0] = '\0';
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1345,12 +1345,9 @@ main(
|
|||
TxPrintf("Devs merged: %d\n", esSpiceDevsMerged);
|
||||
esFMIndex = 0 ;
|
||||
{
|
||||
const devMerge *p;
|
||||
const devMerge *p;
|
||||
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
for (p = devMergeList; p != NULL; p = p->next)
|
||||
freeMagic1(&mm1, (char *)p);
|
||||
freeMagic1_end(&mm1);
|
||||
for ( p = devMergeList ; p != NULL ; p=p->next ) freeMagic((char *)p);
|
||||
}
|
||||
} else if ( esDistrJunct )
|
||||
EFVisitDevs(devDistJunctVisit, (ClientData) NULL);
|
||||
|
|
|
|||
|
|
@ -603,57 +603,33 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice)
|
|||
}
|
||||
if (!equalByCase)
|
||||
{
|
||||
/* If one of the nodes has been generated from the
|
||||
* other by "extract unique", then this is a case where
|
||||
* the "extract unique" algorithm is blind to shorts
|
||||
* through subcell hierarchy and has made a name unique
|
||||
* unnecessarily. In that case, merge the node instead
|
||||
* of generating a short.
|
||||
*/
|
||||
char *uniqstr1, *uniqstr2;
|
||||
bool isuniq;
|
||||
|
||||
uniqstr1 = strstr(nodeName1, "_uq");
|
||||
uniqstr2 = strstr(nodeName2, "_uq");
|
||||
if (uniqstr1) *uniqstr1 = '\0';
|
||||
if (uniqstr2) *uniqstr2 = '\0';
|
||||
isuniq = !strcmp(nodeName1, nodeName2);
|
||||
if (uniqstr1) *uniqstr1 = '_';
|
||||
if (uniqstr2) *uniqstr2 = '_';
|
||||
|
||||
if (!isuniq)
|
||||
if ((EFOutputFlags & EF_SHORT_MASK) != EF_SHORT_NONE)
|
||||
{
|
||||
if ((EFOutputFlags & EF_SHORT_MASK) != EF_SHORT_NONE)
|
||||
{
|
||||
int i;
|
||||
int sdev;
|
||||
char *argv[10], zeroarg[] = "0";
|
||||
int i;
|
||||
int sdev;
|
||||
char *argv[10], zeroarg[] = "0";
|
||||
|
||||
if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_R)
|
||||
sdev = DEV_RES;
|
||||
else
|
||||
sdev = DEV_VOLT;
|
||||
|
||||
for (i = 0; i < 10; i++) argv[i] = zeroarg;
|
||||
argv[0] = StrDup((char **)NULL, "0.0");
|
||||
argv[1] = StrDup((char **)NULL, "dummy");
|
||||
argv[4] = StrDup((char **)NULL, nodeName1);
|
||||
argv[7] = StrDup((char **)NULL, nodeName2);
|
||||
efBuildDevice(def, sdev, "None", &GeoNullRect, 10, argv);
|
||||
freeMagic(argv[0]);
|
||||
freeMagic(argv[1]);
|
||||
freeMagic(argv[4]);
|
||||
freeMagic(argv[7]);
|
||||
return;
|
||||
}
|
||||
else if (!resist)
|
||||
TxError("Warning: Ports \"%s\" and \"%s\" are electrically "
|
||||
"shorted.\n", nodeName1, nodeName2);
|
||||
if ((EFOutputFlags & EF_SHORT_MASK) == EF_SHORT_R)
|
||||
sdev = DEV_RES;
|
||||
else
|
||||
/* Do not merge the nodes when folding in extresist parasitics */
|
||||
return;
|
||||
sdev = DEV_VOLT;
|
||||
|
||||
for (i = 0; i < 10; i++) argv[i] = zeroarg;
|
||||
argv[0] = StrDup((char **)NULL, "0.0");
|
||||
argv[1] = StrDup((char **)NULL, "dummy");
|
||||
argv[4] = StrDup((char **)NULL, nodeName1);
|
||||
argv[7] = StrDup((char **)NULL, nodeName2);
|
||||
efBuildDevice(def, sdev, "None", &GeoNullRect, 10, argv);
|
||||
freeMagic(argv[0]);
|
||||
freeMagic(argv[1]);
|
||||
freeMagic(argv[4]);
|
||||
freeMagic(argv[7]);
|
||||
return;
|
||||
}
|
||||
else if (resist)
|
||||
else if (!resist)
|
||||
TxError("Warning: Ports \"%s\" and \"%s\" are electrically shorted.\n",
|
||||
nodeName1, nodeName2);
|
||||
else
|
||||
/* Do not merge the nodes when folding in extresist parasitics */
|
||||
return;
|
||||
}
|
||||
|
|
@ -676,6 +652,8 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice)
|
|||
if (efWarn)
|
||||
efReadError("Merged nodes %s and %s\n", nodeName1, nodeName2);
|
||||
lostnode = efNodeMerge(&nn1->efnn_node, &nn2->efnn_node);
|
||||
if (nn1->efnn_port > 0) nn2->efnn_port = nn1->efnn_port;
|
||||
else if (nn2->efnn_port > 0) nn1->efnn_port = nn2->efnn_port;
|
||||
|
||||
/* Check if there are any device terminals pointing to the
|
||||
* node that was just removed.
|
||||
|
|
@ -926,22 +904,20 @@ efBuildDevice(
|
|||
/* Parse initial arguments for parameters */
|
||||
while ((pptr = strchr(argv[argstart], '=')) != NULL)
|
||||
{
|
||||
/* If the parameter is in the parameter list "devp", then save
|
||||
* the value as appropriate. If not, then the entire phrase
|
||||
* will be output verbatim, so just save the whole string.
|
||||
*
|
||||
* The "parameters" line comes before any "device" line in the
|
||||
* .ext file, so the "devp" list should be complete.
|
||||
*/
|
||||
// Check if this parameter is in the table.
|
||||
// If so, handle appropriately. Otherwise, the
|
||||
// parameter gets saved verbatim locally. The
|
||||
// "parameters" line comes before any "device" line
|
||||
// in the .ext file, so the table should be complete.
|
||||
|
||||
*pptr = '\0';
|
||||
for (sparm = devp; sparm; sparm = sparm->parm_next)
|
||||
if (!strncasecmp(sparm->parm_type, argv[argstart], 2))
|
||||
if (!strcasecmp(sparm->parm_type, argv[argstart]))
|
||||
break;
|
||||
*pptr = '=';
|
||||
if (sparm == NULL)
|
||||
{
|
||||
/* Copy the whole string into dev_params */
|
||||
/* Copy the parameter into dev_params */
|
||||
/* (parm_type and parm_scale records are not used) */
|
||||
newparm = (DevParam *)mallocMagic(sizeof(DevParam));
|
||||
newparm->parm_name = StrDup((char **)NULL, argv[argstart]);
|
||||
|
|
@ -956,59 +932,30 @@ efBuildDevice(
|
|||
{
|
||||
case 'a':
|
||||
if ((pptr - argv[argstart]) == 2)
|
||||
devtmp.dev_area = (int)(0.5 + (float)atoi(pptr)
|
||||
* locScale * locScale);
|
||||
devtmp.dev_area = atoi(pptr);
|
||||
else
|
||||
{
|
||||
/* Check for a0, a1, a2, ... If a0, handle like "a".
|
||||
* Otherwise, don't handle it here.
|
||||
*/
|
||||
pn = *(argv[argstart] + 1) - '0';
|
||||
if (pn == 0)
|
||||
devtmp.dev_area = (int)(0.5 + (float)atoi(pptr)
|
||||
* locScale * locScale);
|
||||
/* Otherwise, punt */
|
||||
}
|
||||
break;
|
||||
|
||||
case 'p':
|
||||
if ((pptr - argv[argstart]) == 2)
|
||||
devtmp.dev_perim = (int)(0.5 + (float)atoi(pptr) * locScale);
|
||||
devtmp.dev_perim = atoi(pptr);
|
||||
else
|
||||
{
|
||||
/* Check for p0, p1, p2, ... If p0, handle like "p".
|
||||
* Otherwise, don't handle it here.
|
||||
*/
|
||||
pn = *(argv[argstart] + 1) - '0';
|
||||
if (pn == 0)
|
||||
devtmp.dev_perim = (int)(0.5 + (float)atoi(pptr) * locScale);
|
||||
/* Otherwise, use verbatim */
|
||||
}
|
||||
break;
|
||||
|
||||
case 'l':
|
||||
if ((pptr - argv[argstart]) == 2)
|
||||
devtmp.dev_length = (int)(0.5 + (float)atoi(pptr) * locScale);
|
||||
else
|
||||
{
|
||||
/* Check for l0, l1, l2, ... If l0, handle like "l".
|
||||
* Otherwise, save it verbatim like an unknown parameter,
|
||||
* because its value will not be calculated from terminal
|
||||
* values like "a1, a2, ..." or "p1, p2, ...".
|
||||
*/
|
||||
|
||||
pn = *(argv[argstart] + 1) - '0';
|
||||
if (pn == 0)
|
||||
devtmp.dev_length = (int)(0.5 + (float)atoi(pptr) * locScale);
|
||||
else
|
||||
{
|
||||
/* Copy the whole string into dev_params */
|
||||
newparm = (DevParam *)mallocMagic(sizeof(DevParam));
|
||||
newparm->parm_name = StrDup((char **)NULL, argv[argstart]);
|
||||
newparm->parm_next = devtmp.dev_params;
|
||||
devtmp.dev_params = newparm;
|
||||
}
|
||||
}
|
||||
devtmp.dev_length = (int)(0.5 + (float)atoi(pptr) * locScale);
|
||||
break;
|
||||
|
||||
case 'w':
|
||||
devtmp.dev_width = (int)(0.5 + (float)atoi(pptr) * locScale);
|
||||
break;
|
||||
|
|
@ -1599,25 +1546,7 @@ efBuildConnect(def, nodeName1, nodeName2, deltaC, av, ac)
|
|||
unsigned size = sizeof (Connection)
|
||||
+ (efNumResistClasses - 1) * sizeof (EFPerimArea);
|
||||
|
||||
/* If one of the nodes has been generated from the
|
||||
* other by "extract unique", then this is a case where
|
||||
* the "extract unique" algorithm is blind to shorts
|
||||
* through subcell hierarchy and has made a name unique
|
||||
* unnecessarily. In that case, merge the node instead
|
||||
* of generating a short.
|
||||
*/
|
||||
char *uniqstr1, *uniqstr2;
|
||||
bool isuniq;
|
||||
|
||||
uniqstr1 = strstr(nodeName1, "_uq");
|
||||
uniqstr2 = strstr(nodeName2, "_uq");
|
||||
if (uniqstr1) *uniqstr1 = '\0';
|
||||
if (uniqstr2) *uniqstr2 = '\0';
|
||||
isuniq = !strcmp(nodeName1, nodeName2);
|
||||
if (uniqstr1) *uniqstr1 = '_';
|
||||
if (uniqstr2) *uniqstr2 = '_';
|
||||
|
||||
if (!isuniq && ((EFOutputFlags & EF_SHORT_MASK) != EF_SHORT_NONE))
|
||||
if ((EFOutputFlags & EF_SHORT_MASK) != EF_SHORT_NONE)
|
||||
{
|
||||
/* Handle the case where two ports on different nets get merged.
|
||||
* If "extract short resistor" or "extract short voltage" has
|
||||
|
|
@ -2020,10 +1949,8 @@ efNodeMerge(node1ptr, node2ptr)
|
|||
if (*node1ptr == *node2ptr)
|
||||
return NULL;
|
||||
|
||||
/*
|
||||
* Keep the node with the greater number of entries, and merge
|
||||
* the node with fewer entries into it.
|
||||
*/
|
||||
/* Keep the node with the greater number of entries, and merge */
|
||||
/* the node with fewer entries into it. */
|
||||
|
||||
if ((*node1ptr)->efnode_num >= (*node2ptr)->efnode_num)
|
||||
{
|
||||
|
|
@ -2063,7 +1990,7 @@ efNodeMerge(node1ptr, node2ptr)
|
|||
/* Make all EFNodeNames point to "keeping" */
|
||||
if (removing->efnode_name)
|
||||
{
|
||||
bool topportk, topportr, bestname;
|
||||
bool topportk, topportr;
|
||||
|
||||
for (nn = removing->efnode_name; nn; nn = nn->efnn_next)
|
||||
{
|
||||
|
|
@ -2075,9 +2002,9 @@ efNodeMerge(node1ptr, node2ptr)
|
|||
topportr = (removing->efnode_flags & EF_TOP_PORT) ? TRUE : FALSE;
|
||||
|
||||
/* Concatenate list of EFNodeNames, taking into account precedence */
|
||||
if ((!keeping->efnode_name) || (!topportk && topportr)
|
||||
if ((!keeping->efnode_name) || (!topportk && (topportr
|
||||
|| EFHNBest(removing->efnode_name->efnn_hier,
|
||||
keeping->efnode_name->efnn_hier))
|
||||
keeping->efnode_name->efnn_hier))))
|
||||
{
|
||||
/*
|
||||
* New official name is that of "removing".
|
||||
|
|
|
|||
|
|
@ -95,7 +95,6 @@ extOutputGeneratedLabels(parentUse, f)
|
|||
|
||||
parentDef = parentUse->cu_def;
|
||||
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
while ((lab = parentDef->cd_labels) != NULL)
|
||||
{
|
||||
if ((lab->lab_flags & LABEL_GENERATE) == 0) return;
|
||||
|
|
@ -107,10 +106,9 @@ extOutputGeneratedLabels(parentUse, f)
|
|||
for (n = 0; n < ExtCurStyle->exts_numResistClasses; n++)
|
||||
fprintf(f, " 0 0");
|
||||
putc('\n', f);
|
||||
freeMagic1(&mm1, lab);
|
||||
freeMagic(lab);
|
||||
parentDef->cd_labels = lab->lab_next;
|
||||
}
|
||||
freeMagic1_end(&mm1);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -2776,12 +2776,8 @@ extOutputDevices(def, transList, outFile)
|
|||
/* Free the lists */
|
||||
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
free_magic1_t mm1 = freeMagic1_init();
|
||||
for (lb = extSpecialBounds[i]; lb != NULL; lb = lb->b_next)
|
||||
freeMagic1(&mm1, (char *)lb);
|
||||
freeMagic1_end(&mm1);
|
||||
}
|
||||
freeMagic((char *)lb);
|
||||
freeMagic((char *)extSpecialBounds);
|
||||
|
||||
/* Put the region list back the way we found it: */
|
||||
|
|
|
|||
Loading…
Reference in New Issue