Corrected a previous implementation that was supposed to not print
warning messages about ports being electrically connected when those ports have names that match under rules of case-insensitivity, and the .ext file is being read for the purpose of generating a SPICE netlist, which is case-insensitive. Also: Corrected a crash condition when using "extract path <name>" when directory <name> does not exist.
This commit is contained in:
parent
d4f8fe04c5
commit
89f1c4ee67
|
|
@ -615,7 +615,7 @@ runexttosim:
|
|||
}
|
||||
|
||||
/* Read the hierarchical description of the input circuit */
|
||||
if (EFReadFile(inName, FALSE, esDoSimExtResis, FALSE) == FALSE)
|
||||
if (EFReadFile(inName, FALSE, esDoSimExtResis, FALSE, FALSE) == FALSE)
|
||||
{
|
||||
EFDone();
|
||||
return /* TCL_ERROR */;
|
||||
|
|
@ -791,7 +791,7 @@ main(argc, argv)
|
|||
}
|
||||
|
||||
/* Read the hierarchical description of the input circuit */
|
||||
if (EFReadFile(inName, FALSE, esDoSimExtResis, FALSE) == FALSE)
|
||||
if (EFReadFile(inName, FALSE, esDoSimExtResis, FALSE, FALSE) == FALSE)
|
||||
{
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -875,7 +875,7 @@ runexttospice:
|
|||
sprintf(spcesDefaultOut, "%s.spice", inName);
|
||||
|
||||
/* Read the hierarchical description of the input circuit */
|
||||
if (EFReadFile(inName, TRUE, esDoExtResis, FALSE) == FALSE)
|
||||
if (EFReadFile(inName, TRUE, esDoExtResis, FALSE, TRUE) == FALSE)
|
||||
{
|
||||
EFDone();
|
||||
return;
|
||||
|
|
@ -1230,7 +1230,7 @@ main(argc, argv)
|
|||
}
|
||||
|
||||
/* Read the hierarchical description of the input circuit */
|
||||
if (EFReadFile(inName, TRUE, esDoExtResis, FALSE) == FALSE)
|
||||
if (EFReadFile(inName, TRUE, esDoExtResis, FALSE, TRUE) == FALSE)
|
||||
{
|
||||
exit (1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -74,7 +74,7 @@ main(argc, argv)
|
|||
exit (1);
|
||||
|
||||
/* Read the hierarchical description of the input circuit */
|
||||
EFReadFile(inName, FALSE, FALSE, FALSE);
|
||||
EFReadFile(inName, FALSE, FALSE, FALSE, FALSE);
|
||||
if (EFArgTech) EFTech = StrDup((char **) NULL, EFArgTech);
|
||||
if (EFScale == 0.0) EFScale = 1.0;
|
||||
|
||||
|
|
|
|||
|
|
@ -224,7 +224,7 @@ runantennacheck:
|
|||
|
||||
/* Read the hierarchical description of the input circuit */
|
||||
TxPrintf("Reading extract file.\n");
|
||||
if (EFReadFile(inName, FALSE, FALSE, FALSE) == FALSE)
|
||||
if (EFReadFile(inName, FALSE, FALSE, FALSE, FALSE) == FALSE)
|
||||
{
|
||||
EFDone();
|
||||
return /* TCL_ERROR */;
|
||||
|
|
|
|||
|
|
@ -498,9 +498,9 @@ efBuildEquiv(def, nodeName1, nodeName2, resist, isspice)
|
|||
* or nodeName2 must already be known.
|
||||
*/
|
||||
bool resist; /* True if "extresist on" option was selected */
|
||||
bool isspice; /* Passed from "dosubckt" in EFReadFile(), is only
|
||||
* TRUE when running ext2spice. Indicates that nodes
|
||||
* are case-insensitive.
|
||||
bool isspice; /* Passed from EFReadFile(), is only TRUE when
|
||||
* running ext2spice. Indicates that nodes are
|
||||
* case-insensitive.
|
||||
*/
|
||||
{
|
||||
EFNodeName *nn1, *nn2;
|
||||
|
|
|
|||
|
|
@ -121,7 +121,10 @@ static bool efReadDef();
|
|||
* name of 'name', allocates a new one. Calls efReadDef to do the
|
||||
* work of reading the def itself. If 'dosubckt' is true, then port
|
||||
* mappings are kept. If 'resist' is true, read in the .res.ext file
|
||||
* (from extresist) if it exists, after reading the .ext file.
|
||||
* (from extresist) if it exists, after reading the .ext file. If
|
||||
* "isspice" is true, then the .ext file is being read for SPICE
|
||||
* netlist generation, and node names should be treated as case-
|
||||
* insensitive.
|
||||
*
|
||||
* Results:
|
||||
* Passes on the return value of efReadDef (see below)
|
||||
|
|
@ -136,9 +139,9 @@ static bool efReadDef();
|
|||
*/
|
||||
|
||||
bool
|
||||
EFReadFile(name, dosubckt, resist, noscale)
|
||||
EFReadFile(name, dosubckt, resist, noscale, isspice)
|
||||
char *name; /* Name of def to be read in */
|
||||
bool dosubckt, resist, noscale;
|
||||
bool dosubckt, resist, noscale, isspice;
|
||||
{
|
||||
Def *def;
|
||||
bool rc;
|
||||
|
|
@ -148,7 +151,7 @@ EFReadFile(name, dosubckt, resist, noscale)
|
|||
def = efDefNew(name);
|
||||
|
||||
locScale = 1.0;
|
||||
rc = efReadDef(def, dosubckt, resist, noscale, TRUE);
|
||||
rc = efReadDef(def, dosubckt, resist, noscale, TRUE, isspice);
|
||||
if (EFArgTech) EFTech = StrDup((char **) NULL, EFArgTech);
|
||||
if (EFScale == 0.0) EFScale = 1.0;
|
||||
|
||||
|
|
@ -176,9 +179,9 @@ EFReadFile(name, dosubckt, resist, noscale)
|
|||
*/
|
||||
|
||||
bool
|
||||
efReadDef(def, dosubckt, resist, noscale, toplevel)
|
||||
efReadDef(def, dosubckt, resist, noscale, toplevel, isspice)
|
||||
Def *def;
|
||||
bool dosubckt, resist, noscale, toplevel;
|
||||
bool dosubckt, resist, noscale, toplevel, isspice;
|
||||
{
|
||||
int argc, ac, n;
|
||||
CellDef *dbdef;
|
||||
|
|
@ -325,7 +328,7 @@ readfile:
|
|||
|
||||
/* equiv node1 node2 */
|
||||
case EQUIV:
|
||||
efBuildEquiv(def, argv[1], argv[2], resist, dosubckt);
|
||||
efBuildEquiv(def, argv[1], argv[2], resist, isspice);
|
||||
break;
|
||||
|
||||
/* replaces "fet" (below) */
|
||||
|
|
@ -645,7 +648,8 @@ resistChanged:
|
|||
{
|
||||
use = (Use *)HashGetValue(he);
|
||||
if ((use->use_def->def_flags & DEF_AVAILABLE) == 0)
|
||||
if (efReadDef(use->use_def, DoSubCircuit, resist, noscale, FALSE) != TRUE)
|
||||
if (efReadDef(use->use_def, DoSubCircuit, resist, noscale, FALSE,
|
||||
isspice) != TRUE)
|
||||
rc = FALSE;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -418,25 +418,4 @@ extern int EFHierVisitResists();
|
|||
extern int EFHierVisitCaps();
|
||||
extern int EFHierVisitNodes();
|
||||
|
||||
|
||||
/* ------------------------- constants used by clients -------------- */
|
||||
|
||||
/*
|
||||
* ANSI C definitions of arguments to EFvisit procedures
|
||||
*/
|
||||
|
||||
/* - left for documentation purposes
|
||||
|
||||
typedef int (*capproc)(HierName *, HierName *, double, ClientData );
|
||||
|
||||
extern int EFVisitCaps(capproc, ClientData );
|
||||
|
||||
typedef int (*nodeproc)(EFNode *, int , double, ClientData );
|
||||
|
||||
extern int EFVisitNodes(nodeproc , ClientData );
|
||||
|
||||
extern int EFReadFile(char *);
|
||||
|
||||
*/
|
||||
|
||||
#endif /* _EXTFLAT_H */
|
||||
|
|
|
|||
|
|
@ -195,6 +195,12 @@ extFileOpen(def, file, mode, prealfile)
|
|||
ExtLocalPath);
|
||||
name = def->cd_name; /* Save locally */
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Save locally in specified path, which was just created */
|
||||
name = namebuf;
|
||||
sprintf(namebuf, "%s/%s", ExtLocalPath, def->cd_name);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -265,7 +265,7 @@ defCountNets(rootDef, allSpecial)
|
|||
|
||||
EFScale = 0.0; /* Allows EFScale to be set to the scale value */
|
||||
|
||||
if (EFReadFile(rootDef->cd_name, TRUE, FALSE, TRUE))
|
||||
if (EFReadFile(rootDef->cd_name, TRUE, FALSE, TRUE, FALSE))
|
||||
{
|
||||
EFFlatBuild(rootDef->cd_name, EF_FLATNODES | EF_NOFLATSUBCKT);
|
||||
EFVisitNodes(defnodeCount, (ClientData)&total);
|
||||
|
|
|
|||
Loading…
Reference in New Issue