I simulated the osc phase model but fail to run pss & pnoise.
"Analysis `pss' terminated prematurely due to error."
It is due to convergent issue in pss run.
The input node is connected a voltage source vdc or idc with a ideal res.
Code:`include "disciplines.vams"
discipline phase
potential Angle;
enddiscipline
`include "constants.vams"
`include "disciplines.vams"
module phasemodel_osc(in, out);
input in;
output out;
phase out;
voltage in;
parameter real gain = 1 from (0:inf); //Transfer gain, Kvco (Hz/V)
parameter real n=0 from [0:inf); //white output phase noise at 1Hz (rad^2/Hz)
parameter real fc=0 from [0:inf); //flicker noise conrer freq (Hz)
analog begin
Theta(out) <+2*`M_PI*gain*idt(V(in));
Theta(out) <+ flicker_noise(n, 2, "wpn") + flicker_noise(n*fc, 3, "fpn");
end
endmodule