use the GENmodel and GENinstance type instead of void*
This commit is contained in:
parent
c9bfe72187
commit
63fae60605
49
ChangeLog
49
ChangeLog
|
|
@ -1,3 +1,52 @@
|
|||
2010-07-08 Robert Larice
|
||||
* src/tclspice.c ,
|
||||
* src/frontend/outitf.h ,
|
||||
* src/frontend/spiceif.c ,
|
||||
* src/include/cktdefs.h ,
|
||||
* src/include/ifsim.h ,
|
||||
* src/include/inpdefs.h ,
|
||||
* src/spicelib/analysis/ckt.h ,
|
||||
* src/spicelib/analysis/cktfndm.c ,
|
||||
* src/spicelib/analysis/cktmask.c ,
|
||||
* src/spicelib/analysis/cktmcrt.c ,
|
||||
* src/spicelib/analysis/cktmpar.c ,
|
||||
* src/spicelib/analysis/cktpmnam.c ,
|
||||
* src/spicelib/analysis/noisean.c ,
|
||||
* src/spicelib/analysis/tfanal.c ,
|
||||
* src/spicelib/devices/cktask.c ,
|
||||
* src/spicelib/devices/cktcrte.c ,
|
||||
* src/spicelib/devices/cktfinddev.c ,
|
||||
* src/spicelib/devices/ind/mutsetup.c ,
|
||||
* src/spicelib/devices/urc/urcsetup.c ,
|
||||
* src/spicelib/parser/inp.h ,
|
||||
* src/spicelib/parser/inp2b.c ,
|
||||
* src/spicelib/parser/inp2c.c ,
|
||||
* src/spicelib/parser/inp2d.c ,
|
||||
* src/spicelib/parser/inp2e.c ,
|
||||
* src/spicelib/parser/inp2f.c ,
|
||||
* src/spicelib/parser/inp2g.c ,
|
||||
* src/spicelib/parser/inp2h.c ,
|
||||
* src/spicelib/parser/inp2i.c ,
|
||||
* src/spicelib/parser/inp2j.c ,
|
||||
* src/spicelib/parser/inp2k.c ,
|
||||
* src/spicelib/parser/inp2l.c ,
|
||||
* src/spicelib/parser/inp2m.c ,
|
||||
* src/spicelib/parser/inp2n.c ,
|
||||
* src/spicelib/parser/inp2o.c ,
|
||||
* src/spicelib/parser/inp2p.c ,
|
||||
* src/spicelib/parser/inp2q.c ,
|
||||
* src/spicelib/parser/inp2r.c ,
|
||||
* src/spicelib/parser/inp2s.c ,
|
||||
* src/spicelib/parser/inp2t.c ,
|
||||
* src/spicelib/parser/inp2u.c ,
|
||||
* src/spicelib/parser/inp2v.c ,
|
||||
* src/spicelib/parser/inp2w.c ,
|
||||
* src/spicelib/parser/inp2y.c ,
|
||||
* src/spicelib/parser/inp2z.c ,
|
||||
* src/spicelib/parser/inpaname.c ,
|
||||
* src/spicelib/parser/inppname.c :
|
||||
use the GENmodel and GENinstance type instead of void*
|
||||
|
||||
2010-07-07 Robert Larice
|
||||
* src/include/dllitf.h ,
|
||||
* src/include/mifproto.h ,
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ typedef struct dataDesc {
|
|||
char *specParamName; /* The parameter name if special. */
|
||||
int specIndex; /* For sensitivity, if special. */
|
||||
int specType;
|
||||
void *specFast;
|
||||
GENinstance *specFast;
|
||||
int refIndex; /* The index of our ref vector. */
|
||||
struct dvec *vec;
|
||||
} dataDesc;
|
||||
|
|
|
|||
|
|
@ -618,7 +618,7 @@ spif_getparam_special(CKTcircuit *ckt,char **name,char *param,int ind,int do_mod
|
|||
if (!param || (param && eq(param, "all")))
|
||||
{
|
||||
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
|
||||
typecode = finddev_special(ckt, *name, (void**)&dev, (void**)&mod,&modelo_dispositivo);
|
||||
typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo);
|
||||
if (typecode == -1)
|
||||
{
|
||||
fprintf(cp_err,"Error: no such device or model name %s\n",*name);
|
||||
|
|
@ -710,7 +710,7 @@ spif_getparam_special(CKTcircuit *ckt,char **name,char *param,int ind,int do_mod
|
|||
else if (param)
|
||||
{
|
||||
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
|
||||
typecode = finddev_special(ckt, *name, (void**)&dev, (void**)&mod,&modelo_dispositivo);
|
||||
typecode = finddev_special(ckt, *name, &dev, &mod, &modelo_dispositivo);
|
||||
if (typecode == -1)
|
||||
{
|
||||
fprintf(cp_err,"Error: no such device or model name %s\n",*name);
|
||||
|
|
@ -756,7 +756,7 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model)
|
|||
/* MW. My "special routine here" */
|
||||
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
|
||||
|
||||
typecode = finddev(ckt, *name,(void**) &dev,(void **) &mod);
|
||||
typecode = finddev(ckt, *name, &dev, &mod);
|
||||
if (typecode == -1) {
|
||||
fprintf(cp_err,
|
||||
"Error: no such device or model name %s\n",
|
||||
|
|
@ -786,7 +786,7 @@ spif_getparam(CKTcircuit *ckt, char **name, char *param, int ind, int do_model)
|
|||
|
||||
/* MW. */
|
||||
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
|
||||
typecode = finddev(ckt, *name, (void**)&dev, (void **)&mod);
|
||||
typecode = finddev(ckt, *name, &dev, &mod);
|
||||
if (typecode == -1) {
|
||||
fprintf(cp_err,
|
||||
"Error: no such device or model name %s\n",
|
||||
|
|
@ -824,7 +824,7 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val )
|
|||
/* retrieve device name from symbol table */
|
||||
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
|
||||
/* find the specified device */
|
||||
typecode = finddev(ckt, *name, (void**)&dev, (void **)&curMod);
|
||||
typecode = finddev(ckt, *name, &dev, &curMod);
|
||||
if (typecode == -1) {
|
||||
fprintf(cp_err, "Error: no such device or model name %s\n", *name);
|
||||
return;
|
||||
|
|
@ -900,7 +900,7 @@ if_setparam(CKTcircuit *ckt, char **name, char *param, struct dvec *val, int do_
|
|||
|
||||
/* PN */
|
||||
INPretrieve(name,(INPtables *)ft_curckt->ci_symtab);
|
||||
typecode = finddev(ckt, *name, (void**)&dev, (void **)&mod);
|
||||
typecode = finddev(ckt, *name, &dev, &mod);
|
||||
if (typecode == -1) {
|
||||
fprintf(cp_err, "Error: no such device or model name %s\n", *name);
|
||||
return;
|
||||
|
|
@ -1052,10 +1052,10 @@ doask(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op
|
|||
/* fprintf(cp_err, "Calling doask(%d, %x, %x, %x)\n",
|
||||
typecode, dev, mod, opt); */
|
||||
if (dev)
|
||||
err = (*(ft_sim->askInstanceQuest))(ckt, (void *)dev,
|
||||
err = (*(ft_sim->askInstanceQuest))(ckt, dev,
|
||||
opt->id, &pv, (IFvalue *)NULL);
|
||||
else
|
||||
err = (*(ft_sim->askModelQuest))(ckt, (void *) mod,
|
||||
err = (*(ft_sim->askModelQuest))(ckt, mod,
|
||||
opt->id, &pv, (IFvalue *)NULL);
|
||||
if (err != OK) {
|
||||
ft_sperror(err, "if_getparam");
|
||||
|
|
@ -1135,10 +1135,10 @@ doset(CKTcircuit *ckt, int typecode, GENinstance *dev, GENmodel *mod, IFparm *op
|
|||
typecode, dev, mod, opt); */
|
||||
|
||||
if (dev)
|
||||
err = (*(ft_sim->setInstanceParm))(ckt, (void *)dev,
|
||||
err = (*(ft_sim->setInstanceParm))(ckt, dev,
|
||||
opt->id, &nval, (IFvalue *)NULL);
|
||||
else
|
||||
err = (*(ft_sim->setModelParm))(ckt, (void *) mod,
|
||||
err = (*(ft_sim->setModelParm))(ckt, mod,
|
||||
opt->id, &nval, (IFvalue *)NULL);
|
||||
|
||||
return err;
|
||||
|
|
|
|||
|
|
@ -276,14 +276,14 @@ extern int CKTacDump(CKTcircuit *, double , void *);
|
|||
extern int CKTacLoad(CKTcircuit *);
|
||||
extern int CKTaccept(CKTcircuit *);
|
||||
extern int CKTacct(CKTcircuit *, void *, int , IFvalue *);
|
||||
extern int CKTask(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTask(CKTcircuit *, GENinstance *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTaskAnalQ(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTaskNodQst(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTbindNode(CKTcircuit *, void *, int , void *);
|
||||
extern void CKTbreakDump(CKTcircuit *);
|
||||
extern int CKTclrBreak(CKTcircuit *);
|
||||
extern int CKTconvTest(CKTcircuit *);
|
||||
extern int CKTcrtElt(CKTcircuit *, void *, void **, IFuid);
|
||||
extern int CKTcrtElt(CKTcircuit *, GENmodel *, GENinstance **, IFuid);
|
||||
extern int CKTdelTask(CKTcircuit *, void *);
|
||||
extern int CKTdestroy(CKTcircuit *);
|
||||
extern int CKTdltAnal(void *, void *, void *);
|
||||
|
|
@ -299,8 +299,8 @@ extern void NDEVacct(CKTcircuit *ckt, FILE *file);
|
|||
extern void CKTncDump(CKTcircuit *);
|
||||
extern int CKTfndAnal(CKTcircuit *, int *, void **, IFuid , void *, IFuid);
|
||||
extern int CKTfndBranch(CKTcircuit *, IFuid);
|
||||
extern int CKTfndDev(CKTcircuit *, int *, void **, IFuid , void *, IFuid);
|
||||
extern int CKTfndMod(CKTcircuit *, int *, void **, IFuid);
|
||||
extern int CKTfndDev(CKTcircuit *, int *, GENinstance **, IFuid , GENmodel *, IFuid);
|
||||
extern int CKTfndMod(CKTcircuit *, int *, GENmodel **, IFuid);
|
||||
extern int CKTfndNode(CKTcircuit *, void **, IFuid);
|
||||
extern int CKTfndTask(CKTcircuit *, void **, IFuid );
|
||||
extern int CKTground(CKTcircuit *, void **, IFuid);
|
||||
|
|
@ -313,9 +313,9 @@ extern int CKTmapNode(CKTcircuit *, void **, IFuid);
|
|||
extern int CKTmkCur(CKTcircuit *, CKTnode **, IFuid , char *);
|
||||
extern int CKTmkNode(CKTcircuit *, CKTnode **);
|
||||
extern int CKTmkVolt(CKTcircuit *, CKTnode **, IFuid , char *);
|
||||
extern int CKTmodAsk(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTmodCrt(CKTcircuit *, int , void **, IFuid);
|
||||
extern int CKTmodParam(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTmodAsk(CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTmodCrt(CKTcircuit *, int , GENmodel **, IFuid);
|
||||
extern int CKTmodParam(CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTnames(CKTcircuit *, int *, IFuid **);
|
||||
extern int CKTnewAnal(CKTcircuit *, int , IFuid , void **, void *);
|
||||
extern int CKTnewEq(CKTcircuit *, void **, IFuid);
|
||||
|
|
|
|||
|
|
@ -367,24 +367,24 @@ struct IFsimulator {
|
|||
int (*deleteNode) (CKTcircuit *, void *);
|
||||
/* delete a node from the circuit */
|
||||
|
||||
int (*newInstance) (CKTcircuit *, void *, void **, IFuid);
|
||||
int (*newInstance) (CKTcircuit *, GENmodel *, GENinstance **, IFuid);
|
||||
/* create new instance */
|
||||
int (*setInstanceParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* set a parameter on an instance */
|
||||
int (*askInstanceQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*askInstanceQuest) (CKTcircuit *, GENinstance *, int, IFvalue *, IFvalue *);
|
||||
/* ask a question about an instance */
|
||||
int (*findInstance) (CKTcircuit *, int *, void **, IFuid, void *, IFuid);
|
||||
int (*findInstance) (CKTcircuit *, int *, GENinstance **, IFuid, GENmodel *, IFuid);
|
||||
/* find a specific instance */
|
||||
int (*deleteInstance) (CKTcircuit *, void *);
|
||||
/* delete an instance from the circuit */
|
||||
|
||||
int (*newModel) (CKTcircuit *, int, void **, IFuid);
|
||||
int (*newModel) (CKTcircuit *, int, GENmodel **, IFuid);
|
||||
/* create new model */
|
||||
int (*setModelParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*setModelParm) (CKTcircuit *, GENmodel *, int, IFvalue *, IFvalue *);
|
||||
/* set a parameter on a model */
|
||||
int (*askModelQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*askModelQuest) (CKTcircuit *, GENmodel *, int, IFvalue *, IFvalue *);
|
||||
/* ask a questions about a model */
|
||||
int (*findModel) (CKTcircuit *, int *, void **, IFuid);
|
||||
int (*findModel) (CKTcircuit *, int *, GENmodel **, IFuid);
|
||||
/* find a specific model */
|
||||
int (*deleteModel) (CKTcircuit *, void *);
|
||||
/* delete a model from the circuit*/
|
||||
|
|
|
|||
|
|
@ -34,31 +34,31 @@ struct INPtables{
|
|||
struct INPnTab **INPtermsymtab;
|
||||
int INPsize;
|
||||
int INPtermsize;
|
||||
void *defAmod;
|
||||
void *defBmod;
|
||||
void *defCmod;
|
||||
void *defDmod;
|
||||
void *defEmod;
|
||||
void *defFmod;
|
||||
void *defGmod;
|
||||
void *defHmod;
|
||||
void *defImod;
|
||||
void *defJmod;
|
||||
void *defKmod;
|
||||
void *defLmod;
|
||||
void *defMmod;
|
||||
void *defNmod;
|
||||
void *defOmod;
|
||||
void *defPmod;
|
||||
void *defQmod;
|
||||
void *defRmod;
|
||||
void *defSmod;
|
||||
void *defTmod;
|
||||
void *defUmod;
|
||||
void *defVmod;
|
||||
void *defWmod;
|
||||
void *defYmod;
|
||||
void *defZmod;
|
||||
GENmodel *defAmod;
|
||||
GENmodel *defBmod;
|
||||
GENmodel *defCmod;
|
||||
GENmodel *defDmod;
|
||||
GENmodel *defEmod;
|
||||
GENmodel *defFmod;
|
||||
GENmodel *defGmod;
|
||||
GENmodel *defHmod;
|
||||
GENmodel *defImod;
|
||||
GENmodel *defJmod;
|
||||
GENmodel *defKmod;
|
||||
GENmodel *defLmod;
|
||||
GENmodel *defMmod;
|
||||
GENmodel *defNmod;
|
||||
GENmodel *defOmod;
|
||||
GENmodel *defPmod;
|
||||
GENmodel *defQmod;
|
||||
GENmodel *defRmod;
|
||||
GENmodel *defSmod;
|
||||
GENmodel *defTmod;
|
||||
GENmodel *defUmod;
|
||||
GENmodel *defVmod;
|
||||
GENmodel *defWmod;
|
||||
GENmodel *defYmod;
|
||||
GENmodel *defZmod;
|
||||
};
|
||||
|
||||
struct card{
|
||||
|
|
@ -77,7 +77,7 @@ struct INPmodel{
|
|||
INPmodel *INPnextModel; /* link to next model */
|
||||
int INPmodUsed; /* flag to indicate it has already been used */
|
||||
card *INPmodLine; /* pointer to line describing model */
|
||||
void *INPmodfast; /* high speed pointer to model for access */
|
||||
GENmodel *INPmodfast; /* high speed pointer to model for access */
|
||||
};
|
||||
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ struct INPmodel{
|
|||
|
||||
int IFnewUid(CKTcircuit *, IFuid *, IFuid, char *, int, void **);
|
||||
int IFdelUid(CKTcircuit *, IFuid, int);
|
||||
int INPaName(char *, IFvalue *, CKTcircuit *, int *, char *, void **, IFsimulator *, int *,
|
||||
int INPaName(char *, IFvalue *, CKTcircuit *, int *, char *, GENinstance **, IFsimulator *, int *,
|
||||
IFvalue *);
|
||||
int INPapName(CKTcircuit *, int, void *, char *, IFvalue *);
|
||||
void INPcaseFix(char *);
|
||||
|
|
@ -116,7 +116,7 @@ char *INPmkTemp(char *);
|
|||
void INPpas1(CKTcircuit *, card *, INPtables *);
|
||||
void INPpas2(CKTcircuit *, card *, INPtables *, void *);
|
||||
void INPpas3(CKTcircuit *, card *, INPtables *, void *, IFparm *, int);
|
||||
int INPpName(char *, IFvalue *, CKTcircuit *, int, void *);
|
||||
int INPpName(char *, IFvalue *, CKTcircuit *, int, GENinstance *);
|
||||
int INPtermInsert(CKTcircuit *, char **, INPtables *, void **);
|
||||
int INPmkTerm(CKTcircuit *, char **, INPtables *, void **);
|
||||
int INPtypelook(char *);
|
||||
|
|
|
|||
|
|
@ -18,14 +18,14 @@ int CKTacDump( CKTcircuit *, double , void *);
|
|||
int CKTacLoad( CKTcircuit *);
|
||||
int CKTaccept( CKTcircuit *);
|
||||
int CKTacct( CKTcircuit *, void *, int , IFvalue *);
|
||||
int CKTask( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTask( CKTcircuit *, GENinstance *, int , IFvalue *, IFvalue *);
|
||||
int CKTaskAnalQ( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTaskNodQst( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTbindNode( CKTcircuit *, void *, int , void *);
|
||||
void CKTbreakDump( CKTcircuit *);
|
||||
int CKTclrBreak( CKTcircuit *);
|
||||
int CKTconvTest( CKTcircuit *);
|
||||
int CKTcrtElt( CKTcircuit *, void *, void **, IFuid );
|
||||
int CKTcrtElt( CKTcircuit *, GENmodel *, GENinstance **, IFuid );
|
||||
int CKTdelTask( CKTcircuit *, void *);
|
||||
int CKTdestroy( CKTcircuit *);
|
||||
int CKTdltAnal( void *, void *, void *);
|
||||
|
|
@ -36,8 +36,8 @@ int CKTdoJob( CKTcircuit *, int , void *);
|
|||
void CKTdump( CKTcircuit *, double, void *);
|
||||
int CKTfndAnal( CKTcircuit *, int *, void **, IFuid , void *, IFuid );
|
||||
int CKTfndBranch( CKTcircuit *, IFuid);
|
||||
int CKTfndDev( CKTcircuit *, int *, void **, IFuid , void *, IFuid );
|
||||
int CKTfndMod( CKTcircuit *, int *, void **, IFuid );
|
||||
int CKTfndDev( CKTcircuit *, int *, GENinstance **, IFuid , GENmodel *, IFuid );
|
||||
int CKTfndMod( CKTcircuit *, int *, GENmodel **, IFuid );
|
||||
int CKTfndNode( CKTcircuit *, void **, IFuid );
|
||||
int CKTfndTask( CKTcircuit *, void **, IFuid );
|
||||
int CKTground( CKTcircuit *, void **, IFuid );
|
||||
|
|
@ -50,9 +50,9 @@ int CKTmapNode( CKTcircuit *, void **, IFuid );
|
|||
int CKTmkCur( CKTcircuit *, CKTnode **, IFuid , char *);
|
||||
int CKTmkNode(CKTcircuit*,CKTnode**);
|
||||
int CKTmkVolt( CKTcircuit *, CKTnode **, IFuid , char *);
|
||||
int CKTmodAsk( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTmodCrt( CKTcircuit *, int , void **, IFuid );
|
||||
int CKTmodParam( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTmodAsk( CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *);
|
||||
int CKTmodCrt( CKTcircuit *, int , GENmodel **, IFuid );
|
||||
int CKTmodParam( CKTcircuit *, GENmodel *, int , IFvalue *, IFvalue *);
|
||||
int CKTnames(CKTcircuit *, int *, IFuid **);
|
||||
int CKTnewAnal( CKTcircuit *, int , IFuid , void **, void *);
|
||||
int CKTnewEq( CKTcircuit *, void **, IFuid );
|
||||
|
|
|
|||
|
|
@ -13,13 +13,13 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTfndMod(CKTcircuit *ckt, int *type, void **modfast, IFuid modname)
|
||||
CKTfndMod(CKTcircuit *ckt, int *type, GENmodel **modfast, IFuid modname)
|
||||
{
|
||||
GENmodel *mods;
|
||||
|
||||
if(modfast != NULL && *(GENmodel **)modfast != NULL) {
|
||||
if(modfast != NULL && *modfast != NULL) {
|
||||
/* already have modfast, so nothing to do */
|
||||
if(type) *type = (*(GENmodel **)modfast)->GENmodType;
|
||||
if(type) *type = (*modfast)->GENmodType;
|
||||
return(OK);
|
||||
}
|
||||
if(*type >=0 && *type < DEVmaxnum) {
|
||||
|
|
@ -28,7 +28,7 @@ CKTfndMod(CKTcircuit *ckt, int *type, void **modfast, IFuid modname)
|
|||
for(mods=ckt->CKThead[*type]; mods != NULL ;
|
||||
mods = mods->GENnextModel) {
|
||||
if(mods->GENmodName == modname) {
|
||||
*modfast = (char *)mods;
|
||||
*modfast = mods;
|
||||
return(OK);
|
||||
}
|
||||
}
|
||||
|
|
@ -41,7 +41,7 @@ CKTfndMod(CKTcircuit *ckt, int *type, void **modfast, IFuid modname)
|
|||
for(mods=ckt->CKThead[*type];mods!=NULL;
|
||||
mods = mods->GENnextModel) {
|
||||
if(mods->GENmodName == modname) {
|
||||
*modfast = (char *)mods;
|
||||
*modfast = mods;
|
||||
return(OK);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ extern SPICEdev **DEVices;
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTmodAsk(CKTcircuit *ckt, void *modfast, int which, IFvalue *value, IFvalue *selector)
|
||||
CKTmodAsk(CKTcircuit *ckt, GENmodel *modfast, int which, IFvalue *value, IFvalue *selector)
|
||||
{
|
||||
int type = ((GENmodel *)modfast)->GENmodType;
|
||||
if((*DEVices[type]).DEVmodAsk) {
|
||||
|
|
|
|||
|
|
@ -18,13 +18,13 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTmodCrt(CKTcircuit *ckt, int type, void **modfast, IFuid name)
|
||||
CKTmodCrt(CKTcircuit *ckt, int type, GENmodel **modfast, IFuid name)
|
||||
{
|
||||
extern SPICEdev **DEVices;
|
||||
GENmodel *mymodfast = NULL;
|
||||
int error;
|
||||
|
||||
error = CKTfndMod(ckt,&type,(void**)&mymodfast,name);
|
||||
error = CKTfndMod(ckt, &type, &mymodfast, name);
|
||||
if(error == E_NOMOD) {
|
||||
mymodfast = (GENmodel *)MALLOC(*(DEVices[type]->DEVmodSize));
|
||||
if(mymodfast == (GENmodel *)NULL) return(E_NOMEM);
|
||||
|
|
@ -32,10 +32,10 @@ CKTmodCrt(CKTcircuit *ckt, int type, void **modfast, IFuid name)
|
|||
mymodfast->GENmodName = name;
|
||||
mymodfast->GENnextModel =(GENmodel *)(ckt->CKThead[type]);
|
||||
ckt->CKThead[type]=(GENmodel *)mymodfast;
|
||||
if(modfast) *modfast=(void *)mymodfast;
|
||||
if(modfast) *modfast=mymodfast;
|
||||
return(OK);
|
||||
} else if (error==0) {
|
||||
if(modfast) *modfast=(void *)mymodfast;
|
||||
if(modfast) *modfast=mymodfast;
|
||||
return(E_EXISTS);
|
||||
} else {
|
||||
return(error);
|
||||
|
|
|
|||
|
|
@ -21,13 +21,13 @@ extern SPICEdev **DEVices;
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTmodParam(CKTcircuit *ckt, void *modfast, int param, IFvalue *val, IFvalue *selector)
|
||||
CKTmodParam(CKTcircuit *ckt, GENmodel *modfast, int param, IFvalue *val, IFvalue *selector)
|
||||
{
|
||||
int type = ((GENmodel *)modfast)->GENmodType;
|
||||
int type = modfast->GENmodType;
|
||||
|
||||
if (((*DEVices[type]).DEVmodParam)) {
|
||||
return(((*((*DEVices[type]).DEVmodParam)) (param,val,
|
||||
(GENmodel *)modfast)));
|
||||
modfast)));
|
||||
} else {
|
||||
return(E_BADPARM);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ CKTpModName(char *parm, IFvalue *val, CKTcircuit *ckt, int type, IFuid name, GEN
|
|||
|
||||
for(i=0;i<(*(*DEVices[type]).DEVpublic.numModelParms);i++) {
|
||||
if(strcmp(parm,((*DEVices[type]).DEVpublic.modelParms[i].keyword))==0){
|
||||
error = CKTmodParam(ckt,(void *)*modfast,
|
||||
error = CKTmodParam(ckt, *modfast,
|
||||
(*DEVices[type]).DEVpublic.modelParms[i].id,val,
|
||||
(IFvalue*)NULL);
|
||||
if(error) return(error);
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
int code;
|
||||
int step;
|
||||
IFuid freqUid;
|
||||
char *inst;
|
||||
GENinstance *inst;
|
||||
double freqTol; /* tolerence parameter for finding final frequency; hack */
|
||||
|
||||
NOISEAN *job = (NOISEAN*) (ckt->CKTcurJob);
|
||||
|
|
@ -50,8 +50,8 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
inst = NULL;
|
||||
code = CKTtypelook("Vsource");
|
||||
if (code != -1) {
|
||||
error = CKTfndDev(ckt,&code,(void **)&inst,
|
||||
job->input, (void *)NULL, (IFuid)NULL);
|
||||
error = CKTfndDev(ckt, &code, &inst,
|
||||
job->input, (GENmodel *)NULL, (IFuid)NULL);
|
||||
if (!error && !((VSRCinstance *)inst)->VSRCacGiven) {
|
||||
errMsg = (char*) MALLOC(strlen(noacinput)+1);
|
||||
strcpy(errMsg,noacinput);
|
||||
|
|
@ -61,8 +61,8 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
|
||||
code = CKTtypelook("Isource");
|
||||
if (code != -1 && inst==NULL) {
|
||||
error = CKTfndDev(ckt,&code, (void **)&inst,
|
||||
job->input, (void *)NULL,(IFuid)NULL);
|
||||
error = CKTfndDev(ckt, &code, &inst,
|
||||
job->input, (GENmodel *)NULL, (IFuid)NULL);
|
||||
if (error) {
|
||||
/* XXX ??? */
|
||||
(*(SPfrontEnd->IFerror))(ERR_WARNING,
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
int converged;
|
||||
int i;
|
||||
void *plotptr = NULL; /* pointer to out plot */
|
||||
void *ptr = NULL;
|
||||
GENinstance *ptr = NULL;
|
||||
IFuid uids[3];
|
||||
int Itype;
|
||||
int Vtype;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTask(CKTcircuit *ckt, void *fast, int which, IFvalue *value, IFvalue *selector)
|
||||
CKTask(CKTcircuit *ckt, GENinstance *fast, int which, IFvalue *value, IFvalue *selector)
|
||||
{
|
||||
GENinstance *instance = (GENinstance *) fast;
|
||||
int type = instance->GENmodPtr->GENmodType;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "memory.h"
|
||||
|
||||
int
|
||||
CKTcrtElt(CKTcircuit *ckt, void *inModPtr, void **inInstPtr, IFuid name)
|
||||
CKTcrtElt(CKTcircuit *ckt, GENmodel *inModPtr, GENinstance **inInstPtr, IFuid name)
|
||||
{
|
||||
GENinstance *instPtr = NULL; /* instPtr points to the data struct for per-instance data */
|
||||
GENmodel *modPtr = (GENmodel*)inModPtr; /* modPtr points to the data struct for per-model data */
|
||||
|
|
@ -32,11 +32,11 @@ CKTcrtElt(CKTcircuit *ckt, void *inModPtr, void **inInstPtr, IFuid name)
|
|||
|
||||
type = ((GENmodel*)modPtr)->GENmodType;
|
||||
|
||||
error = CKTfndDev(ckt, &type, (void**)&instPtr, name, inModPtr,
|
||||
error = CKTfndDev(ckt, &type, &instPtr, name, inModPtr,
|
||||
(char *)NULL );
|
||||
if (error == OK) {
|
||||
if (inInstPtr)
|
||||
*inInstPtr=(void *)instPtr;
|
||||
*inInstPtr = instPtr;
|
||||
return E_EXISTS;
|
||||
} else if (error != E_NODEV)
|
||||
return error;
|
||||
|
|
@ -59,7 +59,7 @@ CKTcrtElt(CKTcircuit *ckt, void *inModPtr, void **inInstPtr, IFuid name)
|
|||
modPtr->GENinstances = instPtr;
|
||||
|
||||
if(inInstPtr != NULL)
|
||||
*inInstPtr = (void *)instPtr;
|
||||
*inInstPtr = instPtr;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,28 +10,28 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTfndDev(CKTcircuit *Ckt, int *type, void **fast, IFuid name, void *modfast, IFuid modname)
|
||||
CKTfndDev(CKTcircuit *Ckt, int *type, GENinstance **fast, IFuid name, GENmodel *modfast, IFuid modname)
|
||||
{
|
||||
CKTcircuit *ckt= /* fixme, drop that */ Ckt;
|
||||
GENinstance *here;
|
||||
GENmodel *mods;
|
||||
|
||||
if((GENinstance **)fast != (GENinstance **)NULL &&
|
||||
*(GENinstance **)fast != (GENinstance *)NULL)
|
||||
if(fast != NULL &&
|
||||
*fast != NULL)
|
||||
{
|
||||
/* already have fast, so nothing much to do just get & set type */
|
||||
if (type)
|
||||
*type = (*((GENinstance**)fast))->GENmodPtr->GENmodType;
|
||||
*type = (*fast)->GENmodPtr->GENmodType;
|
||||
return(OK);
|
||||
}
|
||||
|
||||
if(modfast) {
|
||||
/* have model, just need device */
|
||||
mods = (GENmodel*)modfast;
|
||||
mods = modfast;
|
||||
for (here = mods->GENinstances; here != NULL; here = here->GENnextInstance) {
|
||||
if (here->GENname == name) {
|
||||
if (fast != NULL)
|
||||
*(GENinstance **)fast = here;
|
||||
*fast = here;
|
||||
|
||||
if (type)
|
||||
*type = mods->GENmodType;
|
||||
|
|
@ -57,7 +57,7 @@ CKTfndDev(CKTcircuit *Ckt, int *type, void **fast, IFuid name, void *modfast, IF
|
|||
{
|
||||
if (here->GENname == name) {
|
||||
if (fast != 0)
|
||||
*(GENinstance **)fast = here;
|
||||
*fast = here;
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
|
@ -83,7 +83,7 @@ CKTfndDev(CKTcircuit *Ckt, int *type, void **fast, IFuid name, void *modfast, IF
|
|||
{
|
||||
if (here->GENname == name) {
|
||||
if(fast != 0)
|
||||
*(GENinstance **)fast = here;
|
||||
*fast = here;
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,8 +41,8 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
return(E_INTERN);
|
||||
}
|
||||
|
||||
error = CKTfndDev(ckt,&ktype,(void **)&(here->MUTind1),
|
||||
here->MUTindName1, (void *)NULL,(char *)NULL);
|
||||
error = CKTfndDev(ckt,&ktype,(GENinstance **)&(here->MUTind1),
|
||||
here->MUTindName1, (GENmodel *)NULL, (char *)NULL);
|
||||
if(error && error!= E_NODEV && error != E_NOMOD) return(error);
|
||||
if(error) {
|
||||
IFuid namarray[2];
|
||||
|
|
@ -52,8 +52,8 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
"%s: coupling to non-existant inductor %s.",
|
||||
namarray);
|
||||
}
|
||||
error = CKTfndDev(ckt,&ktype,(void **)&(here->MUTind2),
|
||||
here->MUTindName2,(void *)NULL,(char *)NULL);
|
||||
error = CKTfndDev(ckt,&ktype,(GENinstance **)&(here->MUTind2),
|
||||
here->MUTindName2, (GENmodel *)NULL, (char *)NULL);
|
||||
if(error && error!= E_NODEV && error != E_NOMOD) return(error);
|
||||
if(error) {
|
||||
IFuid namarray[2];
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
"diodemod",UID_MODEL,(void **)NULL);
|
||||
if(error) return(error);
|
||||
modfast = (GENmodel *)NULL;
|
||||
error = CKTmodCrt(ckt,dtype,(void **)&modfast,
|
||||
error = CKTmodCrt(ckt,dtype,&modfast,
|
||||
dioUid);
|
||||
if(error) return(error);
|
||||
ptemp.rValue = c1;
|
||||
|
|
@ -113,7 +113,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
here->URCname, "capmod",UID_MODEL,(void **)NULL);
|
||||
if(error) return(error);
|
||||
modfast = (GENmodel *)NULL;
|
||||
error = CKTmodCrt(ckt,ctype,(void **)&modfast,
|
||||
error = CKTmodCrt(ckt,ctype,&modfast,
|
||||
capUid);
|
||||
if(error) return(error);
|
||||
}
|
||||
|
|
@ -122,7 +122,7 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
"resmod",UID_MODEL,(void **)NULL);
|
||||
if(error) return(error);
|
||||
rmodfast = (GENmodel *)NULL;
|
||||
error = CKTmodCrt(ckt,rtype,(void **)&rmodfast,resUid);
|
||||
error = CKTmodCrt(ckt,rtype,&rmodfast,resUid);
|
||||
if(error) return(error);
|
||||
lowl = CKTnum2nod(ckt,here->URCposNode);
|
||||
hir = CKTnum2nod(ckt,here->URCnegNode);
|
||||
|
|
@ -150,8 +150,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
error = (*(SPfrontEnd->IFnewUid))(ckt,&eltUid,here->URCname,
|
||||
nameelt,UID_INSTANCE, (void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt(ckt,(void *)rmodfast,
|
||||
(void **)&fast,eltUid);
|
||||
error = CKTcrtElt(ckt,rmodfast,
|
||||
&fast,eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,lowl);
|
||||
if(error) return(error);
|
||||
|
|
@ -167,8 +167,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
error = (*(SPfrontEnd->IFnewUid))(ckt,&eltUid,here->URCname,
|
||||
nameelt,UID_INSTANCE, (void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt(ckt,(void *)rmodfast,
|
||||
(void **)&fast,eltUid);
|
||||
error = CKTcrtElt(ckt,rmodfast,
|
||||
&fast,eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,hil);
|
||||
if(error) return(error);
|
||||
|
|
@ -187,8 +187,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
here->URCname,nameelt,UID_INSTANCE,
|
||||
(void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt(ckt,(void *)modfast,
|
||||
(void **)&fast, eltUid);
|
||||
error = CKTcrtElt(ckt,modfast,
|
||||
&fast, eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,lowr);
|
||||
if(error) return(error);
|
||||
|
|
@ -206,8 +206,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
error = (*(SPfrontEnd->IFnewUid))(ckt,&eltUid,here->URCname
|
||||
,nameelt,UID_INSTANCE, (void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt(ckt,(void *)modfast,
|
||||
(void **)&fast, eltUid);
|
||||
error = CKTcrtElt(ckt,modfast,
|
||||
&fast, eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,lowr);
|
||||
if(error) return(error);
|
||||
|
|
@ -230,8 +230,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
here->URCname,nameelt,UID_INSTANCE,
|
||||
(void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt(ckt,(void *)modfast,
|
||||
(void **) &fast,eltUid);
|
||||
error = CKTcrtElt(ckt,modfast,
|
||||
&fast,eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,hil);
|
||||
if(error) return(error);
|
||||
|
|
@ -250,8 +250,8 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
here->URCname,nameelt,UID_INSTANCE,
|
||||
(void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt(ckt,(void *)modfast,
|
||||
(void **)&fast,eltUid);
|
||||
error = CKTcrtElt(ckt,modfast,
|
||||
&fast,eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,hil);
|
||||
if(error) return(error);
|
||||
|
|
@ -311,7 +311,7 @@ URCunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
modfast = NULL;
|
||||
type = -1;
|
||||
error = CKTfndMod(ckt, &type, (void **) &modfast, varUid);
|
||||
error = CKTfndMod(ckt, &type, &modfast, varUid);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
|
@ -328,7 +328,7 @@ URCunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
|
||||
modfast = NULL;
|
||||
type = -1;
|
||||
error = CKTfndMod(ckt, &type, (void **) &modfast, varUid);
|
||||
error = CKTfndMod(ckt, &type, &modfast, varUid);
|
||||
if (error)
|
||||
return error;
|
||||
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ int INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gn
|
|||
/* inpxxxx.c */
|
||||
|
||||
int INPaName(char *parm, IFvalue *val, CKTcircuit *ckt, int *dev, char *devnam,
|
||||
void **fast, IFsimulator *sim, int *dataType, IFvalue *selector);
|
||||
GENinstance **fast, IFsimulator *sim, int *dataType, IFvalue *selector);
|
||||
int INPapName(CKTcircuit *ckt, int type, void *analPtr, char *parmname, IFvalue *value);
|
||||
void INPcaseFix(register char *string);
|
||||
char * INPdomodel(CKTcircuit *ckt, card *image, INPtables *tab);
|
||||
|
|
@ -72,7 +72,7 @@ int INPmakeMod(char *token, int type, card *line);
|
|||
char * INPmkTemp(char *string);
|
||||
void INPpas1(CKTcircuit *ckt, card *deck, INPtables *tab);
|
||||
void INPpas2(CKTcircuit *ckt, card *data, INPtables *tab, void *task);
|
||||
int INPpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, void *fast);
|
||||
int INPpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, GENinstance *fast);
|
||||
|
||||
/* inpptree.c */
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ void INP2B(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node1; /* the first node's node pointer */
|
||||
void *node2; /* the second node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
IFuid uid; /* uid for default model name */
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ void INP2C(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
int error; /* error code temporary */
|
||||
int error1; /* secondary error code temporary */
|
||||
INPmodel *thismodel; /* pointer to model structure describing our model */
|
||||
void *mdfast = NULL; /* pointer to the actual model */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENmodel *mdfast = NULL; /* pointer to the actual model */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ void INP2D(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node1; /* the first node's node pointer */
|
||||
void *node2; /* the second node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
char *model; /* the name of the model */
|
||||
INPmodel *thismodel; /* pointer to model description for user's model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
IFuid uid; /* uid of default model */
|
||||
|
||||
mytype = INPtypelook("Diode");
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ void INP2E(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node3; /* the third node's node pointer */
|
||||
void *node4; /* the fourth node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ void INP2F(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node1; /* the first node's node pointer */
|
||||
void *node2; /* the second node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
IFvalue *parm; /* pointer to a value structure for functions which return one */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ void INP2G(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node3; /* the third node's node pointer */
|
||||
void *node4; /* the fourth node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ void INP2H(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node1; /* the first node's node pointer */
|
||||
void *node2; /* the second node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
IFvalue *parm; /* pointer to a value structure for functions which return one */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ void INP2I(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node1; /* the first node's node pointer */
|
||||
void *node2; /* the second node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
|
|
|
|||
|
|
@ -26,13 +26,13 @@ void INP2J(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node2; /* the second node's node pointer */
|
||||
void *node3; /* the third node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
char *model; /* the name of the model */
|
||||
INPmodel *thismodel; /* pointer to model description for user's model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
IFuid uid; /* uid of default model */
|
||||
|
||||
line = current->line;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ void INP2K(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
char *line; /* the part of the current line left to parse */
|
||||
char *name; /* the resistor's name */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
IFvalue *parm; /* ptr to a value structure for function return values */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
|
|
|
|||
|
|
@ -30,8 +30,8 @@ void INP2L(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
int error; /* error code temporary */
|
||||
int error1; /* secondary error code temporary */
|
||||
INPmodel *thismodel; /* pointer to model structure describing our model */
|
||||
void *mdfast = NULL; /* pointer to the actual model */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENmodel *mdfast = NULL; /* pointer to the actual model */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package inductance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
|
|
|
|||
|
|
@ -43,12 +43,12 @@ INP2M (CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node7; /* the seventh node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
int nodeflag; /* flag indicating 4 or 5 (or 6 or 7) nodes */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
char *model; /* the name of the model */
|
||||
INPmodel *thismodel; /* pointer to model description for user's model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
IFuid uid; /* uid for default model */
|
||||
char* err_msg;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ void INP2N(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
int i;
|
||||
INPmodel *thismodel; /* pointer to model structure describing our model */
|
||||
void *mdfast = NULL; /* pointer to the actual model */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
NDEVinstance *pinst;
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
|
|
|
|||
|
|
@ -29,12 +29,12 @@ void INP2O(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node3; /* the third node's node pointer */
|
||||
void *node4; /* the fourth node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
char *model; /* the name of the model */
|
||||
INPmodel *thismodel; /* pointer to model description for user's model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
IFuid uid; /* uid for default model */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -33,8 +33,8 @@ void *groundnode;
|
|||
int error; /* error code temporary */
|
||||
int error1=0; /* secondary error code temporary */
|
||||
INPmodel *thismodel; /* pointer to model structure describing our model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package cpl into */
|
||||
IFuid uid; /* uid for default model */
|
||||
double lenval = 0;
|
||||
|
|
|
|||
|
|
@ -36,13 +36,13 @@ void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, void *gnode)
|
|||
#endif
|
||||
int error; /* error code temporary */
|
||||
int nodeflag; /* flag indicating 4 or 5 nodes */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
char *model; /* the name of the model */
|
||||
INPmodel *thismodel; /* pointer to model description for user's model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
IFuid uid; /* uid of default model */
|
||||
|
||||
#ifdef TRACE
|
||||
|
|
|
|||
|
|
@ -36,8 +36,8 @@ void INP2R(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
int error; /* error code temporary */
|
||||
int error1; /* secondary error code temporary */
|
||||
INPmodel *thismodel; /* pointer to model structure describing our model */
|
||||
void *mdfast = NULL; /* pointer to the actual model */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENmodel *mdfast = NULL; /* pointer to the actual model */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
|
|
|
|||
|
|
@ -32,8 +32,8 @@ void INP2S(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node4; /* the fourth node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
INPmodel *thismodel; /* pointer to model structure describing our model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
IFuid uid; /* uid of default model */
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ void INP2T(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node3; /* the third node's node pointer */
|
||||
void *node4; /* the fourth node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
IFuid uid; /* uid for default model */
|
||||
|
|
|
|||
|
|
@ -27,12 +27,12 @@ void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node2; /* the second node's node pointer */
|
||||
void *node3; /* the third node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
char *model; /* name of the model */
|
||||
INPmodel *thismodel; /* pointer to our model descriptor */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
IFuid uid; /* uid for default model */
|
||||
|
||||
mytype = INPtypelook("URC");
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ void INP2V(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node1; /* the first node's node pointer */
|
||||
void *node2; /* the second node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
|
|
|
|||
|
|
@ -28,8 +28,8 @@ void INP2W(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node2; /* the second node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
INPmodel *thismodel; /* pointer to model structure describing our model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
IFvalue *parm; /* pointer to a value structure for functions to return */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
|
|
|
|||
|
|
@ -40,10 +40,10 @@ void *gnode1, *gnode2, *inode1, *inode2;
|
|||
int error; /* error code temporary */
|
||||
int error1=0; /* secondary error code temporary */
|
||||
INPmodel *thismodel; /* pointer to model structure describing our model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
void *mdfast2, *mdfast3, *mdfast4, *mdfast5, *mdfast6;
|
||||
void *fast2, *fast3, *fast4, *fast5, *fast6;
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
GENmodel *mdfast2, *mdfast3, *mdfast4, *mdfast5, *mdfast6;
|
||||
GENinstance *fast2, *fast3, *fast4, *fast5, *fast6;
|
||||
IFuid uid; /* uid for default model */
|
||||
GENinstance *txl;
|
||||
IFvalue ptemp; /* a value structure to package into */
|
||||
|
|
|
|||
|
|
@ -33,13 +33,13 @@ void INP2Z(CKTcircuit *ckt, INPtables * tab, card * current)
|
|||
void *node2; /* the second node's node pointer */
|
||||
void *node3; /* the third node's node pointer */
|
||||
int error; /* error code temporary */
|
||||
void *fast; /* pointer to the actual instance */
|
||||
GENinstance *fast; /* pointer to the actual instance */
|
||||
IFvalue ptemp; /* a value structure to package resistance into */
|
||||
int waslead; /* flag to indicate that funny unlabeled number was found */
|
||||
double leadval; /* actual value of unlabeled number */
|
||||
char *model; /* the name of the model */
|
||||
INPmodel *thismodel; /* pointer to model description for user's model */
|
||||
void *mdfast; /* pointer to the actual model */
|
||||
GENmodel *mdfast; /* pointer to the actual model */
|
||||
IFuid uid; /* uid for default model */
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
int
|
||||
INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam,
|
||||
void **fast, IFsimulator * sim, int *dataType, IFvalue * selector)
|
||||
GENinstance **fast, IFsimulator * sim, int *dataType, IFvalue * selector)
|
||||
/* the name of the parameter to set */
|
||||
/* the parameter union containing the value to set */
|
||||
/* the circuit this device is a member of */
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "iferrmsg.h"
|
||||
#include "inp.h"
|
||||
|
||||
int INPpName(char *parm, IFvalue * val, CKTcircuit *ckt, int dev, void *fast)
|
||||
int INPpName(char *parm, IFvalue * val, CKTcircuit *ckt, int dev, GENinstance *fast)
|
||||
/* the name of the parameter to set */
|
||||
/* the parameter union containing the value to set */
|
||||
/* the circuit this device is a member of */
|
||||
|
|
|
|||
|
|
@ -1255,10 +1255,10 @@ int get_mod_param TCL_CMDPROCARGS(clientData,interp,argc,argv) {
|
|||
found=TRUE;
|
||||
} else if (strcmp(paramname,opt->keyword)==0) {
|
||||
if (devptr)
|
||||
err = (*(ft_sim->askInstanceQuest))(ft_curckt->ci_ckt, devptr,
|
||||
err = (*(ft_sim->askInstanceQuest))(ft_curckt->ci_ckt, (GENinstance*) devptr,
|
||||
opt->id, &pv, (IFvalue *)NULL);
|
||||
else
|
||||
err = (*(ft_sim->askModelQuest))(ft_curckt->ci_ckt, modptr,
|
||||
err = (*(ft_sim->askModelQuest))(ft_curckt->ci_ckt, (GENmodel*) modptr,
|
||||
opt->id, &pv, (IFvalue *)NULL);
|
||||
if (err==OK) {
|
||||
sprintf(buf,"%g",pv.rValue); /* dataType is here always real */
|
||||
|
|
|
|||
Loading…
Reference in New Issue