# EEVblog Electronics Community Forum

## Electronics => Beginners => Topic started by: promach on December 14, 2018, 01:32:44 am

Title: Measuring transconductance of any circuit
Post by: promach on December 14, 2018, 01:32:44 am
May I know if the following transconductance measurement test circuit (https://github.com/promach/frequency_trap/blob/development/test_CMOS_Inverter.net) is correct ?

I suspect that I need to use some derivative function (https://www.edaboard.com/showthread.php?17402-Measure-Transconductance-Gm-of-a-circuit-in-Hspice-or-ADS&p=71141&viewfull=1#post71141) because changing the mosfets width (https://github.com/promach/frequency_trap/blob/development/CMOS_Inverter.net) by a large factor does not change the gm result much at all.

However, my test circuit is simulated in AC, not DC, therefore I really confuse if I should use derivative function or not ?

Note: X1 is a CMOS inverter

(https://i.imgur.com/YumV7ax.png)
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 14, 2018, 02:39:58 am
What is your end goal here?  Is this a step in solving a larger problem?

In small signal,
Vout = Vin * gm * Rout.

If you have Vin, Vout, and Rout, you calculate gm.  For your inverter, gm depends on the dc bias point.

You can simulate this using .ac but you want the frequency to be low enough so that there are no reactive effects.

Title: Re: Measuring transconductance of any circuit
Post by: promach on December 14, 2018, 03:30:41 am
Quote
What is your end goal here?  Is this a step in solving a larger problem?

However, this forum thread is focused on checking whether my transconductance measurement circuit is correct or not.

Quote
For your inverter, gm depends on the dc bias point

OK, I will use this netlist (https://github.com/promach/frequency_trap/blob/development/optimization/inv/inv.net#L30-L33) instead for biasing the CMOS inverter in saturation mode for both mosfets.
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 14, 2018, 02:32:23 pm
Quote
What is your end goal here?  Is this a step in solving a larger problem?

However, this forum thread is focused on checking whether my transconductance measurement circuit is correct or not.

Quote
For your inverter, gm depends on the dc bias point

OK, I will use this netlist (https://github.com/promach/frequency_trap/blob/development/optimization/inv/inv.net#L30-L33) instead for biasing the CMOS inverter in saturation mode for both mosfets.

This is helpful.  You need to simulate the entire circuit using dc operating point analysis (.op).  This will bias the inverter properly.  Then, simply look at the spice operating point output file.  It will give you the gm of all transistors.  For the inverter, you will sum the gm of each transistor and that is the total gm for the inverter.
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 14, 2018, 02:42:52 pm
Quote
This is helpful.  You need to simulate the entire circuit using dc operating point analysis (.op).  This will bias the inverter properly.  Then, simply look at the spice operating point output file.  It will give you the gm of all transistors.  For the inverter, you will sum the gm of each transistor and that is the total gm for the inverter.

For example...see attached.
Title: Re: Measuring transconductance of any circuit
Post by: promach on December 15, 2018, 01:39:49 am
Quote
For the inverter, you will sum the gm of each transistor and that is the total gm for the inverter.

This method only works for small circuit (where we have derived the transfer function for overall Gm)

Quote
simply look at the spice operating point output file.  It will give you the gm of all transistors.

I need overall Gm of a black-box circuit block, not the gm of every individual mosfets (this is not really helping since overall Gm is not a function of gm alone).

Furthermore, unlike in LTspice and Cadence. ngspice does not give user the gm value of each mosfets even after .op analysis.
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 15, 2018, 03:09:15 am
Quote
For the inverter, you will sum the gm of each transistor and that is the total gm for the inverter.

This method only works for small circuit (where we have derived the transfer function for overall Gm)

Quote
simply look at the spice operating point output file.  It will give you the gm of all transistors.

I need overall Gm of a black-box circuit block, not the gm of every individual mosfets (this is not really helping since overall Gm is not a function of gm alone).

Furthermore, unlike in LTspice and Cadence. ngspice does not give user the gm value of each mosfets even after .op analysis.

Are you solving a small-signal problem or a large-signal problem? (You said, earlier that it was SS...have you changed your mind?) Think about it.

If ngspice will not give you transconductances, then don't use it.  Use LTSpice.  Frankly, my money would be on ngspice giving gm values.  Hell, it has Berkeley Spice lineage!  ---read chapter 13 of ngspice manual---
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 15, 2018, 03:24:12 am
"I need overall Gm of a black-box circuit block, not the gm of every individual mosfets (this is not really helping since overall Gm is not a function of gm alone)."

Add the gm of the pch and the nch transistors together to get the overall transconductance of the inverter.

Title: Re: Measuring transconductance of any circuit
Post by: promach on December 15, 2018, 05:00:55 am
Quote
it has Berkeley Spice lineage!  ---read chapter 13 of ngspice manual---

Huh ? Chapter 13 is about verilog-A model (http://ngspice.sourceforge.net/docs/ngspice-manual.pdf#page=245)

Quote
Add the gm of the pch and the nch transistors together to get the overall transconductance of the inverter.

This method only works well for small circuit such as cmos inverter (where we have derived the transfer function for overall Gm)

Note the title of this forum thread again

Quote
Are you solving a small-signal problem or a large-signal problem?

The following is self-biasing for cmos inverter input such that both mosfets are in saturation mode.

(https://i.imgur.com/B4DW3gC.png)
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 15, 2018, 01:41:41 pm
Here is the chapter 13 reference: https://www.csd.uoc.gr/~hy121/2013a/datasheets/ngspice-user-manual.pdf (https://www.csd.uoc.gr/~hy121/2013a/datasheets/ngspice-user-manual.pdf)

Do this.

Perform an operating point simulation.
Measure the voltage at Node A at full precision.
Break connection at wire B.
Add a voltage source (V1) to drive Node A with the value measured above.
Run another operating point simulation.
Measure the voltage at the output of the inverter to full precision.
Add a voltage source (V2) to drive the output of the inverter with the value just measured.
Convert the first voltage source (V1), above, to a SINE source with dc offset being the same as before. Set amplitude to 1mV.  Set frequency to 100 Hz.
Run a transient simulation.
Measure current in the second voltage source, V2.  This current divided by the input ac voltage is your GM.

I am pretty sure there is a better way to do this, and I will give it some thought, but this is one way.

This can be simplified by just making V2 the same dc value as V1 and skip the second operating-point simulation.  The results will be practically the same.

Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 15, 2018, 04:19:36 pm
Here is another way.

Build the test setup using current source and controlled source as shown.
Run transient analysis.
Measure the voltage at the input of the DUT.
Since I and V are known, calculate GM.
Title: Re: Measuring transconductance of any circuit
Post by: promach on December 16, 2018, 01:16:32 am
Quote
Build the test setup using current source and controlled source as shown

1) Is E1 a transconductance simulation element ? If yes, it seems not really practical to assign value of 100 to E1 ?

2) Any reason for using "sine" current source ?

3) Why transient analysis ? I suppose doing a DC sweep across Vin and doing derivative on Iout and Vin is the definition of Gm ?
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 16, 2018, 01:26:30 am
Quote
Build the test setup using current source and controlled source as shown

1) Is E1 a transconductance simulation element ? If yes, it seems not really practical to assign value of 100 to E1 ?
Why (Why not)?
E1 is functioning like an opamp.  Something higher than 100 would be better, but I was concerned about convergence.
Quote
2) Any reason for using "sine" current source ?
It is easy...it works
Quote
3) Why transient analysis ? I suppose doing a DC sweep across Vin and doing derivative on Iout and Vin is the definition of Gm ?
You do not need to do a derivative.  Measure delta voltage...you know the delta current.  Algebra.
Title: Re: Measuring transconductance of any circuit
Post by: promach on December 16, 2018, 01:30:14 am
Did you forget the capacitor which is the important component in a gyrator implementation of inductor ?
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 16, 2018, 01:33:40 am
Did you forget the capacitor which is the important component in a gyrator implementation of inductor ?

No.  I am calculating Gm.  Certainly Gm has some frequency dependence...you can factor that in when you pick the sine frequency.

Title: Re: Measuring transconductance of any circuit
Post by: promach on December 16, 2018, 01:52:00 am
Quote
No.  I am calculating Gm.  Certainly Gm has some frequency dependence...you can factor that in when you pick the sine frequency.

Sorry, I still do not get why the capacitor is not included in the test circuit ?

Ideal Leq using gyrator implementation = CL*s/(Gm1*Gm2)

Are you saying that the sine frequency of the current source I1 helps to emulate a capacitor ?
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 16, 2018, 02:14:57 am
Quote
No.  I am calculating Gm.  Certainly Gm has some frequency dependence...you can factor that in when you pick the sine frequency.

Sorry, I still do not get why the capacitor is not included in the test circuit ?

Ideal Leq using gyrator implementation = CL*s/(Gm1*Gm2)

Are you saying that the sine frequency of the current source I1 helps to emulate a capacitor ?

In your equation...is Gm1 a function of the capacitor??

No, the sine is not emulating a capacitor.
Title: Re: Measuring transconductance of any circuit
Post by: promach on December 16, 2018, 02:31:07 am
Quote
In your equation...is Gm1 a function of the capacitor??

The answer is no. Gm1 is the overall transconductance of cmos inverter. Gm1 is independent of capacitor. Same applies to Gm2
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 16, 2018, 02:33:40 am
Quote
In your equation...is Gm1 a function of the capacitor??

The answer is no. Gm1 is the overall transconductance of cmos inverter. Gm1 is independent of capacitor. Same applies to Gm2

Great!  We are making progress.  That is why my method to calculate Gm has no reactive components.
Title: Re: Measuring transconductance of any circuit
Post by: promach on December 16, 2018, 01:12:17 pm
Quote
That is why my method to calculate Gm has on reactive components.

Investigate the Gm blocks separately as suggested by the forum title itself
This is my personal opinion as of now but please bear in mind that I could be wrong as well
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 16, 2018, 01:20:38 pm
Quote
That is why my method to calculate Gm has on reactive components.

Investigate the Gm blocks separately as suggested by the forum title itself
This is my personal opinion as of now but please bear in mind that I could be wrong as well

That is perfectly fine to do them separately.  What I have shown you, is a method to simulate and find the Gm of any block.  I have already shown you an example using the inverter.  Here is the diff stage.
Title: Re: Measuring transconductance of any circuit
Post by: promach on December 16, 2018, 04:55:26 pm
Why use voltage source for E1 (or E2) negative input terminal ?

Why use current source for E1 (or E2) positive input terminal ?
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 16, 2018, 05:18:35 pm
Why use voltage source for E1 (or E2) negative input terminal ?

Why use current source for E1 (or E2) positive input terminal ?

Does this help?
Title: Re: Measuring transconductance of any circuit
Post by: promach on December 17, 2018, 01:27:29 am
Sorry for my post here, but it "seems" like you are still not measuring the overall transconductance of a circuit block separately (and independently) without using any feedback circuit (which is the opamp or E1/E2 in your previous post).

I understand that you need to set up the DC operating point from the "feedback" test circuit to emulate the actual gyrator, but if that is the case , you "seems" to miss out the capacitor.

Please correct me if I am wrong in any ways.
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 17, 2018, 02:36:43 am
Sorry for my post here, but it "seems" like you are still not measuring the overall transconductance of a circuit block separately (and independently) without using any feedback circuit (which is the opamp or E1/E2 in your previous post).

I understand that you need to set up the DC operating point from the "feedback" test circuit to emulate the actual gyrator, but if that is the case , you "seems" to miss out the capacitor.

Please correct me if I am wrong in any ways.
I set up a Gm analysis test for EACH block (the inverter and the diffamp).  Your gyrator analysis requires these two Gms.  NO CAPACITOR.  The gyrator macro block has the capacitor.  The equations call out Gm1 and Gm2 and a capacitor, CL.

Gm1 does not depend on CL
Gm2 does not depend on CL

The gyrator which includes Gm1 and Gm2 and CL certainly depends on CL.

The feedback circuit I am using is a TEST CIRCUIT.  It is simply measuring the GM of the block (DUT) it is testing.  It has NOTHING to do with the gyrator function itself.  It is exactly the same as you measuring a resistor with a DVM so that you know what its value is to be used in another circuit.  the DVM is not the final circuit...it is the TEST circuit.  The final circuit is where the resistor is placed.

Title: Re: Measuring transconductance of any circuit
Post by: promach on December 17, 2018, 12:44:56 pm
I can now obtain gm values of each individual mosfets using built-in ngspice command

1) For your test circuit, I am still a little bit confused on the need for connecting the output node of DUT circuit to the E1/E2 input terminal ? since the other input terminal is a fixed voltage source, this looks like a voltage comparator to me ?
2) What is the purpose of E1/E2 in transconductance measurement ? simply acting as a voltage gain ?
3) And is there really a need for the current source (which also connects with the output node of DUT) in the test circuit ?

