Forum Discussion
set_input_delay And set_output_delay .SDC Constraints
create_clock -period 37.037 -name clkvin;# virtual clock for input constraintset_input_delay -clock clkvin -max 25 -clock_fallset_input_delay -clock clkvin -min 10 -clock_fall Setting the input delay constraints like this ends up giving the following failing constraints in the Timing Analyzer. https://alteraforum.com/forum/attachment.php?attachmentid=13432&stc=1 CH2-BITEC-IN are the physical input pins on the HSMC connector.The data on these pins is registered with the clock CH2-BITEC-CLK like so : always @ (posedge CH2_BITEC_CLK) begin input_data <= CH2_BITEC_IN; end
Have I deduced the requirements correctly from the diagram? If so, then why does the design fail and how can I make it work? Thank you!24 Replies
- Altera_Forum
Honored Contributor
On a side note, Here's what I think setting the output_delay -max attribute does : It informs the synthesizer that the input register, the one with its "D" pins connected directly to the input pins on the FPGA can not be sampled at the positive edge of the same clock that is used between two internal registers on the FPGA. Consequently, when I constrain the output_delay -max to be 25 ns, it leaves out 12 ns (in a 37ns) for the input pins data to appear at the output of the register and then be used for any combinational logic(like comparators e.t.c) before the final result.When the constraints fail, this simply means that the remaining time isn't sufficient for the subsequent processing? If so, then
What is the purpose of the minimum delay? Why did the design pass when I removed the -fall attribute? What can be done to assure maximum data integrity? - Altera_Forum
Honored Contributor
Thank you for the prompt feedback and I apologize for the poor quality of the picture and any other shortcomings!
Just to be certain, I wrote 't5' and 't6' on the left side of the diagram and not 15 and 16.Again, My bad.Now, as per the diagram attached the data sheet lists the values for 't5' and 't6' labelled in the diagram as "10ns" and "25ns" . My reasoning behind arriving at these values was that 10ns after the falling clock edge, the data begins to change and 15 ns later (25 ns after falling edge),new data is available, hence the min and max values, Please correct me if I'm wrong, Secondly, when I remove the -clock fall constraint, the analyzer reports no warnings.Why is this so? If it should still be 15 and 16 then, I am hopelessly lost. :( . Please have a look at the attached diagrams. https://alteraforum.com/forum/attachment.php?attachmentid=13434&stc=1 https://alteraforum.com/forum/attachment.php?attachmentid=13435&stc=1 - Altera_Forum
Honored Contributor
you need to set offsets as they are:
min = 15 &max = 16 and both from falling edge. It should be no problem to pass How did get those figures of 25/10?? I needed glasses.min = t5 &max = t6 yes. If it fails then you need to try PLL or use same edge. Also you have assumed board delays to be equal for clk/data - Altera_Forum
Honored Contributor
UPDATE : When I remove the -clock_fall constraint, which I included since the data was changing on the negative edge of the clock, the failing constraints go away.With the following constraints, I get no errors.
The only change I've made is the removal of the -clock_fallset_input_delay -clock clkvin -max 25 set_input_delay -clock clkvin -min 10