FIXME, nbjt, nbjt2, excess XXXNames[] entry

or incorrectly postioned node variable in the instance struct.
will lead to incorrect initialisation, local var will be overwritten !
This commit is contained in:
rlar 2017-01-07 20:06:09 +01:00
parent b59e2d03b5
commit 509e2eafcd
4 changed files with 18 additions and 8 deletions

View File

@ -56,10 +56,10 @@ IFparm NBJTmPTable[] = { /* model parameters */
};
char *NBJTnames[] = {
"Collector",
"Base",
"Emitter",
"Substrate"
"Collector", /* 1 */
"Base", /* 2 */
"Emitter", /* 3 */
"Substrate" /* 4 */ // FIXME, excess entry ?!
};
int NBJTnSize = NUMELEMS(NBJTnames);

View File

@ -40,9 +40,14 @@ typedef struct sNBJTinstance {
#define NBJTdIcDVbe NBJTstate+7
#define NBJTnumStates 8
/* GENnode[] { */
int NBJTcolNode; /* number of collector node of bjt */
int NBJTbaseNode; /* number of base node of bjt */
int NBJTemitNode; /* number of emitter node of bjt */
// FIXME, substrate missing, see NBJTnames[]
// the next variable NBJTpDevice is in real danger !
/* } */
ONEdevice *NBJTpDevice;
GLOBvalues NBJTglobals; /* Temp.-Dep. Global Parameters */
int NBJTtype;

View File

@ -40,9 +40,14 @@ typedef struct sNBJT2instance {
#define NBJT2dIcDVbe NBJT2state+7
#define NBJT2numStates 8
/* GENnode[] { */
int NBJT2colNode; /* number of collector node of bjt */
int NBJT2baseNode; /* number of base node of bjt */
int NBJT2emitNode; /* number of emitter node of bjt */
// FIXME, substrate missing, see NBJTnames[]
// the next variable NBJTpDevice is in real danger !
/* } */
double NBJT2width; /* width factor for the bjt */
double NBJT2area; /* area factor for the bjt */
TWOdevice *NBJT2pDevice;

View File

@ -58,10 +58,10 @@ IFparm NBJT2mPTable[] = { /* model parameters */
char *NBJT2names[] = {
"Collector",
"Base",
"Emitter",
"Substrate"
"Collector", /* 1 */
"Base", /* 2 */
"Emitter", /* 3 */
"Substrate" /* 4 */ // FIXME, excess entry ?!
};
int NBJT2nSize = NUMELEMS(NBJT2names);