In other words, it "seems" to me that the test circuit connection with the DUT does not correctly reflect the test measurement definition of transconductance which is delta[Iout]/delta[Vin]

Feel free to correct my statements though.
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 17, 2018, 01:51:49 pm
Lets use this circuit for our discussion.

The concept behind this test scheme (which can be broadly applied to other types of circuits) is as follows.

Using feedback, I force a known output current from the Gm stage.  I force Iout to be equal to I3.  I also force the output voltage to be equal to V1 using the opamp, U1.  The output of the opamp drives the input to the Gm stage to whatever voltage needed to achieve the current balance with I3.

Once I have this established, I vary the input current I3...I have Delta I.  This Delta I is the output of the Gm stage because the feedback requires it.  The input voltage to the Gm stage needed to achieve the Delta I is simply Delta V.  There you have it. dI/dV

Title: Re: Measuring transconductance of any circuit
Post by: promach on December 17, 2018, 02:13:39 pm
Quote
Using feedback, I force a known output current from the Gm stage.  I force Iout to be equal to I3.

Is the current source I3 placed in reverse direction ? the arrow should point to GND since all the current Iout from DUT flows towards I3 and the ideal opamp U1 input terminal does not take any input current

Why is the current source I3 using sine pattern ?
This could easily complicate the computation since sine might involve some 'rms' or 'avg' syntax during Gm calculation ? or are there any specific reasons for choosing sine pattern other than "it works" ?
Title: Re: Measuring transconductance of any circuit
Post by: Wimberleytech on December 17, 2018, 02:45:41 pm
Quote
Using feedback, I force a known output current from the Gm stage.  I force Iout to be equal to I3.

