Created a New Infrastructure for the KCL Verification based on the Linear and Non-Linear Node Method

This commit is contained in:
Francesco Lannutti 2013-05-21 23:44:47 +02:00
parent 9aaa127643
commit 988cf25c24
149 changed files with 1441 additions and 166 deletions

View File

@ -111,6 +111,7 @@ struct CKTcircuit {
double *CKTrhsOld; /* previous rhs value for convergence
testing */
double *CKTfvk ; /* KCL Verification array */
int *CKTnodeIsLinear ; /* Flag to indicate if a node is linear or non-linear */
double *CKTrhsSpare; /* spare rhs value for reordering */
double *CKTirhs; /* current rhs value - being loaded
(imag) */

View File

@ -112,6 +112,10 @@ typedef struct SPICEdev {
int *DEVinstSize; /* size of an instance */
int *DEVmodSize; /* size of a model */
/* Francesco Lannutti */
int (*DEVnodeIsNonLinear)(GENmodel *, CKTcircuit *) ;
/* Routine to declare a node as NonLinear */
} SPICEdev; /* instance of structure for each possible type of device */

View File

@ -73,7 +73,7 @@ NIconvTest(CKTcircuit *ckt)
for (i = 1 ; i <= size ; i++)
{
node = node->next ;
if (node->type == SP_VOLTAGE)
if ((node->type == SP_VOLTAGE) && (!ckt->CKTnodeIsLinear [i]))
{
#ifdef STEPDEBUG

View File

@ -21,10 +21,7 @@ Author: 1985 Thomas L. Quarles
int
NIreinit( CKTcircuit *ckt)
{
int size;
#ifdef PREDICTOR
int i;
#endif
int i, size;
size = SMPmatSize(ckt->CKTmatrix);
CKALLOC(CKTrhs,size+1,double);
@ -34,6 +31,9 @@ NIreinit( CKTcircuit *ckt)
CKALLOC(CKTirhs,size+1,double);
CKALLOC(CKTirhsOld,size+1,double);
CKALLOC(CKTirhsSpare,size+1,double);
CKALLOC(CKTnodeIsLinear,size+1,int);
for (i = 0 ; i <= size ; i++)
ckt->CKTnodeIsLinear [i] = 1 ;
#ifdef PREDICTOR
CKALLOC(CKTpred,size+1,double);
for( i=0;i<8;i++) {

View File

@ -127,6 +127,20 @@ CKTsetup(CKTcircuit *ckt)
/* gtri - end - Setup for adding rshunt option resistors */
#endif
/** Marking node as Non-Linear when needed
* By default every node is Linear
*/
for (i = 0 ; i < DEVmaxnum ; i++)
{
if (DEVices[i] && DEVices[i]->DEVnodeIsNonLinear && ckt->CKThead[i])
{
error = DEVices[i]->DEVnodeIsNonLinear (ckt->CKThead[i], ckt) ;
if (error)
return (error) ;
}
}
return(OK);
}

View File

@ -17,6 +17,7 @@ libasrc_la_SOURCES = \
asrcinit.h \
asrcload.c \
asrcmdel.c \
asrcnode.c \
asrcpar.c \
asrcpzld.c \
asrcset.c \

View File

@ -16,3 +16,4 @@ extern int ASRCacLoad(GENmodel*,CKTcircuit*);
extern int ASRCsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int ASRCunsetup(GENmodel*,CKTcircuit*);
extern int ASRCtemp(GENmodel*,CKTcircuit*);
extern int ASRCnodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -73,7 +73,8 @@ SPICEdev ASRCinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &ASRCiSize,
/* DEVmodSize */ &ASRCmSize
/* DEVmodSize */ &ASRCmSize,
/* DEVnodeIsNonLinear */ ASRCnodeIsNonLinear
};

View File

@ -0,0 +1,28 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "asrcdefs.h"
#include "ngspice/sperror.h"
int
ASRCnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
ASRCmodel *model = (ASRCmodel *)inModel ;
ASRCinstance *here ;
/* loop through all the ASRC models */
for ( ; model != NULL ; model = model->ASRCnextModel)
{
/* loop through all the instances of the model */
for (here = model->ASRCinstances ; here != NULL ; here = here->ASRCnextInstance)
{
ckt->CKTnodeIsLinear [here->ASRCposNode] = 0 ;
ckt->CKTnodeIsLinear [here->ASRCnegNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -22,6 +22,7 @@ libbjt_la_SOURCES = \
bjtmask.c \
bjtmdel.c \
bjtmpar.c \
bjtnode.c \
bjtnoise.c \
bjtparam.c \
bjtpzld.c \

View File

@ -31,5 +31,6 @@ extern int BJTtrunc(GENmodel*,CKTcircuit*,double*);
extern int BJTdisto(int,GENmodel*,CKTcircuit*);
extern int BJTnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BJTdSetup(GENmodel*, register CKTcircuit*);
extern int BJTnodeIsNonLinear (GENmodel *, CKTcircuit *) ;
#endif

View File

@ -72,7 +72,8 @@ SPICEdev BJTinfo = { /* description from struct IFdevice */
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &BJTiSize,
/* DEVmodSize */ &BJTmSize
/* DEVmodSize */ &BJTmSize,
/* DEVnodeIsNonLinear */ BJTnodeIsNonLinear
};

View File

@ -0,0 +1,31 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bjtdefs.h"
#include "ngspice/sperror.h"
int
BJTnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BJTmodel *model = (BJTmodel *)inModel ;
BJTinstance *here ;
/* loop through all the BJT models */
for ( ; model != NULL ; model = model->BJTnextModel)
{
/* loop through all the instances of the model */
for (here = model->BJTinstances ; here != NULL ; here = here->BJTnextInstance)
{
ckt->CKTnodeIsLinear [here->BJTcolPrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->BJTbasePrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->BJTemitPrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->BJTsubstNode] = 0 ;
ckt->CKTnodeIsLinear [here->BJTsubstConNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -19,6 +19,7 @@ libbsim1_la_SOURCES = \
b1moscap.c \
b1mpar.c \
b1par.c \
b1node.c \
b1noi.c \
b1pzld.c \
b1set.c \

View File

@ -0,0 +1,30 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim1def.h"
#include "ngspice/sperror.h"
int
B1nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
B1model *model = (B1model *)inModel ;
B1instance *here ;
/* loop through all the BSIM1 models */
for ( ; model != NULL ; model = model->B1nextModel)
{
/* loop through all the instances of the model */
for (here = model->B1instances ; here != NULL ; here = here->B1nextInstance)
{
ckt->CKTnodeIsLinear [here->B1dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B1sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B1gNode] = 0 ;
ckt->CKTnodeIsLinear [here->B1bNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -29,3 +29,4 @@ extern int B1temp(GENmodel*,CKTcircuit*);
extern int B1trunc(GENmodel*,CKTcircuit*,double*);
extern int B1disto(int,GENmodel*,CKTcircuit*);
extern int B1dSetup(GENmodel*, register CKTcircuit*);
extern int B1nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev B1info = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &B1iSize,
/* DEVmodSize */ &B1mSize
/* DEVmodSize */ &B1mSize,
/* DEVnodeIsNonLinear */ B1nodeIsNonLinear
};

View File

@ -16,6 +16,7 @@ libbsim2_la_SOURCES = \
b2mdel.c \
b2moscap.c \
b2mpar.c \
b2node.c \
b2noi.c \
b2par.c \
b2pzld.c \

View File

@ -0,0 +1,30 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim2def.h"
#include "ngspice/sperror.h"
int
B2nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
B2model *model = (B2model *)inModel ;
B2instance *here ;
/* loop through all the BSIM2 models */
for ( ; model != NULL ; model = model->B2nextModel)
{
/* loop through all the instances of the model */
for (here = model->B2instances ; here != NULL ; here = here->B2nextInstance)
{
ckt->CKTnodeIsLinear [here->B2dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B2sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B2gNode] = 0 ;
ckt->CKTnodeIsLinear [here->B2bNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -25,3 +25,4 @@ extern int B2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int B2unsetup(GENmodel*,CKTcircuit*);
extern int B2temp(GENmodel*,CKTcircuit*);
extern int B2trunc(GENmodel*,CKTcircuit*,double*);
extern int B2nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev B2info = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &B2iSize,
/* DEVmodSize */ &B2mSize
/* DEVmodSize */ &B2mSize,
/* DEVnodeIsNonLinear */ B2nodeIsNonLinear
};

View File

@ -15,6 +15,7 @@ libbsim3_la_SOURCES = \
b3mask.c \
b3mdel.c \
b3mpar.c \
b3node.c \
b3noi.c \
b3par.c \
b3pzld.c \

View File

@ -0,0 +1,29 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim3def.h"
#include "ngspice/sperror.h"
int
BSIM3nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM3model *model = (BSIM3model *)inModel ;
BSIM3instance *here ;
/* loop through all the BSIM3 models */
for ( ; model != NULL ; model = model->BSIM3nextModel)
{
/* loop through all the instances of the model */
for (here = model->BSIM3instances ; here != NULL ; here = here->BSIM3nextInstance)
{
ckt->CKTnodeIsLinear [here->BSIM3dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3qNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -28,3 +28,4 @@ extern int BSIM3temp(GENmodel*,CKTcircuit*);
extern int BSIM3trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM3noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM3unsetup(GENmodel*,CKTcircuit*);
extern int BSIM3nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -71,7 +71,8 @@ SPICEdev BSIM3info = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &BSIM3iSize,
/* DEVmodSize */ &BSIM3mSize
/* DEVmodSize */ &BSIM3mSize,
/* DEVnodeIsNonLinear */ BSIM3nodeIsNonLinear
};

View File

@ -2,29 +2,30 @@
noinst_LTLIBRARIES = libbsim3soidd.la
libbsim3soidd_la_SOURCES = \
b3soidd.c \
b3soiddacld.c \
b3soiddask.c \
b3soiddcheck.c \
b3soiddcvtest.c \
b3soidddel.c \
b3soidddest.c \
b3soiddgetic.c \
b3soiddld.c \
b3soiddmask.c \
b3soiddmdel.c \
b3soiddmpar.c \
b3soiddnoi.c \
b3soiddpar.c \
b3soiddpzld.c \
b3soiddset.c \
b3soiddtemp.c \
b3soiddtrunc.c \
b3soidddef.h \
b3soiddext.h \
b3soiddinit.c \
b3soiddinit.h \
libbsim3soidd_la_SOURCES = \
b3soidd.c \
b3soiddacld.c \
b3soiddask.c \
b3soiddcheck.c \
b3soiddcvtest.c \
b3soidddel.c \
b3soidddest.c \
b3soiddgetic.c \
b3soiddld.c \
b3soiddmask.c \
b3soiddmdel.c \
b3soiddmpar.c \
b3soiddnode.c \
b3soiddnoi.c \
b3soiddpar.c \
b3soiddpzld.c \
b3soiddset.c \
b3soiddtemp.c \
b3soiddtrunc.c \
b3soidddef.h \
b3soiddext.h \
b3soiddinit.c \
b3soiddinit.h \
b3soidditf.h

View File

@ -28,3 +28,4 @@ extern int B3SOIDDtemp(GENmodel*,CKTcircuit*);
extern int B3SOIDDtrunc(GENmodel*,CKTcircuit*,double*);
extern int B3SOIDDnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int B3SOIDDunsetup(GENmodel*,CKTcircuit*);
extern int B3SOIDDnodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -69,7 +69,8 @@ SPICEdev B3SOIDDinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &B3SOIDDiSize,
/* DEVmodSize */ &B3SOIDDmSize
/* DEVmodSize */ &B3SOIDDmSize,
/* DEVnodeIsNonLinear */ B3SOIDDnodeIsNonLinear
};
SPICEdev *

View File

@ -0,0 +1,79 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "b3soidddef.h"
#include "ngspice/sperror.h"
int
B3SOIDDnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
B3SOIDDmodel *model = (B3SOIDDmodel *)inModel ;
B3SOIDDinstance *here ;
/* loop through all the B3SOIDD models */
for ( ; model != NULL ; model = model->B3SOIDDnextModel)
{
/* loop through all the instances of the model */
for (here = model->B3SOIDDinstances ; here != NULL ; here = here->B3SOIDDnextInstance)
{
ckt->CKTnodeIsLinear [here->B3SOIDDdNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDsNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDtempNode] = 0 ;
if ((here->B3SOIDDdebugMod > 1) || (here->B3SOIDDdebugMod == -1))
{
ckt->CKTnodeIsLinear [here->B3SOIDDvbsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDidsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDicNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDibsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDibdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDiiiNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDigidlNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDitunNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDibpNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDabeffNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDvbs0effNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDvbseffNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDxcNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDcbbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDcbdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDcbgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqbfNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqjsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqjdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDgmNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDgmbsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDgdsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDgmeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDvbs0teffNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDvthNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDvgsteffNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDxcsatNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqaccNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqsub0Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqsubs1Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqsubs2Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDqgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDvdscvNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDvcscvNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDcbeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDdum1Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDdum2Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDdum3Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDdum4Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDdum5Node] = 0 ;
}
ckt->CKTnodeIsLinear [here->B3SOIDDgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIDDpNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -2,29 +2,30 @@
noinst_LTLIBRARIES = libbsim3soifd.la
libbsim3soifd_la_SOURCES = \
b3soifd.c \
b3soifdacld.c \
b3soifdask.c \
b3soifdcheck.c \
b3soifdcvtest.c \
b3soifddel.c \
b3soifddest.c \
b3soifdgetic.c \
b3soifdld.c \
b3soifdmask.c \
b3soifdmdel.c \
b3soifdmpar.c \
b3soifdnoi.c \
b3soifdpar.c \
b3soifdpzld.c \
b3soifdset.c \
b3soifdtemp.c \
b3soifdtrunc.c \
b3soifddef.h \
b3soifdext.h \
b3soifdinit.c \
b3soifdinit.h \
libbsim3soifd_la_SOURCES = \
b3soifd.c \
b3soifdacld.c \
b3soifdask.c \
b3soifdcheck.c \
b3soifdcvtest.c \
b3soifddel.c \
b3soifddest.c \
b3soifdgetic.c \
b3soifdld.c \
b3soifdmask.c \
b3soifdmdel.c \
b3soifdmpar.c \
b3soifdnode.c \
b3soifdnoi.c \
b3soifdpar.c \
b3soifdpzld.c \
b3soifdset.c \
b3soifdtemp.c \
b3soifdtrunc.c \
b3soifddef.h \
b3soifdext.h \
b3soifdinit.c \
b3soifdinit.h \
b3soifditf.h

View File

@ -28,4 +28,4 @@ extern int B3SOIFDtemp(GENmodel*,CKTcircuit*);
extern int B3SOIFDtrunc(GENmodel*,CKTcircuit*,double*);
extern int B3SOIFDnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int B3SOIFDunsetup(GENmodel*,CKTcircuit*);
extern int B3SOIFDnodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -70,7 +70,8 @@ SPICEdev B3SOIFDinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize*/ &B3SOIFDiSize,
/* DEVmodSize*/ &B3SOIFDmSize
/* DEVmodSize*/ &B3SOIFDmSize,
/* DEVnodeIsNonLinear */ B3SOIFDnodeIsNonLinear
};

View File

@ -0,0 +1,79 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "b3soifddef.h"
#include "ngspice/sperror.h"
int
B3SOIFDnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
B3SOIFDmodel *model = (B3SOIFDmodel *)inModel ;
B3SOIFDinstance *here ;
/* loop through all the B3SOIFD models */
for ( ; model != NULL ; model = model->B3SOIFDnextModel)
{
/* loop through all the instances of the model */
for (here = model->B3SOIFDinstances ; here != NULL ; here = here->B3SOIFDnextInstance)
{
ckt->CKTnodeIsLinear [here->B3SOIFDdNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDsNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDtempNode] = 0 ;
if ((here->B3SOIFDdebugMod > 1) || (here->B3SOIFDdebugMod == -1))
{
ckt->CKTnodeIsLinear [here->B3SOIFDvbsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDidsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDicNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDibsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDibdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDiiiNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDigidlNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDitunNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDibpNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDabeffNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDvbs0effNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDvbseffNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDxcNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDcbbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDcbdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDcbgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqbfNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqjsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqjdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDgmNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDgmbsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDgdsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDgmeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDvbs0teffNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDvthNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDvgsteffNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDxcsatNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqaccNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqsub0Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqsubs1Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqsubs2Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDqgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDvdscvNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDvcscvNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDcbeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDdum1Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDdum2Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDdum3Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDdum4Node] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDdum5Node] = 0 ;
}
ckt->CKTnodeIsLinear [here->B3SOIFDgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIFDpNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -2,29 +2,30 @@
noinst_LTLIBRARIES = libbsim3soipd.la
libbsim3soipd_la_SOURCES = \
b3soipd.c \
b3soipdacld.c \
b3soipdask.c \
b3soipdcheck.c \
b3soipdcvtest.c \
b3soipddel.c \
b3soipddest.c \
b3soipdgetic.c \
b3soipdld.c \
b3soipdmask.c \
b3soipdmdel.c \
b3soipdmpar.c \
b3soipdnoi.c \
b3soipdpar.c \
b3soipdpzld.c \
b3soipdset.c \
b3soipdtemp.c \
b3soipdtrunc.c \
b3soipddef.h \
b3soipdext.h \
b3soipdinit.c \
b3soipdinit.h \
libbsim3soipd_la_SOURCES = \
b3soipd.c \
b3soipdacld.c \
b3soipdask.c \
b3soipdcheck.c \
b3soipdcvtest.c \
b3soipddel.c \
b3soipddest.c \
b3soipdgetic.c \
b3soipdld.c \
b3soipdmask.c \
b3soipdmdel.c \
b3soipdmpar.c \
b3soipdnode.c \
b3soipdnoi.c \
b3soipdpar.c \
b3soipdpzld.c \
b3soipdset.c \
b3soipdtemp.c \
b3soipdtrunc.c \
b3soipddef.h \
b3soipdext.h \
b3soipdinit.c \
b3soipdinit.h \
b3soipditf.h

View File

@ -28,3 +28,4 @@ extern int B3SOIPDtemp(GENmodel*,CKTcircuit*);
extern int B3SOIPDtrunc(GENmodel*,CKTcircuit*,double*);
extern int B3SOIPDnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int B3SOIPDunsetup(GENmodel*,CKTcircuit*);
extern int B3SOIPDnodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -71,7 +71,8 @@ SPICEdev B3SOIPDinfo = {
/* DEVacct*/ NULL,
#endif
/* DEVinstSize*/ &B3SOIPDiSize,
/* DEVmodSize*/ &B3SOIPDmSize
/* DEVmodSize*/ &B3SOIPDmSize,
/* DEVnodeIsNonLinear */ B3SOIPDnodeIsNonLinear
};
SPICEdev *

View File

@ -0,0 +1,55 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "b3soipddef.h"
#include "ngspice/sperror.h"
int
B3SOIPDnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
B3SOIPDmodel *model = (B3SOIPDmodel *)inModel ;
B3SOIPDinstance *here ;
/* loop through all the B3SOIPD models */
for ( ; model != NULL ; model = model->B3SOIPDnextModel)
{
/* loop through all the instances of the model */
for (here = model->B3SOIPDinstances ; here != NULL ; here = here->B3SOIPDnextInstance)
{
ckt->CKTnodeIsLinear [here->B3SOIPDdNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDsNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDtempNode] = 0 ;
if (here->B3SOIPDdebugMod != 0)
{
ckt->CKTnodeIsLinear [here->B3SOIPDvbsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDidsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDicNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDibsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDibdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDiiiNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDigNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDgiggNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDgigdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDgigbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDigidlNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDitunNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDibpNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDcbbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDcbdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDcbgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDqbfNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDqjsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDqjdNode] = 0 ;
}
ckt->CKTnodeIsLinear [here->B3SOIPDgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B3SOIPDpNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -14,6 +14,7 @@ libbsim3v0_la_SOURCES = \
b3v0mask.c \
b3v0mdel.c \
b3v0mpar.c \
b3v0node.c \
b3v0noi.c \
b3v0par.c \
b3v0pzld.c \

View File

@ -0,0 +1,31 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim3v0def.h"
#include "ngspice/sperror.h"
int
BSIM3v0nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM3v0model *model = (BSIM3v0model *)inModel ;
BSIM3v0instance *here ;
/* loop through all the BSIM3v0 models */
for ( ; model != NULL ; model = model->BSIM3v0nextModel)
{
/* loop through all the instances of the model */
for (here = model->BSIM3v0instances ; here != NULL ; here = here->BSIM3v0nextInstance)
{
ckt->CKTnodeIsLinear [here->BSIM3v0dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v0sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v0qNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v0gNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v0bNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -26,5 +26,5 @@ extern int BSIM3v0setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int BSIM3v0temp(GENmodel*,CKTcircuit*);
extern int BSIM3v0trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM3v0noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM3v0unsetup(GENmodel *, CKTcircuit *);
extern int BSIM3v0unsetup(GENmodel *, CKTcircuit *);
extern int BSIM3v0nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -70,7 +70,8 @@ SPICEdev B3v0info = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &BSIM3v0iSize,
/* DEVmodSize */ &BSIM3v0mSize
/* DEVmodSize */ &BSIM3v0mSize,
/* DEVnodeIsNonLinear */ BSIM3v0nodeIsNonLinear
};

View File

@ -15,6 +15,7 @@ libbsim3v1_la_SOURCES = \
b3v1mask.c \
b3v1mdel.c \
b3v1mpar.c \
b3v1node.c \
b3v1noi.c \
b3v1par.c \
b3v1pzld.c \

View File

@ -0,0 +1,31 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim3v1def.h"
#include "ngspice/sperror.h"
int
BSIM3v1nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM3v1model *model = (BSIM3v1model *)inModel ;
BSIM3v1instance *here ;
/* loop through all the BSIM3v1 models */
for ( ; model != NULL ; model = model->BSIM3v1nextModel)
{
/* loop through all the instances of the model */
for (here = model->BSIM3v1instances ; here != NULL ; here = here->BSIM3v1nextInstance)
{
ckt->CKTnodeIsLinear [here->BSIM3v1dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v1sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v1qNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v1gNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v1bNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -28,4 +28,4 @@ extern int BSIM3v1temp(GENmodel *, CKTcircuit *);
extern int BSIM3v1trunc(GENmodel *, CKTcircuit *, double *);
extern int BSIM3v1noise(int, int, GENmodel *, CKTcircuit *, Ndata *, double *);
extern int BSIM3v1unsetup(GENmodel *, CKTcircuit *);
extern int BSIM3v1nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -70,7 +70,8 @@ SPICEdev BSIM3v1info = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &BSIM3v1iSize,
/* DEVmodSize */ &BSIM3v1mSize
/* DEVmodSize */ &BSIM3v1mSize,
/* DEVnodeIsNonLinear */ BSIM3v1nodeIsNonLinear
};

View File

@ -15,6 +15,7 @@ libbsim3v32_la_SOURCES = \
b3v32mask.c \
b3v32mdel.c \
b3v32mpar.c \
b3v32node.c \
b3v32noi.c \
b3v32par.c \
b3v32pzld.c \

View File

@ -0,0 +1,31 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim3v32def.h"
#include "ngspice/sperror.h"
int
BSIM3v32nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM3v32model *model = (BSIM3v32model *)inModel ;
BSIM3v32instance *here ;
/* loop through all the BSIM3v32 models */
for ( ; model != NULL ; model = model->BSIM3v32nextModel)
{
/* loop through all the instances of the model */
for (here = model->BSIM3v32instances ; here != NULL ; here = here->BSIM3v32nextInstance)
{
ckt->CKTnodeIsLinear [here->BSIM3v32dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v32sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v32qNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v32gNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM3v32bNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -29,3 +29,4 @@ extern int BSIM3v32temp(GENmodel*,CKTcircuit*);
extern int BSIM3v32trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM3v32noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM3v32unsetup(GENmodel*,CKTcircuit*);
extern int BSIM3v32nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -71,7 +71,8 @@ SPICEdev BSIM3v32info = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &BSIM3v32iSize,
/* DEVmodSize */ &BSIM3v32mSize
/* DEVmodSize */ &BSIM3v32mSize,
/* DEVnodeIsNonLinear */ BSIM3v32nodeIsNonLinear
};

View File

@ -16,6 +16,7 @@ libbsim4_la_SOURCES = \
b4mask.c \
b4mdel.c \
b4mpar.c \
b4node.c \
b4noi.c \
b4par.c \
b4pzld.c \

View File

@ -0,0 +1,46 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim4def.h"
#include "ngspice/sperror.h"
int
BSIM4nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM4model *model = (BSIM4model *)inModel ;
BSIM4instance *here ;
/* loop through all the BSIM4 models */
for ( ; model != NULL ; model = model->BSIM4nextModel)
{
/* loop through all the instances of the model */
for (here = model->BSIM4instances ; here != NULL ; here = here->BSIM4nextInstance)
{
#ifdef STEPDEBUG
fprintf (stderr, "here->BSIM4dNodePrime: %d\n", here->BSIM4dNodePrime) ;
fprintf (stderr, "here->BSIM4sNodePrime: %d\n", here->BSIM4sNodePrime) ;
fprintf (stderr, "here->BSIM4gNodePrime: %d\n", here->BSIM4gNodePrime) ;
fprintf (stderr, "here->BSIM4gNodeMid: %d\n", here->BSIM4gNodeMid) ;
fprintf (stderr, "here->BSIM4dbNode: %d\n", here->BSIM4dbNode) ;
fprintf (stderr, "here->BSIM4bNodePrime: %d\n", here->BSIM4bNodePrime) ;
fprintf (stderr, "here->BSIM4sbNode: %d\n", here->BSIM4sbNode) ;
fprintf (stderr, "here->BSIM4qNode: %d\n", here->BSIM4qNode) ;
#endif
ckt->CKTnodeIsLinear [here->BSIM4dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4sNodePrime] = 0 ;
// ckt->CKTnodeIsLinear [here->BSIM4gNodePrime] = 0 ;
// ckt->CKTnodeIsLinear [here->BSIM4gNodeMid] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4dbNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4bNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4sbNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4qNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -28,3 +28,4 @@ extern int BSIM4temp(GENmodel*,CKTcircuit*);
extern int BSIM4trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM4noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM4unsetup(GENmodel*,CKTcircuit*);
extern int BSIM4nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev BSIM4info = {
NULL, /* DEVacct */
#endif
&BSIM4iSize, /* DEVinstSize */
&BSIM4mSize /* DEVmodSize */
&BSIM4mSize, /* DEVmodSize */
BSIM4nodeIsNonLinear /* DEVnodeIsNonLinear */
};

View File

@ -16,6 +16,7 @@ libbsim4v4_la_SOURCES = \
b4v4mask.c \
b4v4mdel.c \
b4v4mpar.c \
b4v4node.c \
b4v4noi.c \
b4v4par.c \
b4v4pzld.c \

View File

@ -0,0 +1,34 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim4v4def.h"
#include "ngspice/sperror.h"
int
BSIM4v4nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM4v4model *model = (BSIM4v4model *)inModel ;
BSIM4v4instance *here ;
/* loop through all the BSIM4v4 models */
for ( ; model != NULL ; model = model->BSIM4v4nextModel)
{
/* loop through all the instances of the model */
for (here = model->BSIM4v4instances ; here != NULL ; here = here->BSIM4v4nextInstance)
{
ckt->CKTnodeIsLinear [here->BSIM4v4dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v4sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v4gNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v4gNodeMid] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v4dbNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v4bNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v4sbNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v4qNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -29,5 +29,4 @@ extern int BSIM4v4temp(GENmodel*,CKTcircuit*);
extern int BSIM4v4trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM4v4noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM4v4unsetup(GENmodel*,CKTcircuit*);
extern int BSIM4v4nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev BSIM4v4info = {
NULL, /* DEVacct */
#endif
&BSIM4v4iSize, /* DEVinstSize */
&BSIM4v4mSize /* DEVmodSize */
&BSIM4v4mSize, /* DEVmodSize */
BSIM4v4nodeIsNonLinear /* DEVnodeIsNonLinear */
};

View File

@ -16,6 +16,7 @@ libbsim4v5_la_SOURCES = \
b4v5mask.c \
b4v5mdel.c \
b4v5mpar.c \
b4v5node.c \
b4v5noi.c \
b4v5par.c \
b4v5pzld.c \

View File

@ -0,0 +1,34 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim4v5def.h"
#include "ngspice/sperror.h"
int
BSIM4v5nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM4v5model *model = (BSIM4v5model *)inModel ;
BSIM4v5instance *here ;
/* loop through all the BSIM4v5 models */
for ( ; model != NULL ; model = model->BSIM4v5nextModel)
{
/* loop through all the instances of the model */
for (here = model->BSIM4v5instances ; here != NULL ; here = here->BSIM4v5nextInstance)
{
ckt->CKTnodeIsLinear [here->BSIM4v5dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v5sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v5gNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v5gNodeMid] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v5dbNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v5bNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v5sbNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v5qNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -28,3 +28,4 @@ extern int BSIM4v5temp(GENmodel*,CKTcircuit*);
extern int BSIM4v5trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM4v5noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM4v5unsetup(GENmodel*,CKTcircuit*);
extern int BSIM4v5nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev BSIM4v5info = {
NULL, /* DEVacct */
#endif
&BSIM4v5iSize, /* DEVinstSize */
&BSIM4v5mSize /* DEVmodSize */
&BSIM4v5mSize, /* DEVmodSize */
BSIM4v5nodeIsNonLinear /* DEVnodeIsNonLinear */
};

View File

@ -5,21 +5,22 @@ noinst_LTLIBRARIES = libbsim4v6.la
libbsim4v6_la_SOURCES = \
b4v6.c \
b4v6acld.c \
b4v6ask.c \
b4v6ask.c \
b4v6check.c \
b4v6cvtest.c \
b4v6del.c \
b4v6del.c \
b4v6dest.c \
b4v6geo.c \
b4v6geo.c \
b4v6getic.c \
b4v6ld.c \
b4v6ld.c \
b4v6mask.c \
b4v6mdel.c \
b4v6mpar.c \
b4v6noi.c \
b4v6par.c \
b4v6node.c \
b4v6noi.c \
b4v6par.c \
b4v6pzld.c \
b4v6set.c \
b4v6set.c \
b4v6temp.c \
b4v6trunc.c \
bsim4v6def.h \

View File

@ -0,0 +1,34 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "bsim4v6def.h"
#include "ngspice/sperror.h"
int
BSIM4v6nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
BSIM4v6model *model = (BSIM4v6model *)inModel ;
BSIM4v6instance *here ;
/* loop through all the BSIM4v6 models */
for ( ; model != NULL ; model = model->BSIM4v6nextModel)
{
/* loop through all the instances of the model */
for (here = model->BSIM4v6instances ; here != NULL ; here = here->BSIM4v6nextInstance)
{
ckt->CKTnodeIsLinear [here->BSIM4v6dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v6sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v6gNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v6gNodeMid] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v6dbNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v6bNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v6sbNode] = 0 ;
ckt->CKTnodeIsLinear [here->BSIM4v6qNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -28,3 +28,4 @@ extern int BSIM4v6temp(GENmodel*,CKTcircuit*);
extern int BSIM4v6trunc(GENmodel*,CKTcircuit*,double*);
extern int BSIM4v6noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int BSIM4v6unsetup(GENmodel*,CKTcircuit*);
extern int BSIM4v6nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev BSIM4v6info = {
NULL, /* DEVacct */
#endif
&BSIM4v6iSize, /* DEVinstSize */
&BSIM4v6mSize /* DEVmodSize */
&BSIM4v6mSize, /* DEVmodSize */
BSIM4v6nodeIsNonLinear /* DEVnodeIsNonLinear */
};

View File

@ -2,30 +2,31 @@
noinst_LTLIBRARIES = libbsim4soi.la
libbsim4soi_la_SOURCES = \
b4soi.c \
b4soiacld.c \
b4soiask.c \
b4soicheck.c \
b4soicvtest.c \
b4soidel.c \
b4soidest.c \
b4soigetic.c \
b4soild.c \
b4soimask.c \
b4soimdel.c \
b4soimpar.c \
b4soinoi.c \
b4soipar.c \
b4soipzld.c \
b4soiset.c \
b4soitemp.c \
b4soitrunc.c \
b4soidef.h \
b4soiext.h \
b4soiinit.c \
b4soiinit.h \
b4soiitf.h
libbsim4soi_la_SOURCES = \
b4soi.c \
b4soiacld.c \
b4soiask.c \
b4soicheck.c \
b4soicvtest.c \
b4soidel.c \
b4soidest.c \
b4soigetic.c \
b4soild.c \
b4soimask.c \
b4soimdel.c \
b4soimpar.c \
b4soinode.c \
b4soinoi.c \
b4soipar.c \
b4soipzld.c \
b4soiset.c \
b4soitemp.c \
b4soitrunc.c \
b4soidef.h \
b4soiext.h \
b4soiinit.c \
b4soiinit.h \
b4soiitf.h

View File

@ -30,3 +30,4 @@ extern int B4SOItemp(GENmodel*,CKTcircuit*);
extern int B4SOItrunc(GENmodel*,CKTcircuit*,double*);
extern int B4SOInoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int B4SOIunsetup(GENmodel*,CKTcircuit*);
extern int B4SOInodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -70,7 +70,8 @@ SPICEdev B4SOIinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &B4SOIiSize,
/* DEVmodSize */ &B4SOImSize
/* DEVmodSize */ &B4SOImSize,
/* DEVnodeIsNonLinear */ B4SOInodeIsNonLinear
};
SPICEdev *

View File

@ -0,0 +1,58 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "b4soidef.h"
#include "ngspice/sperror.h"
int
B4SOInodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
B4SOImodel *model = (B4SOImodel *)inModel ;
B4SOIinstance *here ;
/* loop through all the BSIMSOI models */
for ( ; model != NULL ; model = model->B4SOInextModel)
{
/* loop through all the instances of the model */
for (here = model->B4SOIinstances ; here != NULL ; here = here->B4SOInextInstance)
{
ckt->CKTnodeIsLinear [here->B4SOIdNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIsNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOItempNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIgNodeMid] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIdbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIsbNode] = 0 ;
if (here->B4SOIdebugMod != 0)
{
ckt->CKTnodeIsLinear [here->B4SOIvbsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIidsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIicNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIibsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIibdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIiiiNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIigNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIgiggNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIgigdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIgigbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIigidlNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIitunNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIibpNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIcbbNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIcbdNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIcbgNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIqbfNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIqjsNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIqjdNode] = 0 ;
}
ckt->CKTnodeIsLinear [here->B4SOIeNode] = 0 ;
ckt->CKTnodeIsLinear [here->B4SOIpNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -71,7 +71,8 @@ SPICEdev CAPinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &CAPiSize,
/* DEVmodSize */ &CAPmSize
/* DEVmodSize */ &CAPmSize,
/* DEVnodeIsNonLinear */ NULL
};

View File

@ -71,7 +71,8 @@ SPICEdev CCCSinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &CCCSiSize,
/* DEVmodSize */ &CCCSmSize
/* DEVmodSize */ &CCCSmSize,
/* DEVnodeIsNonLinear */ NULL
};

View File

@ -72,7 +72,8 @@ SPICEdev CCVSinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &CCVSiSize,
/* DEVmodSize */ &CCVSmSize
/* DEVmodSize */ &CCVSmSize,
/* DEVnodeIsNonLinear */ NULL
};

View File

@ -72,7 +72,8 @@ SPICEdev CPLinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &CPLiSize,
/* DEVmodSize */ &CPLmSize
/* DEVmodSize */ &CPLmSize,
/* DEVnodeIsLinear */ NULL
};

View File

@ -74,7 +74,8 @@ SPICEdev CSWinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &CSWiSize,
/* DEVmodSize */ &CSWmSize
/* DEVmodSize */ &CSWmSize,
/* DEVnodeIsLinear */ NULL
};

View File

@ -21,6 +21,7 @@ libdio_la_SOURCES = \
diomask.c \
diomdel.c \
diompar.c \
dionode.c \
dionoise.c \
dioparam.c \
diopzld.c \

View File

@ -28,4 +28,4 @@ extern int DIOtrunc(GENmodel*,CKTcircuit*,double*);
extern int DIOdisto(int,GENmodel*,CKTcircuit*);
extern int DIOnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int DIOdSetup(DIOmodel*,CKTcircuit*);
extern int DIOnodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -73,7 +73,8 @@ SPICEdev DIOinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &DIOiSize,
/* DEVmodSize */ &DIOmSize
/* DEVmodSize */ &DIOmSize,
/* DEVnodeIsNonLinear */ DIOnodeIsNonLinear
};

View File

@ -0,0 +1,28 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "diodefs.h"
#include "ngspice/sperror.h"
int
DIOnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
DIOmodel *model = (DIOmodel *)inModel ;
DIOinstance *here ;
/* loop through all the DIO models */
for ( ; model != NULL ; model = model->DIOnextModel)
{
/* loop through all the instances of the model */
for (here = model->DIOinstances ; here != NULL ; here = here->DIOnextInstance)
{
ckt->CKTnodeIsLinear [here->DIOposPrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->DIOnegNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -18,6 +18,7 @@ libhfet_la_SOURCES = \
hfetmask.c \
hfetmdel.c \
hfetmpar.c \
hfetnode.c \
hfetparam.c \
hfetpzl.c \
hfetsetup.c \

View File

@ -18,3 +18,4 @@ extern int HFETAsetup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int HFETAtemp(GENmodel*,CKTcircuit*);
extern int HFETAtrunc(GENmodel*,CKTcircuit*,double*);
extern int HFETAunsetup(GENmodel*,CKTcircuit*);
extern int HFETAnodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev HFETAinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &HFETAiSize,
/* DEVmodSize */ &HFETAmSize
/* DEVmodSize */ &HFETAmSize,
/* DEVnodeIsNonLinear */ HFETAnodeIsNonLinear
};

View File

@ -0,0 +1,31 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hfetdefs.h"
#include "ngspice/sperror.h"
int
HFETAnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
HFETAmodel *model = (HFETAmodel *)inModel ;
HFETAinstance *here ;
/* loop through all the HFETA models */
for ( ; model != NULL ; model = model->HFETAnextModel)
{
/* loop through all the instances of the model */
for (here = model->HFETAinstances ; here != NULL ; here = here->HFETAnextInstance)
{
ckt->CKTnodeIsLinear [here->HFETAsourcePrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->HFETAdrainPrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->HFETAgatePrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->HFETAdrainPrmPrmNode] = 0 ;
ckt->CKTnodeIsLinear [here->HFETAsourcePrmPrmNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -18,6 +18,7 @@ libhfet2_la_SOURCES = \
hfet2mask.c \
hfet2mdel.c \
hfet2mpar.c \
hfet2node.c \
hfet2param.c \
hfet2pzl.c \
hfet2setup.c \

View File

@ -18,3 +18,4 @@ extern int HFET2setup(SMPmatrix*,GENmodel*,CKTcircuit*,int*);
extern int HFET2temp(GENmodel*,CKTcircuit*);
extern int HFET2trunc(GENmodel*,CKTcircuit*,double*);
extern int HFET2unsetup( GENmodel*,CKTcircuit*);
extern int HFET2nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev HFET2info = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &HFET2iSize,
/* DEVmodSize */ &HFET2mSize
/* DEVmodSize */ &HFET2mSize,
/* DEVnodeIsNonLinear */ HFET2nodeIsNonLinear
};

View File

@ -0,0 +1,29 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hfet2defs.h"
#include "ngspice/sperror.h"
int
HFET2nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
HFET2model *model = (HFET2model *)inModel ;
HFET2instance *here ;
/* loop through all the HFET2 models */
for ( ; model != NULL ; model = model->HFET2nextModel)
{
/* loop through all the instances of the model */
for (here = model->HFET2instances ; here != NULL ; here = here->HFET2nextInstance)
{
ckt->CKTnodeIsLinear [here->HFET2sourcePrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->HFET2drainPrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->HFET2gateNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -23,6 +23,7 @@ libhisim2_la_SOURCES = hisim2.h \
hsm2mask.c \
hsm2mdel.c \
hsm2mpar.c \
hsm2node.c \
hsm2noi.c \
hsm2par.c \
hsm2pzld.c \

View File

@ -37,3 +37,4 @@ extern int HSM2unsetup(GENmodel*,CKTcircuit*);
extern int HSM2temp(GENmodel*,CKTcircuit*);
extern int HSM2trunc(GENmodel*,CKTcircuit*,double*);
extern int HSM2noise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int HSM2nodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -70,7 +70,8 @@ SPICEdev HSM2info = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &HSM2iSize,
/* DEVmodSize */ &HSM2mSize
/* DEVmodSize */ &HSM2mSize,
/* DEVnodeIsNonLinear */ HSM2nodeIsNonLinear
};

View File

@ -0,0 +1,32 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsm2def.h"
#include "ngspice/sperror.h"
int
HSM2nodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
HSM2model *model = (HSM2model *)inModel ;
HSM2instance *here ;
/* loop through all the HSM2 models */
for ( ; model != NULL ; model = model->HSM2nextModel)
{
/* loop through all the instances of the model */
for (here = model->HSM2instances ; here != NULL ; here = here->HSM2nextInstance)
{
ckt->CKTnodeIsLinear [here->HSM2dNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->HSM2sNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->HSM2gNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->HSM2dbNode] = 0 ;
ckt->CKTnodeIsLinear [here->HSM2bNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->HSM2sbNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -23,6 +23,7 @@ libhisimhv1_la_SOURCES = hisimhv.h \
hsmhvmask.c \
hsmhvmdel.c \
hsmhvmpar.c \
hsmhvnode.c \
hsmhvnoi.c \
hsmhvpar.c \
hsmhvpzld.c \

View File

@ -37,3 +37,4 @@ extern int HSMHVunsetup(GENmodel*,CKTcircuit*);
extern int HSMHVtemp(GENmodel*,CKTcircuit*);
extern int HSMHVtrunc(GENmodel*,CKTcircuit*,double*);
extern int HSMHVnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int HSMHVnodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -70,7 +70,8 @@ SPICEdev HSMHVinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &HSMHViSize,
/* DEVmodSize */ &HSMHVmSize
/* DEVmodSize */ &HSMHVmSize,
/* DEVnodeIsNonLinear */ HSMHVnodeIsNonLinear
};

View File

@ -0,0 +1,35 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "hsmhvdef.h"
#include "ngspice/sperror.h"
int
HSMHVnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
HSMHVmodel *model = (HSMHVmodel *)inModel ;
HSMHVinstance *here ;
/* loop through all the HSMHV models */
for ( ; model != NULL ; model = model->HSMHVnextModel)
{
/* loop through all the instances of the model */
for (here = model->HSMHVinstances ; here != NULL ; here = here->HSMHVnextInstance)
{
ckt->CKTnodeIsLinear [here->HSMHVdNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->HSMHVsNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->HSMHVgNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->HSMHVdbNode] = 0 ;
ckt->CKTnodeIsLinear [here->HSMHVbNodePrime] = 0 ;
ckt->CKTnodeIsLinear [here->HSMHVsbNode] = 0 ;
ckt->CKTnodeIsLinear [here->HSMHVtempNode] = 0 ;
ckt->CKTnodeIsLinear [here->HSMHVqiNode] = 0 ;
ckt->CKTnodeIsLinear [here->HSMHVqbNode] = 0 ;
}
}
return (OK) ;
}

View File

@ -71,7 +71,8 @@ SPICEdev INDinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &INDiSize,
/* DEVmodSize */ &INDmSize
/* DEVmodSize */ &INDmSize,
/* DEVnodeIsNonLinear */ NULL
};
@ -139,8 +140,9 @@ SPICEdev MUTinfo = {
/* DEVdump */ NULL,
/* DEVacct */ NULL,
#endif
&MUTiSize,
&MUTmSize
/* DEVinstSize */ &MUTiSize,
/* DEVmodSize */ &MUTmSize,
/* DEVnodeIsNonLinear */ NULL
};

View File

@ -72,7 +72,8 @@ SPICEdev ISRCinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &ISRCiSize,
/* DEVmodSize */ &ISRCmSize
/* DEVmodSize */ &ISRCmSize,
/* DEVnodeIsNonLinear */ NULL
};

View File

@ -20,6 +20,7 @@ libjfet_la_SOURCES = \
jfetmask.c \
jfetmdel.c \
jfetmpar.c \
jfetnode.c \
jfetnoi.c \
jfetpar.c \
jfetpzld.c \

View File

@ -22,3 +22,4 @@ extern int JFETtrunc(GENmodel*,CKTcircuit*,double*);
extern int JFETdisto(int,GENmodel*,CKTcircuit*);
extern int JFETnoise(int,int,GENmodel*,CKTcircuit*,Ndata*,double*);
extern int JFETdSetup(GENmodel*,CKTcircuit*);
extern int JFETnodeIsNonLinear (GENmodel *, CKTcircuit *) ;

View File

@ -72,7 +72,8 @@ SPICEdev JFETinfo = {
/* DEVacct */ NULL,
#endif
/* DEVinstSize */ &JFETiSize,
/* DEVmodSize */ &JFETmSize
/* DEVmodSize */ &JFETmSize,
/* DEVnodeIsNonLinear */ JFETnodeIsNonLinear
};

View File

@ -0,0 +1,29 @@
/**********
Author: 2013 Francesco Lannutti
**********/
#include "ngspice/ngspice.h"
#include "ngspice/cktdefs.h"
#include "jfetdefs.h"
#include "ngspice/sperror.h"
int
JFETnodeIsNonLinear (GENmodel *inModel, CKTcircuit *ckt)
{
JFETmodel *model = (JFETmodel *)inModel ;
JFETinstance *here ;
/* loop through all the JFET models */
for ( ; model != NULL ; model = model->JFETnextModel)
{
/* loop through all the instances of the model */
for (here = model->JFETinstances ; here != NULL ; here = here->JFETnextInstance)
{
ckt->CKTnodeIsLinear [here->JFETsourcePrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->JFETdrainPrimeNode] = 0 ;
ckt->CKTnodeIsLinear [here->JFETgateNode] = 0 ;
}
}
return (OK) ;
}

Some files were not shown because too many files have changed in this diff Show More