From 02dc233bc523b67d3aca5d417d73c8bf18a72a09 Mon Sep 17 00:00:00 2001 From: dwarning Date: Thu, 16 May 2013 22:22:51 +0200 Subject: [PATCH] devices/bsim3: reposition DrainSatCurrent block --- src/spicelib/devices/bsim3/b3ld.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/spicelib/devices/bsim3/b3ld.c b/src/spicelib/devices/bsim3/b3ld.c index 2cf4bcd4e..6e3ce36fb 100644 --- a/src/spicelib/devices/bsim3/b3ld.c +++ b/src/spicelib/devices/bsim3/b3ld.c @@ -387,6 +387,15 @@ for (; model != NULL; model = model->BSIM3nextModel) + here->BSIM3sourcePerimeter * model->BSIM3jctSidewallTempSatCurDensity; } + if ((here->BSIM3drainArea <= 0.0) && (here->BSIM3drainPerimeter <= 0.0)) + { DrainSatCurrent = 1.0e-14; + } + else + { DrainSatCurrent = here->BSIM3drainArea + * model->BSIM3jctTempSatCurDensity + + here->BSIM3drainPerimeter + * model->BSIM3jctSidewallTempSatCurDensity; + } if (SourceSatCurrent <= 0.0) { here->BSIM3gbs = ckt->CKTgmin; here->BSIM3cbs = here->BSIM3gbs * vbs; @@ -415,15 +424,6 @@ for (; model != NULL; model = model->BSIM3nextModel) } } - if ((here->BSIM3drainArea <= 0.0) && (here->BSIM3drainPerimeter <= 0.0)) - { DrainSatCurrent = 1.0e-14; - } - else - { DrainSatCurrent = here->BSIM3drainArea - * model->BSIM3jctTempSatCurDensity - + here->BSIM3drainPerimeter - * model->BSIM3jctSidewallTempSatCurDensity; - } if (DrainSatCurrent <= 0.0) { here->BSIM3gbd = ckt->CKTgmin; here->BSIM3cbd = here->BSIM3gbd * vbd;