Merge branch 'master' into magic-8.2
This commit is contained in:
commit
eaf1ad4827
|
|
@ -1048,7 +1048,7 @@ calmaFindCell(name, was_called)
|
||||||
def = DBCellLookDef(name);
|
def = DBCellLookDef(name);
|
||||||
if (def == NULL)
|
if (def == NULL)
|
||||||
{
|
{
|
||||||
def = DBCellNewDef(name, (char *) NULL);
|
def = DBCellNewDef(name);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Tricky point: call DBReComputeBbox here to make SURE
|
* Tricky point: call DBReComputeBbox here to make SURE
|
||||||
|
|
|
||||||
|
|
@ -1416,7 +1416,7 @@ calmaGetContactCell(type, lookOnly)
|
||||||
def = DBCellLookDef(contactCellName);
|
def = DBCellLookDef(contactCellName);
|
||||||
if ((def == (CellDef *) NULL) && (lookOnly == FALSE))
|
if ((def == (CellDef *) NULL) && (lookOnly == FALSE))
|
||||||
{
|
{
|
||||||
def = DBCellNewDef(contactCellName, (char *) NULL);
|
def = DBCellNewDef(contactCellName);
|
||||||
def->cd_flags &= ~(CDMODIFIED|CDGETNEWSTAMP);
|
def->cd_flags &= ~(CDMODIFIED|CDGETNEWSTAMP);
|
||||||
def->cd_flags |= CDAVAILABLE;
|
def->cd_flags |= CDAVAILABLE;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -112,7 +112,7 @@ CIFInitCells()
|
||||||
CIFTotalDef = DBCellLookDef("__CIF__");
|
CIFTotalDef = DBCellLookDef("__CIF__");
|
||||||
if (CIFTotalDef == (CellDef *) NULL)
|
if (CIFTotalDef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
CIFTotalDef = DBCellNewDef ("__CIF__",(char *) NULL);
|
CIFTotalDef = DBCellNewDef("__CIF__");
|
||||||
ASSERT(CIFTotalDef != (CellDef *) NULL, "cifMakeCell");
|
ASSERT(CIFTotalDef != (CellDef *) NULL, "cifMakeCell");
|
||||||
DBCellSetAvail(CIFTotalDef);
|
DBCellSetAvail(CIFTotalDef);
|
||||||
CIFTotalDef->cd_flags |= CDINTERNAL;
|
CIFTotalDef->cd_flags |= CDINTERNAL;
|
||||||
|
|
@ -124,7 +124,7 @@ CIFInitCells()
|
||||||
CIFComponentDef = DBCellLookDef("__CIF2__");
|
CIFComponentDef = DBCellLookDef("__CIF2__");
|
||||||
if (CIFComponentDef == (CellDef *) NULL)
|
if (CIFComponentDef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
CIFComponentDef = DBCellNewDef ("__CIF2__",(char *) NULL);
|
CIFComponentDef = DBCellNewDef("__CIF2__");
|
||||||
ASSERT(CIFComponentDef != (CellDef *) NULL, "cifMakeCell");
|
ASSERT(CIFComponentDef != (CellDef *) NULL, "cifMakeCell");
|
||||||
DBCellSetAvail(CIFComponentDef);
|
DBCellSetAvail(CIFComponentDef);
|
||||||
CIFComponentDef->cd_flags |= CDINTERNAL;
|
CIFComponentDef->cd_flags |= CDINTERNAL;
|
||||||
|
|
|
||||||
|
|
@ -273,7 +273,7 @@ cifFindCell(cifNum)
|
||||||
def = DBCellLookDef(name);
|
def = DBCellLookDef(name);
|
||||||
if (def == NULL)
|
if (def == NULL)
|
||||||
{
|
{
|
||||||
def = DBCellNewDef(name, (char *) NULL);
|
def = DBCellNewDef(name);
|
||||||
|
|
||||||
/* Tricky point: call DBReComputeBbox here to make SURE
|
/* Tricky point: call DBReComputeBbox here to make SURE
|
||||||
* that the cell has a valid bounding box. Otherwise,
|
* that the cell has a valid bounding box. Otherwise,
|
||||||
|
|
|
||||||
|
|
@ -896,14 +896,12 @@ CmdCellname(w, cmd)
|
||||||
{
|
{
|
||||||
char *fullpath;
|
char *fullpath;
|
||||||
fullpath = (char *)mallocMagic(strlen(filepath) +
|
fullpath = (char *)mallocMagic(strlen(filepath) +
|
||||||
strlen(cellDef->cd_name) + 6);
|
strlen(cellDef->cd_name) + 2);
|
||||||
sprintf(fullpath, "%s/%s.mag", filepath, cellDef->cd_name);
|
sprintf(fullpath, "%s/%s", filepath, cellDef->cd_name);
|
||||||
|
|
||||||
if (cellDef->cd_file != NULL)
|
if (cellDef->cd_file != NULL)
|
||||||
{
|
|
||||||
freeMagic(cellDef->cd_file);
|
freeMagic(cellDef->cd_file);
|
||||||
cellDef->cd_file = NULL;
|
|
||||||
}
|
|
||||||
cellDef->cd_file = fullpath;
|
cellDef->cd_file = fullpath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -945,7 +943,7 @@ CmdCellname(w, cmd)
|
||||||
newDef = DBCellLookDef(cellname);
|
newDef = DBCellLookDef(cellname);
|
||||||
if (newDef == (CellDef *) NULL)
|
if (newDef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
newDef = DBCellNewDef(cellname, (char *) NULL);
|
newDef = DBCellNewDef(cellname);
|
||||||
DBCellSetAvail(newDef);
|
DBCellSetAvail(newDef);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -1442,7 +1440,7 @@ CmdCif(w, cmd)
|
||||||
paintDef = DBCellLookDef(argv[4]);
|
paintDef = DBCellLookDef(argv[4]);
|
||||||
if (paintDef == (CellDef *)NULL)
|
if (paintDef == (CellDef *)NULL)
|
||||||
{
|
{
|
||||||
paintDef = DBCellNewDef(argv[4], (char *)NULL);
|
paintDef = DBCellNewDef(argv[4]);
|
||||||
DBCellSetAvail(paintDef);
|
DBCellSetAvail(paintDef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -3699,8 +3697,7 @@ cmdDumpParseArgs(cmdName, w, cmd, dummy, scx)
|
||||||
if ((cellnameptr = strrchr(cmd->tx_argv[1], '/')) != NULL)
|
if ((cellnameptr = strrchr(cmd->tx_argv[1], '/')) != NULL)
|
||||||
{
|
{
|
||||||
cellnameptr++;
|
cellnameptr++;
|
||||||
/* Allocate extra space for cellname in case it needs an extension */
|
fullpathname = (char *)mallocMagic(strlen(cmd->tx_argv[1]) + 2);
|
||||||
fullpathname = (char *)mallocMagic(strlen(cmd->tx_argv[1]) + 10);
|
|
||||||
strcpy(fullpathname, cmd->tx_argv[1]);
|
strcpy(fullpathname, cmd->tx_argv[1]);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -3723,7 +3720,7 @@ cmdDumpParseArgs(cmdName, w, cmd, dummy, scx)
|
||||||
|
|
||||||
def = DBCellLookDef(cellnameptr);
|
def = DBCellLookDef(cellnameptr);
|
||||||
if (def == (CellDef *) NULL)
|
if (def == (CellDef *) NULL)
|
||||||
def = DBCellNewDef(cellnameptr, (char *) NULL);
|
def = DBCellNewDef(cellnameptr);
|
||||||
|
|
||||||
if (fullpathname != NULL)
|
if (fullpathname != NULL)
|
||||||
{
|
{
|
||||||
|
|
@ -3749,7 +3746,7 @@ cmdDumpParseArgs(cmdName, w, cmd, dummy, scx)
|
||||||
uniqchar++;
|
uniqchar++;
|
||||||
}
|
}
|
||||||
TxError("Renaming cell to \"%s\" to avoid conflict.", newcellname);
|
TxError("Renaming cell to \"%s\" to avoid conflict.", newcellname);
|
||||||
def = DBCellNewDef(cellnameptr, (char *)NULL);
|
def = DBCellNewDef(cellnameptr);
|
||||||
def->cd_file = StrDup(&def->cd_file, fullpathname);
|
def->cd_file = StrDup(&def->cd_file, fullpathname);
|
||||||
freeMagic(newcellname);
|
freeMagic(newcellname);
|
||||||
}
|
}
|
||||||
|
|
@ -3777,7 +3774,7 @@ cmdDumpParseArgs(cmdName, w, cmd, dummy, scx)
|
||||||
dummy->cu_expandMask = CU_DESCEND_SPECIAL;
|
dummy->cu_expandMask = CU_DESCEND_SPECIAL;
|
||||||
if (DBIsAncestor(def, EditCellUse->cu_def))
|
if (DBIsAncestor(def, EditCellUse->cu_def))
|
||||||
{
|
{
|
||||||
TxError("The edit cell is already a desecendant of \"%s\",\n",
|
TxError("The edit cell is already a descendant of \"%s\",\n",
|
||||||
cmd->tx_argv[1]);
|
cmd->tx_argv[1]);
|
||||||
TxError(" which means that you're trying to create a circular\n");
|
TxError(" which means that you're trying to create a circular\n");
|
||||||
TxError(" structure. This isn't legal.\n");
|
TxError(" structure. This isn't legal.\n");
|
||||||
|
|
|
||||||
|
|
@ -878,7 +878,8 @@ cmdExpandFunc(use, windowMask)
|
||||||
#define DOCAPACITANCE 2
|
#define DOCAPACITANCE 2
|
||||||
#define DOCOUPLING 3
|
#define DOCOUPLING 3
|
||||||
#define DOLENGTH 4
|
#define DOLENGTH 4
|
||||||
#define DORESISTANCE 5
|
#define DOLOCAL 5
|
||||||
|
#define DORESISTANCE 6
|
||||||
|
|
||||||
#define LENCLEAR 0
|
#define LENCLEAR 0
|
||||||
#define LENDRIVER 1
|
#define LENDRIVER 1
|
||||||
|
|
@ -900,6 +901,7 @@ CmdExtract(w, cmd)
|
||||||
CellDef *selectedDef;
|
CellDef *selectedDef;
|
||||||
bool dolist = FALSE;
|
bool dolist = FALSE;
|
||||||
bool doforall = FALSE;
|
bool doforall = FALSE;
|
||||||
|
bool doLocal = FALSE;
|
||||||
int argc = cmd->tx_argc;
|
int argc = cmd->tx_argc;
|
||||||
char **argv = cmd->tx_argv;
|
char **argv = cmd->tx_argv;
|
||||||
|
|
||||||
|
|
@ -918,6 +920,7 @@ CmdExtract(w, cmd)
|
||||||
"capacitance extract substrate capacitance",
|
"capacitance extract substrate capacitance",
|
||||||
"coupling extract coupling capacitance",
|
"coupling extract coupling capacitance",
|
||||||
"length compute driver-receiver pathlengths",
|
"length compute driver-receiver pathlengths",
|
||||||
|
"local put all generated files in the current directory",
|
||||||
"resistance estimate resistance",
|
"resistance estimate resistance",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
@ -1136,6 +1139,7 @@ CmdExtract(w, cmd)
|
||||||
TxPrintf("%s capacitance\n", OPTSET(EXT_DOCAPACITANCE));
|
TxPrintf("%s capacitance\n", OPTSET(EXT_DOCAPACITANCE));
|
||||||
TxPrintf("%s coupling\n", OPTSET(EXT_DOCOUPLING));
|
TxPrintf("%s coupling\n", OPTSET(EXT_DOCOUPLING));
|
||||||
TxPrintf("%s length\n", OPTSET(EXT_DOLENGTH));
|
TxPrintf("%s length\n", OPTSET(EXT_DOLENGTH));
|
||||||
|
TxPrintf("%s local\n", OPTSET(EXT_DOLOCAL));
|
||||||
TxPrintf("%s resistance\n", OPTSET(EXT_DORESISTANCE));
|
TxPrintf("%s resistance\n", OPTSET(EXT_DORESISTANCE));
|
||||||
return;
|
return;
|
||||||
#undef OPTSET
|
#undef OPTSET
|
||||||
|
|
@ -1163,6 +1167,7 @@ CmdExtract(w, cmd)
|
||||||
case DOCAPACITANCE: option = EXT_DOCAPACITANCE; break;
|
case DOCAPACITANCE: option = EXT_DOCAPACITANCE; break;
|
||||||
case DOCOUPLING: option = EXT_DOCOUPLING; break;
|
case DOCOUPLING: option = EXT_DOCOUPLING; break;
|
||||||
case DOLENGTH: option = EXT_DOLENGTH; break;
|
case DOLENGTH: option = EXT_DOLENGTH; break;
|
||||||
|
case DOLOCAL: option = EXT_DOLOCAL; break;
|
||||||
case DORESISTANCE: option = EXT_DORESISTANCE; break;
|
case DORESISTANCE: option = EXT_DORESISTANCE; break;
|
||||||
}
|
}
|
||||||
if (no) ExtOptions &= ~option;
|
if (no) ExtOptions &= ~option;
|
||||||
|
|
|
||||||
|
|
@ -1943,7 +1943,7 @@ CmdFlatten(w, cmd)
|
||||||
TxError("%s already exists\n",destname);
|
TxError("%s already exists\n",destname);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
newdef = DBCellNewDef(destname, (char *) NULL);
|
newdef = DBCellNewDef(destname);
|
||||||
ASSERT(newdef, "CmdFlatten");
|
ASSERT(newdef, "CmdFlatten");
|
||||||
DBCellSetAvail(newdef);
|
DBCellSetAvail(newdef);
|
||||||
newuse = DBCellNewUse(newdef, (char *) NULL);
|
newuse = DBCellNewUse(newdef, (char *) NULL);
|
||||||
|
|
|
||||||
|
|
@ -665,7 +665,7 @@ cmdSaveCell(cellDef, newName, noninteractive, tryRename)
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (fileName != newName)
|
if ((fileName != newName) && (fileName != cellDef->cd_name))
|
||||||
freeMagic(fileName);
|
freeMagic(fileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1245,14 +1245,12 @@ DBCellLookDef(cellName)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
CellDef *
|
CellDef *
|
||||||
DBCellNewDef(cellName, cellFileName)
|
DBCellNewDef(cellName)
|
||||||
char *cellName; /* Name by which the cell is known */
|
char *cellName; /* Name by which the cell is known */
|
||||||
char *cellFileName; /* Name of disk file in which the cell
|
|
||||||
* should be kept when written out.
|
|
||||||
*/
|
|
||||||
{
|
{
|
||||||
CellDef *cellDef;
|
CellDef *cellDef;
|
||||||
HashEntry *entry;
|
HashEntry *entry;
|
||||||
|
char *dotptr;
|
||||||
|
|
||||||
if (cellName == (char *) NULL)
|
if (cellName == (char *) NULL)
|
||||||
cellName = UNNAMED;
|
cellName = UNNAMED;
|
||||||
|
|
@ -1264,10 +1262,12 @@ DBCellNewDef(cellName, cellFileName)
|
||||||
cellDef = DBCellDefAlloc();
|
cellDef = DBCellDefAlloc();
|
||||||
HashSetValue(entry, (ClientData) cellDef);
|
HashSetValue(entry, (ClientData) cellDef);
|
||||||
cellDef->cd_name = StrDup((char **) NULL, cellName);
|
cellDef->cd_name = StrDup((char **) NULL, cellName);
|
||||||
if (cellFileName == (char *) NULL)
|
|
||||||
cellDef->cd_file = cellFileName;
|
/* Strip any .mag extension off of the cell name */
|
||||||
else
|
dotptr = strrchr(cellDef->cd_name, '.');
|
||||||
cellDef->cd_file = StrDup((char **) NULL, cellFileName);
|
if (dotptr && !strcmp(dotptr, ".mag")) *dotptr = '\0';
|
||||||
|
|
||||||
|
cellDef->cd_file = NULL;
|
||||||
return (cellDef);
|
return (cellDef);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -2081,7 +2081,7 @@ DBNewYank(yname, pyuse, pydef)
|
||||||
*pydef = DBCellLookDef(yname);
|
*pydef = DBCellLookDef(yname);
|
||||||
if (*pydef == (CellDef *) NULL)
|
if (*pydef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
*pydef = DBCellNewDef (yname,(char *) NULL);
|
*pydef = DBCellNewDef(yname);
|
||||||
ASSERT(*pydef != (CellDef *) NULL, "DBNewYank");
|
ASSERT(*pydef != (CellDef *) NULL, "DBNewYank");
|
||||||
DBCellSetAvail(*pydef);
|
DBCellSetAvail(*pydef);
|
||||||
(*pydef)->cd_flags |= CDINTERNAL;
|
(*pydef)->cd_flags |= CDINTERNAL;
|
||||||
|
|
|
||||||
|
|
@ -859,7 +859,7 @@ DBReadBackup(name)
|
||||||
|
|
||||||
cellDef = DBCellLookDef(rootname);
|
cellDef = DBCellLookDef(rootname);
|
||||||
if (cellDef == (CellDef *)NULL)
|
if (cellDef == (CellDef *)NULL)
|
||||||
cellDef = DBCellNewDef(rootname, (char *)NULL);
|
cellDef = DBCellNewDef(rootname);
|
||||||
|
|
||||||
cellDef->cd_flags &= ~CDNOTFOUND;
|
cellDef->cd_flags &= ~CDNOTFOUND;
|
||||||
cellDef->cd_flags |= CDAVAILABLE;
|
cellDef->cd_flags |= CDAVAILABLE;
|
||||||
|
|
@ -1054,23 +1054,22 @@ dbReadOpen(cellDef, name, setFileName, errptr)
|
||||||
|
|
||||||
if (f != NULL)
|
if (f != NULL)
|
||||||
{
|
{
|
||||||
if (pptr != NULL) *pptr = '.';
|
|
||||||
|
|
||||||
/* NOTE: May not want to present this as an error, as */
|
/* NOTE: May not want to present this as an error, as */
|
||||||
/* it is a common technique to read files from, say, a */
|
/* it is a common technique to read files from, say, a */
|
||||||
/* LEF file but not save them locally, and then expect */
|
/* LEF file but not save them locally, and then expect */
|
||||||
/* that the layout views will be picked up from */
|
/* that the layout views will be picked up from */
|
||||||
/* somewhere else in the search paths. */
|
/* somewhere else in the search paths. */
|
||||||
|
|
||||||
|
if (pptr != NULL) *pptr = '.';
|
||||||
TxError("Warning: Parent cell lists instance of \"%s\" at bad file "
|
TxError("Warning: Parent cell lists instance of \"%s\" at bad file "
|
||||||
"path %s.\n", cellDef->cd_name, cellDef->cd_file);
|
"path %s.\n", cellDef->cd_name, cellDef->cd_file);
|
||||||
TxError("The cell exists in the search paths at %s.\n", filename);
|
|
||||||
TxError("The discovered version will be used.\n");
|
|
||||||
|
|
||||||
/* Write the new path to cd_file or else magic will */
|
/* Write the new path to cd_file or else magic will */
|
||||||
/* generate another error later. */
|
/* generate another error later. */
|
||||||
|
|
||||||
cellDef->cd_file = StrDup(&cellDef->cd_file, filename);
|
cellDef->cd_file = StrDup(&cellDef->cd_file, filename);
|
||||||
|
|
||||||
|
TxError("The cell exists in the search paths at %s.\n", filename);
|
||||||
|
TxError("The discovered version will be used.\n");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1353,7 +1352,7 @@ badTransform:
|
||||||
subCellDef = DBCellLookDef(cellname);
|
subCellDef = DBCellLookDef(cellname);
|
||||||
if (subCellDef == (CellDef *) NULL)
|
if (subCellDef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
subCellDef = DBCellNewDef(cellname, (char *)NULL);
|
subCellDef = DBCellNewDef(cellname);
|
||||||
subCellDef->cd_timestamp = childStamp;
|
subCellDef->cd_timestamp = childStamp;
|
||||||
|
|
||||||
/* Make sure rectangle is non-degenerate */
|
/* Make sure rectangle is non-degenerate */
|
||||||
|
|
@ -2722,29 +2721,25 @@ DBCellWrite(cellDef, fileName)
|
||||||
/*
|
/*
|
||||||
* Figure out the name of the file we will eventually write.
|
* Figure out the name of the file we will eventually write.
|
||||||
*/
|
*/
|
||||||
if (fileName)
|
if (!fileName)
|
||||||
{
|
{
|
||||||
realname = (char *) mallocMagic(strlen(fileName) + strlen(DBSuffix) + 1);
|
if (cellDef->cd_file)
|
||||||
(void) sprintf(realname, "%s%s", fileName, DBSuffix);
|
fileName = cellDef->cd_file;
|
||||||
|
else if (cellDef->cd_name)
|
||||||
|
fileName = cellDef->cd_name;
|
||||||
|
else
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
/* Bug fix: 7/17/99, Michael D. Godfrey: Forces */
|
/* Bug fix: 7/17/99, Michael D. Godfrey: Forces */
|
||||||
/* cd_name and cd_file to ALWAYS be the same, otherwise ugly */
|
/* cd_name and cd_file to ALWAYS be the same, otherwise ugly */
|
||||||
/* surprises can occur after saving a file as a different */
|
/* surprises can occur after saving a file as a different */
|
||||||
/* filename. */
|
/* filename. */
|
||||||
|
|
||||||
cellDef->cd_file = StrDup(&cellDef->cd_file, realname);
|
cellDef->cd_file = StrDup(&cellDef->cd_file, fileName);
|
||||||
}
|
|
||||||
else if (cellDef->cd_file)
|
realname = (char *) mallocMagic(strlen(fileName) + strlen(DBSuffix) + 1);
|
||||||
{
|
(void) sprintf(realname, "%s%s", fileName, DBSuffix);
|
||||||
realname = StrDup((char **) NULL, cellDef->cd_file);
|
|
||||||
}
|
|
||||||
else if (cellDef->cd_name)
|
|
||||||
{
|
|
||||||
realname = (char *) mallocMagic((unsigned) (strlen(cellDef->cd_name)
|
|
||||||
+ strlen(DBSuffix) + 1));
|
|
||||||
(void) sprintf(realname, "%s%s", cellDef->cd_name, DBSuffix);
|
|
||||||
}
|
|
||||||
else return (FALSE);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Expand the filename, removing the leading ~, if any.
|
* Expand the filename, removing the leading ~, if any.
|
||||||
|
|
|
||||||
|
|
@ -328,7 +328,7 @@ DBWloadWindow(window, name, ignoreTech, expand, dereference)
|
||||||
newEditDef = DBCellLookDef(UNNAMED);
|
newEditDef = DBCellLookDef(UNNAMED);
|
||||||
if (newEditDef == (CellDef *) NULL)
|
if (newEditDef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
newEditDef = DBCellNewDef(UNNAMED, (char *) NULL);
|
newEditDef = DBCellNewDef(UNNAMED);
|
||||||
DBCellSetAvail(newEditDef);
|
DBCellSetAvail(newEditDef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -397,7 +397,7 @@ DBWloadWindow(window, name, ignoreTech, expand, dereference)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (newEditDef == (CellDef *) NULL)
|
if (newEditDef == (CellDef *) NULL)
|
||||||
newEditDef = DBCellNewDef(rootname, (char *) NULL);
|
newEditDef = DBCellNewDef(rootname);
|
||||||
|
|
||||||
if (dereference) newEditDef->cd_flags |= CDDEREFERENCE;
|
if (dereference) newEditDef->cd_flags |= CDDEREFERENCE;
|
||||||
|
|
||||||
|
|
@ -431,7 +431,7 @@ DBWloadWindow(window, name, ignoreTech, expand, dereference)
|
||||||
newEditDef = DBCellLookDef(UNNAMED);
|
newEditDef = DBCellLookDef(UNNAMED);
|
||||||
if (newEditDef == (CellDef *) NULL)
|
if (newEditDef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
newEditDef = DBCellNewDef(UNNAMED, (char *) NULL);
|
newEditDef = DBCellNewDef(UNNAMED);
|
||||||
DBCellSetAvail(newEditDef);
|
DBCellSetAvail(newEditDef);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -345,7 +345,7 @@ DRCInit()
|
||||||
DRCdef = DBCellLookDef(DRCYANK);
|
DRCdef = DBCellLookDef(DRCYANK);
|
||||||
if (DRCdef == (CellDef *) NULL)
|
if (DRCdef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
DRCdef = DBCellNewDef (DRCYANK,(char *) NULL);
|
DRCdef = DBCellNewDef(DRCYANK);
|
||||||
ASSERT(DRCdef != (CellDef *) NULL, "DRCInit");
|
ASSERT(DRCdef != (CellDef *) NULL, "DRCInit");
|
||||||
DBCellSetAvail(DRCdef);
|
DBCellSetAvail(DRCdef);
|
||||||
DRCdef->cd_flags |= CDINTERNAL;
|
DRCdef->cd_flags |= CDINTERNAL;
|
||||||
|
|
|
||||||
|
|
@ -95,8 +95,11 @@ ExtCell(def, outName, doLength)
|
||||||
{
|
{
|
||||||
char *filename;
|
char *filename;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
|
bool doLocal;
|
||||||
|
|
||||||
f = extFileOpen(def, outName, "w", &filename);
|
doLocal = (ExtOptions & EXT_DOLOCAL) ? TRUE : FALSE;
|
||||||
|
|
||||||
|
f = extFileOpen(def, outName, "w", doLocal, &filename);
|
||||||
|
|
||||||
TxPrintf("Extracting %s into %s:\n", def->cd_name, filename);
|
TxPrintf("Extracting %s into %s:\n", def->cd_name, filename);
|
||||||
|
|
||||||
|
|
@ -149,7 +152,7 @@ ExtCell(def, outName, doLength)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
FILE *
|
FILE *
|
||||||
extFileOpen(def, file, mode, prealfile)
|
extFileOpen(def, file, mode, doLocal, prealfile)
|
||||||
CellDef *def; /* Cell whose .ext file is to be written */
|
CellDef *def; /* Cell whose .ext file is to be written */
|
||||||
char *file; /* If non-NULL, open 'name'.ext; otherwise,
|
char *file; /* If non-NULL, open 'name'.ext; otherwise,
|
||||||
* derive filename from 'def' as described
|
* derive filename from 'def' as described
|
||||||
|
|
@ -158,6 +161,7 @@ extFileOpen(def, file, mode, prealfile)
|
||||||
char *mode; /* Either "r" or "w", the mode in which the .ext
|
char *mode; /* Either "r" or "w", the mode in which the .ext
|
||||||
* file is to be opened.
|
* file is to be opened.
|
||||||
*/
|
*/
|
||||||
|
bool doLocal; /* If true, always write to local directory */
|
||||||
char **prealfile; /* If this is non-NULL, it gets set to point to
|
char **prealfile; /* If this is non-NULL, it gets set to point to
|
||||||
* a string holding the name of the .ext file.
|
* a string holding the name of the .ext file.
|
||||||
*/
|
*/
|
||||||
|
|
@ -167,6 +171,8 @@ extFileOpen(def, file, mode, prealfile)
|
||||||
FILE *rfile, *testf;
|
FILE *rfile, *testf;
|
||||||
|
|
||||||
if (file) name = file;
|
if (file) name = file;
|
||||||
|
else if (doLocal)
|
||||||
|
name = def->cd_name; /* No path component, so save locally */
|
||||||
else if (def->cd_file)
|
else if (def->cd_file)
|
||||||
{
|
{
|
||||||
name = def->cd_file;
|
name = def->cd_file;
|
||||||
|
|
|
||||||
|
|
@ -632,7 +632,6 @@ closeit:
|
||||||
void
|
void
|
||||||
extExtractStack(stack, doExtract, rootDef)
|
extExtractStack(stack, doExtract, rootDef)
|
||||||
Stack *stack;
|
Stack *stack;
|
||||||
bool doExtract;
|
|
||||||
CellDef *rootDef;
|
CellDef *rootDef;
|
||||||
{
|
{
|
||||||
int fatal = 0, warnings = 0;
|
int fatal = 0, warnings = 0;
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,7 @@ extern char *extDevTable[];
|
||||||
#define EXT_DORESISTANCE 0x08 /* Extract resistance */
|
#define EXT_DORESISTANCE 0x08 /* Extract resistance */
|
||||||
#define EXT_DOLENGTH 0x10 /* Extract pathlengths */
|
#define EXT_DOLENGTH 0x10 /* Extract pathlengths */
|
||||||
#define EXT_DOALL 0x1f /* ALL OF THE ABOVE */
|
#define EXT_DOALL 0x1f /* ALL OF THE ABOVE */
|
||||||
|
#define EXT_DOLOCAL 0x20 /* Write to local directory only */
|
||||||
|
|
||||||
extern int ExtOptions; /* Bitmask of above */
|
extern int ExtOptions; /* Bitmask of above */
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1220,6 +1220,9 @@ DefReadVias(f, sname, oscale, total)
|
||||||
|
|
||||||
LefEstimate(processed++, total, "vias");
|
LefEstimate(processed++, total, "vias");
|
||||||
|
|
||||||
|
/* If not otherwise specified, rows and columns default to 1 */
|
||||||
|
rows = cols = 1;
|
||||||
|
|
||||||
/* Get via name */
|
/* Get via name */
|
||||||
token = LefNextToken(f, TRUE);
|
token = LefNextToken(f, TRUE);
|
||||||
if (sscanf(token, "%2047s", vianame) != 1)
|
if (sscanf(token, "%2047s", vianame) != 1)
|
||||||
|
|
@ -1538,7 +1541,7 @@ DefReadComponents(f, rootDef, sname, oscale, total)
|
||||||
|
|
||||||
/* Before giving up, assume that this cell has a */
|
/* Before giving up, assume that this cell has a */
|
||||||
/* magic .mag layout file. */
|
/* magic .mag layout file. */
|
||||||
defMacro = DBCellNewDef(token, (char *)NULL);
|
defMacro = DBCellNewDef(token);
|
||||||
defMacro->cd_flags &= ~CDNOTFOUND;
|
defMacro->cd_flags &= ~CDNOTFOUND;
|
||||||
dereference = (defMacro->cd_flags & CDDEREFERENCE) ? TRUE : FALSE;
|
dereference = (defMacro->cd_flags & CDDEREFERENCE) ? TRUE : FALSE;
|
||||||
if (!DBCellRead(defMacro, (char *)NULL, TRUE, dereference, NULL))
|
if (!DBCellRead(defMacro, (char *)NULL, TRUE, dereference, NULL))
|
||||||
|
|
|
||||||
|
|
@ -572,7 +572,7 @@ lefFindCell(name)
|
||||||
def = DBCellLookDef(name);
|
def = DBCellLookDef(name);
|
||||||
if (def == NULL)
|
if (def == NULL)
|
||||||
{
|
{
|
||||||
def = DBCellNewDef(name, (char *)NULL);
|
def = DBCellNewDef(name);
|
||||||
DBReComputeBbox(def);
|
DBReComputeBbox(def);
|
||||||
}
|
}
|
||||||
HashSetValue(h, def);
|
HashSetValue(h, def);
|
||||||
|
|
|
||||||
|
|
@ -675,7 +675,7 @@ lefWriteMacro(def, f, scale, hide)
|
||||||
|
|
||||||
lefFlatDef = DBCellLookDef("__lefFlat__");
|
lefFlatDef = DBCellLookDef("__lefFlat__");
|
||||||
if (lefFlatDef == (CellDef *)NULL)
|
if (lefFlatDef == (CellDef *)NULL)
|
||||||
lefFlatDef = DBCellNewDef("__lefFlat__", (char *)NULL);
|
lefFlatDef = DBCellNewDef("__lefFlat__");
|
||||||
DBCellSetAvail(lefFlatDef);
|
DBCellSetAvail(lefFlatDef);
|
||||||
lefFlatDef->cd_flags |= CDINTERNAL;
|
lefFlatDef->cd_flags |= CDINTERNAL;
|
||||||
|
|
||||||
|
|
@ -828,7 +828,7 @@ lefWriteMacro(def, f, scale, hide)
|
||||||
|
|
||||||
lc.lefYank = DBCellLookDef("__lefYank__");
|
lc.lefYank = DBCellLookDef("__lefYank__");
|
||||||
if (lc.lefYank == (CellDef *)NULL)
|
if (lc.lefYank == (CellDef *)NULL)
|
||||||
lc.lefYank = DBCellNewDef("__lefYank__", (char *)NULL);
|
lc.lefYank = DBCellNewDef("__lefYank__");
|
||||||
|
|
||||||
DBCellSetAvail(lc.lefYank);
|
DBCellSetAvail(lc.lefYank);
|
||||||
lc.lefYank->cd_flags |= CDINTERNAL;
|
lc.lefYank->cd_flags |= CDINTERNAL;
|
||||||
|
|
|
||||||
|
|
@ -235,7 +235,7 @@ nmGetShowCell()
|
||||||
nmscShowDef = DBCellLookDef("__SHOW__");
|
nmscShowDef = DBCellLookDef("__SHOW__");
|
||||||
if (nmscShowDef == NULL)
|
if (nmscShowDef == NULL)
|
||||||
{
|
{
|
||||||
nmscShowDef = DBCellNewDef("__SHOW__", (char *) NULL);
|
nmscShowDef = DBCellNewDef("__SHOW__");
|
||||||
ASSERT (nmscShowDef != (CellDef *) NULL, "nmGetShowCell");
|
ASSERT (nmscShowDef != (CellDef *) NULL, "nmGetShowCell");
|
||||||
DBCellSetAvail(nmscShowDef);
|
DBCellSetAvail(nmscShowDef);
|
||||||
nmscShowDef->cd_flags |= CDINTERNAL;
|
nmscShowDef->cd_flags |= CDINTERNAL;
|
||||||
|
|
|
||||||
|
|
@ -113,7 +113,7 @@ ResGetReCell()
|
||||||
ResDef = DBCellLookDef("__RESIS__");
|
ResDef = DBCellLookDef("__RESIS__");
|
||||||
if (ResDef == NULL)
|
if (ResDef == NULL)
|
||||||
{
|
{
|
||||||
ResDef = DBCellNewDef("__RESIS__", (char *) NULL);
|
ResDef = DBCellNewDef("__RESIS__");
|
||||||
ASSERT (ResDef != (CellDef *) NULL, "ResGetReCell");
|
ASSERT (ResDef != (CellDef *) NULL, "ResGetReCell");
|
||||||
DBCellSetAvail(ResDef);
|
DBCellSetAvail(ResDef);
|
||||||
ResDef->cd_flags |= CDINTERNAL;
|
ResDef->cd_flags |= CDINTERNAL;
|
||||||
|
|
|
||||||
|
|
@ -271,7 +271,7 @@ RtrFindChannelDef()
|
||||||
/* Create our target cell */
|
/* Create our target cell */
|
||||||
if ((def = DBCellLookDef("__CHANNEL__")) == (CellDef *) NULL)
|
if ((def = DBCellLookDef("__CHANNEL__")) == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
def = DBCellNewDef("__CHANNEL__", (char *) NULL);
|
def = DBCellNewDef("__CHANNEL__");
|
||||||
DBCellSetAvail(def);
|
DBCellSetAvail(def);
|
||||||
def->cd_flags |= CDINTERNAL;
|
def->cd_flags |= CDINTERNAL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ SelectInit()
|
||||||
SelectDef = DBCellLookDef("__SELECT__");
|
SelectDef = DBCellLookDef("__SELECT__");
|
||||||
if (SelectDef == (CellDef *) NULL)
|
if (SelectDef == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
SelectDef = DBCellNewDef("__SELECT__",(char *) NULL);
|
SelectDef = DBCellNewDef("__SELECT__");
|
||||||
ASSERT(SelectDef != (CellDef *) NULL, "SelectInit");
|
ASSERT(SelectDef != (CellDef *) NULL, "SelectInit");
|
||||||
DBCellSetAvail(SelectDef);
|
DBCellSetAvail(SelectDef);
|
||||||
SelectDef->cd_flags |= CDINTERNAL;
|
SelectDef->cd_flags |= CDINTERNAL;
|
||||||
|
|
@ -122,7 +122,7 @@ SelectInit()
|
||||||
Select2Def = DBCellLookDef("__SELECT2__");
|
Select2Def = DBCellLookDef("__SELECT2__");
|
||||||
if (Select2Def == (CellDef *) NULL)
|
if (Select2Def == (CellDef *) NULL)
|
||||||
{
|
{
|
||||||
Select2Def = DBCellNewDef("__SELECT2__",(char *) NULL);
|
Select2Def = DBCellNewDef("__SELECT2__");
|
||||||
ASSERT(Select2Def != (CellDef *) NULL, "SelectInit");
|
ASSERT(Select2Def != (CellDef *) NULL, "SelectInit");
|
||||||
DBCellSetAvail(Select2Def);
|
DBCellSetAvail(Select2Def);
|
||||||
Select2Def->cd_flags |= CDINTERNAL;
|
Select2Def->cd_flags |= CDINTERNAL;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue