📄 cktdefs.h
字号:
/* * Copyright (c) 1985 Thomas L. Quarles * Modified 1999 Paolo Nenzi - Removed non STDC definitions * Modified 2000 AlansFixes * $Id: cktdefs.h,v 1.18 2005/05/30 20:30:09 sjborley Exp $ */#ifndef CKT#define CKT "CKTdefs.h $Revision: 1.18 $ on $Date: 2005/05/30 20:30:09 $ "/* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */#ifdef XSPICE#include "evt.h"#include "enh.h"#endif/* gtri - evt - wbk - 5/20/91 - add event-driven and enhancements data */#define MAXNUMDEVS 64 /* Max number of possible devices PN:XXX may cause toubles*/extern int DEVmaxnum; /* Not sure if still used */#define MAXNUMDEVNODES 4 /* Max No. of nodes per device */ /* Need to change for SOI devs ? */#include "smpdefs.h"#include "ifsim.h"#include "acdefs.h"#include "gendefs.h"#include "trcvdefs.h"#include "optdefs.h"#include "sen2defs.h"#include "pzdefs.h"#include "noisedef.h"typedef struct sCKTnode { IFuid name; int type;#define SP_VOLTAGE 3#define SP_CURRENT 4#define NODE_VOLTAGE SP_VOLTAGE#define NODE_CURRENT SP_CURRENT int number; /* Number of the node */ double ic; /* Value of the initial condition */ double nodeset; /* Value of the .nodeset option */ double *ptr; /* ??? */ struct sCKTnode *next; /* pointer to the next node */ unsigned int icGiven:1; /* FLAG ic given */ unsigned int nsGiven:1; /* FLAG nodeset given */ } CKTnode;/* defines for node parameters */#define PARM_NS 1#define PARM_IC 2#define PARM_NODETYPE 3typedef struct {/* gtri - begin - wbk - change declaration to allow dynamic sizing *//* An associated change is made in CKTinit.c to alloc the space *//* required for the pointers. No changes are needed to the source *//* code at the 3C1 level, although the compiler will generate *//* slightly different code for references to this data. *//* GENmodel *CKThead[MAXNUMDEVS]; The max number of loadable devices */ GENmodel **CKThead;/* gtri - end - wbk - change declaration to allow dynamic sizing *//* GENmodel *CKThead[MAXNUMDEVS]; maschmann : deleted */ STATistics *CKTstat; /* The STATistics structure */ double *(CKTstates[8]); /* Used as memory of past steps ??? */ /* Some shortcut for CKTstates */#define CKTstate0 CKTstates[0]#define CKTstate1 CKTstates[1]#define CKTstate2 CKTstates[2]#define CKTstate3 CKTstates[3]#define CKTstate4 CKTstates[4]#define CKTstate5 CKTstates[5]#define CKTstate6 CKTstates[6]#define CKTstate7 CKTstates[7] double CKTtime; /* ??? */ double CKTdelta; /* ??? */ double CKTdeltaOld[7]; /* Memory for ??? */ double CKTtemp; /* Actual temperature of CKT */ double CKTnomTemp; /* Reference temperature 27 C ? */ double CKTvt; /* Thernmal voltage at CKTtemp */ double CKTag[7]; /* the gear variable coefficient matrix */#ifdef PREDICTOR double CKTagp[7]; /* the gear predictor variable coefficient matrix */#endif /*PREDICTOR*/ int CKTorder; /* the integration method order */ int CKTmaxOrder; /* maximum integration method order */ int CKTintegrateMethod; /* the integration method to be used *//* known integration methods */#define TRAPEZOIDAL 1#define GEAR 2 SMPmatrix *CKTmatrix; /* pointer to sparse matrix */ int CKTniState; /* internal state */ double *CKTrhs; /* current rhs value - being loaded */ double *CKTrhsOld; /* previous rhs value for convergence testing */ double *CKTrhsSpare; /* spare rhs value for reordering */ double *CKTirhs; /* current rhs value - being loaded (imag) */ double *CKTirhsOld; /* previous rhs value (imaginary)*/ double *CKTirhsSpare; /* spare rhs value (imaginary)*/#ifdef PREDICTOR double *CKTpred; /* predicted solution vector */ double *CKTsols[8]; /* previous 8 solutions */#endif /* PREDICTOR */ double *CKTrhsOp; /* opearating point values */ double *CKTsenRhs; /* current sensitivity rhs values */ double *CKTseniRhs; /* current sensitivity rhs values (imag)*//* * symbolic constants for CKTniState * Note that they are bitwise disjoint * What is their meaning ???? */#define NISHOULDREORDER 0x1#define NIREORDERED 0x2#define NIUNINITIALIZED 0x4#define NIACSHOULDREORDER 0x10#define NIACREORDERED 0x20#define NIACUNINITIALIZED 0x40#define NIDIDPREORDER 0x100#define NIPZSHOULDREORDER 0x200 int CKTmaxEqNum; /* And this ? */ int CKTcurrentAnalysis; /* the analysis in progress (if any) *//* defines for the value of CKTcurrentAnalysis *//* are in TSKdefs.h */ CKTnode *CKTnodes; /* ??? */ CKTnode *CKTlastNode; /* ??? */ /* This define should be somewhere else ??? */#define NODENAME(ckt,nodenum) CKTnodName(ckt,nodenum) int CKTnumStates; /* Number of sates effectively valid ??? */ long CKTmode; /* Mode of operation of the circuit ??? *//* defines for CKTmode *//* old 'mode' parameters */#define MODE 0x3#define MODETRAN 0x1#define MODEAC 0x2/* old 'modedc' parameters */#define MODEDC 0x70#define MODEDCOP 0x10#define MODETRANOP 0x20#define MODEDCTRANCURVE 0x40/* old 'initf' parameters */#define INITF 0x3f00#define MODEINITFLOAT 0x100#define MODEINITJCT 0x200#define MODEINITFIX 0x400#define MODEINITSMSIG 0x800#define MODEINITTRAN 0x1000#define MODEINITPRED 0x2000/* old 'nosolv' paramater */#define MODEUIC 0x10000l int CKTbypass; /* bypass option, how does it work ? */ int CKTdcMaxIter; /* iteration limit for dc op. (itl1) */ int CKTdcTrcvMaxIter; /* iteration limit for dc tran. curv (itl2) */ int CKTtranMaxIter; /* iteration limit for each timepoint for tran*/ /* (itl4) */ int CKTbreakSize; /* ??? */ int CKTbreak; /* ??? */ double CKTsaveDelta; /* ??? */ double CKTminBreak; /* ??? */ double *CKTbreaks; /* List of breakpoints ??? */ double CKTabstol; /* --- */ double CKTpivotAbsTol; /* --- */ double CKTpivotRelTol; /* --- */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -