`include "disciplines.h"
`include "constants.h"
//`include "phase.vams" // from Listing 2, includes disciplines.vams.



module divider(in, out);
input in; output out;
phase in, out;
parameter real ratio = 1 from (0:inf); // divide ratio
parameter real n = 0 from [0:inf); // white output phase noise (rads2/Hz)
parameter real fc = 0 from [0:inf); // flicker noise corner frequency (Hz)
analog begin
Theta(out) <+ Theta(in) / ratio;
Theta(out) <+ white_noise(n, "wpn") + flicker_noise(n*fc, 1, "fpn");
end
endmodule
