EDIT: never mind, the actual arguments are VO VMO VMA FM FC TD PHASES PHASEC not as mentioned AM(VO, VA, MF, MD, FC, TD, PHASES, PHASEC) I'm on ngspice45 on ubuntu 26 and there is some kind of issue. When I use this: * first line is ignored * a b O A MF MD FC TD P1 P2 V1 1 0 AM 1 2 50 0.9 1k 0 0 0 .options NOACCT NOPAGE .control set nobreak set nopage set width = 200 .endc .print tran v(1) .plot tran v(1) .tran 0.0001 0.02 0 .end With MF 50Hz and tran 0.02 I should see exactly 1 period but I see...
I'm on ngspice45 on ubuntu 26 and there is some kind of issue. When I use this: * first line is ignored * a b O A MF MD FC TD P1 P2 V1 1 0 AM 1 2 50 0.9 1k 0 0 0 .options NOACCT NOPAGE .control set nobreak set nopage set width = 200 .endc .print tran v(1) .plot tran v(1) .tran 0.0001 0.02 0 .end With MF 50Hz and tran 0.02 I should see exactly 1 period but I see this:
I think there is some inverval / "number of steps in decade" which is zero which causes infinity somewhere, or something like that
What about upgrading to ngspice-44.2? I prefer to use distribution version. Adding ac 1 didn't help, still freezes (simple_ngspice_init_getchar: Reference value : inf). Plus i'm not making the netlist user makes the netlist and analyzing it could be difficult circarray [0] = strdup ("* comment"); circarray [1] = strdup ("V1 1 0 1 ac 1"); circarray [2] = strdup ("R1 1 2 1"); circarray [3] = strdup ("C1 2 0 1 ic=0"); circarray [4] = strdup (".ac dec 3 10 20"); // >= 4 works ok circarray [5] = strdup...
What about upgrading to ngspice-44.2? I prefer to use distribution version. Adding ac 1 didn't help, still freezes (simple_ngspice_init_getchar: Reference value : inf). Plus i'm not making the netlist user makes the netlist and analyzing it could be difficult circarray [0] = strdup ("* comment"); circarray [1] = strdup ("V1 1 0 1 ac 1"); circarray [2] = strdup ("R1 1 2 1"); circarray [3] = strdup ("C1 2 0 1 ic=0"); circarray [4] = strdup (".ac dec 3 10 20"); // >= 4 works ok circarray [5] = strdup...
In the attachment is program using shared ngspice library, if AC has parameter N lower than 4 (e.g. 1, 2 or 3) it freezes and runs indefinitely and consumes all memory. In v40 I was using ".ac dec 1 10 20" as a fastest way to get list of all available vectors (I need to know all vectors so that I can show them in dropdown or something) and it worked fine but since upgrade to 42 it freezes. I know the command doesn't make much sense to have 1 point per decade but it should either not freeze or print...
On page 489 of https://ngspice.sourceforge.io/docs/ngspice-42-manual.pdf there is circarray [4] = strdup (". tran 10 u 3 uic "); It should be maybe 10u 3u or something like that
remcirc solved the issue, thanks.