Timing Considerations
Explains setup and hold time constraints for flip-flops in digital circuits, including clock skew effects.
What this file does
Explains setup and hold time constraints for flip-flops in digital circuits, including clock skew effects.
When to use it
- Designing synchronous digital systems with flip-flops
- Verifying timing margins in combinational logic paths
- Teaching or learning digital timing fundamentals
- Analyzing clock distribution and skew impact
Timing Considerations
Introduction
When considering the timing of a digital system, we need to consider the following:
- The delay of combinational logic
- The delay of flip-flops
The delay of combinational logic
-
We distinguish two delays in combinational logic:
- The propagation delay
- The contamination delay
-
The contamination delay is the time that it takes for the output value to be contaminated by the input value.
- How long the output of a gate takes to change after the input changes.
-
The propagation delay is the time that it takes for the output value to be stable after the input value has been stable.
- How long the output of a gate will take to reach its final value after the input has been stable.
-
Image of the propagation and contamination delay of a gate
t1- the input starts to changet1'- the output starts to change- contamination delay =
t1' - t1 t2- the input reaches its final valuet2'- the output reaches its final value- propagation delay =
t2' - t2
The delay of flip-flops
-
D flip-flops sample the input at the active edge of the clock signal
- Updates the output with the input value at the active edge of the clock signal
-
For the sampling to be successful:
- The data must reach its final value before the clock reaches the 50% point of the clock signal -> setup time
- The data must remain stable until the clock signal has passed the 50% point -> hold time
-
If the input obeys setup and hold time, the following happens:
- The old value remains stable on input for contamination delay of the flip-flop
t_ccq(ccq - contamination clock to Q) - The output of the flip-flop is updated after the propagation delay of the flip-flop
t_dcq(dcq - delay clock to Q)
- The old value remains stable on input for contamination delay of the flip-flop
Setup and Hold Time Constraints
- Setup and hold time constraints are used to ensure that the input data is stable when the clock signal arrives.
Setup time constraint:
t_clk >= t_setup + t_dcq + t_Dmax- where
t_setupis the setup time of the flip-flop,t_dcqis the propagation delay of the flip-flop, andt_Dmaxis the maximum delay of the combinational logic. t_clkdetermines the minimal cycle (maximal frequency) of the system.- If the setup time constraint is not met, the output of the flip-flop will be unpredictable.
Hold time constraint:
t_hold <= t_ccq + t_Dmin- where
t_ccqis the contamination delay of the flip-flop, andt_Dminis the minimum contamination delay of the combinational logic. - Ensures that no signal is contaminated before the hold time expires.
Example:
-
Determine the hold and setup time constraints for the system below:
- Combinational block MAX has a larger delay than the MIN block.
-
Solution:
-
The setup time constraint is determined by the MAX block:
t_clk >= t_setup + t_dcq + t_Dmax
-
The hold time constraint is determined by the MIN block:
t_hold >= t_ccq + t_Dmin
-
Clock skew
- In previous examples, we assumed that the clock signal arrives at the same time at all flip-flops.
- In reality, the clock signal will arrive at different times at different flip-flops.
- The difference in arrival time is called clock skew.
- Spatial variation in the arrival time of the clock signal
- Effects of clock skew:
t_clk >= t_setup + t_dcq + t_Dmax + t_skewt_hold <= t_ccq + t_Dmin - t_skew
What's inside
4 sections covering combinational delays, flip-flop delays, setup/hold constraints, and clock skew with 3 diagrams.
Change this for your project
- Replace image paths like
./img/13/01.pngwith your own diagrams - Replace example block labels
MAXandMINwith your own logic blocks
Where it goes
Keep it in your repository where the agent or team that needs it will read it.
Worth borrowing
- Formal constraint equations for setup and hold time are reusable for any flip-flop-based design
- Clock skew adjustment formulas can be applied directly to timing analysis
Related Documents
DunApp PWA - Project Constraints
Defines 14 hard constraints for a Hungarian PWA project, banning Netlify deployment and enforcing local-only testing, Supabase backend, and zero-cost development.
Constraints
Defines a three-tier priority system for design decisions, with conflict resolution examples to guide trade-offs.
Version Constraints Guide
Teaches Composer version constraint syntax for WordPress plugins and themes using a custom shell script wrapper.
Specifying version constraints
Explains how to pin Terraform CLI, provider, and Ansible versions for IBM Cloud Schematics workspaces and actions.