Is the current source I3 placed in reverse direction ? the arrow should point to GND since all the current Iout from DUT flows towards I3 and the ideal opamp U1 input terminal does not take any input current
The Gm stage is biased to an output voltage of 2.5 volts.  Thus the current can point either way.  In fact, it is oscillating plus and minus.
Yes, opamp takes no current.
Quote
Why is the current source I3 using sine pattern ?
This could easily complicate the computation since sine might involve some 'rms' or 'avg' syntax during Gm calculation ? or are there any specific reasons for choosing sine pattern other than "it works" ?
Pick any pattern you want.  Sine is convenient.  No issue with RMS.  Just use peak value or peak-to-peak value.  Do the same for the opamp output for consistency.
Title: Re: Measuring transconductance of any circuit
Post by: promach on December 23, 2018, 10:22:29 am
Please see the following test circuit (for CMOS inverter) (https://github.com/promach/frequency_trap/blob/38fa7cf9821753f47136d7849794c5ef1075447f/test_CMOS_Inverter.net) that shows gm_pmos + gm_nmos = overall Gm

(https://i.imgur.com/ZKgbI4f.png)

(https://i.imgur.com/kixsvBj.png)

Quote
[phung@archlinux frequency_trap]\$ ngspice test_CMOS_Inverter.net
******
** ngspice-29 : Circuit level simulation program
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Creation Date: Sun Nov 11 02:18:13 UTC 2018
******

Circuit: * gnetlist -l ../.. -g spice-noqsi -o test_cmos_inverter.net test_cmos_inverter.sch

Doing analysis at TEMP = 25.000000 and TNOM = 27.000000

No. of Data Rows : 100
* gnetlist -l ../.. -g spice-noqsi -o test_cmos_inverter.net test_cmos_inverter.sch
AC Analysis  Sun Dec 23 18:14:37  2018
--------------------------------------------------------------------------------
Index   frequency       @m.x1.m1[gm]
--------------------------------------------------------------------------------
0   1.000000e+00   2.080796e-03,   0.000000e+00
1   1.010101e+08   2.080796e-03,   0.000000e+00
2   2.020202e+08   2.080796e-03,   0.000000e+00
3   3.030303e+08   2.080796e-03,   0.000000e+00
4   4.040404e+08   2.080796e-03,   0.000000e+00
5   5.050505e+08   2.080796e-03,   0.000000e+00
6   6.060606e+08   2.080796e-03,   0.000000e+00
7   7.070707e+08   2.080796e-03,   0.000000e+00
8   8.080808e+08   2.080796e-03,   0.000000e+00
9   9.090909e+08   2.080796e-03,   0.000000e+00
10   1.010101e+09   2.080796e-03,   0.000000e+00
11   1.111111e+09   2.080796e-03,   0.000000e+00
12   1.212121e+09   2.080796e-03,   0.000000e+00
13   1.313131e+09   2.080796e-03,   0.000000e+00
14   1.414141e+09   2.080796e-03,   0.000000e+00
15   1.515152e+09   2.080796e-03,   0.000000e+00
16   1.616162e+09   2.080796e-03,   0.000000e+00
17   1.717172e+09   2.080796e-03,   0.000000e+00
18   1.818182e+09   2.080796e-03,   0.000000e+00
19   1.919192e+09   2.080796e-03,   0.000000e+00
20   2.020202e+09   2.080796e-03,   0.000000e+00
21   2.121212e+09   2.080796e-03,   0.000000e+00
22   2.222222e+09   2.080796e-03,   0.000000e+00
23   2.323232e+09   2.080796e-03,   0.000000e+00
24   2.424242e+09   2.080796e-03,   0.000000e+00
25   2.525253e+09   2.080796e-03,   0.000000e+00
26   2.626263e+09   2.080796e-03,   0.000000e+00
27   2.727273e+09   2.080796e-03,   0.000000e+00
28   2.828283e+09   2.080796e-03,   0.000000e+00
29   2.929293e+09   2.080796e-03,   0.000000e+00
30   3.030303e+09   2.080796e-03,   0.000000e+00
31   3.131313e+09   2.080796e-03,   0.000000e+00
32   3.232323e+09   2.080796e-03,   0.000000e+00
33   3.333333e+09   2.080796e-03,   0.000000e+00
34   3.434343e+09   2.080796e-03,   0.000000e+00
35   3.535354e+09   2.080796e-03,   0.000000e+00
36   3.636364e+09   2.080796e-03,   0.000000e+00
37   3.737374e+09   2.080796e-03,   0.000000e+00
38   3.838384e+09   2.080796e-03,   0.000000e+00
39   3.939394e+09   2.080796e-03,   0.000000e+00
40   4.040404e+09   2.080796e-03,   0.000000e+00
41   4.141414e+09   2.080796e-03,   0.000000e+00
42   4.242424e+09   2.080796e-03,   0.000000e+00
43   4.343434e+09   2.080796e-03,   0.000000e+00
44   4.444444e+09   2.080796e-03,   0.000000e+00
45   4.545455e+09   2.080796e-03,   0.000000e+00
46   4.646465e+09   2.080796e-03,   0.000000e+00
47   4.747475e+09   2.080796e-03,   0.000000e+00
48   4.848485e+09   2.080796e-03,   0.000000e+00
49   4.949495e+09   2.080796e-03,   0.000000e+00
50   5.050505e+09   2.080796e-03,   0.000000e+00
51   5.151515e+09   2.080796e-03,   0.000000e+00
52   5.252525e+09   2.080796e-03,   0.000000e+00
53   5.353535e+09   2.080796e-03,   0.000000e+00
54   5.454545e+09   2.080796e-03,   0.000000e+00

Index   frequency       @m.x1.m1[gm]
--------------------------------------------------------------------------------
55   5.555556e+09   2.080796e-03,   0.000000e+00
56   5.656566e+09   2.080796e-03,   0.000000e+00
57   5.757576e+09   2.080796e-03,   0.000000e+00
58   5.858586e+09   2.080796e-03,   0.000000e+00
59   5.959596e+09   2.080796e-03,   0.000000e+00
60   6.060606e+09   2.080796e-03,   0.000000e+00
61   6.161616e+09   2.080796e-03,   0.000000e+00
62   6.262626e+09   2.080796e-03,   0.000000e+00
63   6.363636e+09   2.080796e-03,   0.000000e+00
64   6.464646e+09   2.080796e-03,   0.000000e+00
65   6.565657e+09   2.080796e-03,   0.000000e+00
66   6.666667e+09   2.080796e-03,   0.000000e+00
67   6.767677e+09   2.080796e-03,   0.000000e+00
68   6.868687e+09   2.080796e-03,   0.000000e+00
69   6.969697e+09   2.080796e-03,   0.000000e+00
70   7.070707e+09   2.080796e-03,   0.000000e+00
71   7.171717e+09   2.080796e-03,   0.000000e+00
72   7.272727e+09   2.080796e-03,   0.000000e+00
73   7.373737e+09   2.080796e-03,   0.000000e+00
74   7.474747e+09   2.080796e-03,   0.000000e+00
75   7.575758e+09   2.080796e-03,   0.000000e+00
76   7.676768e+09   2.080796e-03,   0.000000e+00
77   7.777778e+09   2.080796e-03,   0.000000e+00
78   7.878788e+09   2.080796e-03,   0.000000e+00
79   7.979798e+09   2.080796e-03,   0.000000e+00
80   8.080808e+09   2.080796e-03,   0.000000e+00
81   8.181818e+09   2.080796e-03,   0.000000e+00
82   8.282828e+09   2.080796e-03,   0.000000e+00
83   8.383838e+09   2.080796e-03,   0.000000e+00
84   8.484848e+09   2.080796e-03,   0.000000e+00
85   8.585859e+09   2.080796e-03,   0.000000e+00
86   8.686869e+09   2.080796e-03,   0.000000e+00
87   8.787879e+09   2.080796e-03,   0.000000e+00
88   8.888889e+09   2.080796e-03,   0.000000e+00
89   8.989899e+09   2.080796e-03,   0.000000e+00
90   9.090909e+09   2.080796e-03,   0.000000e+00
91   9.191919e+09   2.080796e-03,   0.000000e+00
92   9.292929e+09   2.080796e-03,   0.000000e+00
93   9.393939e+09   2.080796e-03,   0.000000e+00
94   9.494949e+09   2.080796e-03,   0.000000e+00
95   9.595960e+09   2.080796e-03,   0.000000e+00
96   9.696970e+09   2.080796e-03,   0.000000e+00
97   9.797980e+09   2.080796e-03,   0.000000e+00
98   9.898990e+09   2.080796e-03,   0.000000e+00
99   1.000000e+10   2.080796e-03,   0.000000e+00
* gnetlist -l ../.. -g spice-noqsi -o test_cmos_inverter.net test_cmos_inverter.sch
AC Analysis  Sun Dec 23 18:14:37  2018
--------------------------------------------------------------------------------
Index   frequency       @m.x1.m4[gm]
--------------------------------------------------------------------------------
0   1.000000e+00   1.145951e-03,   0.000000e+00
1   1.010101e+08   1.145951e-03,   0.000000e+00
2   2.020202e+08   1.145951e-03,   0.000000e+00
3   3.030303e+08   1.145951e-03,   0.000000e+00
4   4.040404e+08   1.145951e-03,   0.000000e+00
5   5.050505e+08   1.145951e-03,   0.000000e+00
6   6.060606e+08   1.145951e-03,   0.000000e+00
7   7.070707e+08   1.145951e-03,   0.000000e+00
8   8.080808e+08   1.145951e-03,   0.000000e+00
9   9.090909e+08   1.145951e-03,   0.000000e+00
10   1.010101e+09   1.145951e-03,   0.000000e+00
11   1.111111e+09   1.145951e-03,   0.000000e+00
12   1.212121e+09   1.145951e-03,   0.000000e+00
13   1.313131e+09   1.145951e-03,   0.000000e+00
14   1.414141e+09   1.145951e-03,   0.000000e+00
15   1.515152e+09   1.145951e-03,   0.000000e+00
16   1.616162e+09   1.145951e-03,   0.000000e+00
17   1.717172e+09   1.145951e-03,   0.000000e+00
18   1.818182e+09   1.145951e-03,   0.000000e+00
19   1.919192e+09   1.145951e-03,   0.000000e+00
20   2.020202e+09   1.145951e-03,   0.000000e+00
21   2.121212e+09   1.145951e-03,   0.000000e+00
22   2.222222e+09   1.145951e-03,   0.000000e+00
23   2.323232e+09   1.145951e-03,   0.000000e+00
24   2.424242e+09   1.145951e-03,   0.000000e+00
25   2.525253e+09   1.145951e-03,   0.000000e+00
26   2.626263e+09   1.145951e-03,   0.000000e+00
27   2.727273e+09   1.145951e-03,   0.000000e+00
28   2.828283e+09   1.145951e-03,   0.000000e+00
29   2.929293e+09   1.145951e-03,   0.000000e+00
30   3.030303e+09   1.145951e-03,   0.000000e+00
31   3.131313e+09   1.145951e-03,   0.000000e+00
32   3.232323e+09   1.145951e-03,   0.000000e+00
33   3.333333e+09   1.145951e-03,   0.000000e+00
34   3.434343e+09   1.145951e-03,   0.000000e+00
35   3.535354e+09   1.145951e-03,   0.000000e+00
36   3.636364e+09   1.145951e-03,   0.000000e+00
37   3.737374e+09   1.145951e-03,   0.000000e+00
38   3.838384e+09   1.145951e-03,   0.000000e+00
39   3.939394e+09   1.145951e-03,   0.000000e+00
40   4.040404e+09   1.145951e-03,   0.000000e+00
41   4.141414e+09   1.145951e-03,   0.000000e+00
42   4.242424e+09   1.145951e-03,   0.000000e+00
43   4.343434e+09   1.145951e-03,   0.000000e+00
44   4.444444e+09   1.145951e-03,   0.000000e+00
45   4.545455e+09   1.145951e-03,   0.000000e+00
46   4.646465e+09   1.145951e-03,   0.000000e+00
47   4.747475e+09   1.145951e-03,   0.000000e+00
48   4.848485e+09   1.145951e-03,   0.000000e+00
49   4.949495e+09   1.145951e-03,   0.000000e+00
50   5.050505e+09   1.145951e-03,   0.000000e+00
51   5.151515e+09   1.145951e-03,   0.000000e+00
52   5.252525e+09   1.145951e-03,   0.000000e+00
53   5.353535e+09   1.145951e-03,   0.000000e+00
54   5.454545e+09   1.145951e-03,   0.000000e+00

Index   frequency       @m.x1.m4[gm]
--------------------------------------------------------------------------------
55   5.555556e+09   1.145951e-03,   0.000000e+00
56   5.656566e+09   1.145951e-03,   0.000000e+00
57   5.757576e+09   1.145951e-03,   0.000000e+00
58   5.858586e+09   1.145951e-03,   0.000000e+00
59   5.959596e+09   1.145951e-03,   0.000000e+00
60   6.060606e+09   1.145951e-03,   0.000000e+00
61   6.161616e+09   1.145951e-03,   0.000000e+00
62   6.262626e+09   1.145951e-03,   0.000000e+00
63   6.363636e+09   1.145951e-03,   0.000000e+00
64   6.464646e+09   1.145951e-03,   0.000000e+00
65   6.565657e+09   1.145951e-03,   0.000000e+00
66   6.666667e+09   1.145951e-03,   0.000000e+00
67   6.767677e+09   1.145951e-03,   0.000000e+00
68   6.868687e+09   1.145951e-03,   0.000000e+00
69   6.969697e+09   1.145951e-03,   0.000000e+00
70   7.070707e+09   1.145951e-03,   0.000000e+00
71   7.171717e+09   1.145951e-03,   0.000000e+00
72   7.272727e+09   1.145951e-03,   0.000000e+00
73   7.373737e+09   1.145951e-03,   0.000000e+00
74   7.474747e+09   1.145951e-03,   0.000000e+00
75   7.575758e+09   1.145951e-03,   0.000000e+00
76   7.676768e+09   1.145951e-03,   0.000000e+00
77   7.777778e+09   1.145951e-03,   0.000000e+00
78   7.878788e+09   1.145951e-03,   0.000000e+00
79   7.979798e+09   1.145951e-03,   0.000000e+00
80   8.080808e+09   1.145951e-03,   0.000000e+00
81   8.181818e+09   1.145951e-03,   0.000000e+00
82   8.282828e+09   1.145951e-03,   0.000000e+00
83   8.383838e+09   1.145951e-03,   0.000000e+00
84   8.484848e+09   1.145951e-03,   0.000000e+00
85   8.585859e+09   1.145951e-03,   0.000000e+00
86   8.686869e+09   1.145951e-03,   0.000000e+00
87   8.787879e+09   1.145951e-03,   0.000000e+00
88   8.888889e+09   1.145951e-03,   0.000000e+00
89   8.989899e+09   1.145951e-03,   0.000000e+00
90   9.090909e+09   1.145951e-03,   0.000000e+00
91   9.191919e+09   1.145951e-03,   0.000000e+00
92   9.292929e+09   1.145951e-03,   0.000000e+00
93   9.393939e+09   1.145951e-03,   0.000000e+00
94   9.494949e+09   1.145951e-03,   0.000000e+00
95   9.595960e+09   1.145951e-03,   0.000000e+00
96   9.696970e+09   1.145951e-03,   0.000000e+00
97   9.797980e+09   1.145951e-03,   0.000000e+00
98   9.898990e+09   1.145951e-03,   0.000000e+00
99   1.000000e+10   1.145951e-03,   0.000000e+00
* gnetlist -l ../.. -g spice-noqsi -o test_cmos_inverter.net test_cmos_inverter.sch
AC Analysis  Sun Dec 23 18:14:37  2018
--------------------------------------------------------------------------------
Index   frequency       gm
--------------------------------------------------------------------------------
0   1.000000e+00   6.338799e-12,   3.979701e-09
1   1.010101e+08   3.226539e-03,   2.589921e-05
2   2.020202e+08   3.226695e-03,   1.295023e-05
3   3.030303e+08   3.226724e-03,   8.633565e-06
4   4.040404e+08   3.226734e-03,   6.475194e-06
5   5.050505e+08   3.226738e-03,   5.180163e-06
6   6.060606e+08   3.226741e-03,   4.316806e-06
7   7.070707e+08   3.226742e-03,   3.700121e-06
8   8.080808e+08   3.226743e-03,   3.237607e-06
9   9.090909e+08   3.226744e-03,   2.877873e-06
10   1.010101e+09   3.226745e-03,   2.590086e-06
11   1.111111e+09   3.226745e-03,   2.354624e-06
12   1.212121e+09   3.226745e-03,   2.158406e-06
13   1.313131e+09   3.226745e-03,   1.992375e-06
14   1.414141e+09   3.226746e-03,   1.850062e-06
15   1.515152e+09   3.226746e-03,   1.726725e-06
16   1.616162e+09   3.226746e-03,   1.618805e-06
17   1.717172e+09   3.226746e-03,   1.523581e-06
18   1.818182e+09   3.226746e-03,   1.438938e-06
19   1.919192e+09   3.226746e-03,   1.363204e-06
20   2.020202e+09   3.226746e-03,   1.295044e-06
21   2.121212e+09   3.226746e-03,   1.233375e-06
22   2.222222e+09   3.226746e-03,   1.177313e-06
23   2.323232e+09   3.226746e-03,   1.126125e-06
24   2.424242e+09   3.226746e-03,   1.079203e-06
25   2.525253e+09   3.226746e-03,   1.036035e-06
26   2.626263e+09   3.226746e-03,   9.961877e-07
27   2.727273e+09   3.226746e-03,   9.592918e-07
28   2.828283e+09   3.226746e-03,   9.250314e-07
29   2.929293e+09   3.226746e-03,   8.931338e-07
30   3.030303e+09   3.226746e-03,   8.633627e-07
31   3.131313e+09   3.226747e-03,   8.355122e-07
32   3.232323e+09   3.226747e-03,   8.094025e-07
33   3.333333e+09   3.226747e-03,   7.848751e-07
34   3.434343e+09   3.226747e-03,   7.617906e-07
35   3.535354e+09   3.226747e-03,   7.400251e-07
36   3.636364e+09   3.226747e-03,   7.194689e-07
37   3.737374e+09   3.226747e-03,   7.000238e-07
38   3.838384e+09   3.226747e-03,   6.816021e-07
39   3.939394e+09   3.226747e-03,   6.641251e-07
40   4.040404e+09   3.226747e-03,   6.475220e-07
41   4.141414e+09   3.226747e-03,   6.317288e-07
42   4.242424e+09   3.226747e-03,   6.166876e-07
43   4.343434e+09   3.226747e-03,   6.023461e-07
44   4.444444e+09   3.226747e-03,   5.886564e-07
45   4.545455e+09   3.226747e-03,   5.755751e-07
46   4.646465e+09   3.226747e-03,   5.630626e-07
47   4.747475e+09   3.226747e-03,   5.510826e-07
48   4.848485e+09   3.226747e-03,   5.396017e-07
49   4.949495e+09   3.226747e-03,   5.285894e-07
50   5.050505e+09   3.226747e-03,   5.180176e-07
51   5.151515e+09   3.226747e-03,   5.078604e-07
52   5.252525e+09   3.226747e-03,   4.980939e-07
53   5.353535e+09   3.226747e-03,   4.886959e-07
54   5.454545e+09   3.226747e-03,   4.796459e-07

Index   frequency       gm
--------------------------------------------------------------------------------
55   5.555556e+09   3.226747e-03,   4.709251e-07
56   5.656566e+09   3.226747e-03,   4.625157e-07
57   5.757576e+09   3.226747e-03,   4.544014e-07
58   5.858586e+09   3.226747e-03,   4.465669e-07
59   5.959596e+09   3.226747e-03,   4.389980e-07
60   6.060606e+09   3.226747e-03,   4.316813e-07
61   6.161616e+09   3.226747e-03,   4.246046e-07
62   6.262626e+09   3.226747e-03,   4.177561e-07
63   6.363636e+09   3.226747e-03,   4.111251e-07
64   6.464646e+09   3.226747e-03,   4.047013e-07
65   6.565657e+09   3.226747e-03,   3.984751e-07
66   6.666667e+09   3.226747e-03,   3.924376e-07
67   6.767677e+09   3.226747e-03,   3.865803e-07
68   6.868687e+09   3.226747e-03,   3.808953e-07
69   6.969697e+09   3.226747e-03,   3.753751e-07
70   7.070707e+09   3.226747e-03,   3.700126e-07
71   7.171717e+09   3.226747e-03,   3.648011e-07
72   7.272727e+09   3.226747e-03,   3.597345e-07
73   7.373737e+09   3.226747e-03,   3.548066e-07
74   7.474747e+09   3.226747e-03,   3.500119e-07
75   7.575758e+09   3.226747e-03,   3.453451e-07
76   7.676768e+09   3.226747e-03,   3.408011e-07
77   7.777778e+09   3.226747e-03,   3.363751e-07
78   7.878788e+09   3.226747e-03,   3.320626e-07
79   7.979798e+09   3.226747e-03,   3.278593e-07
80   8.080808e+09   3.226747e-03,   3.237610e-07
81   8.181818e+09   3.226747e-03,   3.197640e-07
82   8.282828e+09   3.226747e-03,   3.158644e-07
83   8.383838e+09   3.226747e-03,   3.120588e-07
84   8.484848e+09   3.226747e-03,   3.083438e-07
85   8.585859e+09   3.226747e-03,   3.047162e-07
86   8.686869e+09   3.226747e-03,   3.011730e-07
87   8.787879e+09   3.226747e-03,   2.977113e-07
88   8.888889e+09   3.226747e-03,   2.943282e-07
89   8.989899e+09   3.226747e-03,   2.910211e-07
90   9.090909e+09   3.226747e-03,   2.877876e-07
91   9.191919e+09   3.226747e-03,   2.846251e-07
92   9.292929e+09   3.226747e-03,   2.815313e-07
93   9.393939e+09   3.226747e-03,   2.785041e-07
94   9.494949e+09   3.226747e-03,   2.755413e-07
95   9.595960e+09   3.226747e-03,   2.726409e-07
96   9.696970e+09   3.226747e-03,   2.698008e-07
97   9.797980e+09   3.226747e-03,   2.670194e-07
98   9.898990e+09   3.226747e-03,   2.642947e-07
99   1.000000e+10   3.226747e-03,   2.616251e-07
ngspice 1219 ->