home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 13 / 13.iso / p / p064 / 3.ddi / TRAN.H < prev    next >
Encoding:
C/C++ Source or Header  |  1991-07-01  |  3.9 KB  |  85 lines

  1. /****************************************************************************/
  2. /*        Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991                  */
  3. /*          By MicroSim Corporation, All Rights Reserved                    */
  4. /****************************************************************************/
  5. /* tran.h
  6.  *   $Revision:   1.4  $
  7.  *   $Author:   whb  $
  8.  *   $Date:   26 Mar 1991 13:02:26  $ */
  9.  
  10. /******************* USERS OF DEVICE EQUATIONS OPTION ***********************/
  11. /********                Do not change this file                   **********/
  12.  
  13. /*
  14.  * Declarations for transient analysis.
  15.  */
  16. #define MSTVCT  4               /* Total number of state vectors */
  17. GLOBAL int JSTVCT;
  18.  
  19. struct TRDef {
  20.   int           TRfl;           /* YES: do transient analysis */
  21.   int           TRUICfl;        /* YES: skip bias point for tran. analysis */
  22.   int           TROpfl;         /* YES: detailed print of bias point */
  23.   double        TREnd;          /* End time */
  24.   double        TRPrStp;        /* .PRINT and .PLOT step size */
  25.   double        TRSkip;         /* Time at which to start output */
  26.   double        TRStCl;         /* Ceiling on internal time step */
  27.   double        TRTime;         /* Analysis time */
  28.   double        TRDelta;        /* Time step */
  29.   double        TRDelOld[MSTVCT];       /* Past values of TRDelta */
  30.   double        TRThrmVlt;      /* Thermal voltage at current temperature */
  31.   int           TRIntOrd;       /* Order of integration method */
  32.   long          TRNItr;         /* No. of iterations needed */
  33.   long          TRFrSt;         /* No. of forward time steps */
  34.   long          TRRvSt;         /* No. of reverse time steps */
  35.   double        TRSec;          /* Time needed */
  36.   double        TRFourFreq;     /* Fourier frequency */
  37.   struct PrPlList
  38.                 *TRFourVar;     /* ptr to list of .FOUR variables */
  39.   int        TRFourNH;    /* Number of Fourier harmonics */
  40.   };
  41. GLOBAL struct TRDef *TRData;
  42. GLOBAL double   AG1, AG2, AG3, AG4;     /* Coefficients for integration */
  43.  
  44. #define TRFLG   (TRData->TRfl)
  45. #define NOSOLV  (TRData->TRUICfl)
  46. #define TROPPR  (TRData->TROpfl)
  47. #define TSTOP   (TRData->TREnd)
  48. #define TSTEP   (TRData->TRPrStp)
  49. #define TSTART  (TRData->TRSkip)
  50. #define TMAX    (TRData->TRStCl)
  51. #define TIME    (TRData->TRTime)
  52. #define DELTA   (TRData->TRDelta)
  53. #define DELOLD  (TRData->TRDelOld)
  54. #define VT      (TRData->TRThrmVlt)
  55. #define IORD    (TRData->TRIntOrd)
  56. #define TRITR   (TRData->TRNItr)
  57. #define TRFRSTP (TRData->TRFrSt)
  58. #define TRRVSTP (TRData->TRRvSt)
  59. #define TRTIM   (TRData->TRSec)
  60. #define TRFOURNH    9    /* Default value for TRFourNH */
  61. #define TRFOURMH    100    /* Max value for TRFourNH */
  62.  
  63. double  Trunc();                /* These return size of next time step from */
  64. /*
  65.  * Mode controls some options during the iterations
  66.  */
  67. #define MDBPDC  1               /* Small signal bias point calculation */
  68. #define MDBPTR  2               /* Bias point for transient analysis */
  69. #define MDDCSW  3               /* DC Sweep which uses previous step */
  70. #define MDTRAN  4               /* Transient analysis */
  71. #define MDAC    5               /* AC analysis */
  72. /*
  73.  * InitFl controls where the device evaluation code gets its terminal voltages
  74.  *   from.
  75.  */
  76. #define INNORM  1               /* Use VltVct values from last iteration */
  77. #define ININIT  2               /* Use IC= values in device table (transient
  78.                                      bias point) or value calculated and
  79.                                      stored in model table (reg. bias point) */
  80. #define INOFF   3               /* Use VltVct unless device has OFF flag,
  81.                                      then use 0 */
  82. #define INSTV0  4               /* Use STVCT0 (= value used previous iteration) */
  83. #define INTRAN  5               /* Use STVCT1 (= value used previous step) */
  84. #define INPRDCT 6               /* Extrapolate using STVCT2 and STVCT1 */
  85.