Altera_Forum
Honored Contributor
16 years agoHold time violations in simple clock divider
I am using a register to divide a 100 MHz input clock and am getting hold time violations.
The actual code is a tad more complicated (it switches to a slower clock divider depending on an input), but the following verilog fails in the same way.always @(posedge In_Clk, negedge Rst_)
if (~Rst_) Out_Clk <= 1'b0;
else Out_Clk <= ~Out_Clk; The hold error is from node Out_Clk to node Out_Clk, with launch clock being Out_Clk and the latch clock being In_Clk. There are separate hold time failures for both the rising edge of the launch clock and the falling edge. From the falling edge, the hold time violation is about 0.08, for the rising edge it is about 0.05 I have confirmed in the Resource Property Editor that the only input to Out_Clk is itself, fed back from the register through LUT input C, so I am assuming this is a tools problem. Specifically, it seems that the Launch clock should also be In_Clk, not Out_Clk. Is this problem caused because Out_Clk is routed to the global clock network? Should I just set a false path between these nodes? If there is another way to re-write this portion of code that will help the tools automatically analyze this clock generator properly, I would prefer to do that.