Altera_Forum
Honored Contributor
8 years agotime contain for a driver
hi,
I have a divider as following. I usually ignore the timing report for the divider. I started to check those timing report for the divider. There is a hold timing violation as shown in the screen capture. Hold timing violation means the data changes too quick after the sampling clock. So I have several questions about the report. 1) Does the timing report really mean that the clk_out change too quick after the sampling edge due to the loop back to the input? 2) I implemented the divider like this for many years. If the answer is yes to question 1, how should the divider be implemented to correct the timing violation? 3) If the answer is no to question 1, then why does the TimeQuest reports it as a violation? Should I ignore this violation by set as a node false path from clk_out to clk_out? thanks Peng module divider #( // parameter declarations parameter divider = 1000, parameter cnt_width = 16 ) ( // input ports input rst_n, input sys_clk, output reg clk_out ); // timer counter reg[cnt_width-1:0] counter; always @(posedge sys_clk or negedge rst_n) begin if(!rst_n) begin counter<=0; clk_out<=1'b0; end else if(counter==divider-1) begin counter<=0; clk_out<=~clk_out; end else counter<=counter+1'b1; end endmodulehttps://alteraforum.com/forum/attachment.php?attachmentid=14256&stc=1