Hello, this is an issue related to <#C0750383B2M|>...
# analog-design
c
Hello, this is an issue related to #C0750383B2M I am having trouble with parametric noise runs. The core problem is this bit of code:
Copy code
alter vvgs_ctrl 0.8
  op
  print Vp1p8hvt#branch
  noise v(src_n1p8lvt) Vvgs_ctrl dec 1000 100 10e9
  print onoise_total
  ; reset
  alter vvgs_ctrl 1.2
  op
  print Vp1p8hvt#branch
  noise v(src_n1p8lvt) Vvgs_ctrl dec 1000 100 10e9
  print onoise_total
This is the core of my loop, I alter a parameter and then re-run the simulation. I have included the
op
command just to verify the
alter
command is doing something. This is what it returns:
Copy code
Using SPARSE 1.3 as Direct Linear Solver
 Reference value :  0.00000e+00
No. of Data Rows : 1
vp1p8hvt#branch = 5.9080065507013344e-07
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver

No. of Data Rows : 8001

No. of Data Rows : 1
onoise_total = 1.2877645416968548e-05
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver

No. of Data Rows : 1
vp1p8hvt#branch = 2.3014385629361719e-05
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver

No. of Data Rows : 8001

No. of Data Rows : 1
onoise_total = 1.2879064884219959e-05
The branch current increases, however the output noise seems to return the original value. When I simulate at
vctrl=1.2
directly, I get the (expected) noise increase. I saw this: https://sourceforge.net/p/ngspice/discussion/133842/thread/fcd70adf/ So I tried adding the
reset
command, but it kills the sim:
Copy code
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver

No. of Data Rows : 1
vp1p8hvt#branch = 2.3014385629361719e-05
Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver
Error: no data saved for Noise analysis; analysis not run
doAnalyses: not found

noise simulation(s) aborted
Warning from checkvalid: vector onoise_total is not available or has zero length.
Any ideas? Thank you.
b
This works fine for me (with reset). Perhaps there is something going on outside this core that you're showing?
c
Thanks for trying it out! I wonder if it’s somehow related to OSX or my versions? I removed all the other stuff, and just run this control line.
Copy code
.control
  save all
  noise v(src_n1p8lvt) Vvgs_ctrl dec 1000 100 10e9
  reset
  noise v(src_n1p8lvt) Vvgs_ctrl dec 1000 100 10e9
.endc
I just tried the following versions: Version 4.4, installed via homebrew (pre-compiled)
Copy code
******
** ngspice-44.2 : Circuit level simulation program
** Compiled with KLU Direct Linear Solver
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Copyright 2001-2024, The ngspice team.
** Please get your ngspice manual from <https://ngspice.sourceforge.io/docs.html>
** Please file your bug-reports at <http://ngspice.sourceforge.net/bugrep.html>
******
Warning: locale not supported by Xlib, locale set to C
Warning: X locale modifiers not supported, using default

Note: No compatibility mode selected!


Circuit: ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver
 Reference value :  1.00000e+02
No. of Data Rows : 8001

No. of Data Rows : 1
Reset re-loads circuit ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Circuit: ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver
Error: no data saved for Noise analysis; analysis not run
doAnalyses: not found

noise simulation(s) aborted
I compiled version 4.2 myself, from the tarball release download:
Copy code
******
** ngspice-42 : Circuit level simulation program
** Compiled with Sparse Direct Linear Solver
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Copyright 2001-2023, The ngspice team.
** Please get your ngspice manual from <https://ngspice.sourceforge.io/docs.html>
** Please file your bug-reports at <http://ngspice.sourceforge.net/bugrep.html>
******

Note: No compatibility mode selected!


Circuit: ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

 Reference value :  1.00000e+02
No. of Data Rows : 8001

No. of Data Rows : 1
Reset re-loads circuit ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Circuit: ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Error: no data saved for Noise analysis; analysis not run
doAnalyses: not found

noise simulation(s) aborted
Compiled version 4.4+ from hash dd916b1d0e03a8a441d998291897424cf956ee92
Copy code
******
** ngspice-44+ : Circuit level simulation program
** Compiled with KLU Direct Linear Solver
** The U. C. Berkeley CAD Group
** Copyright 1985-1994, Regents of the University of California.
** Copyright 2001-2024, The ngspice team.
** Please get your ngspice manual from <https://ngspice.sourceforge.io/docs.html>
** Please file your bug-reports at <http://ngspice.sourceforge.net/bugrep.html>
******

Note: No compatibility mode selected!


Circuit: ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver
 Reference value :  1.00000e+02
No. of Data Rows : 8001

No. of Data Rows : 1
Reset re-loads circuit ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Circuit: ** sch_path: /users/colinww/foss/work/device_char/device_char.sch

Doing analysis at TEMP = 27.000000 and TNOM = 27.000000

Using SPARSE 1.3 as Direct Linear Solver
Error: no data saved for Noise analysis; analysis not run
doAnalyses: not found

noise simulation(s) aborted
Fundamentally, it seems like I can’t run a noise analysis after the
reset
command. I could dig into the source if someone gives a general idea of what this message means:
Copy code
Error: no data saved for Noise analysis; analysis not run
OKAY I figured it out. This does not work.
Copy code
.control
  save all
  reset
  noise v(src_n1p8lvt) Vvgs_ctrl dec 1000 100 10e9
.endc
However, this DOES work
Copy code
.control
  reset
  save all
  noise v(src_n1p8lvt) Vvgs_ctrl dec 1000 100 10e9
.endc
I saw this statement in the manual: The circuit can then be re-run from it’s initial state, overriding the effect of any set or alter commands. However, I didn’t realize I need to explicitly save the nodes required for the noise analysis to work.
👍 1
b
I don't need the
save all
for it to work. Is
src_n1p8lvt
a "regular" node in your circuit?
c
Yeah, just top level connectivity. It’s not some internal macromodel node like the ST models used to do, if that’s what you meant. I agree it’s odd, but still not the oddest thing I’ve encountered with this flow in the past few days 🙂