1 COMP541 Sequential Logic Timing Montek Singh Sep 30, 2015
Topics Timing analysis flip-flops flip-flops sequential systems sequential systems clock skew clock skew 2
Input Timing Constraints Setup time: t setup = time before the clock edge that data must be stable (i.e. not changing) Hold time: t hold = time after the clock edge that data must be stable Aperture time: t a = time around clock edge that data must be stable (t a = t setup + t hold ) 3
Output Timing Constraints Propagation delay: t pcq = max time after clock edge by which output Q is guaranteed to have stabilized (i.e., not changing anymore) Contamination delay: t ccq = min time after clock edge during which Q will not have started changing yet 4
Dynamic Discipline The input to a synchronous sequential circuit must be stable during the aperture (setup and hold) time around the clock edge Specifically, the input must be stable at least t setup before the clock edge at least t setup before the clock edge at least until t hold after the clock edge at least until t hold after the clock edge 5
Implications on Design Constrains operation Given a clock period, constrains circuit delays Given a clock period, constrains circuit delays Given a circuit, constraints clock period Given a circuit, constraints clock period The delay between registers (which impacts clock period) has a minimum and maximum delay, dependent on the delays of the circuit elements Delays of both comb. logic and flip-flops must be taken into account Delays of both comb. logic and flip-flops must be taken into account 6
Setup Time Constraint Setup time input to R2 must be stable at least t setup before the clock edge input to R2 must be stable at least t setup before the clock edge constrains max delay from R1 through combinational logic constrains max delay from R1 through combinational logic What’s min clock period? What’s min period, T c ? T c ≥ t pcq + t pd + t setup t pd ≤ T c – (t pcq + t setup ) So, clock period constrained by: Delay in CL Delay in previous reg (R1) Setup requirement in next reg (R2) 7
Hold Time Constraint Hold time input to R2 must be stable for at least t hold after clock edge input to R2 must be stable for at least t hold after clock edge constrains the minimum delay from register R1 through the combinational logic constrains the minimum delay from register R1 through the combinational logic often try to design circuits with 0 hold time requirement often try to design circuits with 0 hold time requirement t ccq + t cd ≥ t hold t cd ≥ t hold - t ccq If there is no combinational logic between flipflops: t hold ≤ t ccq 8
Timing Analysis Timing Characteristics t ccq = 30 ps (FF contamination) t pcq = 50 ps (FF propagation) t setup = 60 ps t hold = 70 ps t pd = 35 ps t cd = 25 ps t pd = t cd = Setup time constraint: T c ≥ f c = Hold time constraint: t ccq + t cd > t hold ? t pd = 3 x 35 ps = 105 ps t cd = 25 ps Setup time constraint: T c ≥ ( ) ps = 215 ps f c = 1/T c = 4.65 GHz ( ) ps > 70 ps ? No! 9
Fixing Hold Time Violation Timing Characteristics t ccq = 30 ps t pcq = 50 ps t setup = 60 ps t hold = 70 ps t pd = 35 ps t cd = 25 ps t pd = 3 x 35 ps = 105 ps t cd = 2 x 25 ps = 50 ps Setup time constraint: T c ≥ ( ) ps = 215 ps f c = 1/T c = 4.65 GHz Hold time constraint: t ccq + t pd > t hold ? ( ) ps > 70 ps ? Yes! Add buffers to the short paths: 10
Hold Time Often flip-flops are designed for a hold time of zero To avoid these tricky problems To avoid these tricky problems 11
Clock Skew Clock doesn’t arrive at all registers at the same time Skew is the difference between the arrival times of the clock edge at two different (typically neighboring) flip-flops Skew is the difference between the arrival times of the clock edge at two different (typically neighboring) flip-flops Examine the worst case: guarantee that discipline is not violated for any register pair guarantee that discipline is not violated for any register pair many registers in a system! many registers in a system! 12
Setup Time Constraint with Clock Skew Worst case: CLK2 is earlier than CLK1 T c ≥ t pcq + t pd + t setup + t skew t pd ≤ T c – (t pcq + t setup + t skew ) 13
Hold Time Constraint with Clock Skew Worst case: CLK1 is earlier than CLK2 t ccq + t cd ≥ t hold + t skew t cd ≥ t hold - t ccq + t skew If there is no combinational logic between flipflops: t hold + t skew ≤ t ccq Even if hold time is 0, only a very small skew is tolerated: t skew ≤ t ccq 14
Next Time Read Section Next: VGA Monitors Then we’ll move on to memories Section 5.5 Section