How To Solve Setup and Hold Violation.. continue...
STA & SI:: Chapter 2: Static Timing Analysis | |||||
2.1 | 2.2 | 2.3a | 2.3b | 2.3c | 2.4a |
Timing Paths | Time Borrowing | Basic Concept Of Setup-Hold | Basic Concept of Setup-Hold Violation | Examples:S-H Time/Violation | Timing Path Delay |
2.4b | 2.4c | 2.5a | 2.5b | 2.6a | 2.6b |
Interconnect Delay Models | Delay - Wire Load Model | Maximum Clock Frequency | Calculate “Max Clock Freq”-Examples | Fix Setup-Hold Violation-1 | Fix Setup-Hold Violation-2 |
2.6c | 2.7a | 2.7b | 2.7c | 2.8 | |
Fix Setup-Hold Violation-3 | Incr/Decr Delay Method-1 | Incr/Decr Delay Method-2 | Incr/Decr Delay Method-3 | 10 ways to fix Setup-Hold Violation. |
Static Timing analysis is divided into several parts:
- Part1 -> Timing Paths
- Part2 -> Time Borrowing
- Part 3a -> Basic Concept Of Setup and Hold
- Part 3b -> Basic Concept of Setup and Hold Violation
- Part 3c -> Practical Examples for Setup and Hold Time / Violation
- Part 4a -> Delay - Timing Path Delay
- Part 4b -> Delay - Interconnect Delay Models
- Part 4c -> Delay - Wire Load Model
- Part 5a -> Maximum Clock Frequency
- Part 5b -> Examples to calculate the “Maximum Clock Frequency” for different circuits.
- Part 6a -> How to solve Setup and Hold Violation (basic example)
- Part 6b -> Continue of How to solve Setup and Hold Violation (Advance examples)
- Part 6c -> Continue of How to solve Setup and Hold Violation (more advance examples)
- Part 7a -> Methods for Increase/Decrease the Delay of Circuit (Effect of Wire Length On the Slew)
- Part 7b -> Methods for Increase/Decrease the Delay of Circuit (Effect of Size of the Transistor On the Slew)
- Part 7c -> Methods for Increase/Decrease the Delay of Circuit (Effect of Threshold voltage On the Slew)
- Part 8 -> 10 ways to fix Setup and Hold Violation.
In the last part/post we have discussed 2 examples with different specifications (Both net delay and Tck2Q were ideal means 0ns) and come to know that for Violation free Circuit, following conditions should be satisfied.
Min delay of Combinational path > Hold time of Capture FF.
Max delay of Combinational path < Clock Period - Setup time of Capture FF.
Clock Period >= Setup time + Hold time.
In this post we will discuss few more examples with more restrictions. Like
- What if we can’t reduce the Delay of Data path?
Let’s consider the following figure common to all examples until unless it’s specified
Example 3:
Specification of the FF Circuit | |||||
Setup | Hold | Clock period | Tck2q delay | Net Delay | Combinational Logic Delay |
3ns | 2ns | 10ns | 0ns (Ideal) | 0ns (Ideal) | 5ns (can’t be further reduced). |
On the basic of last post …let’s start with checking few conditions directly.
Clock Period Condition: (Satisfied)
Setup time +Hold time = 5ns
Clock period = 10ns
Clock Period > Setup time +Hold time (10> 5)
Min delay / Hold Condition: (Satisfied)
Combinational Delay (5ns) > Hold time.
Means - NO HOLD VIOLATION
Max Delay / Setup Condition: (Satisfied)
Combinational delay (5ns) < Clock period (10ns) – Setup (3ns)
Means - NO SETUP VIOLATION.
Example 4:
Specification of the FF Circuit | |||||
Setup | Hold | Clock period | Tck2q delay | Net Delay | Combinational Logic Delay |
4ns | 3ns | 10ns | 0ns (Ideal) | 0ns (Ideal) | 8ns (can’t be further reduced). |
Clock Period Condition: (Satisfied)
Setup time +Hold time = 4ns+3ns = 7ns
Clock period = 10ns
Clock Period > Setup time + Hold time (10 > 7)
Min delay / Hold Condition: (Satisfied)
Combinational Delay (8ns) > Hold time (3ns)
Means - NO HOLD VIOLATION
Max Delay / Setup Condition: (Not Satisfied)
Combinational delay (8ns) Is Not Less Than “Clock period (10ns) – Setup (4ns)”
Means - SETUP VIOLATION.
Flow of the data from FF1 to FF2:
- Let’s assume that you have added one buffer of T_capture delay in the clock path between the FF1 and FF2.
- Data is going to launch from FF1 at Clock Edge at 0ns and it will reach to FF2 after 8ns (combinational logic delay only).
- This data is going to capture at FF2 at Clock Edge at 10ns+T_capture. (because of Delay added by Buffer).
- As per the Setup definition, data should be stable 4ns (Setup time of FF2) before the Clock Edge at FF2 and in the above case clock edge is at t=T_capture+10ns.
So, for No Setup violation:
=> 8ns (Combinational Delay) < T_capture+10ns (clock period) – 4ns (Setup Time of FF2)
=> 12ns – 10ns < T_capture
=> T_capture > 2ns.
Let’s assume if my T_capture = 3ns. Then NO SETUP VIOLATION.
Now, recheck the Hold violation.
- At the FF1 – second set of data is going to launch at t=10ns and it will reach the FF2 in another 8ns, means at t=18ns.
- This second set of data is going to update/override the first set of data present at FF2.
- As per the Hold Definition, data should be stable till 3ns (Hold time of FF2) after the clock edge at FF2 (Which is at t=10ns+3ns=13ns – where 3ns is the T_capture).
- That means Data should be remain stable till t=13ns+3ns=16ns.
- In the above case the second set of data is going to override only after t=18ns. That means first set of data remain Stable till 16ns. Means NO HOLD VIOLATION.
Let me Generalize this concept:
Specification of the FF Circuit | |
Setup | T_setup |
Hold | T_hold |
Clock Period | Clk_period |
Tck2q Delay | 0 (Ideal) |
Net Delay | 0 (Ideal) |
Combinational Logic Delay (b/w 2FFs) | Td |
Launch Clock path Delay | T_launch |
Capture Clock path Delay | T_capture |
Let’s understand the data flow from FF1 to FF2
- Data is going to launch from FF1 at Clock Edge at T_launch and it will reach to FF2 after Td (combinational logic delay only) that means t= “Td + T_launch”.
- This data is going to capture at FF2 at Clock Edge at “Clk_period + T_capture”
- As per the Setup definition, data should be stable “T_setup” (Setup time of FF2) time before the Clock Edge at FF2
- Means data should reach at FF2 before t= “Clk_period + T_capture – T_setup”.
So For NO SETUP VIOLATION:
=> T_launch + Td < Clk_period + T_capture – T_setup
=> Td < Clk_Period + (T_capture - T_launch) – T_setup
- At the FF1 – second set of data is going to launch at t= “Clk_Period + T_launch” and it will reach the FF2 in another Td, means at t=” Clk_Period + Td + T_launch”.
- This second set of data is going to update/override the first set of data present at FF2.
- As per the Hold Definition, data should be stable till “T_hold” (Hold time of FF2) time after the Clock edge (which is at t= “Clk_Period + T_capture”).
- Means Next set of data should not reach FF2 before t= “Clk_Period + T_capture + T_hold”
So For NO HOLD VIOLATION:
=> Clk_Period + Td + T_launch > Clk_Period + T_capture + T_hold
=> Td > (T_capture - T_launch ) + T_hold
Summary of this post:
Clock Period Condition:
Clock period > Setup time + Hold Time
Max Delay/ Setup Condition:
Td < Clk_Period + (T_capture - T_launch) – T_setup
Min Delay / Hold Condition:
Td > (T_capture - T_launch ) + T_hold
In the next part we will discuss
- More examples which will explain the above conditions in more details.
- How to fix the Setup and hold violation, if we can neither decrease nor increase the Delay in the Data path?
Awesome :) crystal clear..
ReplyDeleteThanks alot for all of your posts...eagerly waiting for your next post...:) Also read your posts on design constraints...simply great!!!.....waiting for your next post in that series as well.......being greedy...:)
ReplyDeletethanks for appreciation. I would request you to drop a mail on our mail id Or Like Facebook page - so that you can get regular updates from us.
DeleteJust Awesome like previous :)
ReplyDeleteThank you for the article. Helping me in my transition into VLSI from college. Hare Krishna ! ( Thanks to the creator who has given you such abilities )
ReplyDeleteThanks Sir.
ReplyDeleteWhole blog about STA was so helpul
Excellently explained! Thank you so much
ReplyDeletechokran sir
ReplyDeletevery helpful
ReplyDeletegreat work sir.But what happens if there is a cascaded structure of flops ?? single buffer insertion may delay the other flops in getting its input ??
ReplyDeleteHi abubacker,
DeleteAnalyse the circuit and if the delay isn't required to be passed on to the next flop stage then introduce the delay(insert_buffer) just before the required flop's clk pin i,e make sure the path is not common or shared to any other line. Hope this clears your doubt.
How do you constrain a clock enable signal against the edge of the clock?
ReplyDeleteClock enable pulses used in multy-cycle path have routing delays, so they have alsotiming specifications.
Excellent!!
ReplyDelete