feihudui
New Member
Offline
Posts: 5
|
hi,
i am trying to build my vco modell using verilog-AMS in phase Domain laut paper of Kundert. But the problem is, that i can not verify the power of the flicker noise generated from flicker_noise() function. I found out that the phase noise, i have added to my vco, depends on the setting of noisefmax from the cadence analog environment. It does not depend on the power of the flicker_noise(power,n). I just want to find out the correct power of the flicker_noise(power,2) to adjust my accJitter*rdist_normal(seed,0,1) at the time domain of my vco model.
my code for the vco, that tests the flicker_noise
module VCO_VeriAMS (in,out,phase_out,gnd ); input in,gnd; output out,phase_out; electrical in,out,gnd,phase_out;
parameter real amp = 1; parameter real Fmin=4.8G; parameter real Fmax=5.2G; parameter real Vmin=0.0; parameter real Vmax=1.0; parameter real accJitter=353.55f; parameter real vco_gain = (Fmax-Fmin)/(Vmax-Vmin); parameter real ttol=0.01*2/Fmax; parameter real outStart=1/Fmin from[1/Fmin:inf); parameter integer steps_per_period = 32;
electrical Wnoise;
real phase,n; real inst_freq; // instanteous frequency integer seed,fp; real diff,prev,now;
//assign out=n;
analog begin
@ ( initial_step ) begin seed=287; fp=$fopen("/tmp/periods.m"); end
inst_freq = Fmin+vco_gain*V(in,gnd);
phase = idtmod(inst_freq,0,1); phase = phase+flicker_noise(accJitter*10G,2,"flicker_at_phasse"); V(phase_out,gnd) <+ phase; @(cross(phase-0.25,1,ttol)) begin if($abstime>=outStart) $fstrobe(fp,"%0.10e",$abstime-prev); prev=$abstime; end V(out)<+ amp*sin(2*`M_PI*phase); end
endmodule
|