0
\$\begingroup\$

I'm getting the following error from ngspice:

too many nodes connected to instance

The netlist and circuit I'm modeling are shown below. Each bulk is tied to the source, so I have the sources and bulks of each transistor at the same node.

Where is the error in my netlist?

* Differential pair
*** Netlist
VDD VDD   0 dc=2 ac=0
IDD VDD  VA dc=15u ac=0
M1   VA  VA   0   0 .model nmosfet w=9u l=5u
M4   VD  VA   0   0 .model nmosfet w=27u l=5u
M2   VC  VB  VD  VD .model nmosfet w=4.5u l=5u
M5   VF  VE  VD  VD .model nmosfet w=4.5u l=5u
M3   VC  VC VDD VDD .model pmosfet w=50u l=5u
M6   VF  VC VDD VDD .model pmosfet w=50u l=5u
CLD  VF   0 10p
*** Model statements
.model nmosfet nmos vto=400m kp=200u lambda=10m tox=5n
.model pmosfet pmos vto=400m kp=50u lambda=10m tox=5n
*** Commands
.op
.end

enter image description here

ngspice errors:

Warning: Model issue on line 7 :
  m1 va va 0 0 .model nmosfet w=9u l=5u ...
too many nodes connected to instance
Warning: Model issue on line 8 :
  m4 vd va 0 0 .model nmosfet w=27u l=5u ...
too many nodes connected to instance
Warning: Model issue on line 9 :
  m2 vc vb vd vd .model nmosfet w=4.5u l=5u ...
too many nodes connected to instance
Warning: Model issue on line 10 :
  m5 vf ve vd vd .model nmosfet w=4.5u l=5u ...
too many nodes connected to instance
Warning: Model issue on line 11 :
  m3 vc vc vdd vdd .model pmosfet w=50u l=5u ...
too many nodes connected to instance
Warning: Model issue on line 12 :
  m6 vf vc vdd vdd .model pmosfet w=50u l=5u ...
too many nodes connected to instance
\$\endgroup\$
1
\$\begingroup\$

I think you have a syntax error. When you instantiate a transistor, don't include .model as part of the line, just provide the model name.

M1 VA VA 0 0 .model nmosfet w=9u l=5u

becomes

M1 VA VA 0 0 nmosfet w=9u l=5u

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.