Browse Source

Added a compilation switch to enable a comaptible behavior.

pre-master-46
pnenzi 23 years ago
parent
commit
1b367de70d
  1. 10
      src/spicelib/devices/bjt2/bjt2setup.c

10
src/spicelib/devices/bjt2/bjt2setup.c

@ -38,10 +38,20 @@ BJT2setup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit *ckt, int *states)
if(model->BJT2type != NPN && model->BJT2type != PNP) { if(model->BJT2type != NPN && model->BJT2type != PNP) {
model->BJT2type = NPN; model->BJT2type = NPN;
} }
#ifndef GEOMETRY_COMPAT
if(!model->BJT2subsGiven || if(!model->BJT2subsGiven ||
(model->BJT2subs != VERTICAL && model->BJT2subs != LATERAL)) { (model->BJT2subs != VERTICAL && model->BJT2subs != LATERAL)) {
model->BJT2subs = VERTICAL; model->BJT2subs = VERTICAL;
} }
#else
if(!model->BJT2subsGiven ||
(model->BJT2subs != VERTICAL && model->BJT2subs != LATERAL)) {
if (model->BJT2type = NPN)
model->BJT2subs = VERTICAL; /* Vertical for NPN */
else
model->BJT2subs = LATERAL; /* Lateral for PNP */
}
#endif
if(!model->BJT2satCurGiven) { if(!model->BJT2satCurGiven) {
model->BJT2satCur = 1e-16; model->BJT2satCur = 1e-16;
} }

Loading…
Cancel
Save