Showing posts with label Setup slack calculation. Show all posts
Showing posts with label Setup slack calculation. Show all posts

STA problem: Finding setup and hold slack considering ideal clock

Problem: Figure 1 below shows a timing path from a positive edge-triggered flip-flop to a positive edge-triggered flip-flop. Considering ideal clocks, and clock frequency of 100 MHz, find the setup and hold slacks for this timing path.

Solution:
Figure 1: Timing path


Ideally, all the flip-flops in design should get clock at the same time. So, ideal clock means that launch as well as capture flip-flops get clock at zero time. In other words, we can assume that clock skew is zero between start and end points.

As the clock frequency is given as a 100 MHz, time period = 1/frequency = 10 ns.

Let us first calculate the setup slack. The setup timing equation is given as:
Tck->q + Tprop + Tsetup - Tskew < Tperiod
And equation for setup slack is given as:
SS = Tperiod - (Tck->q + Tprop + Tsetup - Tskew)  
Here,
Tck->q = 2ns, Tprop (max value of delay of combinational logic) = 4 ns+ Tsetup = 1 ns,   Tperiod = 10 ns
 Putting these values into equation for setup slack, we get setup slack for this timing path.

SS = 10 - (2 + 4 + 1 - 0) ns
SS = 3 ns

Now, hold slack can be found out from the hold timing equation. The hold timing equation is given as:
Tck->q  + Tprop > Thold + Tskew
Here,
Tck->q  =  2 ns, Tprop (min value of combinational propagation delay) = 4 ns, Thold = 1 ns
 And the equation for hold slack is given as:

HS = Tck->q  + Tprop  - (Thold + Tskew
HS = 2 + 4 - (1 + 0) = 5 ns 
So, for this timing path, setup slack value is 3 ns and hold slack value is 5 ns.