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