Why is NGSPICE giving me wrong results for my inverter simulation?

  • Thread starter Kholdstare
  • Start date
In summary, The speaker was trying to simulate a basic inverter using an IBM 65nm model file, but was getting incorrect results with a delay of 4ns instead of the expected 8-15 ps. They suspect that ngspice (ver 24) is causing the issue and mention the possibility of high capacitive Miller coupling effect. They then mention finding the bug and suggest considering changing the default transistor values to real values. Finally, they mention a helpful website for running SPICE simulations from a web browser.
  • #1
Kholdstare
388
1
I was trying to simulate basic inverter with mosis IBM 65nm model file (lvl 54 BSIM 4.3.0). And I am getting a delay of 4ns whereas I should get 8-15 ps. I don't understand why it is giving me wrong results. I suspect ngspice (ver 24) is doing it wrong.

Thnx

subckt.txt
* Inverter
.SUBCKT INV IN OUT
M1 OUT IN GND GND nmos
M2 OUT IN VDD VDD pmos
.ENDS

test.txt
* Inverter

.INCLUDE D:\ngspice\bin\0_Models_mosis_ibm_65nm_l54.ftr
.INCLUDE D:\ngspice\bin\subckt.txt
.GLOBAL GND VDD

XINV IN OUT INV
VDD VDD GND 1V
VIN IN GND PWL(0 0 10ns 0 10.1ns 1 30ns 1 30.1ns 0)

.TRAN 0.01ns 50ns
.END

.CONTROL
run
plot in out
.ENDC
 
Engineering news on Phys.org
  • #2
Bump. I even see high capacitive Miller coupling effect.
 
  • #3
Thnx,

your current circuit has transistors with L=5um and W=5um (default values). You may consider changing these to real values.

Holger
 
  • #4
Yeah, found the bug at last.
 
  • #5
For simple netlists like this, http://www.ngspice.com can be very helpful. This site allows you to run SPICE simulations from a web browser. There is also an example circuit similar to yours that may have helped to identify the problem that you were having.
 

1. Why am I getting unexpected results when using NGSPICE?

There could be several reasons for this. First, double check your circuit design to make sure there are no errors. Also, check the input parameters and make sure they are correct. Additionally, it is possible that you are using an outdated version of NGSPICE, so try updating to the latest version.

2. What can cause NGSPICE to give inaccurate results?

One common cause of inaccurate results is using incorrect or inconsistent units in your circuit design. Make sure all your values are in the correct units and that they are consistent throughout the circuit. Another factor could be numerical precision errors, which can be minimized by using smaller timesteps in your simulation. Additionally, make sure your simulation settings are appropriate for your circuit, such as the simulation type and convergence criteria.

3. How can I troubleshoot NGSPICE when it gives wrong results?

Start by checking for any errors or warnings that may appear during the simulation. These can give clues as to what may be causing the inaccurate results. Next, try simplifying your circuit and running a smaller simulation to see if the issue persists. You can also try changing simulation settings or using different models for certain components to see if that affects the results.

4. Can user errors cause NGSPICE to give incorrect results?

Yes, user errors can certainly lead to inaccurate results in NGSPICE. This could be due to mistakes in the circuit design, input parameters, or simulation settings. It is important to carefully review all aspects of your simulation to ensure they are correct and consistent.

5. How can I improve the accuracy of NGSPICE results?

There are several ways to improve the accuracy of NGSPICE results. First, make sure your circuit design is accurate and all values are in the correct units. Next, use smaller timesteps in your simulation to reduce numerical precision errors. You can also try using more advanced models for certain components, or adjusting simulation settings such as convergence criteria. Additionally, it can be helpful to compare your results with other simulation tools or with physical measurements to validate the accuracy of your NGSPICE results.

Back
Top