Altera_Forum
Honored Contributor
9 years agoset_input_delay constraint
Hi,
I have a bidirectional synchronous interface which I want to constrain. Without any constraints the interface doesn't work and with the constraints I tried it works, but I get the message from Quartus that the timing requirements aren't met. I have probmles constraining the input signals coming from the external chip. The chip works with a 100MHz clock (PCLK) which comes from the FPGA and is inverted to the FPGA clock (FPGA_CLK) generating the control and data signals. The inversion is done with an ALTDDIO register. I want to sample the control flags on the rising edge of FPGA_CLK. Everything I read to the set_input_delay constrain is based on the assumption that I have a clock coming from the external device aligned with the data. But in my case I only have the clocks generated inside the FPGA, so I don't know if I need a virtual clock here too. I tried it with and without virtual clock and in both cases I get the timing requirements not met warning. Attached you can see a capture of the control signals of the interface. PCLK comes from the FPGA and goes into the external device. Now I want to constrain the FLAGD signal which needs to be sampled by the FPGA. It comes with a maximum delay of 8ns (7ns in the attachment) after the rising edge of PCLK and needs to be sampled with the next rising edge of FPGA_CLK. My sdc file looks currently like this (shortened, output port included):create_clock -period 20
derive_pll_clocks
create_generated_clock -name out_clk -source |muxsel}] -divide_by 1 -multiply_by 1 -invert
derive_clock_uncertainty
set_false_path -to
# setup and hold for data send to the external interface
set tsu_fx3 2
set th_fx3 0.5
# board delays. I don't have exact values.
set tbd_data_min 0.65
set tbd_data_max 1.26
set tbd_clk_min 0.72
set tbd_clk_max 1.15
set out_max_delay
set out_min_delay
set_output_delay -max $out_max_delay -clock out_clk
set_output_delay -min $out_min_delay -clock out_clk
set tco_fx3_min 0
set tco_fx3_max 8
set in_max_delay
set in_min_delay
set_input_delay -clock {out_clk} -max $in_max_delay
set_input_delay -clock {out_clk} -min $in_min_delay
set_multicycle_path -setup -to 2 Is this a good basis or are my constraints completely wrong? What is correct value for tco_min? It is not mentioned in the datasheet. Which clock I need as the reference for my set_input_delay constrain? Regards