Added new command option "extract do local" to force all .ext files
to be written to the local directory instead of the directory where the .mag file is located.
This commit is contained in:
parent
ae6b627df7
commit
c2bf9a8fb4
|
|
@ -878,7 +878,8 @@ cmdExpandFunc(use, windowMask)
|
|||
#define DOCAPACITANCE 2
|
||||
#define DOCOUPLING 3
|
||||
#define DOLENGTH 4
|
||||
#define DORESISTANCE 5
|
||||
#define DOLOCAL 5
|
||||
#define DORESISTANCE 6
|
||||
|
||||
#define LENCLEAR 0
|
||||
#define LENDRIVER 1
|
||||
|
|
@ -900,6 +901,7 @@ CmdExtract(w, cmd)
|
|||
CellDef *selectedDef;
|
||||
bool dolist = FALSE;
|
||||
bool doforall = FALSE;
|
||||
bool doLocal = FALSE;
|
||||
int argc = cmd->tx_argc;
|
||||
char **argv = cmd->tx_argv;
|
||||
|
||||
|
|
@ -918,6 +920,7 @@ CmdExtract(w, cmd)
|
|||
"capacitance extract substrate capacitance",
|
||||
"coupling extract coupling capacitance",
|
||||
"length compute driver-receiver pathlengths",
|
||||
"local put all generated files in the current directory",
|
||||
"resistance estimate resistance",
|
||||
NULL
|
||||
};
|
||||
|
|
@ -1136,6 +1139,7 @@ CmdExtract(w, cmd)
|
|||
TxPrintf("%s capacitance\n", OPTSET(EXT_DOCAPACITANCE));
|
||||
TxPrintf("%s coupling\n", OPTSET(EXT_DOCOUPLING));
|
||||
TxPrintf("%s length\n", OPTSET(EXT_DOLENGTH));
|
||||
TxPrintf("%s local\n", OPTSET(EXT_DOLOCAL));
|
||||
TxPrintf("%s resistance\n", OPTSET(EXT_DORESISTANCE));
|
||||
return;
|
||||
#undef OPTSET
|
||||
|
|
@ -1163,6 +1167,7 @@ CmdExtract(w, cmd)
|
|||
case DOCAPACITANCE: option = EXT_DOCAPACITANCE; break;
|
||||
case DOCOUPLING: option = EXT_DOCOUPLING; break;
|
||||
case DOLENGTH: option = EXT_DOLENGTH; break;
|
||||
case DOLOCAL: option = EXT_DOLOCAL; break;
|
||||
case DORESISTANCE: option = EXT_DORESISTANCE; break;
|
||||
}
|
||||
if (no) ExtOptions &= ~option;
|
||||
|
|
|
|||
|
|
@ -95,8 +95,11 @@ ExtCell(def, outName, doLength)
|
|||
{
|
||||
char *filename;
|
||||
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);
|
||||
|
||||
|
|
@ -149,7 +152,7 @@ ExtCell(def, outName, doLength)
|
|||
*/
|
||||
|
||||
FILE *
|
||||
extFileOpen(def, file, mode, prealfile)
|
||||
extFileOpen(def, file, mode, doLocal, prealfile)
|
||||
CellDef *def; /* Cell whose .ext file is to be written */
|
||||
char *file; /* If non-NULL, open 'name'.ext; otherwise,
|
||||
* 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
|
||||
* 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
|
||||
* a string holding the name of the .ext file.
|
||||
*/
|
||||
|
|
@ -167,6 +171,8 @@ extFileOpen(def, file, mode, prealfile)
|
|||
FILE *rfile, *testf;
|
||||
|
||||
if (file) name = file;
|
||||
else if (doLocal)
|
||||
name = def->cd_name; /* No path component, so save locally */
|
||||
else if (def->cd_file)
|
||||
{
|
||||
name = def->cd_file;
|
||||
|
|
|
|||
|
|
@ -632,7 +632,6 @@ closeit:
|
|||
void
|
||||
extExtractStack(stack, doExtract, rootDef)
|
||||
Stack *stack;
|
||||
bool doExtract;
|
||||
CellDef *rootDef;
|
||||
{
|
||||
int fatal = 0, warnings = 0;
|
||||
|
|
|
|||
|
|
@ -66,6 +66,7 @@ extern char *extDevTable[];
|
|||
#define EXT_DORESISTANCE 0x08 /* Extract resistance */
|
||||
#define EXT_DOLENGTH 0x10 /* Extract pathlengths */
|
||||
#define EXT_DOALL 0x1f /* ALL OF THE ABOVE */
|
||||
#define EXT_DOLOCAL 0x20 /* Write to local directory only */
|
||||
|
||||
extern int ExtOptions; /* Bitmask of above */
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue