The setup check is performed only on the most pessimistic setup relationship between two clocks. By default, this corresponds to the smallest positive delta between the launch and capture edges. For example, consider a path between two flip-flops that are sensitive to the rising edge of their respective clock. The launch and capture edges of this path are the clock rising edges only.
The clocks are defined as follows:
clk0has a period of 6 ns with first rising @ 0 ns and falling edge @ 3 ns.
clk1has a period of 4 ns with first rising @ 0 ns and falling edge @ 2 ns.
As the following figure shows, there are two unique setup relationships: Setup(1) and Setup(2).
The smallest positive delta from
clk1 is 2 ;ns, which corresponds to Setup(2). The Common Period is 12 ;ns, which corresponds to the time between two simultaneous alignments of the two clocks.
Once the path requirement is known, the path delays, the clocks uncertainty and the setup time are introduced to compute the slack. The typical slack equation is:
|Data Required Time (setup)||=||
capture edge time
+ destination clock path delay
- clock uncertainty
- setup time
|Data Arrival Time (setup)||=||
launch edge time
+ source clock path delay
+ datapath delay
|Slack (setup)||=||Data Required Time - Data Arrival Time|
As the equation shows, a positive setup slack occurs when the data arrives before the required time.
The recovery check is similar to the setup check, except that it applies to asynchronous pins such as preset or clear. The relationships are established the same way as for setup, and the slack equation is the same except that the recovery time is used instead of the setup time.