home *** CD-ROM | disk | FTP | other *** search
- /****************************************************************************/
- /* Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991 */
- /* By MicroSim Corporation, All Rights Reserved */
- /****************************************************************************/
- /* program.h
- * $Revision: 1.17 $
- * $Author: sv $
- * $Date: 30 Apr 1991 07:40:32 $ */
-
-
- /*
- * Declarations for files, IO, and other data specific to one PSpice
- * run but independent of any circuit
- */
- struct PrgDef {
- FILE *PrgInFl; /* Circuit file */
- char PrgInNm[MBUFF]; /* Circuit file name */
- FILE *PrgOutFl; /* Output file */
- char PrgOutNm[MBUFF]; /* Output file name */
- FILE *PrgPrbFl; /* Probe data file */
- char PrgPrbNm[MBUFF]; /* Probe data file name */
- FILE *PrgPrFl; /* Print data file */
- char PrgPrNm[MBUFF]; /* Print data file name */
- FILE *PrgPlFl; /* Plot data file */
- char PrgPlNm[MBUFF]; /* Plot data file name */
- FILE *PrgMCFl; /* MonteCarlo data file */
- char PrgMCNm[MBUFF]; /* MonteCarlo data file name */
- FILE *PrgDigFl; /* Digital probe data file (temp)*/
- char PrgDigNm[MBUFF]; /* Digital probe data file name*/
- int PrgFstatus; /* EOF = input file closed
- * 0 = normal (not EOL),
- * ATEOL = end of line
- * PUSHTOKEN = return same token */
- int PrgNstatus; /* next status from NewGets */
- int PrgDspLvl; /* /D CRT display level option */
- int PrgNoDate; /* /T Suppress date, ver, ... in .OUT */
- int PrgIntFl; /* YES: user has aborted run */
- char PrgHdr[MBUFF]; /* PSpice ver. no. and release date */
- long PrgSN; /* Program serial number (ID) */
- int PrgMessWn[4]; /* Message window coordinates */
- int PrgStatWn[4]; /* Status window coordinates */
- int PrgTmpWn[4]; /* Temporary window coordinates */
- int PrgFFFlag; /* set to true to enable FF's */
- int PrgNeedMC; /* YES if used MC - specific */
- int PrgNeedPAD; /* YES if Parallel Analog/Digital in use */
- int PrgInCS; /* YES if run as Control Shell */
- int PrgAlias; /* YES if has .ALIAS */
- };
-
- #define DSPNONE 0
- #define DSPFULL 7
-
- #define INFILE (PrgData->PrgInFl)
- #define INFILEN (PrgData->PrgInNm)
- #define OUTFILE (PrgData->PrgOutFl)
- #define OUTFILEN (PrgData->PrgOutNm)
- #define PRBFILE (PrgData->PrgPrbFl)
- #define PRBFILEN (PrgData->PrgPrbNm)
- #define PRFILE (PrgData->PrgPrFl)
- #define PRFILEN (PrgData->PrgPrNm)
- #define PLFILE (PrgData->PrgPlFl)
- #define PLFILEN (PrgData->PrgPlNm)
- #define MCFILE (PrgData->PrgMCFl)
- #define MCFILEN (PrgData->PrgMCNm)
- #define DIGFILE (PrgData->PrgDigFl)
- #define DIGFILEN (PrgData->PrgDigNm)
- #define FSTATUS (PrgData->PrgFstatus)
- #define NEXTSTATUS (PrgData->PrgNstatus)
- #define DSPLVL (PrgData->PrgDspLvl)
- #define NODATE (PrgData->PrgNoDate)
- #define INTRFL (PrgData->PrgIntFl)
- #define PRGHDR (PrgData->PrgHdr)
- #define PRGSN (PrgData->PrgSN)
- #define MESSWN (PrgData->PrgMessWn)
- #define STATWN (PrgData->PrgStatWn)
- #define TEMPWN (PrgData->PrgTmpWn)
- #define FORMFEEDFLAG (PrgData->PrgFFFlag)
- #define NEEDSMCOPTION (PrgData->PrgNeedMC)
- #define NEEDPADOPTION (PrgData->PrgNeedPAD)
- #define INCS (PrgData->PrgInCS)
- #define USESALIASES (PrgData->PrgAlias)
-
- GLOBAL struct PrgDef *PrgData;
-
- GLOBAL char *Heads[27];
- GLOBAL char *MHeads[27];
- #define AD_HEAD 26 /* Header index for "invisable" analog half
- of mixed devices */
-
- /* device type flag values for mixed devices */
-
- #define UADC_TYPE 1
- #define UDAC_TYPE 2
-
- GLOBAL unsigned ConfigFlags[26]; /* for suppressing analyses */
-
- /* number of expression pointers in devices a - z */
- /* models are subject to change by users so handled differently. */
- GLOBAL struct {
- int nnodes;
- int nexprs;
- int nstr_exprs;
- } Nexprs[26]
- #ifdef Main_Pgm
- = {
- {0, 0, 0}, /* a */
- {4, 3, 0}, /* b */
- {2, 2, 0}, /* c */
- {3, 2, 0}, /* d */
- {2, 0, 0}, /* e - not general model */
- {2, 0, 0}, /* f - " */
- {2, 0, 0}, /* g - " */
- {2, 0, 0}, /* h - " */
- {2, 4, 0}, /* i */
- {4, 3, 0}, /* j */
- {0, 2, 0}, /* k */
- {2, 2, 0}, /* l */
- {5, 14, 0}, /* m */ /* M instance param added */
- {3, 0, 2}, /* n */
- {2, 0, 1}, /* o */
- {0, 0, 0}, /* p */
- {5, 3, 0}, /* q */
- {2, 1, 0}, /* r */
- {5, 3, 0}, /* s */
- {8, 6, 0}, /* t */ /* t modified to fit the struct gen_ pattern */
- {0, 0, 0}, /* u - not general model */
- {2, 4, 0}, /* v */
- {3, 3, 0}, /* w */
- {0, 0, 0}, /* x */
- {0, 0, 0}, /* y */
- {0, 0, 0}, /* z */
- }
- #endif
- ;
-
- GLOBAL int
- EndRead,
- InputLineNumber,
- ErrorFlag,
- WarningFlag,
- FatalErrorFlag;
-
- /* FSTATUS values */
- #define ATEOL 1
- #define PUSHTOKEN 2
- #define NEWCARD 3
-
- GLOBAL char *InputCharPtr;
-
- GLOBAL double RDSec; /* time needed for ReadIn */
- #define RDTIM RDSec
-
- GLOBAL int SuppressPrint;
- #define SUPPRESS SuppressPrint
-
- /* define the names of the probe.dat and probe.txt files */
- GLOBAL char ProbeBinaryFile[MBUFF];
- GLOBAL char ProbeTextFile[MBUFF];
-
- #if CTYPE & ( DOS | D16 )
- GLOBAL char ConfigSys[]
- #ifdef Main_Pgm
- = "\nIncrease the \"FILES\" parameter in file \"\\CONFIG.SYS\" then reboot.\n\n"
- #endif
- ;
- #define CONFIG_SYS_MSG printf(ConfigSys)
- #define CONFIG_SYS_TEST TestConfigSys()
- #else
- #define CONFIG_SYS_MSG
- #define CONFIG_SYS_TEST
- #endif
-
-