Re: [ng-spice-devel] Patches
>Not in the version I'm looking at :-) When the diode voltage crosses
>zero the current jumps from -satcur to zero.
Oops, I think I'm talking rubbish. That wasn't the original code. It's
all so long ago I can't remember. Looking at what I now think is the
original code -
next1: if(vbs <= 0) {
here->MOS9gbs = SourceSatCur/vt;
here->MOS9cbs = here->MOS9gbs*vbs;
here->MOS9gbs += ckt->CKTgmin;
} else {
evbs = exp(MIN(MAX_EXP_ARG,vbs/vt));
here->MOS9gbs = SourceSatCur*evbs/vt + ckt->CKTgmin;
here->MOS9cbs = SourceSatCur * (evbs-1);
}
sets the reverse gbs so that the reverse current will be -
SourceSatCur * Vbs/vt
Am I reading that correctly ? That's not how a diode is supposed
to behave, is it ?
All my rambling about fixed reverse currents was actually about
my first simple attempt to fix the above. So just ignore that :-)
Anyway, as I said, the diodes in the mosfets should now work
in the same way as the actual diode model. That's reasonable,
isn't it ?
Cheers,
Alan
Partial thread listing: