Clock Domain Crossing Part 10
Clock Domain Crossing Part 10
Crossing
Part 7 – Timing Constraints
/amradelm
Save The Palestinian Children
𝑝𝑜𝑠𝑠𝑖𝑏𝑙𝑒 𝑝𝑎𝑡ℎ𝑠
200𝑝𝑠 300𝑝𝑠
0 0
1 1
100𝑝𝑠 500𝑝𝑠
sel
Free Palestine /amradelm
D D D
EN
EN
EN
[1] : You can watch an animation of this here : https://lnkd.in/en-iuNPx Free Palestine /amradelm 7
CDC Mux Scheme And False Path
1 Now let’s consider the faulty behavior with a 2 • The data takes a long time to reach the MUX 3 • After some time, the data arrives at the MUX
false path constraint applied1 due to the logic delay. after the enable.
• The data goes to the Rx domain MUX • The enable reaches the MUX and opens the • The data is a domain 1 signal arriving at
• The enable goes to the Rx domain through FF gate domain 2 FF. Metastability happens
synchronizers
D Metastability!
D D
EN EN
EN
[1] : You can watch an animation of this here : https://lnkd.in/en-iuNPx Free Palestine /amradelm 8
CDC Gray Coding And False Path
1 Now let’s see the faulty behavior with CDC Gray coding 2 • We then send gray code 101 (decimal 6)
• Initially the Rx sees gray code 110 (decimal 4) • Due to the long delay on the LSB line, the logic “1” from decimal 5 didn’t
• After that we send gray code 111 (decimal 5) reach the Rx yet.
• Now the Rx sees two bit changing and may jump to wrong count
1 1 1 1
5 4 6 4
1 1 0 1
1
1 0 1 0
[1] : You can watch an animation of this here : https://lnkd.in/ejkpFvZR Free Palestine /amradelm 9
2 nd(Trial) Solution :
Don’t Apply False Path
𝑇𝑐𝑞 𝑇𝑐𝑞
𝑇𝑐𝑜𝑚𝑏 𝑇𝑐𝑜𝑚𝑏
𝑇𝑙𝑎𝑢𝑛𝑐ℎ_𝑒𝑑𝑔𝑒 𝑇𝑙𝑎𝑢𝑛𝑐ℎ_𝑒𝑑𝑔𝑒
𝑇𝑠𝑒𝑡𝑢𝑝 𝑇𝑠𝑒𝑡𝑢𝑝
𝑇𝑐𝑎𝑝𝑡𝑢𝑟𝑒_𝑒𝑑𝑔𝑒 𝑇𝑐𝑎𝑝𝑡𝑢𝑟𝑒_𝑒𝑑𝑔𝑒
[1] : The tools ignore less critical paths and focus on the critical ones. This will lead to real paths being masked by Free Palestine /amradelm 11
fake CDC violations
3 rd (Correct) Solution :
Skew Constraint
Free Palestine
• The best approach is to add a max delay constraint with an amount small enough that the CDC paths are not broken
• What makes this approach easy is that it can applied to all CDC paths with one line1 so it doesn’t need manual work:
• pt_shell> set_max_delay 4.0 -from CLK1 -to CLK2
• What remains now is what value to use for the max delay constraint.
≤ 𝟒 𝒏𝒔
o In some cases, we need to apply the Tx clock period
o In other cases, we need to apply the Rx clock period
o In other cases, we need to apply multiple clock periods.
≤ 𝟒 𝒏𝒔
o We will use the worst case (smallest) instead of applying a specific max delay
value for each
• The value used for max delay might be too tight for some CDC paths. In that case, ≤ 𝟒 𝒏𝒔
we can resort to skew constraint
[1] : In some tools, the max delay constraint overwrites the setup constraints, but in others, it won’t.
Free Palestine /amradelm
Depending on your tool, you might need to first apply a false path on the setup constraint then apply the max
Free Palestine /amradelm
delay constraint : Timing constraints for clock-domain crossings. #sta #cdc (github.com)
References
1) https://gist.github.com/brabect1/7695ead3d79be47576890bbcd61fe426
2) Y. Mirsky, O. Tsarfaty, D. Stein, & O. Winner, “Timing Analysis of Unconstrained Clock Domain Crossings – the Need and the Method,”
3) O. Dasa, Y. Mirsky “A New Approach to Easily Resolve the Hidden Timing Dangers of False Path Constraints on Clock Domain Crossings”