Forum Discussion
Altera_Forum
Honored Contributor
13 years ago --- Quote Start --- caobaiyu, 1. Trying to manually adjust delays by adding modules to your design is, generally, a bad idea for bunch of reasons: tools tend to optimize those things away or change the way they're placed. And of course, you have process/voltage/temperature variations. The best way is simply to correctly constrain your design and let the tools do their job. 2. There's a (fairly big) delay between the clock delivered to the FPGA pin and the clock delivered to the flip-flops inside the FPGA, caused by the FPGA clock distribution tree. The PLL can compensate this delay by using the clock delayed by the clock tree as feedback clock. This will cause the clock delivered to the flip-flops to be phase aligned with the clock at the FPGA input pin. Input/Output delays tell the tools about the delays/requirements of the system that surrounds the FPGA. 3: set_output_delay -min xx -clock clk [get_ports fp1_do] tells the tools that, after leaving the FPGA1 pins, fp1_do will be delayed by a minimum of xx ns and then be captured at the rising edge of clk 4: set_output_delay -max XX -clock clk [get_ports fp1_do] does an equivalent thing Put in another way, it's telling the tools that fp1_do is going to flip-flops which operate on the rising edge of clk and have a tSU of XX ns and a tH of -xx ns. 5,6: set_input_delay -min yy -clock clk [get_ports fp2_di] tells the tools that fp1_di will have a minimum delay of yy ns. Equivalent thing for max. Again, put in another way, it's telling the tools that fp2_di is produced by flip-flops operating on the rising edge of clk and have min_tCO of yy ns and max tCO of YY ns. In case of doubt, draw a timing diagram. The tools will then take this information into account and try to optimize the design inside the FPGAs to make sure that all timing requirements are respected. 7. If your constrains meet the relationship I wrote above and TimeQuest says timing requirements are met, then it's OK. You can then try to look at the I/O timings slack in both FPGAs. If one FPGA has large slacks and the other small ones, maybe you should change the constrains a bit to improve it. --- Quote End --- Thank you for your replay. by what you mentioned,so usually we first assume a value to tSU/tH or max tCO/min_tCO,and then calculate another. for example, set fp2_tsu 2.250 set fp2_th 0.250 set fp1_max_tco [expr 15.625 - $fp2_tsu] set fp1_min_tco [expr $fp2_th] FPGA1: set_output_delay -clock fp1_co -max [expr $fp2_tsu] [get_ports fp1_do[*]] -add_delay set_output_delay -clock fp1_co -min [expr -$fp2_th] [get_ports fp1_do[*]] -add_delay set_output_delay -clock fp1_co -max [expr $fp2_tsu] -clock_fall [get_ports fp1_do[*]] -add_delay set_output_delay -clock fp1_co -min [expr -$fp2_th] -clock_fall [get_ports fp1_do[*]] -add_delay FPGA2: set_input_delay -clock fp2_ci -max [expr $fp1_max_tco] [get_ports {fp2_di[*]}] -add_delay set_input_delay -clock fp2_ci -min [expr $fp1_min_tco] [get_ports {fp2_di[*]}] -add_delay set_input_delay -clock fp2_ci -max [expr $fp1_max_tco] -clock_fall [get_ports {fp2_di[*]}] -add_delay set_input_delay -clock fp2_ci -min [expr $fp1_min_tco] -clock_fall [get_ports {fp2_di[*]}] -add_delay Then see the timing constraint report and adjust the value of tSU/tH or max tCO/min_tCO by the slack value. Right? How to decide what is the assumed value?or it may be any value.