Community
cancel
Showing results for 
Search instead for 
Did you mean: 
EBoln
New Contributor I
142 Views

set_input_delay constraints direction

Good day!
Tell me, in which direction should the delays be considered relative to the clock front?

const.png

create_clock -name {llc} -period 75MHz { llc }

set_input_delay -clock [get_clocks {llc}]             -max  4.10 [get_ports {rx_data[*]}]
set_input_delay -clock [get_clocks {llc}]             -min  0.15 [get_ports {rx_data[*]}]
set_input_delay -clock [get_clocks {llc}] -clock_fall -max  3.34 [get_ports {rx_data[*]}] -add_delay
set_input_delay -clock [get_clocks {llc}] -clock_fall -min -0.89 [get_ports {rx_data[*]}] -add_delay

Or

create_clock -name {llc} -period 75MHz { llc }

set_input_delay
-clock [get_clocks {llc}] -max -4.10 [get_ports {rx_data[*]}] set_input_delay -clock [get_clocks {llc}] -min -0.15 [get_ports {rx_data[*]}] set_input_delay -clock [get_clocks {llc}] -clock_fall -max -3.34 [get_ports {rx_data[*]}] -add_delay set_input_delay -clock [get_clocks {llc}] -clock_fall -min 0.89 [get_ports {rx_data[*]}] -add_delay

Or

create_clock -name {llc} -period 75MHz { llc }

set_input_delay -clock [get_clocks {llc}]             -max  4.10 [get_ports {rx_data[*]}]
set_input_delay -clock [get_clocks {llc}]             -min -0.15 [get_ports {rx_data[*]}]
set_input_delay -clock [get_clocks {llc}] -clock_fall -max  3.34 [get_ports {rx_data[*]}] -add_delay
set_input_delay -clock [get_clocks {llc}] -clock_fall -min  0.89 [get_ports {rx_data[*]}] -add_delay

and so on

Thanks

Tags (1)
0 Kudos
10 Replies
sstrell
Honored Contributor II
101 Views

What kind of interface is this?  I'm guessing DDR.  Center-aligned or edge-aligned clock?  Same edge or opposite edge data transfer?  And what are the numbers in your waveform supposed to represent?  Exact timing or an example from an external device or something?

EBoln
New Contributor I
94 Views

Yes, edge-aligned DDR, dual edge data transfer. Data from DS

-0.15 Positive clock edge to end of valid data
 4.1    Positive clock edge to start of valid data
 0.89  Negative clock edge to end of valid data
 3.34  Negative clock edge to start of valid data

EBoln_0-1617768301030.png

Converting to waveform from top message

sstrell
Honored Contributor II
78 Views

That helps a bit.  First of all, with the clock arriving edge-aligned, you need an internal 90 degree phase shift to center-align the incoming clock with the data, usually performed with a PLL.  If you already have that in your design, add derive_pll_clocks to your .sdc to create the generated clock constraint needed.

From there, I think the correct formulas to use would be (for edge-aligned DDR):

(setup latch - setup launch) - Tsu = 0 - Tsu

Th - (hold launch - hold latch) = Th - (clock period/2) 

So the values for -max would be -4.1 and -3.34 and for -min would be (0.15 - (13.33ns/2)) and (0.89 - (13.33ns/2)), so -6.515 and -5.775.  I think I got the math right.  It's all negative, so it looks weird, but it's because of the edge alignment and the fact that there's the internal phase shift to then center align the clock with the data.

You'll also need a number of false path timing exceptions to prevent incorrect analysis.  Assuming same edge transfer, they would look like this (you need to specify your virtual clock as well):

set_false_path -setup -rise_from [get_clocks vir_clk_in] -fall_to [get_clocks llc]

set_false_path -setup -fall_from [get_clocks vir_clk_in] -rise_to [get_clocks llc]

set_false_path -hold  -rise_from [get_clocks vir_clk_in] -rise_to [get_clocks llc]

set_false_path -hold  -fall_from [get_clocks vir_clk_in] -fall_to [get_clocks llc]

EBoln
New Contributor I
68 Views

Thank you very much for your reply!
There is one subtlety - I have no pll left and cannot move it 90 degrees. Calculations are good, but for me the main problem is in understanding which way to count: for max to the left of the edge and for min also to the left? or how?

sstrell
Honored Contributor II
63 Views

You need some method for shifting the clock if the clock is arriving at the device edge aligned.  Otherwise, you will not be able to meet timing.

-max is for constraining setup.  -min is for constraining hold.  So -max/-min are for the rising edge and -max/-min combined with -clock_fall are for the falling clock edge.  The negative numbers I gave you are what should be used.

EBoln
New Contributor I
60 Views

this is all clear, but in which direction relative to the edge is the countdown

EBoln
New Contributor I
53 Views

sorry not edge-aligned, but center-aligned

sstrell
Honored Contributor II
40 Views

So...are you now saying the clock is center-aligned with the data?

EBoln
New Contributor I
35 Views

Yes, I was wrong, I'm sorry. Clock is center-aligned with the data. why pll is needed, can't the fitter delay the data lines to align with the clock? at first glance, it is enough to delay by 2.5ns, so that center-aligned
sstrell
Honored Contributor II
29 Views

If it's center-aligned, you don't need a PLL for a phase shift, though sometimes one is still inserted to add minor phase adjustments to improve slack.  But you do need to add a phase shift to your create_clock command:

create_clock -name llc  -period 13.33 -waveform { 3.33 9.99 } [get_ports llc]

The numbers are all different for center-aligned as well:

(period/4) - Tsu

Th - (period/4)

Reply