@User consider that ngspice flattens out the circuit netlist before starting building matrices and solving the ODE equation system. For this reason you always must bring the .nodeset
lines to the top level, so if bandgap has a .nodeset v(a)=0
and bandgap is placed as instance x1
, the nodeset must become .nodeset v(x1.a)=0
at global scope (that is, outside the bandgap .subckt
.. .ends
)
EDIT
i verified that a .nodeset in a schematic placed as a symbol in another schematic gets expanded by ngspice: for example a .nodeset v(c6)=-40 placed in a schematic placed as instance x1 will be expanded by ngspice as:
.nodeset v(x1.c6)=-40
So my above statement is wrong.