NAND Gate Simulation ngspice

Hi folks,

I’m a newbie in spice, and I’ve been trying to write the netlist of a NAND gate.
I’m using the 7nm library of PTM-MG FinFET.

Here’s the netlist I wrote.

*file tmp.cir
.LIB /home/n/Desktop/sim/ADC/PTM-MG/models ptm7hp

m1 3 2 5 0 nmos W=45n L=11n
m2 5 4 0 0 nmos W=45n L=11n
m3 3 2 1 1 pmos W=90n L=11n
m4 3 4 1 1 pmos W=90n L=11n

vdd 1 0 dc 0.7
va 2 0 pulse (0 0.7 0 0.1n 0.1n 10n 20n)
vb 2 0 pulse (0 0.7 0 0.1n 0.1n 10n 20n)

.tran 0.1n 100n

plot v(3) v(2) v(4)


The problem is that I can’t run the simulation and I receive the following message:

Error on line 6 or its substitute:
m1 3 2 5 0 nmos w=45n l=11n
could not find a valid modelname
simulation interrupted due to error!

Any idea?

Not a great simulation user here, but this has been quoted many times to new users.

I took the liberty to change your category.

Well, before everything, I already did all the tutorials that you mentioned!

@holger is your best bet. He may take a while to answer.

Thank you sir for your help!

I’m not a sir, just a fellow member.
Using the @ and changing your category will alert the simulation specialist, I hope :slightly_smiling_face:

This is a ngspice question, and not a KiCad question.

The model parameter set 7nm library of PTM-MG FinFET requires the BSIM_CMG device model. This model is only available with recent ngspice-39 and its OSDI/OpenVAF interface and model compiler.

If you are on MS Windows, you may download a complete setup (plain ngspice, not made for KiCad) as Download ngspice-39_64.7z (ngspice). There is some instruction available in the ngspice manual, chapter 13. In the download there are some examples available at /examples/osdi/bsimcmg.

If you are on Linux, you might better ask your questions at the ngspice-users discussion forum ngspice / Discussion / ngspice-users .

KiCad plus ngspice-39 plus compiled Verilog-A models is not yet available. It requires an update to KiCad probably only available in KiCad 8.


I added the user discussion group to the mini faq.

1 Like

Thank you so much for your help! I’m a Linux user, so I’ll write there.