use CKTcircuit instead of void*, #3/4
This commit is contained in:
parent
fe68605770
commit
94518fdb02
100
ChangeLog
100
ChangeLog
|
|
@ -1,3 +1,103 @@
|
|||
2010-07-07 Robert Larice
|
||||
* src/main.c ,
|
||||
* src/ngnutmeg.c ,
|
||||
* src/ngspice.c ,
|
||||
* src/frontend/outitf.c ,
|
||||
* src/frontend/outitf.h ,
|
||||
* src/frontend/shyu.c ,
|
||||
* src/frontend/spiceif.c ,
|
||||
* src/frontend/where.c ,
|
||||
* src/include/cktdefs.h ,
|
||||
* src/include/ifsim.h ,
|
||||
* src/include/inpdefs.h ,
|
||||
* src/include/ipcproto.h ,
|
||||
* src/maths/ni/nidest.c ,
|
||||
* src/spicelib/analysis/acan.c ,
|
||||
* src/spicelib/analysis/ckt.h ,
|
||||
* src/spicelib/analysis/cktasknq.c ,
|
||||
* src/spicelib/analysis/cktdelt.c ,
|
||||
* src/spicelib/analysis/cktdest.c ,
|
||||
* src/spicelib/analysis/cktdlti.c ,
|
||||
* src/spicelib/analysis/cktdltm.c ,
|
||||
* src/spicelib/analysis/cktdltn.c ,
|
||||
* src/spicelib/analysis/cktdojob.c ,
|
||||
* src/spicelib/analysis/cktfnda.c ,
|
||||
* src/spicelib/analysis/cktfndm.c ,
|
||||
* src/spicelib/analysis/cktfnode.c ,
|
||||
* src/spicelib/analysis/cktftask.c ,
|
||||
* src/spicelib/analysis/cktgrnd.c ,
|
||||
* src/spicelib/analysis/ckti2nod.c ,
|
||||
* src/spicelib/analysis/cktmapn.c ,
|
||||
* src/spicelib/analysis/cktmask.c ,
|
||||
* src/spicelib/analysis/cktmcrt.c ,
|
||||
* src/spicelib/analysis/cktmkcur.c ,
|
||||
* src/spicelib/analysis/cktmkvol.c ,
|
||||
* src/spicelib/analysis/cktmpar.c ,
|
||||
* src/spicelib/analysis/cktnewan.c ,
|
||||
* src/spicelib/analysis/cktneweq.c ,
|
||||
* src/spicelib/analysis/cktnewn.c ,
|
||||
* src/spicelib/analysis/cktntask.c ,
|
||||
* src/spicelib/analysis/cktnum2n.c ,
|
||||
* src/spicelib/analysis/cktparam.c ,
|
||||
* src/spicelib/analysis/cktpmnam.c ,
|
||||
* src/spicelib/analysis/cktpname.c ,
|
||||
* src/spicelib/analysis/cktsens.c ,
|
||||
* src/spicelib/analysis/cktsetnp.c ,
|
||||
* src/spicelib/analysis/ckttroub.c ,
|
||||
* src/spicelib/analysis/dcop.c ,
|
||||
* src/spicelib/analysis/dctran.c ,
|
||||
* src/spicelib/analysis/dctrcurv.c ,
|
||||
* src/spicelib/analysis/distoan.c ,
|
||||
* src/spicelib/analysis/noisean.c ,
|
||||
* src/spicelib/analysis/pzan.c ,
|
||||
* src/spicelib/analysis/tfanal.c ,
|
||||
* src/spicelib/devices/cktask.c ,
|
||||
* src/spicelib/devices/cktbindnode.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/ifnewuid.c ,
|
||||
* src/spicelib/parser/inp.h ,
|
||||
* src/spicelib/parser/inp2b.c ,
|
||||
* src/spicelib/parser/inp2c.c ,
|
||||
* src/spicelib/parser/inp2d.c ,
|
||||
* src/spicelib/parser/inp2dot.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/inpdomod.c ,
|
||||
* src/spicelib/parser/inpdpar.c ,
|
||||
* src/spicelib/parser/inpgmod.c ,
|
||||
* src/spicelib/parser/inpgval.c ,
|
||||
* src/spicelib/parser/inppas3.c ,
|
||||
* src/spicelib/parser/inppas3.h ,
|
||||
* src/spicelib/parser/inppname.c ,
|
||||
* src/spicelib/parser/inpptree.c ,
|
||||
* src/spicelib/parser/inpsymt.c ,
|
||||
* src/xspice/ipc/ipctiein.c :
|
||||
the third of a series of four patches, which will change the code
|
||||
to use the CKTcircuit type instead of the current mixed void*/char*
|
||||
|
||||
2010-07-07 Robert Larice
|
||||
* src/include/cktdefs.h ,
|
||||
* src/include/ifsim.h ,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ extern char *spice_analysis_get_description(int index);
|
|||
|
||||
|
||||
/* static declarations */
|
||||
static int beginPlot(void *analysisPtr, void *circuitPtr, char *cktName, char *analName,
|
||||
static int beginPlot(void *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analName,
|
||||
char *refName, int refType, int numNames, char **dataNames, int dataType,
|
||||
bool windowed, runDesc **runp);
|
||||
static int addDataDesc(runDesc *run, char *name, int type, int ind);
|
||||
|
|
@ -88,7 +88,7 @@ static bool printinfo = FALSE; /* Print informational "error messages". */
|
|||
/* The two "begin plot" routines share all their internals... */
|
||||
|
||||
int
|
||||
OUTpBeginPlot(void *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName, int refType, int numNames, IFuid *dataNames, int dataType, void **plotPtr)
|
||||
OUTpBeginPlot(CKTcircuit *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName, int refType, int numNames, IFuid *dataNames, int dataType, void **plotPtr)
|
||||
{
|
||||
char *name;
|
||||
|
||||
|
|
@ -109,7 +109,7 @@ if (ARCHme != 0) return(OK);
|
|||
}
|
||||
|
||||
int
|
||||
OUTwBeginPlot(void *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName, int refType, int numNames, IFuid *dataNames, int dataType, void **plotPtr)
|
||||
OUTwBeginPlot(CKTcircuit *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName, int refType, int numNames, IFuid *dataNames, int dataType, void **plotPtr)
|
||||
{
|
||||
#ifdef PARALLEL_ARCH
|
||||
if (ARCHme != 0) return(OK);
|
||||
|
|
@ -122,7 +122,7 @@ OUTwBeginPlot(void *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName
|
|||
}
|
||||
|
||||
static int
|
||||
beginPlot(void *analysisPtr, void *circuitPtr, char *cktName, char *analName, char *refName, int refType, int numNames, char **dataNames, int dataType, bool windowed, runDesc **runp)
|
||||
beginPlot(void *analysisPtr, CKTcircuit *circuitPtr, char *cktName, char *analName, char *refName, int refType, int numNames, char **dataNames, int dataType, bool windowed, runDesc **runp)
|
||||
{
|
||||
runDesc *run;
|
||||
struct save_info *saves;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ typedef struct dataDesc {
|
|||
|
||||
typedef struct runDesc {
|
||||
void *analysis;
|
||||
void *circuit;
|
||||
CKTcircuit *circuit;
|
||||
char *name;
|
||||
char *type;
|
||||
int numData;
|
||||
|
|
@ -39,9 +39,9 @@ typedef struct runDesc {
|
|||
int windowCount;
|
||||
} runDesc;
|
||||
|
||||
int OUTpBeginPlot(void *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName,
|
||||
int OUTpBeginPlot(CKTcircuit *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName,
|
||||
int refType, int numNames, IFuid *dataNames, int dataType, void **plotPtr);
|
||||
int OUTwBeginPlot(void *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName,
|
||||
int OUTwBeginPlot(CKTcircuit *circuitPtr, void *analysisPtr, IFuid analName, IFuid refName,
|
||||
int refType, int numNames, IFuid *dataNames, int dataType, void **plotPtr);
|
||||
int OUTpData(void *plotPtr, IFvalue *refValue, IFvalue *valuePtr);
|
||||
int OUTwReference(void *plotPtr, IFvalue *valuePtr, void **refPtr);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ Copyright 1990 Regents of the University of California. All rights reserved.
|
|||
int
|
||||
if_sens_run(CKTcircuit *t, wordlist *args, INPtables *tab)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit * /*fixme*/) t;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ t;
|
||||
void *senseJob;
|
||||
void *acJob;
|
||||
void *opJob;
|
||||
|
|
|
|||
|
|
@ -170,13 +170,13 @@ if_inpdeck(struct line *deck, INPtables **tab)
|
|||
* cards. These are left till INPpas3 so that we can check for
|
||||
* nodeset/ic of non-existant nodes. */
|
||||
|
||||
INPpas3((void *) ckt, (card *) deck->li_next,
|
||||
INPpas3(ckt, (card *) deck->li_next,
|
||||
(INPtables *) *tab,ft_curckt->ci_defTask, ft_sim->nodeParms,
|
||||
ft_sim->numNodeParms);
|
||||
|
||||
#ifdef XSPICE
|
||||
/* gtri - begin - wbk - 6/6/91 - Finish initialization of event driven structures */
|
||||
err = EVTinit((void *) ckt);
|
||||
err = EVTinit(ckt);
|
||||
if(err) {
|
||||
ft_sperror(err,"EVTinit");
|
||||
return(NULL);
|
||||
|
|
@ -197,7 +197,7 @@ if_inpdeck(struct line *deck, INPtables **tab)
|
|||
int
|
||||
if_run(CKTcircuit *t, char *what, wordlist *args, INPtables *tab)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit *) t;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ t;
|
||||
int err;
|
||||
struct line deck;
|
||||
char buf[BSIZE_SP];
|
||||
|
|
@ -386,7 +386,7 @@ if_option(CKTcircuit *ckt, char *name, int type, char *value)
|
|||
{
|
||||
IFvalue pval;
|
||||
int err, i;
|
||||
CKTcircuit *cc = (CKTcircuit * /*fixme*/) ckt;
|
||||
CKTcircuit *cc = /* fixme, drop that */ ckt;
|
||||
char **vv;
|
||||
int which = -1;
|
||||
|
||||
|
|
@ -540,7 +540,7 @@ if_dump(CKTcircuit *ckt, FILE *file)
|
|||
void
|
||||
if_cktfree(CKTcircuit *ckt, INPtables *tab)
|
||||
{
|
||||
void *cc = (void *) ckt;
|
||||
CKTcircuit *cc = /* fixme, drop that */ ckt;
|
||||
|
||||
(*(ft_sim->deleteCircuit))(cc);
|
||||
INPtabEnd((INPtables *) tab);
|
||||
|
|
@ -578,7 +578,7 @@ finddev_special(
|
|||
int err;
|
||||
int type = -1;
|
||||
|
||||
err = (*(ft_sim->findInstance))((void *)ck,&type,devptr,name,NULL,NULL);
|
||||
err = (*(ft_sim->findInstance))(ck,&type,devptr,name,NULL,NULL);
|
||||
if(err == OK)
|
||||
{
|
||||
*device_or_model=0;
|
||||
|
|
@ -586,7 +586,7 @@ finddev_special(
|
|||
}
|
||||
type = -1;
|
||||
*devptr = (void *)NULL;
|
||||
err = (*(ft_sim->findModel))((void *)ck,&type,modptr,name);
|
||||
err = (*(ft_sim->findModel))(ck,&type,modptr,name);
|
||||
if(err == OK)
|
||||
{
|
||||
*device_or_model=1;
|
||||
|
|
@ -871,11 +871,11 @@ if_setparam_model(CKTcircuit *ckt, char **name, char *val )
|
|||
/* see if any devices remaining that reference current model */
|
||||
if ( curMod->GENinstances == NULL ) {
|
||||
prevMod = NULL;
|
||||
for( mods = ((CKTcircuit *)ckt)->CKThead[typecode]; mods != NULL; mods = mods->GENnextModel ) {
|
||||
for( mods = ckt->CKThead[typecode]; mods != NULL; mods = mods->GENnextModel ) {
|
||||
if ( mods->GENmodName == curMod->GENmodName ) {
|
||||
|
||||
/* see if at beginning of linked list */
|
||||
if ( prevMod == NULL ) ((CKTcircuit *)ckt)->CKThead[typecode] = mods->GENnextModel;
|
||||
if ( prevMod == NULL ) ckt->CKThead[typecode] = mods->GENnextModel;
|
||||
else prevMod->GENnextModel = mods->GENnextModel;
|
||||
|
||||
INPgetMod( ckt, (char *)mods->GENmodName, &inpmod, (INPtables *)ft_curckt->ci_symtab );
|
||||
|
|
@ -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))((void *)ckt, (void *)dev,
|
||||
err = (*(ft_sim->askInstanceQuest))(ckt, (void *)dev,
|
||||
opt->id, &pv, (IFvalue *)NULL);
|
||||
else
|
||||
err = (*(ft_sim->askModelQuest))((void*)ckt, (void *) mod,
|
||||
err = (*(ft_sim->askModelQuest))(ckt, (void *) 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))((void *)ckt, (void *)dev,
|
||||
err = (*(ft_sim->setInstanceParm))(ckt, (void *)dev,
|
||||
opt->id, &nval, (IFvalue *)NULL);
|
||||
else
|
||||
err = (*(ft_sim->setModelParm))((void*)ckt, (void *) mod,
|
||||
err = (*(ft_sim->setModelParm))(ckt, (void *) mod,
|
||||
opt->id, &nval, (IFvalue *)NULL);
|
||||
|
||||
return err;
|
||||
|
|
@ -1156,11 +1156,11 @@ finddev(CKTcircuit *ck, char *name, GENinstance **devptr, GENmodel **modptr)
|
|||
int err;
|
||||
int type = -1;
|
||||
|
||||
err = (*(ft_sim->findInstance))((void *)ck,&type,devptr,name,NULL,NULL);
|
||||
err = (*(ft_sim->findInstance))(ck,&type,devptr,name,NULL,NULL);
|
||||
if(err == OK) return(type);
|
||||
type = -1;
|
||||
*devptr = (void *)NULL;
|
||||
err = (*(ft_sim->findModel))((void *)ck,&type,modptr,name);
|
||||
err = (*(ft_sim->findModel))(ck,&type,modptr,name);
|
||||
if(err == OK) return(type);
|
||||
*modptr = (void *)NULL;
|
||||
return(-1);
|
||||
|
|
@ -1524,9 +1524,9 @@ do {\
|
|||
fprintf(cp_err,"error in CKTnames\n");
|
||||
return;
|
||||
}
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&timeUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&timeUid,(IFuid)NULL,
|
||||
"time", UID_OTHER, (void **)NULL);
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname,timeUid,IF_REAL,numNames,nameList,
|
||||
IF_REAL,&(((TRANan*)ckt->CKTcurJob)->TRANplot));
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ com_where(wordlist *wl)
|
|||
fprintf(cp_err, "No unconverged node found.\n");
|
||||
return;
|
||||
}
|
||||
msg = (*ft_sim->nonconvErr)((void *) (ft_curckt->ci_ckt), 0);
|
||||
msg = (*ft_sim->nonconvErr)(ft_curckt->ci_ckt, 0);
|
||||
|
||||
printf("%s", msg);
|
||||
|
||||
|
|
|
|||
|
|
@ -276,51 +276,51 @@ extern int CKTacDump(CKTcircuit *, double , void *);
|
|||
extern int CKTacLoad(CKTcircuit *);
|
||||
extern int CKTaccept(CKTcircuit *);
|
||||
extern int CKTacct(CKTcircuit *, void *, int , IFvalue *);
|
||||
extern int CKTask(void *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTask(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTaskAnalQ(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTaskNodQst(void *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTbindNode(void *, void *, int , void *);
|
||||
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(void *, void *, void **, IFuid);
|
||||
extern int CKTdelTask(void *, void *);
|
||||
extern int CKTdestroy(void *);
|
||||
extern int CKTcrtElt(CKTcircuit *, void *, void **, IFuid);
|
||||
extern int CKTdelTask(CKTcircuit *, void *);
|
||||
extern int CKTdestroy(CKTcircuit *);
|
||||
extern int CKTdltAnal(void *, void *, void *);
|
||||
extern int CKTdltInst(void *, void *);
|
||||
extern int CKTdltMod(void *, void *);
|
||||
extern int CKTdltNNum(void *, int);
|
||||
extern int CKTdltNod(void *, void *);
|
||||
extern int CKTdoJob(void *, int , void *);
|
||||
extern int CKTdltInst(CKTcircuit *, void *);
|
||||
extern int CKTdltMod(CKTcircuit *, void *);
|
||||
extern int CKTdltNNum(CKTcircuit *, int);
|
||||
extern int CKTdltNod(CKTcircuit *, void *);
|
||||
extern int CKTdoJob(CKTcircuit *, int , void *);
|
||||
extern void CKTdump(CKTcircuit *, double, void *);
|
||||
#ifdef CIDER
|
||||
extern void NDEVacct(CKTcircuit *ckt, FILE *file);
|
||||
#endif /* CIDER */
|
||||
extern void CKTncDump(CKTcircuit *);
|
||||
extern int CKTfndAnal(void *, int *, void **, IFuid , void *, IFuid);
|
||||
extern int CKTfndAnal(CKTcircuit *, int *, void **, IFuid , void *, IFuid);
|
||||
extern int CKTfndBranch(CKTcircuit *, IFuid);
|
||||
extern int CKTfndDev(void *, int *, void **, IFuid , void *, IFuid);
|
||||
extern int CKTfndMod(void *, int *, void **, IFuid);
|
||||
extern int CKTfndNode(void *, void **, IFuid);
|
||||
extern int CKTfndTask(void *, void **, IFuid );
|
||||
extern int CKTground(void *, void **, IFuid);
|
||||
extern int CKTfndDev(CKTcircuit *, int *, void **, IFuid , void *, IFuid);
|
||||
extern int CKTfndMod(CKTcircuit *, int *, void **, IFuid);
|
||||
extern int CKTfndNode(CKTcircuit *, void **, IFuid);
|
||||
extern int CKTfndTask(CKTcircuit *, void **, IFuid );
|
||||
extern int CKTground(CKTcircuit *, void **, IFuid);
|
||||
extern int CKTic(CKTcircuit *);
|
||||
extern int CKTinit(CKTcircuit **);
|
||||
extern int CKTinst2Node(void *, void *, int , CKTnode **, IFuid *);
|
||||
extern int CKTinst2Node(CKTcircuit *, void *, int , CKTnode **, IFuid *);
|
||||
extern int CKTlinkEq(CKTcircuit *, CKTnode *);
|
||||
extern int CKTload(CKTcircuit *);
|
||||
extern int CKTmapNode(void *, void **, IFuid);
|
||||
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(void *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTmodCrt(void *, int , void **, IFuid);
|
||||
extern int CKTmodParam(void *, void *, int , IFvalue *, IFvalue *);
|
||||
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 CKTnames(CKTcircuit *, int *, IFuid **);
|
||||
extern int CKTnewAnal(void *, int , IFuid , void **, void *);
|
||||
extern int CKTnewEq(void *, void **, IFuid);
|
||||
extern int CKTnewNode(void *, void **, IFuid);
|
||||
extern int CKTnewTask(void *, void **, IFuid, void **);
|
||||
extern int CKTnewAnal(CKTcircuit *, int , IFuid , void **, void *);
|
||||
extern int CKTnewEq(CKTcircuit *, void **, IFuid);
|
||||
extern int CKTnewNode(CKTcircuit *, void **, IFuid);
|
||||
extern int CKTnewTask(CKTcircuit *, void **, IFuid, void **);
|
||||
extern int CKTnoise (CKTcircuit *ckt, int mode, int operation, Ndata *data);
|
||||
extern IFuid CKTnodName(CKTcircuit *, int);
|
||||
extern void CKTnodOut(CKTcircuit *);
|
||||
|
|
@ -328,7 +328,7 @@ extern CKTnode * CKTnum2nod(CKTcircuit *, int);
|
|||
extern int CKTop(CKTcircuit *, long, long, int);
|
||||
extern int CKTpModName(char *, IFvalue *, CKTcircuit *, int , IFuid , GENmodel **);
|
||||
extern int CKTpName(char *, IFvalue *, CKTcircuit *, int , char *, GENinstance **);
|
||||
extern int CKTparam(void *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTparam(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTpartition(register CKTcircuit *ckt);
|
||||
extern int CKTpzFindZeros(CKTcircuit *, PZtrial **, int *);
|
||||
extern int CKTpzLoad(CKTcircuit *, SPcomplex *);
|
||||
|
|
@ -342,12 +342,12 @@ extern int CKTsenSetup(CKTcircuit *);
|
|||
extern int CKTsenUpdate(CKTcircuit *);
|
||||
extern int CKTsetAnalPm(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTsetBreak(CKTcircuit *, double);
|
||||
extern int CKTsetNodPm(void *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTsetNodPm(CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
extern int CKTsetOpt(CKTcircuit *, void *, int , IFvalue *);
|
||||
extern int CKTsetup(CKTcircuit *);
|
||||
extern int CKTunsetup(CKTcircuit *);
|
||||
extern int CKTtemp(CKTcircuit *);
|
||||
extern char *CKTtrouble(void *, char *);
|
||||
extern char *CKTtrouble(CKTcircuit *, char *);
|
||||
extern void CKTterr(int , CKTcircuit *, double *);
|
||||
extern int CKTtrunc(CKTcircuit *, double *);
|
||||
extern int CKTtypelook(char *);
|
||||
|
|
|
|||
|
|
@ -347,65 +347,65 @@ struct IFsimulator {
|
|||
|
||||
int (*newCircuit) (CKTcircuit **);
|
||||
/* create new circuit */
|
||||
int (*deleteCircuit) (void *);
|
||||
int (*deleteCircuit) (CKTcircuit *);
|
||||
/* destroy old circuit's data structures*/
|
||||
|
||||
int (*newNode) (void *, void **, IFuid);
|
||||
int (*newNode) (CKTcircuit *, void **, IFuid);
|
||||
/* create new node */
|
||||
int (*groundNode) (void *, void **, IFuid);
|
||||
int (*groundNode) (CKTcircuit *, void **, IFuid);
|
||||
/* create ground node */
|
||||
int (*bindNode) (void *, void *, int, void *);
|
||||
int (*bindNode) (CKTcircuit *, void *, int, void *);
|
||||
/* bind a node to a terminal */
|
||||
int (*findNode) (void *, void **, IFuid);
|
||||
int (*findNode) (CKTcircuit *, void **, IFuid);
|
||||
/* find a node by name */
|
||||
int (*instToNode) (void *, void *, int, void **, IFuid *);
|
||||
int (*instToNode) (CKTcircuit *, void *, int, void **, IFuid *);
|
||||
/* find the node attached to a terminal */
|
||||
int (*setNodeParm) (void *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*setNodeParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* set a parameter on a node */
|
||||
int (*askNodeQuest) (void *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*askNodeQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* ask a question about a node */
|
||||
int (*deleteNode) (void *, void *);
|
||||
int (*deleteNode) (CKTcircuit *, void *);
|
||||
/* delete a node from the circuit */
|
||||
|
||||
int (*newInstance) (void *, void *, void **, IFuid);
|
||||
int (*newInstance) (CKTcircuit *, void *, void **, IFuid);
|
||||
/* create new instance */
|
||||
int (*setInstanceParm) (void *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*setInstanceParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* set a parameter on an instance */
|
||||
int (*askInstanceQuest) (void *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*askInstanceQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* ask a question about an instance */
|
||||
int (*findInstance) (void *, int *, void **, IFuid, void *, IFuid);
|
||||
int (*findInstance) (CKTcircuit *, int *, void **, IFuid, void *, IFuid);
|
||||
/* find a specific instance */
|
||||
int (*deleteInstance) (void *, void *);
|
||||
int (*deleteInstance) (CKTcircuit *, void *);
|
||||
/* delete an instance from the circuit */
|
||||
|
||||
int (*newModel) (void *, int, void **, IFuid);
|
||||
int (*newModel) (CKTcircuit *, int, void **, IFuid);
|
||||
/* create new model */
|
||||
int (*setModelParm) (void *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*setModelParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* set a parameter on a model */
|
||||
int (*askModelQuest) (void *, void *, int, IFvalue *, IFvalue *);
|
||||
int (*askModelQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* ask a questions about a model */
|
||||
int (*findModel) (void *, int *, void **, IFuid);
|
||||
int (*findModel) (CKTcircuit *, int *, void **, IFuid);
|
||||
/* find a specific model */
|
||||
int (*deleteModel) (void *, void *);
|
||||
int (*deleteModel) (CKTcircuit *, void *);
|
||||
/* delete a model from the circuit*/
|
||||
|
||||
int (*newTask) (void *, void **, IFuid, void **); /*CDHW*/
|
||||
int (*newTask) (CKTcircuit *, void **, IFuid, void **); /*CDHW*/
|
||||
/* create a new task */
|
||||
int (*newAnalysis) (void *, int, IFuid, void **, void *);
|
||||
int (*newAnalysis) (CKTcircuit *, int, IFuid, void **, void *);
|
||||
/* create new analysis within a task */
|
||||
int (*setAnalysisParm) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* set a parameter on an analysis */
|
||||
int (*askAnalysisQuest) (CKTcircuit *, void *, int, IFvalue *, IFvalue *);
|
||||
/* ask a question about an analysis */
|
||||
int (*findAnalysis) (void *, int *, void **, IFuid, void *, IFuid);
|
||||
int (*findAnalysis) (CKTcircuit *, int *, void **, IFuid, void *, IFuid);
|
||||
/* find a specific analysis */
|
||||
int (*findTask) (void *, void **, IFuid);
|
||||
int (*findTask) (CKTcircuit *, void **, IFuid);
|
||||
/* find a specific task */
|
||||
int (*deleteTask) (void *, void *);
|
||||
int (*deleteTask) (CKTcircuit *, void *);
|
||||
/* delete a task */
|
||||
|
||||
int (*doAnalyses) (void *, int, void *);
|
||||
char *(*nonconvErr) (void *, char *); /* return nonconvergence error */
|
||||
int (*doAnalyses) (CKTcircuit *, int, void *);
|
||||
char *(*nonconvErr) (CKTcircuit *, char *); /* return nonconvergence error */
|
||||
|
||||
int numDevices; /* number of device types supported */
|
||||
IFdevice **devices; /* array of device type descriptors */
|
||||
|
|
@ -432,9 +432,9 @@ struct IFsimulator {
|
|||
*/
|
||||
|
||||
struct IFfrontEnd {
|
||||
int (*IFnewUid) (void *, IFuid *, IFuid, char *, int, void **);
|
||||
int (*IFnewUid) (CKTcircuit *, IFuid *, IFuid, char *, int, void **);
|
||||
/* create a new UID in the circuit */
|
||||
int (*IFdelUid) (void *, IFuid, int);
|
||||
int (*IFdelUid) (CKTcircuit *, IFuid, int);
|
||||
/* create a new UID in the circuit */
|
||||
int (*IFpauseTest) (void);
|
||||
/* should we stop now? */
|
||||
|
|
@ -442,12 +442,12 @@ struct IFfrontEnd {
|
|||
/* what time is it? */
|
||||
int (*IFerror) (int, char *, IFuid *);
|
||||
/* output an error or warning message */
|
||||
int (*OUTpBeginPlot) (void *, void *, IFuid, IFuid, int,
|
||||
int (*OUTpBeginPlot) (CKTcircuit *, void *, IFuid, IFuid, int,
|
||||
int, IFuid *, int, void **);
|
||||
/* start pointwise output plot */
|
||||
int (*OUTpData) (void *, IFvalue *, IFvalue *);
|
||||
/* data for pointwise plot */
|
||||
int (*OUTwBeginPlot) (void *, void *, IFuid, IFuid, int,
|
||||
int (*OUTwBeginPlot) (CKTcircuit *, void *, IFuid, IFuid, int,
|
||||
int, IFuid *, int, void **);
|
||||
/* start windowed output plot */
|
||||
int (*OUTwReference) (void *, IFvalue *, void **);
|
||||
|
|
|
|||
|
|
@ -86,26 +86,26 @@ struct INPmodel{
|
|||
#define LOGICAL 1
|
||||
#define PHYSICAL 2
|
||||
|
||||
int IFnewUid(void *, IFuid *, IFuid, char *, int, void **);
|
||||
int IFdelUid(void *, IFuid, int);
|
||||
int INPaName(char *, IFvalue *, void *, int *, char *, void **, IFsimulator *, int *,
|
||||
int IFnewUid(CKTcircuit *, IFuid *, IFuid, char *, int, void **);
|
||||
int IFdelUid(CKTcircuit *, IFuid, int);
|
||||
int INPaName(char *, IFvalue *, CKTcircuit *, int *, char *, void **, IFsimulator *, int *,
|
||||
IFvalue *);
|
||||
int INPapName(CKTcircuit *, int, void *, char *, IFvalue *);
|
||||
void INPcaseFix(char *);
|
||||
char *INPdevParse(char **, void *, int, void *, double *, int *, INPtables *);
|
||||
char *INPdomodel(void *, card *, INPtables *);
|
||||
char *INPdevParse(char **, CKTcircuit *, int, void *, double *, int *, INPtables *);
|
||||
char *INPdomodel(CKTcircuit *, card *, INPtables *);
|
||||
void INPdoOpts(CKTcircuit *, void *, card *, INPtables *);
|
||||
char *INPerrCat(char *, char *);
|
||||
char *INPerror(int);
|
||||
double INPevaluate(char **, int *, int);
|
||||
char *INPfindLev(char *, int *);
|
||||
char *INPgetMod(void *, char *, INPmodel **, INPtables *);
|
||||
char *INPgetModBin(void *, char *, INPmodel **, INPtables *, char *);
|
||||
char *INPgetMod(CKTcircuit *, char *, INPmodel **, INPtables *);
|
||||
char *INPgetModBin(CKTcircuit *, char *, INPmodel **, INPtables *, char *);
|
||||
int INPgetTok(char **, char **, int);
|
||||
int INPgetNetTok(char **, char **, int);
|
||||
void INPgetTree(char **, INPparseTree **, void *, INPtables *);
|
||||
IFvalue *INPgetValue(void *, char **, int, INPtables *);
|
||||
int INPgndInsert(void *, char **, INPtables *, void **);
|
||||
void INPgetTree(char **, INPparseTree **, CKTcircuit *, INPtables *);
|
||||
IFvalue *INPgetValue(CKTcircuit *, char **, int, INPtables *);
|
||||
int INPgndInsert(CKTcircuit *, char **, INPtables *, void **);
|
||||
int INPinsertNofree(char **token, INPtables *tab);
|
||||
int INPinsert(char **, INPtables *);
|
||||
int INPretrieve(char **, INPtables *);
|
||||
|
|
@ -115,34 +115,34 @@ int INPmakeMod(char *, int, card *);
|
|||
char *INPmkTemp(char *);
|
||||
void INPpas1(CKTcircuit *, card *, INPtables *);
|
||||
void INPpas2(CKTcircuit *, card *, INPtables *, void *);
|
||||
void INPpas3(void *, card *, INPtables *, void *, IFparm *, int);
|
||||
int INPpName(char *, IFvalue *, void *, int, void *);
|
||||
int INPtermInsert(void *, char **, INPtables *, void **);
|
||||
int INPmkTerm(void *, char **, INPtables *, void **);
|
||||
void INPpas3(CKTcircuit *, card *, INPtables *, void *, IFparm *, int);
|
||||
int INPpName(char *, IFvalue *, CKTcircuit *, int, void *);
|
||||
int INPtermInsert(CKTcircuit *, char **, INPtables *, void **);
|
||||
int INPmkTerm(CKTcircuit *, char **, INPtables *, void **);
|
||||
int INPtypelook(char *);
|
||||
void INP2B(void *, INPtables *, card *);
|
||||
void INP2C(void *, INPtables *, card *);
|
||||
void INP2D(void *, INPtables *, card *);
|
||||
void INP2E(void *, INPtables *, card *);
|
||||
void INP2F(void *, INPtables *, card *);
|
||||
void INP2G(void *, INPtables *, card *);
|
||||
void INP2H(void *, INPtables *, card *);
|
||||
void INP2I(void *, INPtables *, card *);
|
||||
void INP2J(void *, INPtables *, card *);
|
||||
void INP2K(void *, INPtables *, card *);
|
||||
void INP2L(void *, INPtables *, card *);
|
||||
void INP2M(void *, INPtables *, card *);
|
||||
void INP2O(void *, INPtables *, card *);
|
||||
void INP2P(void *, INPtables *, card *);
|
||||
void INP2Q(void *, INPtables *, card *, void *);
|
||||
void INP2R(void *, INPtables *, card *);
|
||||
void INP2S(void *, INPtables *, card *);
|
||||
void INP2T(void *, INPtables *, card *);
|
||||
void INP2U(void *, INPtables *, card *);
|
||||
void INP2V(void *, INPtables *, card *);
|
||||
void INP2W(void *, INPtables *, card *);
|
||||
void INP2Y(void *, INPtables *, card *);
|
||||
void INP2Z(void *, INPtables *, card *);
|
||||
void INP2B(CKTcircuit *, INPtables *, card *);
|
||||
void INP2C(CKTcircuit *, INPtables *, card *);
|
||||
void INP2D(CKTcircuit *, INPtables *, card *);
|
||||
void INP2E(CKTcircuit *, INPtables *, card *);
|
||||
void INP2F(CKTcircuit *, INPtables *, card *);
|
||||
void INP2G(CKTcircuit *, INPtables *, card *);
|
||||
void INP2H(CKTcircuit *, INPtables *, card *);
|
||||
void INP2I(CKTcircuit *, INPtables *, card *);
|
||||
void INP2J(CKTcircuit *, INPtables *, card *);
|
||||
void INP2K(CKTcircuit *, INPtables *, card *);
|
||||
void INP2L(CKTcircuit *, INPtables *, card *);
|
||||
void INP2M(CKTcircuit *, INPtables *, card *);
|
||||
void INP2O(CKTcircuit *, INPtables *, card *);
|
||||
void INP2P(CKTcircuit *, INPtables *, card *);
|
||||
void INP2Q(CKTcircuit *, INPtables *, card *, void *);
|
||||
void INP2R(CKTcircuit *, INPtables *, card *);
|
||||
void INP2S(CKTcircuit *, INPtables *, card *);
|
||||
void INP2T(CKTcircuit *, INPtables *, card *);
|
||||
void INP2U(CKTcircuit *, INPtables *, card *);
|
||||
void INP2V(CKTcircuit *, INPtables *, card *);
|
||||
void INP2W(CKTcircuit *, INPtables *, card *);
|
||||
void INP2Y(CKTcircuit *, INPtables *, card *);
|
||||
void INP2Z(CKTcircuit *, INPtables *, card *);
|
||||
int INP2dot(CKTcircuit *, INPtables *, card *, void *, void *);
|
||||
INPtables *INPtabInit(int);
|
||||
void INPkillMods(void);
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ void ipc_send_stdout (void );
|
|||
void ipc_send_stderr (void );
|
||||
Ipc_Status_t ipc_send_std_files (void );
|
||||
Ipc_Boolean_t ipc_screen_name (char *name , char *mapped_name );
|
||||
int ipc_get_devices (void *circuit , char *device , char ***names , double **modtypes );
|
||||
int ipc_get_devices (CKTcircuit *circuit , char *device , char ***names , double **modtypes );
|
||||
void ipc_free_devices (int num_items , char **names , double *modtypes );
|
||||
void ipc_check_pause_stop (void );
|
||||
|
||||
|
|
|
|||
|
|
@ -190,9 +190,9 @@ bool ft_nutmeg = FALSE;
|
|||
extern struct comm spcp_coms[ ];
|
||||
struct comm *cp_coms = spcp_coms;
|
||||
|
||||
extern int OUTpBeginPlot(void *,void *,IFuid,IFuid,int,int,IFuid *,int,void **);
|
||||
extern int OUTpBeginPlot(CKTcircuit *,void *,IFuid,IFuid,int,int,IFuid *,int,void **);
|
||||
extern int OUTpData(void *,IFvalue *,IFvalue *);
|
||||
extern int OUTwBeginPlot(void *,void *,IFuid,IFuid,int,int,IFuid *,int,void **);
|
||||
extern int OUTwBeginPlot(CKTcircuit *,void *,IFuid,IFuid,int,int,IFuid *,int,void **);
|
||||
extern int OUTwReference(void *,IFvalue *,void **);
|
||||
extern int OUTwData(void *,int,IFvalue *,void *), OUTwEnd(void *), OUTendPlot(void *);
|
||||
extern int OUTbeginDomain(void *,IFuid,int,IFvalue *);
|
||||
|
|
|
|||
|
|
@ -28,9 +28,9 @@ NIdestroy(CKTcircuit *ckt)
|
|||
if(ckt->CKTirhsSpare) FREE(ckt->CKTirhsSpare);
|
||||
#ifdef WANT_SENSE2
|
||||
if(ckt->CKTsenInfo){
|
||||
if(ckt->CKTrhsOp) FREE(((CKTcircuit *)ckt)->CKTrhsOp);
|
||||
if(ckt->CKTsenRhs) FREE(((CKTcircuit *)ckt)->CKTsenRhs);
|
||||
if(ckt->CKTseniRhs) FREE(((CKTcircuit *)ckt)->CKTseniRhs);
|
||||
if(ckt->CKTrhsOp) FREE(ckt->CKTrhsOp);
|
||||
if(ckt->CKTsenRhs) FREE(ckt->CKTsenRhs);
|
||||
if(ckt->CKTseniRhs) FREE(ckt->CKTseniRhs);
|
||||
SENdestroy(ckt->CKTsenInfo);
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ IFsimulator SIMinfo = {
|
|||
#ifdef CIDER
|
||||
/* An ugly hack */
|
||||
void
|
||||
NDEVacct(void *ckt, FILE *file)
|
||||
NDEVacct(CKTcircuit *ckt, FILE *file)
|
||||
{
|
||||
fprintf(file, "Ouch, you have called NDEV from ngnutmeg\n");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ IFsimulator SIMinfo = {
|
|||
CKTground, /* groundNode function */
|
||||
CKTbindNode, /* bindNode function */
|
||||
CKTfndNode, /* findNode function */
|
||||
(int(*)(void *,void *,int,void **,IFuid *)) /* va, type cast for CKTinst2Node */
|
||||
(int(*)(CKTcircuit *,void *,int,void **,IFuid *)) /* va, type cast for CKTinst2Node */
|
||||
CKTinst2Node, /* instToNode function */
|
||||
CKTsetNodPm, /* setNodeParm function */
|
||||
CKTaskNodQst, /* askNodeQuest function */
|
||||
|
|
|
|||
|
|
@ -129,7 +129,7 @@ ACan(CKTcircuit *ckt, int restart)
|
|||
* Moreover the begin plot has not even been done yet at this
|
||||
* point...
|
||||
*/
|
||||
(*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,(void*)ckt->CKTcurJob,
|
||||
(*(SPfrontEnd->OUTpBeginPlot))(ckt,(void*)ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname,(IFuid)NULL,IF_REAL,numNames,nameList,
|
||||
IF_REAL,&acPlot);
|
||||
tfree(nameList);
|
||||
|
|
@ -152,7 +152,7 @@ ACan(CKTcircuit *ckt, int restart)
|
|||
|
||||
if (ckt->CKTkeepOpInfo) {
|
||||
/* Dump operating point. */
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob, "AC Operating Point",
|
||||
(IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot);
|
||||
if(error) return(error);
|
||||
|
|
@ -161,9 +161,9 @@ ACan(CKTcircuit *ckt, int restart)
|
|||
plot = NULL;
|
||||
}
|
||||
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&freqUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&freqUid,(IFuid)NULL,
|
||||
"frequency", UID_OTHER,(void **)NULL);
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname,freqUid,IF_REAL,numNames,nameList,
|
||||
IF_COMPLEX,&acPlot);
|
||||
|
|
@ -180,7 +180,7 @@ ACan(CKTcircuit *ckt, int restart)
|
|||
freq = ((ACAN*)ckt->CKTcurJob)->ACsaveFreq;
|
||||
((ACAN*)ckt->CKTcurJob)->ACsaveFreq = 0; /* clear the 'old' frequency */
|
||||
/* fix resume? saj*/
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname,freqUid,IF_REAL,numNames,nameList,
|
||||
IF_COMPLEX,&acPlot);
|
||||
|
|
|
|||
|
|
@ -18,53 +18,53 @@ int CKTacDump( CKTcircuit *, double , void *);
|
|||
int CKTacLoad( CKTcircuit *);
|
||||
int CKTaccept( CKTcircuit *);
|
||||
int CKTacct( CKTcircuit *, void *, int , IFvalue *);
|
||||
int CKTask( void *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTask( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTaskAnalQ( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTaskNodQst( void *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTbindNode( void *, void *, int , void *);
|
||||
int CKTaskNodQst( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTbindNode( CKTcircuit *, void *, int , void *);
|
||||
void CKTbreakDump( CKTcircuit *);
|
||||
int CKTclrBreak( CKTcircuit *);
|
||||
int CKTconvTest( CKTcircuit *);
|
||||
int CKTcrtElt( void *, void *, void **, IFuid );
|
||||
int CKTdelTask( void *, void *);
|
||||
int CKTdestroy( void *);
|
||||
int CKTcrtElt( CKTcircuit *, void *, void **, IFuid );
|
||||
int CKTdelTask( CKTcircuit *, void *);
|
||||
int CKTdestroy( CKTcircuit *);
|
||||
int CKTdltAnal( void *, void *, void *);
|
||||
int CKTdltInst( void *, void *);
|
||||
int CKTdltMod( void *, void *);
|
||||
int CKTdltNod( void *, void *);
|
||||
int CKTdoJob( void *, int , void *);
|
||||
int CKTdltInst( CKTcircuit *, void *);
|
||||
int CKTdltMod( CKTcircuit *, void *);
|
||||
int CKTdltNod( CKTcircuit *, void *);
|
||||
int CKTdoJob( CKTcircuit *, int , void *);
|
||||
void CKTdump( CKTcircuit *, double, void *);
|
||||
int CKTfndAnal( void *, int *, void **, IFuid , void *, IFuid );
|
||||
int CKTfndAnal( CKTcircuit *, int *, void **, IFuid , void *, IFuid );
|
||||
int CKTfndBranch( CKTcircuit *, IFuid);
|
||||
int CKTfndDev( void *, int *, void **, IFuid , void *, IFuid );
|
||||
int CKTfndMod( void *, int *, void **, IFuid );
|
||||
int CKTfndNode( void *, void **, IFuid );
|
||||
int CKTfndTask( void *, void **, IFuid );
|
||||
int CKTground( void *, void **, IFuid );
|
||||
int CKTfndDev( CKTcircuit *, int *, void **, IFuid , void *, IFuid );
|
||||
int CKTfndMod( CKTcircuit *, int *, void **, IFuid );
|
||||
int CKTfndNode( CKTcircuit *, void **, IFuid );
|
||||
int CKTfndTask( CKTcircuit *, void **, IFuid );
|
||||
int CKTground( CKTcircuit *, void **, IFuid );
|
||||
int CKTic( CKTcircuit *);
|
||||
int CKTinit( CKTcircuit **);
|
||||
int CKTinst2Node( void *, void *, int , CKTnode **, IFuid *);
|
||||
int CKTinst2Node( CKTcircuit *, void *, int , CKTnode **, IFuid *);
|
||||
int CKTlinkEq(CKTcircuit*,CKTnode*);
|
||||
int CKTload( CKTcircuit *);
|
||||
int CKTmapNode( void *, void **, IFuid );
|
||||
int CKTmapNode( CKTcircuit *, void **, IFuid );
|
||||
int CKTmkCur( CKTcircuit *, CKTnode **, IFuid , char *);
|
||||
int CKTmkNode(CKTcircuit*,CKTnode**);
|
||||
int CKTmkVolt( CKTcircuit *, CKTnode **, IFuid , char *);
|
||||
int CKTmodAsk( void *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTmodCrt( void *, int , void **, IFuid );
|
||||
int CKTmodParam( void *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTmodAsk( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTmodCrt( CKTcircuit *, int , void **, IFuid );
|
||||
int CKTmodParam( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTnames(CKTcircuit *, int *, IFuid **);
|
||||
int CKTnewAnal( void *, int , IFuid , void **, void *);
|
||||
int CKTnewEq( void *, void **, IFuid );
|
||||
int CKTnewNode( void *, void **, IFuid );
|
||||
int CKTnewTask( void *, void **, IFuid );
|
||||
int CKTnewAnal( CKTcircuit *, int , IFuid , void **, void *);
|
||||
int CKTnewEq( CKTcircuit *, void **, IFuid );
|
||||
int CKTnewNode( CKTcircuit *, void **, IFuid );
|
||||
int CKTnewTask( CKTcircuit *, void **, IFuid );
|
||||
IFuid CKTnodName( CKTcircuit *, int );
|
||||
void CKTnodOut( CKTcircuit *);
|
||||
CKTnode * CKTnum2nod( CKTcircuit *, int );
|
||||
int CKTop(CKTcircuit *, long, long, int );
|
||||
int CKTpModName( char *, IFvalue *, CKTcircuit *, int , IFuid , GENmodel **);
|
||||
int CKTpName( char *, IFvalue *, CKTcircuit *, int , char *, GENinstance **);
|
||||
int CKTparam( void *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTparam( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTpzFindZeros( CKTcircuit *, PZtrial **, int * );
|
||||
int CKTpzLoad( CKTcircuit *, SPcomplex * );
|
||||
int CKTpzSetup( CKTcircuit *, int);
|
||||
|
|
@ -77,12 +77,12 @@ int CKTsenSetup( CKTcircuit *);
|
|||
int CKTsenUpdate( CKTcircuit *);
|
||||
int CKTsetAnalPm( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTsetBreak( CKTcircuit *, double );
|
||||
int CKTsetNodPm( void *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTsetNodPm( CKTcircuit *, void *, int , IFvalue *, IFvalue *);
|
||||
int CKTsetOpt( CKTcircuit *, void *, int , IFvalue *);
|
||||
int CKTsetup( CKTcircuit *);
|
||||
int CKTunsetup(CKTcircuit *ckt);
|
||||
int CKTtemp( CKTcircuit *);
|
||||
char *CKTtrouble(void *, char *);
|
||||
char *CKTtrouble(CKTcircuit *, char *);
|
||||
void CKTterr( int , CKTcircuit *, double *);
|
||||
int CKTtrunc( CKTcircuit *, double *);
|
||||
int CKTtypelook( char *);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTaskNodQst(void *ckt, void *node, int parm, IFvalue *value, IFvalue *selector)
|
||||
CKTaskNodQst(CKTcircuit *ckt, void *node, int parm, IFvalue *value, IFvalue *selector)
|
||||
{
|
||||
if(!node) return(E_BADPARM);
|
||||
switch(parm) {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTdelTask(void *ckt, void *task)
|
||||
CKTdelTask(CKTcircuit *ckt, void *task)
|
||||
{
|
||||
JOB *job;
|
||||
JOB *old=NULL;
|
||||
|
|
|
|||
|
|
@ -22,9 +22,9 @@ extern SPICEdev **DEVices;
|
|||
|
||||
|
||||
int
|
||||
CKTdestroy(void *inCkt)
|
||||
CKTdestroy(CKTcircuit *inCkt)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit *)inCkt;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ inCkt;
|
||||
int i;
|
||||
CKTnode *node;
|
||||
CKTnode *nnode;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTdltInst(void *ckt, void *instance)
|
||||
CKTdltInst(CKTcircuit *ckt, void *instance)
|
||||
{
|
||||
return(E_UNSUPP);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -16,9 +16,9 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTdltMod(void *cktp, void *modPtr)
|
||||
CKTdltMod(CKTcircuit *cktp, void *modPtr)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit *) cktp;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ cktp;
|
||||
GENmodel *m = (GENmodel *) modPtr, *mod, **prevp;
|
||||
GENinstance *h, *next_i;
|
||||
int error;
|
||||
|
|
@ -34,11 +34,11 @@ CKTdltMod(void *cktp, void *modPtr)
|
|||
|
||||
for (h = m->GENinstances; h; h = next_i) {
|
||||
next_i = h->GENnextInstance;
|
||||
error = (*(SPfrontEnd->IFdelUid))((void *)ckt,h->GENname,
|
||||
error = (*(SPfrontEnd->IFdelUid))(ckt,h->GENname,
|
||||
UID_INSTANCE);
|
||||
tfree(h);
|
||||
}
|
||||
error = (*(SPfrontEnd->IFdelUid))((void *)ckt,m->GENmodName, UID_MODEL);
|
||||
error = (*(SPfrontEnd->IFdelUid))(ckt,m->GENmodName, UID_MODEL);
|
||||
tfree(m);
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,19 +10,19 @@ Copyright 1992 Regents of the University of California. All rights reserved.
|
|||
#include "ifsim.h"
|
||||
#include "sperror.h"
|
||||
|
||||
int CKTdltNNum(void *cktp, int num);
|
||||
int CKTdltNNum(CKTcircuit *cktp, int num);
|
||||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTdltNod(void *ckt, void *node)
|
||||
CKTdltNod(CKTcircuit *ckt, void *node)
|
||||
{
|
||||
return CKTdltNNum(ckt, ((CKTnode *) node)->number);
|
||||
}
|
||||
|
||||
int
|
||||
CKTdltNNum(void *cktp, int num)
|
||||
CKTdltNNum(CKTcircuit *cktp, int num)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit *) cktp;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ cktp;
|
||||
CKTnode *n, *prev, *node, *sprev;
|
||||
int error;
|
||||
|
||||
|
|
@ -51,7 +51,7 @@ CKTdltNNum(void *cktp, int num)
|
|||
if (node == ckt->CKTlastNode)
|
||||
ckt->CKTlastNode = sprev;
|
||||
|
||||
error = (*(SPfrontEnd->IFdelUid))((void *)ckt,node->name, UID_SIGNAL);
|
||||
error = (*(SPfrontEnd->IFdelUid))(ckt,node->name, UID_SIGNAL);
|
||||
tfree(node);
|
||||
|
||||
return error;
|
||||
|
|
|
|||
|
|
@ -24,9 +24,9 @@ Modified: 2000 AlansFixes
|
|||
extern SPICEanalysis *analInfo[];
|
||||
|
||||
int
|
||||
CKTdoJob(void *inCkt, int reset, void *inTask)
|
||||
CKTdoJob(CKTcircuit *inCkt, int reset, void *inTask)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit *)inCkt;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ inCkt;
|
||||
TSKtask *task = (TSKtask *)inTask;
|
||||
JOB *job;
|
||||
double startTime;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTfndAnal(void *ckt, int *analIndex, void **anal, IFuid name, void *inTask, IFuid taskName)
|
||||
CKTfndAnal(CKTcircuit *ckt, int *analIndex, void **anal, IFuid name, void *inTask, IFuid taskName)
|
||||
{
|
||||
TSKtask *task = (TSKtask *)inTask;
|
||||
JOB *here;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTfndMod(void *ckt, int *type, void **modfast, IFuid modname)
|
||||
CKTfndMod(CKTcircuit *ckt, int *type, void **modfast, IFuid modname)
|
||||
{
|
||||
GENmodel *mods;
|
||||
|
||||
|
|
@ -25,7 +25,7 @@ CKTfndMod(void *ckt, int *type, void **modfast, IFuid modname)
|
|||
if(*type >=0 && *type < DEVmaxnum) {
|
||||
/* have device type, need to find model */
|
||||
/* look through all models */
|
||||
for(mods=((CKTcircuit *)ckt)->CKThead[*type]; mods != NULL ;
|
||||
for(mods=ckt->CKThead[*type]; mods != NULL ;
|
||||
mods = mods->GENnextModel) {
|
||||
if(mods->GENmodName == modname) {
|
||||
*modfast = (char *)mods;
|
||||
|
|
@ -38,7 +38,7 @@ CKTfndMod(void *ckt, int *type, void **modfast, IFuid modname)
|
|||
for(*type = 0;*type <DEVmaxnum;(*type)++) {
|
||||
/* need to find model & device */
|
||||
/* look through all models */
|
||||
for(mods=((CKTcircuit *)ckt)->CKThead[*type];mods!=NULL;
|
||||
for(mods=ckt->CKThead[*type];mods!=NULL;
|
||||
mods = mods->GENnextModel) {
|
||||
if(mods->GENmodName == modname) {
|
||||
*modfast = (char *)mods;
|
||||
|
|
|
|||
|
|
@ -18,11 +18,11 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTfndNode(void *ckt, void **node, IFuid name)
|
||||
CKTfndNode(CKTcircuit *ckt, void **node, IFuid name)
|
||||
{
|
||||
CKTnode *here;
|
||||
|
||||
for (here = ((CKTcircuit *)ckt)->CKTnodes; here; here = here->next) {
|
||||
for (here = ckt->CKTnodes; here; here = here->next) {
|
||||
if(here->name == name) {
|
||||
if(node) *node = (char *)here;
|
||||
return(OK);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTfndTask(void *ckt, void **taskPtr, IFuid taskName)
|
||||
CKTfndTask(CKTcircuit *ckt, void **taskPtr, IFuid taskName)
|
||||
{
|
||||
return(E_UNSUPP);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,9 +17,9 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTground(void *inCkt, void **node, IFuid name)
|
||||
CKTground(CKTcircuit *inCkt, void **node, IFuid name)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit *)inCkt;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ inCkt;
|
||||
|
||||
if(ckt->CKTnodes) {
|
||||
if(ckt->CKTnodes->name) {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ Author: 1985 Thomas L. Quarles
|
|||
extern SPICEdev **DEVices;
|
||||
|
||||
int
|
||||
CKTinst2Node(void *ckt, void *instPtr, int terminal, CKTnode **node, IFuid *nodeName)
|
||||
CKTinst2Node(CKTcircuit *ckt, void *instPtr, int terminal, CKTnode **node, IFuid *nodeName)
|
||||
{
|
||||
int nodenum;
|
||||
int type;
|
||||
|
|
@ -56,7 +56,7 @@ CKTinst2Node(void *ckt, void *instPtr, int terminal, CKTnode **node, IFuid *node
|
|||
break;
|
||||
}
|
||||
/* ok, now we know its number, so we just have to find it.*/
|
||||
for(here = ((CKTcircuit*)ckt)->CKTnodes;here;here = here->next) {
|
||||
for(here = ckt->CKTnodes;here;here = here->next) {
|
||||
if(here->number == nodenum) {
|
||||
/* found it */
|
||||
*node = here;
|
||||
|
|
|
|||
|
|
@ -17,25 +17,25 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
|
||||
/* ARGSUSED */
|
||||
/* ARGSUSED *//* fixme abandoned */
|
||||
int
|
||||
CKTmapNode(void *ckt, void **node, IFuid name)
|
||||
CKTmapNode(CKTcircuit *ckt, void **node, IFuid name)
|
||||
{
|
||||
CKTnode *here;
|
||||
int error;
|
||||
IFuid uid;
|
||||
CKTnode *mynode;
|
||||
|
||||
for (here = ((CKTcircuit *)ckt)->CKTnodes; here; here = here->next) {
|
||||
for (here = ckt->CKTnodes; here; here = here->next) {
|
||||
if(here->name == name) {
|
||||
if(node) *node = (char *)here;
|
||||
return(E_EXISTS);
|
||||
}
|
||||
}
|
||||
/* not found, so must be a new one */
|
||||
error = CKTmkNode((CKTcircuit*)ckt,&mynode); /*allocate the node*/
|
||||
error = CKTmkNode(ckt,&mynode); /*allocate the node*/
|
||||
if(error) return(error);
|
||||
error = (*(SPfrontEnd->IFnewUid))((void *)ckt,
|
||||
error = (*(SPfrontEnd->IFnewUid))(ckt,
|
||||
&uid,
|
||||
(IFuid) NULL,
|
||||
name,
|
||||
|
|
@ -44,7 +44,7 @@ CKTmapNode(void *ckt, void **node, IFuid name)
|
|||
if(error) return(error);
|
||||
mynode->name = uid; /* set the info we have */
|
||||
mynode->type = SP_VOLTAGE;
|
||||
error = CKTlinkEq((CKTcircuit*)ckt,mynode); /* and link it in */
|
||||
error = CKTlinkEq(ckt,mynode); /* and link it in */
|
||||
if(node) *node = (void *)mynode; /* and finally, return it */
|
||||
return(OK);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,11 +20,11 @@ extern SPICEdev **DEVices;
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTmodAsk(void *ckt, void *modfast, int which, IFvalue *value, IFvalue *selector)
|
||||
CKTmodAsk(CKTcircuit *ckt, void *modfast, int which, IFvalue *value, IFvalue *selector)
|
||||
{
|
||||
int type = ((GENmodel *)modfast)->GENmodType;
|
||||
if((*DEVices[type]).DEVmodAsk) {
|
||||
return( (*((*DEVices[type]).DEVmodAsk)) ((CKTcircuit *)ckt,
|
||||
return( (*((*DEVices[type]).DEVmodAsk)) (ckt,
|
||||
(GENmodel *)modfast,which,value) );
|
||||
}
|
||||
return(E_BADPARM);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTmodCrt(void *ckt, int type, void **modfast, IFuid name)
|
||||
CKTmodCrt(CKTcircuit *ckt, int type, void **modfast, IFuid name)
|
||||
{
|
||||
extern SPICEdev **DEVices;
|
||||
GENmodel *mymodfast = NULL;
|
||||
|
|
@ -30,8 +30,8 @@ CKTmodCrt(void *ckt, int type, void **modfast, IFuid name)
|
|||
if(mymodfast == (GENmodel *)NULL) return(E_NOMEM);
|
||||
mymodfast->GENmodType = type;
|
||||
mymodfast->GENmodName = name;
|
||||
mymodfast->GENnextModel =(GENmodel *)((CKTcircuit *)ckt)->CKThead[type];
|
||||
((CKTcircuit *)ckt)->CKThead[type]=(GENmodel *)mymodfast;
|
||||
mymodfast->GENnextModel =(GENmodel *)(ckt->CKThead[type]);
|
||||
ckt->CKThead[type]=(GENmodel *)mymodfast;
|
||||
if(modfast) *modfast=(void *)mymodfast;
|
||||
return(OK);
|
||||
} else if (error==0) {
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ CKTmkCur(CKTcircuit *ckt, CKTnode **node, IFuid basename, char *suffix)
|
|||
error = CKTmkNode(ckt,&mynode);
|
||||
if(error) return(error);
|
||||
checknode = mynode;
|
||||
error = (*(SPfrontEnd->IFnewUid))((void *)ckt,&uid,basename,
|
||||
error = (*(SPfrontEnd->IFnewUid))(ckt,&uid,basename,
|
||||
suffix,UID_SIGNAL,(void**)&checknode);
|
||||
if(error) {
|
||||
FREE(mynode);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ CKTmkVolt(CKTcircuit *ckt, CKTnode **node, IFuid basename, char *suffix)
|
|||
error = CKTmkNode(ckt,&mynode);
|
||||
if(error) return(error);
|
||||
checknode = mynode;
|
||||
error = (*(SPfrontEnd->IFnewUid))((void *)ckt,&uid,basename,
|
||||
error = (*(SPfrontEnd->IFnewUid))(ckt,&uid,basename,
|
||||
suffix,UID_SIGNAL,(void**)&checknode);
|
||||
if(error) {
|
||||
FREE(mynode);
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ extern SPICEdev **DEVices;
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTmodParam(void *ckt, void *modfast, int param, IFvalue *val, IFvalue *selector)
|
||||
CKTmodParam(CKTcircuit *ckt, void *modfast, int param, IFvalue *val, IFvalue *selector)
|
||||
{
|
||||
int type = ((GENmodel *)modfast)->GENmodType;
|
||||
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ extern SPICEanalysis *analInfo[];
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTnewAnal(void *ckt, int type, IFuid name, void **analPtr, void *taskPtr)
|
||||
CKTnewAnal(CKTcircuit *ckt, int type, IFuid name, void **analPtr, void *taskPtr)
|
||||
{
|
||||
if(type==0) {
|
||||
/* special case for analysis type 0 == option card */
|
||||
|
|
|
|||
|
|
@ -19,10 +19,10 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTnewEq(void *inCkt, void **node, IFuid name)
|
||||
CKTnewEq(CKTcircuit *inCkt, void **node, IFuid name)
|
||||
{
|
||||
CKTnode *mynode;
|
||||
CKTcircuit *ckt = (CKTcircuit *)inCkt;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ inCkt;
|
||||
int error;
|
||||
|
||||
error = CKTmkNode(ckt,&mynode);
|
||||
|
|
|
|||
|
|
@ -20,9 +20,9 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* should just call CKTnewEQ and set node type afterwards */
|
||||
int
|
||||
CKTnewNode(void *inCkt, void **node, IFuid name)
|
||||
CKTnewNode(CKTcircuit *inCkt, void **node, IFuid name)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit *)inCkt;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ inCkt;
|
||||
if(!(ckt->CKTnodes)) { /* starting the list - allocate both ground and 1 */
|
||||
ckt->CKTnodes = (CKTnode *) MALLOC(sizeof(CKTnode));
|
||||
if(ckt->CKTnodes == (CKTnode *)NULL) return(E_NOMEM);
|
||||
|
|
|
|||
|
|
@ -16,10 +16,10 @@ Modified: 2000 AlansFixes
|
|||
/* ARGSUSED */
|
||||
/*
|
||||
int
|
||||
CKTnewTask(void *ckt, void **taskPtr, IFuid taskName)
|
||||
CKTnewTask(CKTcircuit *ckt, void **taskPtr, IFuid taskName)
|
||||
*/
|
||||
int
|
||||
CKTnewTask(void *ckt, void **taskPtr, IFuid taskName, void **defPtr)
|
||||
CKTnewTask(CKTcircuit *ckt, void **taskPtr, IFuid taskName, void **defPtr)
|
||||
/*CDHW See notes in spiceif.c for an explanation of these fixes CDHW*/
|
||||
{
|
||||
TSKtask *tsk, *def=NULL;
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ CKTnum2nod(CKTcircuit *ckt, int node)
|
|||
{
|
||||
CKTnode *here;
|
||||
|
||||
for (here = ((CKTcircuit *)ckt)->CKTnodes; here; here = here->next) {
|
||||
for (here = ckt->CKTnodes; here; here = here->next) {
|
||||
if(here->number == node) {
|
||||
return(here);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ extern SPICEdev **DEVices;
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTparam(void *ckt, void *fast, int param, IFvalue *val, IFvalue *selector)
|
||||
CKTparam(CKTcircuit *ckt, void *fast, int param, IFvalue *val, IFvalue *selector)
|
||||
{
|
||||
int type;
|
||||
GENinstance *myfast = (GENinstance *)fast;
|
||||
|
|
|
|||
|
|
@ -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((void *)ckt,(void *)*modfast,
|
||||
error = CKTmodParam(ckt,(void *)*modfast,
|
||||
(*DEVices[type]).DEVpublic.modelParms[i].id,val,
|
||||
(IFvalue*)NULL);
|
||||
if(error) return(error);
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ CKTpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, char *name, GENinst
|
|||
for(i=0;i<(*(*DEVices[dev]).DEVpublic.numInstanceParms);i++) {
|
||||
if(strcmp(parm,
|
||||
((*DEVices[dev]).DEVpublic.instanceParms[i].keyword))==0) {
|
||||
error = CKTparam((void*)ckt,(void *)*fast,
|
||||
error = CKTparam(ckt,(void *)*fast,
|
||||
(*DEVices[dev]).DEVpublic.instanceParms[i].id,val,
|
||||
(IFvalue *)NULL);
|
||||
if(error) return(error);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,7 @@ int sens_sens(CKTcircuit *ckt, int restart)
|
|||
sg->ptable[sg->param].keyword);
|
||||
}
|
||||
|
||||
(*SPfrontEnd->IFnewUid)((void *) ckt,
|
||||
(*SPfrontEnd->IFnewUid)(ckt,
|
||||
output_names + k, NULL,
|
||||
namebuf, UID_OTHER, NULL);
|
||||
k += 1;
|
||||
|
|
@ -179,12 +179,12 @@ int sens_sens(CKTcircuit *ckt, int restart)
|
|||
freq_name = NULL;
|
||||
} else {
|
||||
type = IF_COMPLEX;
|
||||
(*SPfrontEnd->IFnewUid)((void *) ckt,
|
||||
(*SPfrontEnd->IFnewUid)(ckt,
|
||||
&freq_name, NULL,
|
||||
"frequency", UID_OTHER, NULL);
|
||||
}
|
||||
|
||||
error = (*SPfrontEnd->OUTpBeginPlot)((void *) ckt,
|
||||
error = (*SPfrontEnd->OUTpBeginPlot)(ckt,
|
||||
(void *) ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname, freq_name, IF_REAL, num_vars,
|
||||
output_names, type, (void **) &sen_data);
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
/* ARGSUSED */
|
||||
int
|
||||
CKTsetNodPm(void *ckt, void *node, int parm, IFvalue *value, IFvalue *selector)
|
||||
CKTsetNodPm(CKTcircuit *ckt, void *node, int parm, IFvalue *value, IFvalue *selector)
|
||||
{
|
||||
if(!node) return(E_BADPARM);
|
||||
switch(parm) {
|
||||
|
|
|
|||
|
|
@ -18,9 +18,9 @@ extern SPICEdev **DEVices;
|
|||
extern SPICEanalysis *analInfo[];
|
||||
|
||||
char *
|
||||
CKTtrouble(void *cktp, char *optmsg)
|
||||
CKTtrouble(CKTcircuit *cktp, char *optmsg)
|
||||
{
|
||||
CKTcircuit *ckt = (CKTcircuit *) cktp;
|
||||
CKTcircuit *ckt = /* fixme, drop that */ cktp;
|
||||
char msg_buf[513];
|
||||
char *emsg;
|
||||
TRCV *cv;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ DCop(CKTcircuit *ckt, int notused)
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob, ckt->CKTcurJob->JOBname,
|
||||
(IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot);
|
||||
tfree(nameList); /* va: nameList not used any longer, it was a memory leak */
|
||||
|
|
|
|||
|
|
@ -138,9 +138,9 @@ DCtran(CKTcircuit *ckt,
|
|||
#endif
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&timeUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&timeUid,(IFuid)NULL,
|
||||
"time", UID_OTHER, (void **)NULL);
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname,timeUid,IF_REAL,numNames,nameList,
|
||||
IF_REAL,&(((TRANan*)ckt->CKTcurJob)->TRANplot));
|
||||
|
|
@ -331,9 +331,9 @@ DCtran(CKTcircuit *ckt,
|
|||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
/* get timeUiD again */
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&timeUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&timeUid,(IFuid)NULL,
|
||||
"time", UID_OTHER, (void **)NULL);
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt, (void*)ckt->CKTcurJob,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt, (void*)ckt->CKTcurJob,
|
||||
ckt->CKTcurJob->JOBname,timeUid,IF_REAL,666,nameList,
|
||||
666,&(((TRANan*)ckt->CKTcurJob)->TRANplot));/*magic 666 nums as flags */
|
||||
tfree(nameList);
|
||||
|
|
@ -960,7 +960,7 @@ resume:
|
|||
ckt->CKTstat->STATcombineTime - startcTime;
|
||||
ckt->CKTstat->STATtranSyncTime +=
|
||||
ckt->CKTstat->STATsyncTime - startkTime;
|
||||
errMsg = CKTtrouble((void *) ckt, "Timestep too small");
|
||||
errMsg = CKTtrouble(ckt, "Timestep too small");
|
||||
return(E_TIMESTEP);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ DCtrCurv(CKTcircuit *ckt, int restart)
|
|||
/* continuing */
|
||||
i = cv->TRCVnestState;
|
||||
/* resume to work? saj*/
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob, ckt->CKTcurJob->JOBname,
|
||||
varUid,IF_REAL,666,nameList, 666,&plot);
|
||||
goto resume;
|
||||
|
|
@ -191,32 +191,32 @@ found:;
|
|||
|
||||
|
||||
if (cv->TRCVvType[i]==vcode)
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&varUid,(IFuid )NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&varUid,(IFuid )NULL,
|
||||
"v-sweep", UID_OTHER, (void **)NULL);
|
||||
|
||||
else {
|
||||
if (cv->TRCVvType[i]==icode)
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&varUid,(IFuid )NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&varUid,(IFuid )NULL,
|
||||
"i-sweep", UID_OTHER, (void **)NULL);
|
||||
|
||||
else {
|
||||
if (cv->TRCVvType[i]==TEMP_CODE)
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&varUid,(IFuid )NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&varUid,(IFuid )NULL,
|
||||
"temp-sweep", UID_OTHER, (void **)NULL);
|
||||
|
||||
else {
|
||||
if (cv->TRCVvType[i]==rcode)
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&varUid,(IFuid )NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&varUid,(IFuid )NULL,
|
||||
"res-sweep", UID_OTHER, (void **)NULL);
|
||||
|
||||
else
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&varUid,(IFuid )NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&varUid,(IFuid )NULL,
|
||||
"?-sweep", UID_OTHER, (void **)NULL);
|
||||
} /* icode */
|
||||
} /* TEMP_CODE */
|
||||
} /* rcode*/
|
||||
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob, ckt->CKTcurJob->JOBname,
|
||||
varUid,IF_REAL,numNames,nameList, IF_REAL,&plot);
|
||||
|
||||
|
|
|
|||
|
|
@ -113,7 +113,7 @@ time1 = (*(SPfrontEnd->IFseconds))();
|
|||
|
||||
if (ckt->CKTkeepOpInfo) {
|
||||
/* Dump operating point. */
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob, "Distortion Operating Point",
|
||||
(IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&acPlot);
|
||||
if(error) return(error);
|
||||
|
|
@ -520,9 +520,9 @@ time1 = (*(SPfrontEnd->IFseconds))();
|
|||
if (! job->Df2wanted) {
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&freqUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&freqUid,(IFuid)NULL,
|
||||
"frequency", UID_OTHER,(void **)NULL);
|
||||
(*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
(*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,"DISTORTION - 2nd harmonic",
|
||||
freqUid,IF_REAL, numNames,nameList,IF_COMPLEX,&acPlot);
|
||||
if (job->DstepType != LINEAR) {
|
||||
|
|
@ -544,9 +544,9 @@ time1 = (*(SPfrontEnd->IFseconds))();
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&freqUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&freqUid,(IFuid)NULL,
|
||||
"frequency", UID_OTHER,(void **)NULL);
|
||||
(*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
(*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,"DISTORTION - 3rd harmonic",freqUid,IF_REAL,
|
||||
numNames,nameList,IF_COMPLEX,&acPlot);
|
||||
for (i=0; i< displacement ; i++)
|
||||
|
|
@ -566,9 +566,9 @@ time1 = (*(SPfrontEnd->IFseconds))();
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&freqUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&freqUid,(IFuid)NULL,
|
||||
"frequency", UID_OTHER,(void **)NULL);
|
||||
(*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
(*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,"DISTORTION - IM: f1+f2",freqUid,IF_REAL,
|
||||
numNames,nameList,IF_COMPLEX,&acPlot);
|
||||
for (i=0; i< displacement ; i++)
|
||||
|
|
@ -586,9 +586,9 @@ time1 = (*(SPfrontEnd->IFseconds))();
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&freqUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&freqUid,(IFuid)NULL,
|
||||
"frequency", UID_OTHER,(void **)NULL);
|
||||
(*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
(*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,"DISTORTION - IM: f1-f2",freqUid,IF_REAL,
|
||||
numNames,nameList,IF_COMPLEX,&acPlot);
|
||||
for (i=0; i< displacement ; i++)
|
||||
|
|
@ -607,9 +607,9 @@ time1 = (*(SPfrontEnd->IFseconds))();
|
|||
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&freqUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&freqUid,(IFuid)NULL,
|
||||
"frequency", UID_OTHER,(void **)NULL);
|
||||
(*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
(*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob,"DISTORTION - IM: 2f1-f2",freqUid,IF_REAL,
|
||||
numNames,nameList,IF_COMPLEX,&acPlot);
|
||||
for (i=0; i< displacement ; i++)
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
inst = NULL;
|
||||
code = CKTtypelook("Vsource");
|
||||
if (code != -1) {
|
||||
error = CKTfndDev((void *)ckt,&code,(void **)&inst,
|
||||
error = CKTfndDev(ckt,&code,(void **)&inst,
|
||||
job->input, (void *)NULL, (IFuid)NULL);
|
||||
if (!error && !((VSRCinstance *)inst)->VSRCacGiven) {
|
||||
errMsg = (char*) MALLOC(strlen(noacinput)+1);
|
||||
|
|
@ -61,7 +61,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
|
||||
code = CKTtypelook("Isource");
|
||||
if (code != -1 && inst==NULL) {
|
||||
error = CKTfndDev((void *)ckt,&code, (void **)&inst,
|
||||
error = CKTfndDev(ckt,&code, (void **)&inst,
|
||||
job->input, (void *)NULL,(IFuid)NULL);
|
||||
if (error) {
|
||||
/* XXX ??? */
|
||||
|
|
@ -122,7 +122,7 @@ NOISEan (CKTcircuit *ckt, int restart)
|
|||
/* the current front-end needs the namelist to be fully
|
||||
declared before an OUTpBeginplot */
|
||||
|
||||
(*(SPfrontEnd->IFnewUid))((void *)ckt,&freqUid,(IFuid)NULL,
|
||||
(*(SPfrontEnd->IFnewUid))(ckt,&freqUid,(IFuid)NULL,
|
||||
"frequency", UID_OTHER,(void **)NULL);
|
||||
|
||||
data->numPlots = 0; /* we don't have any plots yet */
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ PZan(CKTcircuit *ckt, int reset)
|
|||
/* Dump operating point. */
|
||||
error = CKTnames(ckt,&numNames,&nameList);
|
||||
if(error) return(error);
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))((void *)ckt,
|
||||
error = (*(SPfrontEnd->OUTpBeginPlot))(ckt,
|
||||
(void*)ckt->CKTcurJob, "Distortion Operating Point",
|
||||
(IFuid)NULL,IF_REAL,numNames,nameList, IF_REAL,&plot);
|
||||
if(error) return(error);
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
Itype = CKTtypelook("Isource");
|
||||
Vtype = CKTtypelook("Vsource");
|
||||
if(Itype != -1) {
|
||||
error = CKTfndDev((void*)ckt,&Itype,&ptr,
|
||||
error = CKTfndDev(ckt,&Itype,&ptr,
|
||||
((TFan*)ckt->CKTcurJob)->TFinSrc, (void *)NULL,(IFuid)NULL);
|
||||
if(error ==0) {
|
||||
((TFan*)ckt->CKTcurJob)->TFinIsI = 1;
|
||||
|
|
@ -59,7 +59,7 @@ TFanal(CKTcircuit *ckt, int restart)
|
|||
}
|
||||
|
||||
if( (Vtype != -1) && (ptr==NULL) ) {
|
||||
error = CKTfndDev((void*)ckt,&Vtype,&ptr,
|
||||
error = CKTfndDev(ckt,&Vtype,&ptr,
|
||||
((TFan*)ckt->CKTcurJob)->TFinSrc, (void *)NULL,
|
||||
(IFuid)NULL);
|
||||
((TFan*)ckt->CKTcurJob)->TFinIsV = 1;
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTask(void *ckt, void *fast, int which, IFvalue *value, IFvalue *selector)
|
||||
CKTask(CKTcircuit *ckt, void *fast, int which, IFvalue *value, IFvalue *selector)
|
||||
{
|
||||
GENinstance *instance = (GENinstance *) fast;
|
||||
int type = instance->GENmodPtr->GENmodType;
|
||||
|
|
@ -28,7 +28,7 @@ CKTask(void *ckt, void *fast, int which, IFvalue *value, IFvalue *selector)
|
|||
|
||||
DEVices = devices();
|
||||
if((*DEVices[type]).DEVask) {
|
||||
error = DEVices[type]->DEVask((CKTcircuit *)ckt,
|
||||
error = DEVices[type]->DEVask(ckt,
|
||||
(GENinstance *)fast,which,value,selector);
|
||||
} else {
|
||||
error = E_BADPARM;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "dev.h"
|
||||
|
||||
int
|
||||
CKTbindNode(void *ckt, void *fast, int term, void *node)
|
||||
CKTbindNode(CKTcircuit *ckt, void *fast, int term, void *node)
|
||||
{
|
||||
int mappednode;
|
||||
SPICEdev **devs;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "memory.h"
|
||||
|
||||
int
|
||||
CKTcrtElt(void *ckt, void *inModPtr, void **inInstPtr, IFuid name)
|
||||
CKTcrtElt(CKTcircuit *ckt, void *inModPtr, void **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 */
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@ Author: 1985 Thomas L. Quarles
|
|||
|
||||
|
||||
int
|
||||
CKTfndDev(void *Ckt, int *type, void **fast, IFuid name, void *modfast, IFuid modname)
|
||||
CKTfndDev(CKTcircuit *Ckt, int *type, void **fast, IFuid name, void *modfast, IFuid modname)
|
||||
{
|
||||
CKTcircuit *ckt=(CKTcircuit *)Ckt;
|
||||
CKTcircuit *ckt= /* fixme, drop that */ Ckt;
|
||||
GENinstance *here;
|
||||
GENmodel *mods;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
return(E_INTERN);
|
||||
}
|
||||
|
||||
error = CKTfndDev((void *)ckt,&ktype,(void **)&(here->MUTind1),
|
||||
error = CKTfndDev(ckt,&ktype,(void **)&(here->MUTind1),
|
||||
here->MUTindName1, (void *)NULL,(char *)NULL);
|
||||
if(error && error!= E_NODEV && error != E_NOMOD) return(error);
|
||||
if(error) {
|
||||
|
|
@ -52,7 +52,7 @@ MUTsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
|
|||
"%s: coupling to non-existant inductor %s.",
|
||||
namarray);
|
||||
}
|
||||
error = CKTfndDev((void *)ckt,&ktype,(void **)&(here->MUTind2),
|
||||
error = CKTfndDev(ckt,&ktype,(void **)&(here->MUTind2),
|
||||
here->MUTindName2,(void *)NULL,(char *)NULL);
|
||||
if(error && error!= E_NODEV && error != E_NOMOD) return(error);
|
||||
if(error) {
|
||||
|
|
|
|||
|
|
@ -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((void *)ckt,dtype,(void **)&modfast,
|
||||
error = CKTmodCrt(ckt,dtype,(void **)&modfast,
|
||||
dioUid);
|
||||
if(error) return(error);
|
||||
ptemp.rValue = c1;
|
||||
|
|
@ -109,11 +109,11 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
error = CKTpModName("is",&ptemp,ckt,dtype,dioUid,&modfast);
|
||||
if(error) return(error);
|
||||
} else {
|
||||
error = (*(SPfrontEnd->IFnewUid))((void *)ckt,&capUid,
|
||||
error = (*(SPfrontEnd->IFnewUid))(ckt,&capUid,
|
||||
here->URCname, "capmod",UID_MODEL,(void **)NULL);
|
||||
if(error) return(error);
|
||||
modfast = (GENmodel *)NULL;
|
||||
error = CKTmodCrt((void *)ckt,ctype,(void **)&modfast,
|
||||
error = CKTmodCrt(ckt,ctype,(void **)&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((void *)ckt,rtype,(void **)&rmodfast,resUid);
|
||||
error = CKTmodCrt(ckt,rtype,(void **)&rmodfast,resUid);
|
||||
if(error) return(error);
|
||||
lowl = CKTnum2nod(ckt,here->URCposNode);
|
||||
hir = CKTnum2nod(ckt,here->URCnegNode);
|
||||
|
|
@ -150,12 +150,12 @@ 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((void *)ckt,(void *)rmodfast,
|
||||
error = CKTcrtElt(ckt,(void *)rmodfast,
|
||||
(void **)&fast,eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,1,lowl);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,lowl);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,2,lowr);
|
||||
error = CKTbindNode(ckt,(void *)fast,2,lowr);
|
||||
if(error) return(error);
|
||||
ptemp.rValue = r;
|
||||
error = CKTpName("resistance",&ptemp,ckt,rtype,nameelt,&fast);
|
||||
|
|
@ -167,12 +167,12 @@ 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((void *)ckt,(void *)rmodfast,
|
||||
error = CKTcrtElt(ckt,(void *)rmodfast,
|
||||
(void **)&fast,eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,1,hil);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,hil);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,2,hir);
|
||||
error = CKTbindNode(ckt,(void *)fast,2,hir);
|
||||
if(error) return(error);
|
||||
ptemp.rValue = r;
|
||||
error = CKTpName("resistance",&ptemp,ckt,rtype,nameelt,&fast);
|
||||
|
|
@ -187,12 +187,12 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
here->URCname,nameelt,UID_INSTANCE,
|
||||
(void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt((void *)ckt,(void *)modfast,
|
||||
error = CKTcrtElt(ckt,(void *)modfast,
|
||||
(void **)&fast, eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,1,lowr);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,lowr);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,2,
|
||||
error = CKTbindNode(ckt,(void *)fast,2,
|
||||
(void *)CKTnum2nod(ckt, here->URCgndNode));
|
||||
if(error) return(error);
|
||||
ptemp.rValue = prop;
|
||||
|
|
@ -206,12 +206,12 @@ 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((void *)ckt,(void *)modfast,
|
||||
error = CKTcrtElt(ckt,(void *)modfast,
|
||||
(void **)&fast, eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,1,lowr);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,lowr);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,2,
|
||||
error = CKTbindNode(ckt,(void *)fast,2,
|
||||
(void *)CKTnum2nod(ckt, here->URCgndNode));
|
||||
if(error) return(error);
|
||||
ptemp.rValue = c;
|
||||
|
|
@ -230,12 +230,12 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
here->URCname,nameelt,UID_INSTANCE,
|
||||
(void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt((void *)ckt,(void *)modfast,
|
||||
error = CKTcrtElt(ckt,(void *)modfast,
|
||||
(void **) &fast,eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,1,hil);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,hil);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,2,
|
||||
error = CKTbindNode(ckt,(void *)fast,2,
|
||||
(void *)CKTnum2nod(ckt, here->URCgndNode));
|
||||
if(error) return(error);
|
||||
ptemp.rValue = prop;
|
||||
|
|
@ -250,12 +250,12 @@ URCsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *state)
|
|||
here->URCname,nameelt,UID_INSTANCE,
|
||||
(void **)NULL);
|
||||
if(error) return(error);
|
||||
error = CKTcrtElt((void *)ckt,(void *)modfast,
|
||||
error = CKTcrtElt(ckt,(void *)modfast,
|
||||
(void **)&fast,eltUid);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,1,hil);
|
||||
error = CKTbindNode(ckt,(void *)fast,1,hil);
|
||||
if(error) return(error);
|
||||
error = CKTbindNode((void *)ckt,(void *)fast,2,
|
||||
error = CKTbindNode(ckt,(void *)fast,2,
|
||||
(void *)CKTnum2nod(ckt, here->URCgndNode));
|
||||
if(error) return(error);
|
||||
ptemp.rValue = c;
|
||||
|
|
@ -300,7 +300,7 @@ URCunsetup(GENmodel *inModel, CKTcircuit *ckt)
|
|||
(void **)NULL);
|
||||
} else {
|
||||
/* Capacitors */
|
||||
error = (*(SPfrontEnd->IFnewUid))((void *)ckt, &varUid,
|
||||
error = (*(SPfrontEnd->IFnewUid))(ckt, &varUid,
|
||||
here->URCname,
|
||||
"capmod",
|
||||
UID_MODEL,
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Author: 1988 Thomas L. Quarles
|
|||
|
||||
/* va: we should use tmalloc, whith also makes failure test */
|
||||
int
|
||||
IFnewUid(void *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type,
|
||||
IFnewUid(CKTcircuit *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type,
|
||||
void **nodedata)
|
||||
{
|
||||
char *newname;
|
||||
|
|
@ -75,7 +75,7 @@ IFnewUid(void *ckt, IFuid * newuid, IFuid olduid, char *suffix, int type,
|
|||
return (OK);
|
||||
}
|
||||
|
||||
int IFdelUid(void *ckt, IFuid uid, int type)
|
||||
int IFdelUid(CKTcircuit *ckt, IFuid uid, int type)
|
||||
{
|
||||
int error;
|
||||
|
||||
|
|
|
|||
|
|
@ -13,58 +13,58 @@ int IFeval(IFparseTree *tree, double gmin, double *result, double *vals,
|
|||
|
||||
/* ifnewuid.c */
|
||||
|
||||
int IFnewUid(void *ckt, IFuid *newuid, IFuid olduid, char *suffix, int type,
|
||||
int IFnewUid(CKTcircuit *ckt, IFuid *newuid, IFuid olduid, char *suffix, int type,
|
||||
void **nodedata);
|
||||
int IFdelUid(void *ckt, IFuid uid, int type);
|
||||
int IFdelUid(CKTcircuit *ckt, IFuid uid, int type);
|
||||
|
||||
/* inp2xx.c */
|
||||
|
||||
void INP2B(void *ckt, INPtables *tab, card *current);
|
||||
void INP2C(void *ckt, INPtables *tab, card *current);
|
||||
void INP2D(void *ckt, INPtables *tab, card *current);
|
||||
void INP2E(void *ckt, INPtables *tab, card *current);
|
||||
void INP2F(void *ckt, INPtables *tab, card *current);
|
||||
void INP2G(void *ckt, INPtables *tab, card *current);
|
||||
void INP2H(void *ckt, INPtables *tab, card *current);
|
||||
void INP2I(void *ckt, INPtables *tab, card *current);
|
||||
void INP2J(void *ckt, INPtables *tab, card *current);
|
||||
void INP2K(void *ckt, INPtables *tab, card *current);
|
||||
void INP2L(void *ckt, INPtables *tab, card *current);
|
||||
void INP2M(void *ckt, INPtables *tab, card *current);
|
||||
void INP2O(void *ckt, INPtables *tab, card *current);
|
||||
void INP2P(void *ckt, INPtables *tab, card *current);
|
||||
void INP2Q(void *ckt, INPtables *tab, card *current, void *gnode);
|
||||
void INP2R(void *ckt, INPtables *tab, card *current);
|
||||
void INP2S(void *ckt, INPtables *tab, card *current);
|
||||
void INP2T(void *ckt, INPtables *tab, card *current);
|
||||
void INP2U(void *ckt, INPtables *tab, card *current);
|
||||
void INP2V(void *ckt, INPtables *tab, card *current);
|
||||
void INP2W(void *ckt, INPtables *tab, card *current);
|
||||
void INP2Y(void *ckt, INPtables *tab, card *current);
|
||||
void INP2Z(void *ckt, INPtables *tab, card *current);
|
||||
void INP2B(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2C(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2D(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2E(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2F(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2G(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2H(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2I(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2J(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2K(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2L(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2M(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2O(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2P(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2Q(CKTcircuit *ckt, INPtables *tab, card *current, void *gnode);
|
||||
void INP2R(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2S(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2T(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2U(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2V(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2W(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2Y(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
void INP2Z(CKTcircuit *ckt, INPtables *tab, card *current);
|
||||
int INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode);
|
||||
|
||||
/* inpxxxx.c */
|
||||
|
||||
int INPaName(char *parm, IFvalue *val, void *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);
|
||||
int INPapName(CKTcircuit *ckt, int type, void *analPtr, char *parmname, IFvalue *value);
|
||||
void INPcaseFix(register char *string);
|
||||
char * INPdomodel(void *ckt, card *image, INPtables *tab);
|
||||
char * INPdomodel(CKTcircuit *ckt, card *image, INPtables *tab);
|
||||
void INPdoOpts(CKTcircuit *ckt, void *anal, card *optCard, INPtables *tab);
|
||||
char * INPdevParse(char **line, void *ckt, int dev, void *fast, double *leading,
|
||||
char * INPdevParse(char **line, CKTcircuit *ckt, int dev, void *fast, double *leading,
|
||||
int *waslead, INPtables *tab);
|
||||
char * INPerrCat(char *a, char *b);
|
||||
char * INPerror(int type);
|
||||
double INPevaluate(char **line, int *error, int gobble);
|
||||
char * INPfindLev(char *line, int *level);
|
||||
char * INPfindVer(char *line, char *version);
|
||||
char * INPgetMod(void *ckt, char *name, INPmodel **model, INPtables *tab);
|
||||
char * INPgetMod(CKTcircuit *ckt, char *name, INPmodel **model, INPtables *tab);
|
||||
int INPgetStr(char **line, char **token, int gobble);
|
||||
int INPgetTitle(CKTcircuit **ckt, card **data);
|
||||
int INPgetTok(char **line, char **token, int gobble);
|
||||
int INPgetUTok(char **line, char **token, int gobble);
|
||||
IFvalue * INPgetValue(void *ckt, char **line, int type, INPtables *tab);
|
||||
IFvalue * INPgetValue(CKTcircuit *ckt, char **line, int type, INPtables *tab);
|
||||
void INPkillMods(void);
|
||||
void INPlist(FILE *file, card *deck, int type);
|
||||
int INPlookMod(char *name);
|
||||
|
|
@ -72,19 +72,19 @@ 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, void *ckt, int dev, void *fast);
|
||||
int INPpName(char *parm, IFvalue *val, CKTcircuit *ckt, int dev, void *fast);
|
||||
|
||||
/* inpptree.c */
|
||||
|
||||
void INPgetTree(char **line, INPparseTree **pt, void *ckt, INPtables *tab);
|
||||
void INPgetTree(char **line, INPparseTree **pt, CKTcircuit *ckt, INPtables *tab);
|
||||
|
||||
|
||||
/* inpsymt.c */
|
||||
|
||||
INPtables * INPtabInit(int numlines);
|
||||
int INPtermInsert(void *ckt, char **token, INPtables *tab, void **node);
|
||||
int INPmkTerm(void *ckt, char **token, INPtables *tab, void **node);
|
||||
int INPgndInsert(void *ckt, char **token, INPtables *tab, void **node);
|
||||
int INPtermInsert(CKTcircuit *ckt, char **token, INPtables *tab, void **node);
|
||||
int INPmkTerm(CKTcircuit *ckt, char **token, INPtables *tab, void **node);
|
||||
int INPgndInsert(CKTcircuit *ckt, char **token, INPtables *tab, void **node);
|
||||
int INPretrieve(char **token, INPtables *tab);
|
||||
int INPinsert(char **token, INPtables *tab);
|
||||
int INPinsertNofree(char **token, INPtables *tab);
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "inp.h"
|
||||
#include "cktdefs.h"
|
||||
|
||||
void INP2B(void *ckt, INPtables * tab, card * current)
|
||||
void INP2B(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Bname <node> <node> [V=expr] [I=expr] */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2C(void *ckt, INPtables * tab, card * current)
|
||||
void INP2C(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* parse a capacitor card */
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Modified: 2001 Paolo Nenzi (Cider Integration)
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2D(void *ckt, INPtables * tab, card * current)
|
||||
void INP2D(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Dname <node> <node> <model> [<val>] [OFF] [IC=<val>] */
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ dot_noise(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
|
|||
|
||||
|
||||
static int
|
||||
dot_op(char *line, void *ckt, INPtables *tab, card *current,
|
||||
dot_op(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
|
||||
void *task, void *gnode, void *foo)
|
||||
{
|
||||
int which; /* which analysis we are performing */
|
||||
|
|
@ -548,7 +548,7 @@ dot_sens(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
|
|||
|
||||
#ifdef WANT_SENSE2
|
||||
static int
|
||||
dot_sens2(char *line, void *ckt, INPtables *tab, card *current,
|
||||
dot_sens2(char *line, CKTcircuit *ckt, INPtables *tab, card *current,
|
||||
void *task, void *gnode, void *foo)
|
||||
{
|
||||
int error; /* error code temporary */
|
||||
|
|
@ -721,7 +721,7 @@ INP2dot(CKTcircuit *ckt, INPtables *tab, card *current, void *task, void *gnode)
|
|||
else if ((strcmp(token, ".options") == 0)||
|
||||
(strcmp(token,".option")==0) ||
|
||||
(strcmp(token,".opt")==0)) {
|
||||
rtn = dot_options(line, (CKTcircuit * /*fixme*/) ckt, tab, current, task, gnode, foo);
|
||||
rtn = dot_options(line, ckt, tab, current, task, gnode, foo);
|
||||
goto quit;
|
||||
}
|
||||
/* Added by H.Tanaka to find .global option */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2E(void *ckt, INPtables * tab, card * current)
|
||||
void INP2E(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Ename <node> <node> <node> <node> <val> */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2F(void *ckt, INPtables * tab, card * current)
|
||||
void INP2F(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Fname <node> <node> <vname> <val> */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2G(void *ckt, INPtables * tab, card * current)
|
||||
void INP2G(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Gname <node> <node> <node> <node> <val> */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2H(void *ckt, INPtables * tab, card * current)
|
||||
void INP2H(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Hname <node> <node> <vname> <val> */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2I(void *ckt, INPtables * tab, card * current)
|
||||
void INP2I(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Iname <node> <node> [ [DC] <val>] [AC [<val> [<val> ] ] ]
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2J(void *ckt, INPtables * tab, card * current)
|
||||
void INP2J(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Jname <node> <node> <node> <model> [<val>] [OFF] [IC=<val>,<val>] */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2K(void *ckt, INPtables * tab, card * current)
|
||||
void INP2K(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Kname Lname Lname <val> */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2L(void *ckt, INPtables * tab, card * current)
|
||||
void INP2L(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* parse an inductor card */
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Modified: 2001 Paolo Nenzi (Cider Integration)
|
|||
#include "inp.h"
|
||||
|
||||
void
|
||||
INP2M (void *ckt, INPtables * tab, card * current)
|
||||
INP2M (CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Mname <node> <node> <node> <node> <model> [L=<val>]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ University of Science and Technology of China
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2N(void *ckt, INPtables * tab, card * current)
|
||||
void INP2N(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
/* parse a numerical device card */
|
||||
/* Nname <node> <node> [<node> ...] [<mname>] */
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ Author: 1990 Jaijeet S. Roychowdhury
|
|||
#include "inp.h"
|
||||
|
||||
|
||||
void INP2O(void *ckt, INPtables * tab, card * current)
|
||||
void INP2O(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Oname <node> <node> <node> <node> [IC=<val>,<val>,<val>,<val>] */
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Author: 1992 Charles Hough
|
|||
|
||||
void
|
||||
INP2P(
|
||||
void *ckt,
|
||||
CKTcircuit *ckt,
|
||||
INPtables *tab,
|
||||
card *current)
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Modified: 2001 Paolo Nenzi (Cider Integration)
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2Q(void *ckt, INPtables * tab, card * current, void *gnode)
|
||||
void INP2Q(CKTcircuit *ckt, INPtables * tab, card * current, void *gnode)
|
||||
{
|
||||
|
||||
/* Qname <node> <node> <node> [<node>] <model> [<val>] [OFF]
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Remarks: This code is based on a version written by Serban Popescu which
|
|||
/* undefine to add tracing to this file */
|
||||
/* #define TRACE */
|
||||
|
||||
void INP2R(void *ckt, INPtables * tab, card * current)
|
||||
void INP2R(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
/* parse a resistor card */
|
||||
/* Rname <node> <node> [<val>][<mname>][w=<val>][l=<val>][ac=<val>] */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2S(void *ckt, INPtables * tab, card * current)
|
||||
void INP2S(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Sname <node> <node> <node> <node> [<modname>] [IC] */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2T(void *ckt, INPtables * tab, card * current)
|
||||
void INP2T(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Tname <node> <node> <node> <node> [TD=<val>]
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2U(void *ckt, INPtables * tab, card * current)
|
||||
void INP2U(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Uname <node> <node> <model> [l=<val>] [n=<val>] */
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2V(void *ckt, INPtables * tab, card * current)
|
||||
void INP2V(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Vname <node> <node> [ [DC] <val>] [AC [<val> [<val> ] ] ]
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2W(void *ckt, INPtables * tab, card * current)
|
||||
void INP2W(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Wname <node> <node> <vctrl> [<modname>] [IC] */
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ Author: 1992 Charles Hough
|
|||
|
||||
void
|
||||
INP2Y(
|
||||
void *ckt,
|
||||
CKTcircuit *ckt,
|
||||
INPtables *tab,
|
||||
card *current)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Author: 1988 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
void INP2Z(void *ckt, INPtables * tab, card * current)
|
||||
void INP2Z(CKTcircuit *ckt, INPtables * tab, card * current)
|
||||
{
|
||||
|
||||
/* Zname <node> <node> <node> <model> [<val>] [OFF] [IC=<val>,<val>] */
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "inp.h"
|
||||
|
||||
int
|
||||
INPaName(char *parm, IFvalue * val, void *ckt, int *dev, char *devnam,
|
||||
INPaName(char *parm, IFvalue * val, CKTcircuit *ckt, int *dev, char *devnam,
|
||||
void **fast, IFsimulator * sim, int *dataType, IFvalue * selector)
|
||||
/* the name of the parameter to set */
|
||||
/* the parameter union containing the value to set */
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ Author: 1985 Thomas L. Quarles
|
|||
* Note that multi-line models are handled in the calling fcn
|
||||
* (INPpas1).
|
||||
*-------------------------------------------------------------*/
|
||||
char *INPdomodel(void *ckt, card * image, INPtables * tab)
|
||||
char *INPdomodel(CKTcircuit *ckt, card * image, INPtables * tab)
|
||||
{
|
||||
|
||||
char *modname;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "fteext.h"
|
||||
#include "inp.h"
|
||||
|
||||
char *INPdevParse(char **line, void *ckt, int dev, void *fast,
|
||||
char *INPdevParse(char **line, CKTcircuit *ckt, int dev, void *fast,
|
||||
double *leading, int *waslead, INPtables * tab)
|
||||
/* the line to parse */
|
||||
/* the circuit this device is a member of */
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ extern int INPnumCards;
|
|||
#define E_MISSING -1
|
||||
#define E_AMBIGUOUS -2
|
||||
|
||||
static int INPparseNumMod( void* ckt, INPmodel *model, INPtables *tab, char **errMessage );
|
||||
static int INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMessage );
|
||||
static int INPfindCard( char *name, IFcardInfo *table[], int numCards );
|
||||
static int INPfindParm( char *name, IFparm *table, int numParms );
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ extern INPmodel *modtab;
|
|||
code moved from INPgetMod
|
||||
*/
|
||||
static int
|
||||
create_model( void* ckt, INPmodel* modtmp, INPtables* tab )
|
||||
create_model( CKTcircuit* ckt, INPmodel* modtmp, INPtables* tab )
|
||||
{
|
||||
IFvalue* val;
|
||||
char* err = NULL;
|
||||
|
|
@ -193,7 +193,7 @@ in_range( double value, double min, double max )
|
|||
}
|
||||
|
||||
char*
|
||||
INPgetModBin( void* ckt, char* name, INPmodel** model, INPtables* tab, char* line )
|
||||
INPgetModBin( CKTcircuit* ckt, char* name, INPmodel** model, INPtables* tab, char* line )
|
||||
{
|
||||
INPmodel* modtmp;
|
||||
double l, w, lmin, lmax, wmin, wmax;
|
||||
|
|
@ -240,7 +240,7 @@ INPgetModBin( void* ckt, char* name, INPmodel** model, INPtables* tab, char* lin
|
|||
return NULL;
|
||||
}
|
||||
|
||||
char *INPgetMod(void *ckt, char *name, INPmodel ** model, INPtables * tab)
|
||||
char *INPgetMod(CKTcircuit *ckt, char *name, INPmodel ** model, INPtables * tab)
|
||||
{
|
||||
INPmodel *modtmp;
|
||||
char *err = NULL;
|
||||
|
|
@ -310,7 +310,7 @@ char *INPgetMod(void *ckt, char *name, INPmodel ** model, INPtables * tab)
|
|||
* other = new card
|
||||
*/
|
||||
static int
|
||||
INPparseNumMod( void* ckt, INPmodel *model, INPtables *tab, char **errMessage )
|
||||
INPparseNumMod( CKTcircuit* ckt, INPmodel *model, INPtables *tab, char **errMessage )
|
||||
{
|
||||
card *txtCard; /* Text description of a card */
|
||||
GENcard *tmpCard; /* Processed description of a card */
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "inpptree.h"
|
||||
#include "inp.h"
|
||||
|
||||
IFvalue *INPgetValue(void *ckt, char **line, int type, INPtables * tab)
|
||||
IFvalue *INPgetValue(CKTcircuit *ckt, char **line, int type, INPtables * tab)
|
||||
{
|
||||
double *list;
|
||||
int *ilist;
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ extern IFsimulator *ft_sim;
|
|||
* warning. */
|
||||
|
||||
void
|
||||
INPpas3(void *ckt, card *data, INPtables *tab, void *task,
|
||||
INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, void *task,
|
||||
IFparm *nodeParms, int numNodeParms)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
#include <inpdefs.h>
|
||||
|
||||
void INPpas3(void *ckt, card *data, INPtables *tab, void *task,
|
||||
void INPpas3(CKTcircuit *ckt, card *data, INPtables *tab, void *task,
|
||||
IFparm *nodeParms, int numNodeParams);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ Author: 1985 Thomas L. Quarles
|
|||
#include "iferrmsg.h"
|
||||
#include "inp.h"
|
||||
|
||||
int INPpName(char *parm, IFvalue * val, void *ckt, int dev, void *fast)
|
||||
int INPpName(char *parm, IFvalue * val, CKTcircuit *ckt, int dev, void *fast)
|
||||
/* the name of the parameter to set */
|
||||
/* the parameter union containing the value to set */
|
||||
/* the circuit this device is a member of */
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@ static INPparseNode *PTdifferentiate(INPparseNode * p, int varnum);
|
|||
static IFvalue *values = NULL;
|
||||
static int *types;
|
||||
static int numvalues;
|
||||
static void *circuit;
|
||||
static CKTcircuit *circuit;
|
||||
static INPtables *tables;
|
||||
|
||||
#if defined (_MSC_VER)
|
||||
|
|
@ -117,7 +117,7 @@ static struct constant {
|
|||
*/
|
||||
|
||||
void
|
||||
INPgetTree(char **line, INPparseTree ** pt, void *ckt, INPtables * tab)
|
||||
INPgetTree(char **line, INPparseTree ** pt, CKTcircuit *ckt, INPtables * tab)
|
||||
{
|
||||
INPparseNode *p;
|
||||
int i, rv;
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ INPtables *INPtabInit(int numlines)
|
|||
/* insert 'token' into the terminal symbol table */
|
||||
/* create a NEW NODE and return a pointer to it in *node */
|
||||
|
||||
int INPtermInsert(void *ckt, char **token, INPtables * tab, void **node)
|
||||
int INPtermInsert(CKTcircuit *ckt, char **token, INPtables * tab, void **node)
|
||||
{
|
||||
int key;
|
||||
int error;
|
||||
|
|
@ -79,7 +79,7 @@ int INPtermInsert(void *ckt, char **token, INPtables * tab, void **node)
|
|||
/* USE node as the node pointer */
|
||||
|
||||
|
||||
int INPmkTerm(void *ckt, char **token, INPtables * tab, void **node)
|
||||
int INPmkTerm(CKTcircuit *ckt, char **token, INPtables * tab, void **node)
|
||||
{
|
||||
int key;
|
||||
struct INPnTab *t;
|
||||
|
|
@ -107,7 +107,7 @@ int INPmkTerm(void *ckt, char **token, INPtables * tab, void **node)
|
|||
|
||||
/* insert 'token' into the terminal symbol table as a name for ground*/
|
||||
|
||||
int INPgndInsert(void *ckt, char **token, INPtables * tab, void **node)
|
||||
int INPgndInsert(CKTcircuit *ckt, char **token, INPtables * tab, void **node)
|
||||
{
|
||||
int key;
|
||||
int error;
|
||||
|
|
|
|||
|
|
@ -376,7 +376,7 @@ determines what instances will have data returned over the IPC channel.
|
|||
|
||||
|
||||
int ipc_get_devices(
|
||||
void *circuit, /* The circuit structure */
|
||||
CKTcircuit *circuit, /* The circuit structure */
|
||||
char *device, /* The device name as it appears in the info struct */
|
||||
char ***names, /* Array of name strings to be built */
|
||||
double **modtypes) /* Array of types to be built */
|
||||
|
|
@ -397,7 +397,7 @@ int ipc_get_devices(
|
|||
MOS3model *MOS3mod;
|
||||
|
||||
/* Initialize local variables */
|
||||
ckt = (CKTcircuit *) circuit;
|
||||
ckt = /* fixme, drop that */ circuit;
|
||||
num_instances = 0;
|
||||
|
||||
/* Get the index into the circuit structure linked list of models */
|
||||
|
|
|
|||
Loading…
Reference in New Issue