⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ifsim.h

📁 ngspice又一个电子CAD仿真软件代码.功能更全
💻 H
📖 第 1 页 / 共 2 页
字号:
            IFuid *uVec;    /* pointer to UID vector */            IFnode *nVec;   /* pointer to node vector */        }vec;    }v;} IFvalue;/* * structure:  IFdevice * * This structure contains all the information available to the * front end about a particular device.  The simulator will * present the front end with an array of pointers to these structures * which it will use to determine legal device types and parameters. * * Note to simulators:  you are passing an array of pointers to * these structures, so you may in fact make this the first component * in a larger, more complex structure which includes other data * which you need, but which is not needed in the common * front end interface. * */typedef struct sIFdevice {    char *name;                 /* name of this type of device */    char *description;          /* description of this type of device */    int *terms;                 /* number of terminals on this device */    int *numNames;              /* number of names in termNames */    char **termNames;           /* pointer to array of pointers to names */                                /* array contains 'terms' pointers */    int *numInstanceParms;      /* number of instance parameter descriptors */    IFparm *instanceParms;      /* array  of instance parameter descriptors */    int *numModelParms;         /* number of model parameter descriptors */    IFparm *modelParms;         /* array  of model parameter descriptors *//* gtri - modify - wbk - 10/11/90 - add entries to hold data required *//*                                  by new parser                     */#ifdef XSPICE    void ((*cm_func)(Mif_Private_t *));  /* pointer to code model function */    int num_conn;               /* number of code model connections */    Mif_Conn_Info_t  *conn;     /* array of connection info for mif parser */    int num_param;              /* number of parameters = numModelParms */    Mif_Param_Info_t *param;    /* array of parameter info for mif parser */    int num_inst_var;              /* number of instance vars = numInstanceParms */    Mif_Inst_Var_Info_t *inst_var; /* array of instance var info for mif parser *//* gtri - end - wbk - 10/11/90 */#endif    int	flags;			/* DEV_ */} IFdevice;/* * Structure: IFanalysis * * This structure contains all the information available to the * front end about a particular analysis type.  The simulator will * present the front end with an array of pointers to these structures  * which it will use to determine legal analysis types and parameters. * * Note to simulators:  As for IFdevice above, you pass an array of pointers * to these, so you can make this structure a prefix to a larger structure * which you use internally. * */typedef struct sIFanalysis {    char *name;                 /* name of this analysis type */    char *description;          /* description of this type of analysis */    int numParms;               /* number of analysis parameter descriptors */    IFparm *analysisParms;      /* array  of analysis parameter descriptors */} IFanalysis;/* * Structure: IFsimulator * * This is what we have been leading up to all along. * This structure describes a simulator to the front end, and is * returned from the SIMinit command to the front end. * This is where all those neat structures we described in the first * few hundred lines of this file come from. * */typedef struct sIFsimulator {    char *simulator;                /* the simulator's name */    char *description;              /* description of this simulator */    char *version;                  /* version or revision level of simulator*/    int ((*newCircuit)(void **));                                      /* create new circuit */    int ((*deleteCircuit)(void *));                                    /* destroy old circuit's data structures*/    int ((*newNode)(void *,void**,IFuid));                                    /* create new node */    int ((*groundNode)(void*,void**,IFuid));                                     /* create ground node */    int ((*bindNode)(void *,void*,int,void*));                                    /* bind a node to a terminal */    int ((*findNode)(void *,void**,IFuid));                                               /* find a node by name */    int ((*instToNode)(void *,void *,int,void **,IFuid *));                                              /* find the node attached to a terminal */    int ((*setNodeParm)(void*,void*,int,IFvalue*,IFvalue*));                                             /* set a parameter on a node */    int ((*askNodeQuest)(void*,void*,int,IFvalue*,IFvalue*));                                            /* ask a question about a node */    int ((*deleteNode)(void*,void*));                                              /* delete a node from the circuit */    int ((*newInstance)(void*,void*,void**,IFuid));                                             /* create new instance */    int ((*setInstanceParm)(void*,void*,int,IFvalue*,IFvalue*));                                         /* set a parameter on an instance */    int ((*askInstanceQuest)(void*,void*,int,IFvalue*,IFvalue*));                                        /* ask a question about an instance */    int ((*findInstance)(void*,int*,void**,IFuid,void*,IFuid));                                            /* find a specific instance */    int ((*deleteInstance)(void*,void*));                                          /* delete an instance from the circuit */    int ((*newModel)(void*,int,void**,IFuid));                                                /* create new model */    int ((*setModelParm)(void*,void*,int,IFvalue*,IFvalue*));                                            /* set a parameter on a model */    int ((*askModelQuest)(void*,void*,int,IFvalue*,IFvalue*));                                           /* ask a questions about a model */    int ((*findModel)(void*,int*,void**,IFuid));                                               /* find a specific model */    int ((*deleteModel)(void*,void*));                                             /* delete a model from the circuit*/    int ((*newTask)(void*,void**,IFuid, void**)); /*CDHW*/                                                 /* create a new task */    int ((*newAnalysis)(void*,int,IFuid,void**,void*));                                             /* create new analysis within a task */    int ((*setAnalysisParm)(void*,void*,int,IFvalue*,IFvalue*));                                         /* set a parameter on an analysis  */    int ((*askAnalysisQuest)(void*,void*,int,IFvalue*,IFvalue*));                                        /* ask a question about an analysis */    int ((*findAnalysis)(void*,int*,void**,IFuid,void*,IFuid));                                            /* find a specific analysis */    int ((*findTask)(void*,void**,IFuid));                                                /* find a specific task */    int ((*deleteTask)(void*,void*));                                              /* delete a task */    int ((*doAnalyses)(void*,int,void*));              char *((*nonconvErr)(void*,char *)); /* return nonconvergence error */    int numDevices;                 /* number of device types supported */    IFdevice **devices;             /* array of device type descriptors */    int numAnalyses;                /* number of analysis types supported */    IFanalysis **analyses;          /* array of analysis type descriptors */    int numNodeParms;               /* number of node parameters supported */    IFparm *nodeParms;              /* array of node parameter descriptors */    int numSpecSigs;        /* number of special signals legal in parse trees */    char **specSigs;        /* names of special signals legal in parse trees */} IFsimulator;/* * Structure: IFfrontEnd * * This structure provides the simulator with all the information * it needs about the front end.  This is the entire set of * front end and back end related routines the simulator * should know about. * */typedef struct sIFfrontEnd {    int ((*IFnewUid)(void*,IFuid*,IFuid,char*,int,void**));                                /* create a new UID in the circuit */    int ((*IFdelUid)(void*,IFuid,int));			    /* create a new UID in the circuit */    int ((*IFpauseTest)(void));                             /* should we stop now? */    double ((*IFseconds)(void));                               /* what time is it? */    int ((*IFerror)(int,char*,IFuid*));                                 /* output an error or warning message */    int ((*OUTpBeginPlot)(void*,void*,IFuid,IFuid,int,            int,IFuid*,int,void**));                               /* start pointwise output plot */    int ((*OUTpData)(void*,IFvalue*,IFvalue*));                                    /* data for pointwise plot */    int ((*OUTwBeginPlot)(void*,void*,IFuid,IFuid,int,            int,IFuid*,int,void**));                               /* start windowed output plot */    int ((*OUTwReference)(void*,IFvalue*,void**));                               /* independent vector for windowed plot */    int ((*OUTwData)(void*,int,IFvalue*,void*));                                    /* data for windowed plot */    int ((*OUTwEnd)(void*));                             /* signal end of windows */    int ((*OUTendPlot)(void*));                                  /* end of plot */    int ((*OUTbeginDomain)(void*,IFuid,int,IFvalue*));                              /* start nested domain */    int ((*OUTendDomain)(void*));                                /* end nested domain */    int ((*OUTattributes)(void *,IFuid*,int,IFvalue*));                            /* specify output attributes of node */} IFfrontEnd;/* flags for the first argument to IFerror */#define ERR_WARNING 0x1#define ERR_FATAL 0x2#define ERR_PANIC 0x4#define ERR_INFO 0x8    /* valid values for the second argument to doAnalyses */    /* continue the analysis from where we left off */#define RESUME 0    /* start everything over from the beginning of this task*/#define RESTART 1    /* abandon the current analysis and go on the the next in the task*/#define SKIPTONEXT 2#define OUT_SCALE_LIN   1#define OUT_SCALE_LOG   2#endif /*IFSIMULATOR*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -