I am generating a PLL simulation model. I can find the input ref clock period by using $time and divide the period with pll divider to generate pll output clock. as shown below, but simulator doesn't show anything on waveform , no syntax error though. What is wrong with this approach ?
time prev_t, periodd; reg clk = 0; always @(posedge CLK_PLL_IN) begin periodd = $time - prev_t; prev_t = $time; end always #(periodd/pll_div) clk = ~clk;