After the simulation when I do a 'plot i(vds)', it gives the currents as
negative which means that the current is flowing in the opposite direction.
I have observed the same in a PMOS device where the current is once again reversed.
However, when I used Level 49 models, the currents were fine.
Am I missing anything?
Thanks and Regards,
Vivek Roy
There is a warning that the channel length is negative.
Apparently this leads to an unphysical current direction.
With "CMOSN W=0.64u L=0.2u" the current direction
is OK here.
You plot from high vds to low instead of low to high
(it makes no difference to ngspice, but LTspice takes
this literally as shown below). Maybe that confused
your plot software?
With LEVEL=49 the effective channel length maybe
OK for your L=0.13u specification.
I don't know whether this has someting to do with you posting, but,
we have in "dctrcurv.c" the stepping for a
dc ... start stop step
coded as:
for ...
value += step
Recently looking at some example from somewhere (bsim6 ?),
i did have the impression another spice (hspice ?)
might have done something more like that:
for ...
value += fabs(step) * sgn(stop - start)
To me this second variant feels considerably wanna be clever,
but if other spices indeed work like that, then we should consider this.
Do you, or someody else know, whether this is more more "widespread" or "common" ?
We should not change that light heartily, because this might break ngspice users scripts
(in most perhaps all cases it wouldn't harm, but I'm not 100% sure)
Regards,
Robert
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
The MOS model level 1 is definitely not suited to simulate submicron MOS. It stems from 1971, when 10µm NMOS was state of the art. Its simplified equation set will only describe long channel devices adequately (definitely L should be larger than 5µm or so). Its capacitance model has discontinuities and may lead to non-convergence during transient simulation.
Similarily MOS models at levels 2,3,6,9 are not recommended because they are kept for backwards compatibility only.
For L < 5µm and submicron simulation I recommend to use BSIM3. An example model parameter set is available from the Berkeley web pages at http://bsim.berkeley.edu/BSIM4/BSIM3/ftpv330.zip . Check for /test/modelcard.nmos and modelcard.pmos.
If sub-0.1µm simulation is required, even for 0.13µm, use BSIM4. Sample model parameters are available in (http://bsim.berkeley.edu/BSIM4/BSIM4_4.8.1_20170215.tar.gz) /benchmark_test.
Holger
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
ngspice computes points from 2.5 downwards to 0, but plots them with an
x-axis with 0 left and 2.5 on the right.
In this case LTspice computes (I don't know in what order) then plots with an
x-axis with 2.5 left and 0 on the right.
In order to emulate the plot direction of LTspice we can do:
.dcvds2.50-0.05
plot -i(vds) vs 2.5-"v-sweep"
Your specification of HSPICE's algorithm is too vague for my
understanding, but in general I think the setup of .dc does not
say how the result is to be plotted. I think we should not
change anything as an NGSPICE user has full flexibility already.
-marcel
Last edit: marcel hendrix 2017-06-24
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
[ moved here from the mailing list because it is such a nice double entendre. ]
The content of the file gen_proc.lib is as shown below :
There is a warning that the channel length is negative.
Apparently this leads to an unphysical current direction.
With "CMOSN W=0.64u L=0.2u" the current direction
is OK here.
You plot from high vds to low instead of low to high
(it makes no difference to ngspice, but LTspice takes
this literally as shown below). Maybe that confused
your plot software?
With LEVEL=49 the effective channel length maybe
OK for your L=0.13u specification.
-marcel
Last edit: marcel hendrix 2017-06-24
Hello Marcel,
I don't know whether this has someting to do with you posting, but,
we have in "dctrcurv.c" the stepping for a
coded as:
Recently looking at some example from somewhere (bsim6 ?),
i did have the impression another spice (hspice ?)
might have done something more like that:
To me this second variant feels considerably wanna be clever,
but if other spices indeed work like that, then we should consider this.
Do you, or someody else know, whether this is more more "widespread" or "common" ?
We should not change that light heartily, because this might break ngspice users scripts
(in most perhaps all cases it wouldn't harm, but I'm not 100% sure)
Regards,
Robert
The MOS model level 1 is definitely not suited to simulate submicron MOS. It stems from 1971, when 10µm NMOS was state of the art. Its simplified equation set will only describe long channel devices adequately (definitely L should be larger than 5µm or so). Its capacitance model has discontinuities and may lead to non-convergence during transient simulation.
Similarily MOS models at levels 2,3,6,9 are not recommended because they are kept for backwards compatibility only.
For model selection you might have a look at https://people.rit.edu/lffeee/SPICE_MOSFET_Model_Intro.pdf .
For L < 5µm and submicron simulation I recommend to use BSIM3. An example model parameter set is available from the Berkeley web pages at http://bsim.berkeley.edu/BSIM4/BSIM3/ftpv330.zip . Check for /test/modelcard.nmos and modelcard.pmos.
If sub-0.1µm simulation is required, even for 0.13µm, use BSIM4. Sample model parameters are available in (http://bsim.berkeley.edu/BSIM4/BSIM4_4.8.1_20170215.tar.gz) /benchmark_test.
Holger
Hi Robert,
With
ngspice computes points from 2.5 downwards to 0, but plots them with an
x-axis with 0 left and 2.5 on the right.
In this case LTspice computes (I don't know in what order) then plots with an
x-axis with 2.5 left and 0 on the right.
In order to emulate the plot direction of LTspice we can do:
Your specification of HSPICE's algorithm is too vague for my
understanding, but in general I think the setup of .dc does not
say how the result is to be plotted. I think we should not
change anything as an NGSPICE user has full flexibility already.
-marcel
Last edit: marcel hendrix 2017-06-24