Colin Weltin-Wu
02/21/2025, 8:27 PMalter 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:
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:
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.Boris Murmann
02/22/2025, 7:24 PMColin Weltin-Wu
02/22/2025, 9:43 PM.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)
******
** 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:
******
** 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
******
** 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:
Error: no data saved for Noise analysis; analysis not run
Colin Weltin-Wu
02/22/2025, 10:03 PM.control
save all
reset
noise v(src_n1p8lvt) Vvgs_ctrl dec 1000 100 10e9
.endc
However, this DOES work
.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.Boris Murmann
02/22/2025, 11:00 PMsave all
for it to work. Is src_n1p8lvt
a "regular" node in your circuit?Colin Weltin-Wu
02/23/2025, 12:55 AM