moisiad
New Member
Offline
Posts: 5
Athens, Greece
|
Hi
I am using Spectre in Cadence. I am trying to perform a PSS and Pnoise analysis of a veriloga behavioral model (given below) of a VCO with FM jitter . However i am getting the following error message:
"Distributed components and components with hidden state are not allowed with this analysis", which most probably refers to the line where dT is declared.
How can i overcome this problem
Thanks
// Voltage Controlled Oscillator with Jitter ‘include “discipline.h” ‘include “constants.h” module vco (out, in); input in; output out; electrical out, in; parameter real Vmin=0; parameter real Vmax=Vmin+1 from (Vmin:inf); parameter real Fmin=1 from (0:inf); parameter real Fmax=2*Fmin from (Fmin:inf); parameter real Vlo=–1, Vhi=1; parameter real tt=0.01/Fmax from (0:inf); parameter real jitter=0 from [0:0.25/Fmax); parameter real ttol=1u/Fmax from (0:1/Fmax); real freq, phase, dT; integer n, seed; analog begin @(initial_step) seed = –561; // compute the freq from the input voltage freq = (V(in) – Vmin)*(Fmax – Fmin) / (Vmax – Vmin) + Fmin; // bound the frequency (this is optional) if (freq > Fmax) freq = Fmax; if (freq < Fmin) freq = Fmin; // add the phase noise freq = freq/(1 + dT*freq); // phase is the integral of the freq modulo 2p phase = 2*‘M_PI*idtmod(freq, 0.0, 1.0, –0.5); // update jitter twice per period // 1.414=sqrt(K), K=2 jitter updates/period @(cross(phase + ‘M_PI/2, +1, ttol) or cross(phase – ‘M_PI/2, +1, ttol)) begin dT = 1.414*jitter*$dist_normal(seed,0, 1); n = (phase >= –‘M_PI/2) && (phase < ‘M_PI/2); end endmodule
|