|
![](static/image/common/ico_lz.png)
楼主 |
发表于 2019-5-22 11:51:59
|
显示全部楼层
你说的是Ken Kundent的文档是"Modeling Jitter in PLL-based Frequency Synthesizers"吧?
对应的code是第18页的如下accumulating jitter code?
LISTING 3 Fixed frequency oscillator with accumulating jitter.
`include “disciplines.vams”
module osc (out);
output out; electrical out;
parameter real freq=1 from (0:inf);
parameter real Vlo=–1, Vhi=1;
parameter real tt=0.01/freq from (0:inf);
parameter real jitter=0 from [0:0.1/freq); // period jitter
integer n, seed;
real next, dT;
analog begin
@(initial_step) begin
seed = 286;
next = 0.5/freq + $abstime;
end
@(timer(next)) begin
n = !n;
dT = jitter∗$rdist_normal(seed,0,1);
next = next + 0.5/freq + 0.707∗dT;
end
V(out) <+ transition(n ? Vhi : Vlo, 0, tt);
end
endmodule
|
|