Hi ,

I am trying to model a VCO of 1 GHz frequency with added flicker and white noise. While running the PNOISE I am seeing a spur at 1GHz and 10 GHz frequency also white noise is not visible. Please let me know how to correct the spur and is this the correct way to add noise in VCO in Verilog-A model.

Thank you for your time.

Here is the code:

// VerilogA for verilog_ams_model, vco_question, veriloga

`include "constants.vams"

`include "disciplines.vams"

`define PI 3.14159265358979323846264338327950288419716939937511

module vco_question (vin, vout);

input vin;

output vout;

electrical vin, vout;

parameter real amp = 1;

parameter real center_freq = 1K;

parameter real vco_gain = 1K;

parameter integer steps_per_period = 32;

real phase;

real inst_freq; // instanteous frequency

real Fl_n;real W_n;

analog begin

inst_freq = center_freq + vco_gain * V(vin);

$bound_step (1.0 / (steps_per_period*inst_freq));

Fl_n = flicker_noise(1e-14,2);

W_n = white_noise(8.28e-16);

phase = idtmod(inst_freq,0,1);

V(vout) <+ amp * sin (2 * `PI * phase);

V(vout) <+ W_n + Fl_n ;

end

endmodule