Hello,
I am sorry if I repeat the same question over and over again, but I have honestly tried to find an answer here, there is something, but still it is not that clear for me. I am new to this area, please excuse my misunderstanding.
So, I would like to measure the leakage current using SPICE (to be precise, I am using NGSPICE) for a CMOS NAND gate, or at least for a separate NMOS or PMOS. In order to do this, I took the BSIM4 model with all the parameters and made a simple circuit. Here is its listing (one NMOS):
Code:Measure the leakage current of a CMOS NAND gate
.param length = 65n
.param width = 10u
.param vdd = 1
.param vg = 0
.options noacct
m1 d g s b n1 l={length} w={width}
vds d s {vdd}
vgs g s {vg}
vbs b s 0
vss s 0 0
.control
op
print vbs#branch
print vds#branch
print vgs#branch
print vss#branch
print @m1[id]
print @m1[ibd]
print @m1[ibs]
print @m1[isub]
print @m1[igs]
print @m1[igd]
print @m1[igb]
print @m1[igcs]
print @m1[igcd]
.endc
.include modelcard.nmos
.include modelcard.pmos
.end
Since NMOS is off then the gate voltage is low, Vg is set to zero (we are measuring the leakage current what the device is turned off). So, it gives me something like:
Code:vbs#branch = 7.340167e-11
vds#branch = -1.02761e-07
vgs#branch = 9.773162e-08
vss#branch = -5.85230e-23
@m1[id] = 4.955657e-09
@m1[ibd] = -7.34015e-11
@m1[ibs] = 0.000000e+00
@m1[isub] = 1.593217e-16
@m1[igs] = 2.510354e-18
@m1[igd] = -9.77316e-08
@m1[igb] = 2.497680e-23
@m1[igcs] = 3.422269e-20
@m1[igcd] = 3.384294e-20
Can anybody please explain me what is going on here? Why the first commands are so different from the direct reading of the device's parameters? What is the real subthreshold leakage current and where is the total gate leakage current?
Yet another question, how to measure the same, but for a NAND gate. The problem is that I cannot understand what will be a complete off state here, because we have two pair of MOSs of different types, so if we switch off NMOSs, PMOSs will be on, and vise versa.
And the last question, is it possible to plot the device's parameters (@m1[...]) with a dc-sweep? When I do like "plot @m1[isub]" after "dc ...", it plots a straight line, since @m1[...] is just one value, I guess at the last point of the dc sweep.
Thank you.
Best wishes,
Ivan