Browse Source

devices/res, bug fix, semantics of "short" and "narrow", aka "dlr" and "dw"

These need to be subtracted from both sides
pre-master-46
rlar 9 years ago
parent
commit
1c5e954b47
  1. 4
      src/spicelib/devices/res/ressetup.c
  2. 4
      src/spicelib/devices/res/restemp.c

4
src/spicelib/devices/res/ressetup.c

@ -58,8 +58,8 @@ RESsetup(SMPmatrix *matrix, GENmodel *inModel, CKTcircuit*ckt, int *state)
here->RESbv_max = model->RESbv_max;
if((here->RESwidthGiven)||(here->RESlengthGiven))
here->RESeffNoiseArea = pow((here->RESlength-model->RESshort),model->RESlf)
*pow((here->RESwidth-model->RESnarrow),model->RESwf);
here->RESeffNoiseArea = pow(here->RESlength - 2 * model->RESshort, model->RESlf)
*pow(here->RESwidth - 2 * model->RESnarrow, model->RESwf);
else
here->RESeffNoiseArea = 1.0;

4
src/spicelib/devices/res/restemp.c

@ -36,8 +36,8 @@ REStemp(GENmodel *inModel, CKTcircuit *ckt)
if (!here->RESresGiven) {
if (here->RESlength * here->RESwidth * model->RESsheetRes > 0.0) {
here->RESresist =
(here->RESlength - model->RESshort) /
(here->RESwidth - model->RESnarrow) *
(here->RESlength - 2 * model->RESshort) /
(here->RESwidth - 2 * model->RESnarrow) *
model->RESsheetRes;
} else if (model->RESresGiven) {
here->RESresist = model->RESres;

Loading…
Cancel
Save