From af9a2c4ba2abe261adc2d6024cd799f17a4ba940 Mon Sep 17 00:00:00 2001 From: Holger Vogt Date: Tue, 19 Jan 2021 18:33:12 +0100 Subject: [PATCH] Revert "Put reasonable limits to ngate and similar" This reverts commit ba0552f7908f073b679ff985263401ea3d7c3ef6. --- src/spicelib/devices/bsim3/b3mpar.c | 4 ++-- src/spicelib/devices/bsim3v32/b3v32mpar.c | 4 ++-- src/spicelib/devices/bsim4/b4mpar.c | 6 +++--- src/spicelib/devices/bsim4v5/b4v5mpar.c | 10 +++++----- src/spicelib/devices/bsim4v6/b4v6mpar.c | 10 +++++----- src/spicelib/devices/bsim4v7/b4v7mpar.c | 6 +++--- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/spicelib/devices/bsim3/b3mpar.c b/src/spicelib/devices/bsim3/b3mpar.c index 591291e21..807dd158f 100644 --- a/src/spicelib/devices/bsim3/b3mpar.c +++ b/src/spicelib/devices/bsim3/b3mpar.c @@ -136,13 +136,13 @@ GENmodel *inMod) mod->BSIM3npeak = value->rValue; mod->BSIM3npeakGiven = TRUE; if (mod->BSIM3npeak > 1.0e20) - mod->BSIM3npeak = 1.0e20; + mod->BSIM3npeak *= 1.0e-6; break; case BSIM3_MOD_NGATE: mod->BSIM3ngate = value->rValue; mod->BSIM3ngateGiven = TRUE; if (mod->BSIM3ngate > 1.0e23) - mod->BSIM3ngate = 1.0e23; + mod->BSIM3ngate *= 1.0e-6; break; case BSIM3_MOD_GAMMA1: mod->BSIM3gamma1 = value->rValue; diff --git a/src/spicelib/devices/bsim3v32/b3v32mpar.c b/src/spicelib/devices/bsim3v32/b3v32mpar.c index 0cf13ea91..c3ec08c2a 100644 --- a/src/spicelib/devices/bsim3v32/b3v32mpar.c +++ b/src/spicelib/devices/bsim3v32/b3v32mpar.c @@ -130,13 +130,13 @@ BSIM3v32mParam(int param, IFvalue *value, GENmodel *inMod) mod->BSIM3v32npeak = value->rValue; mod->BSIM3v32npeakGiven = TRUE; if (mod->BSIM3v32npeak > 1.0e20) - mod->BSIM3v32npeak = 1.0e20; + mod->BSIM3v32npeak *= 1.0e-6; break; case BSIM3v32_MOD_NGATE: mod->BSIM3v32ngate = value->rValue; mod->BSIM3v32ngateGiven = TRUE; if (mod->BSIM3v32ngate > 1.0e23) - mod->BSIM3v32ngate = 1.0e23; + mod->BSIM3v32ngate *= 1.0e-6; break; case BSIM3v32_MOD_GAMMA1: mod->BSIM3v32gamma1 = value->rValue; diff --git a/src/spicelib/devices/bsim4/b4mpar.c b/src/spicelib/devices/bsim4/b4mpar.c index 2f6299fee..dcc118d40 100644 --- a/src/spicelib/devices/bsim4/b4mpar.c +++ b/src/spicelib/devices/bsim4/b4mpar.c @@ -315,19 +315,19 @@ GENmodel *inMod) mod->BSIM4ndep = value->rValue; mod->BSIM4ndepGiven = TRUE; if (mod->BSIM4ndep > 1.0e20) - mod->BSIM4ndep = 1.0e20; + mod->BSIM4ndep *= 1.0e-6; break; case BSIM4_MOD_NSD: mod->BSIM4nsd = value->rValue; mod->BSIM4nsdGiven = TRUE; if (mod->BSIM4nsd > 1.0e23) - mod->BSIM4nsd = 1.0e23; + mod->BSIM4nsd *= 1.0e-6; break; case BSIM4_MOD_NGATE: mod->BSIM4ngate = value->rValue; mod->BSIM4ngateGiven = TRUE; if (mod->BSIM4ngate > 1.0e23) - mod->BSIM4ngate = 1.0e23; + mod->BSIM4ngate *= 1.0e-6; break; case BSIM4_MOD_GAMMA1: mod->BSIM4gamma1 = value->rValue; diff --git a/src/spicelib/devices/bsim4v5/b4v5mpar.c b/src/spicelib/devices/bsim4v5/b4v5mpar.c index 9cbf2cc44..17f9ec4a6 100644 --- a/src/spicelib/devices/bsim4v5/b4v5mpar.c +++ b/src/spicelib/devices/bsim4v5/b4v5mpar.c @@ -194,20 +194,20 @@ GENmodel *inMod) case BSIM4v5_MOD_NDEP: mod->BSIM4v5ndep = value->rValue; mod->BSIM4v5ndepGiven = TRUE; - if (mod->BSIM4v5ndep > 1.0e20) - mod->BSIM4v5ndep = 1.0e20; + if (mod->BSIM4v5ndep > 1.0e20) + mod->BSIM4v5ndep *= 1.0e-6; break; case BSIM4v5_MOD_NSD: mod->BSIM4v5nsd = value->rValue; mod->BSIM4v5nsdGiven = TRUE; if (mod->BSIM4v5nsd > 1.0e23) - mod->BSIM4v5nsd = 1.0e23; + mod->BSIM4v5nsd *= 1.0e-6; break; case BSIM4v5_MOD_NGATE: mod->BSIM4v5ngate = value->rValue; mod->BSIM4v5ngateGiven = TRUE; - if (mod->BSIM4v5ngate > 1.0e23) - mod->BSIM4v5ngate = 1.0e23; + if (mod->BSIM4v5ngate > 1.0e23) + mod->BSIM4v5ngate *= 1.0e-6; break; case BSIM4v5_MOD_GAMMA1: mod->BSIM4v5gamma1 = value->rValue; diff --git a/src/spicelib/devices/bsim4v6/b4v6mpar.c b/src/spicelib/devices/bsim4v6/b4v6mpar.c index a1a6dfa7f..b1babc1f4 100644 --- a/src/spicelib/devices/bsim4v6/b4v6mpar.c +++ b/src/spicelib/devices/bsim4v6/b4v6mpar.c @@ -268,20 +268,20 @@ GENmodel *inMod) case BSIM4v6_MOD_NDEP: mod->BSIM4v6ndep = value->rValue; mod->BSIM4v6ndepGiven = TRUE; - if (mod->BSIM4v6ndep > 1.0e20) - mod->BSIM4v6ndep = 1.0e20; + if (mod->BSIM4v6ndep > 1.0e20) + mod->BSIM4v6ndep *= 1.0e-6; break; case BSIM4v6_MOD_NSD: mod->BSIM4v6nsd = value->rValue; mod->BSIM4v6nsdGiven = TRUE; if (mod->BSIM4v6nsd > 1.0e23) - mod->BSIM4v6nsd = 1.0e23; + mod->BSIM4v6nsd *= 1.0e-6; break; case BSIM4v6_MOD_NGATE: mod->BSIM4v6ngate = value->rValue; mod->BSIM4v6ngateGiven = TRUE; - if (mod->BSIM4v6ngate > 1.0e23) - mod->BSIM4v6ngate = 1.0e23; + if (mod->BSIM4v6ngate > 1.0e23) + mod->BSIM4v6ngate *= 1.0e-6; break; case BSIM4v6_MOD_GAMMA1: mod->BSIM4v6gamma1 = value->rValue; diff --git a/src/spicelib/devices/bsim4v7/b4v7mpar.c b/src/spicelib/devices/bsim4v7/b4v7mpar.c index a547eedf6..9d02f775d 100644 --- a/src/spicelib/devices/bsim4v7/b4v7mpar.c +++ b/src/spicelib/devices/bsim4v7/b4v7mpar.c @@ -278,19 +278,19 @@ GENmodel *inMod) mod->BSIM4v7ndep = value->rValue; mod->BSIM4v7ndepGiven = TRUE; if (mod->BSIM4v7ndep > 1.0e20) - mod->BSIM4v7ndep = 1.0e20; + mod->BSIM4v7ndep *= 1.0e-6; break; case BSIM4v7_MOD_NSD: mod->BSIM4v7nsd = value->rValue; mod->BSIM4v7nsdGiven = TRUE; if (mod->BSIM4v7nsd > 1.0e23) - mod->BSIM4v7nsd = 1.0e23; + mod->BSIM4v7nsd *= 1.0e-6; break; case BSIM4v7_MOD_NGATE: mod->BSIM4v7ngate = value->rValue; mod->BSIM4v7ngateGiven = TRUE; if (mod->BSIM4v7ngate > 1.0e23) - mod->BSIM4v7ngate = 1.0e23; + mod->BSIM4v7ngate *= 1.0e-6; break; case BSIM4v7_MOD_GAMMA1: mod->BSIM4v7gamma1 = value->rValue;