Digital Logic Design: a rigorous approach c Chapter 17: Flip-Flops - - PowerPoint PPT Presentation

digital logic design a rigorous approach c
SMART_READER_LITE
LIVE PREVIEW

Digital Logic Design: a rigorous approach c Chapter 17: Flip-Flops - - PowerPoint PPT Presentation

Digital Logic Design: a rigorous approach c Chapter 17: Flip-Flops Guy Even Moti Medina School of Electrical Engineering Tel-Aviv Univ. January 4, 2016 Book Homepage: http://www.eng.tau.ac.il/~guy/Even-Medina 1 / 1 Preliminary


slide-1
SLIDE 1

Digital Logic Design: a rigorous approach c

  • Chapter 17: Flip-Flops

Guy Even Moti Medina

School of Electrical Engineering Tel-Aviv Univ.

January 4, 2016 Book Homepage: http://www.eng.tau.ac.il/~guy/Even-Medina

1 / 1

slide-2
SLIDE 2

Preliminary questions

1

How is time measured in a synchronous circuit?

2

What is a “clock” in a microprocessor?

3

What is the frequency of a clock?

4

How are bits stored?

5

What is the functionality of a flip-flop?

6

What is a stable state? How many stable states does a flip-flop have?

7

How does a flip-flop move from one stable state to another?

8

How fast is this transition?

2 / 1

slide-3
SLIDE 3

The clock

the clock is generated by rectifying and amplifying a signal generated by special non-digital devices (e.g., crystal oscillators). Definition A clock is a periodic logical signal that oscillates instantaneously between logical one and logical zero. There are two instantaneous transitions in every clock period: (i) in the beginning of the clock period, the clock transitions instantaneously from zero to one; and (ii) at some time in the interior of the clock period, the clock transitions instantaneously from one to zero.

logical level 1

pulse width

time clock fall clock rise clock period

3 / 1

slide-4
SLIDE 4

logical level 1 time (A) (B) (C) logical level 1 time logical level 1 time

Figure: (A) A symmetric clock (B) narrow pulses (C) wide pulses.

slide-5
SLIDE 5

Clock cycles

A clock partitions time into discrete intervals. ti - the starting time of the ith clock period. [ti, ti+1) -clock cycle i.

5 / 1

slide-6
SLIDE 6

Definition (edge-triggered flip-flop) Inputs: D(t) and a clock clk. Output: Q(t). Parameters: Four parameters are used to specify the functionality

  • f a flip-flop:

Setup-time denoted by tsu, Hold-time denoted by thold, Contamination-delay denoted by tcont, and Propagation-delay denoted by tpd. Terminology Require −tsu < thold < tcont < tpd. critical segment: Ci

= [ti − tsu, ti + thold] instability segment: Ai

= [ti + tcont, ti + tpd] Functionality: If D(t) is stable during the critical segment Ci, then Q(t) = D(ti) during the interval (ti + tpd, ti+1 + tcont).

slide-7
SLIDE 7

Critical and instability segments in a flip-flop

Ci clk Ai

Figure: The critical segment Ci = [ti − tsu, ti + thold] and instability segment Ai = [ti + tcont, ti + tpd] corresponding the clock period starting at ti.

7 / 1

slide-8
SLIDE 8

Timing diagram of a Flip Flop

The x-axis corresponds to time. A green interval means that the signal is stable during this interval. A red interval means that the signal may be instable.

Ci Ai Ci+1 Ai+1 tpd tcont tcont clk D(t) tsu thold Q(t)

x x y y

8 / 1

slide-9
SLIDE 9

Remarks about flip-flops

1

The assumption −tsu < thold < tcont < tpd implies that the critical segment Ci and the instability segment Ai are disjoint.

2

If D(t) is stable during the critical segment Ci, then the value

  • f D(t) during the critical segment Ci is well defined and

equals D(ti).

3

The flip-flop samples the input signal D(t) during the critical segment Ci. Sampling is successful only if D(t) is stable while it is sampled.

4

If the input D(t) is stable during the critical segments {Ci}i, then the output Q(t) is stable in between the instability segments {Ai}i.

5

The stability of the input D(t) during the critical segments depends on the clock period. We will later see that slowing down the clock (i.e., increasing the clock period) helps in achieving a stable signal D(t) during the critical segments.

9 / 1

slide-10
SLIDE 10

Flip-flop schematic

The special “arrow” that marks the clock input port.

Q clk ff D

10 / 1

slide-11
SLIDE 11

clk ff clk ff combinational circuit C D0(t) Q1(t) D1(t) Q0(t)

d(C)

Ci Ai Ci+1 Ai+1 clk D0(t) tsu thold D1(t) tpd tcont tpd tcont Q0(t) Q1(t)

slide-12
SLIDE 12

clk ff clk ff combinational circuit C D0(t) Q1(t) D1(t) Q0(t)

f(X) X X f(X)

clk D0(t) D1(t) Q0(t) Q1(t)

slide-13
SLIDE 13

Non-empty intersection of Ci and Ai

The timing analysis fails if Ci ∩ Ai = ∅. This could happen, if thold > tcont (in contradiction to the definition of a flip-flop).

13 / 1

slide-14
SLIDE 14

thold > tcont

clk ff clk ff combinational circuit C D0(t) Q1(t) D1(t) Q0(t)

  • d(C)

Ci Ci+1 Ci+1 Ci clk D0(t) tsu thold D1(t) Q0(t) Q1(t) Ai Ai+1 tcont tpd tcont tpd

14 / 1

slide-15
SLIDE 15

Bounding Instability

Flip-flops play a crucial role in bounding the segments of time during which signals may be instable. Informally, uncertainty increases as the segments of stability become shorter. Flip-flops help bounding instability.

15 / 1

slide-16
SLIDE 16

A chain of k inverters and a chain of k flip-flops

inv1

D1(t) D2(t) Q2(t)

inv2

D0(t) Q1(t)

inv0

Q0(t)

D1(t) D0(t) clk ff0 clk ff1 Q0(t) D1(t) clk ff2 Q2(t) Q1(t)

16 / 1

slide-17
SLIDE 17

timing: chain of inverters vs. chain of FFs

k · tpd(inv) tpd(inv) tpd(inv)

Q1(t) Qk−1(t) D0(t) Q0(t) tcont clk D0(t) tsu thold tpd tcont Q0(t) Q1(t) Qk−1(t) Ci Ai Ci+1 Ai+1 tpd tcont tpd tcont tcont tcont 17 / 1

slide-18
SLIDE 18

Clock enabled flip-flops

Definition A clock enabled flip-flop is defined as follows. Inputs: Digital signals D(t), ce(t) and a clock clk. Output: A digital signal Q(t). Functionality: If D(t) and ce(t) are stable during the critical segment Ci, then for every t ∈ (ti + tpd, ti+1 + tcont) Q(t) =

  • D(ti)

if ce(ti) = 1 Q(ti) if ce(ti) = 0. We refer to the input signal ce(t) as the clock-enable signal. Note that the input ce(t) indicates whether the flip-flop samples the input D(t) or maintains its previous value.

18 / 1

slide-19
SLIDE 19

Which design is a correct clock enabled FF?

clk ff mux

1

Q(t) D(t) ce(t)

(A)

ff Q(t)

(B)

D(t) clk ce(t)

and

19 / 1

slide-20
SLIDE 20

Summary

memory devices: flip-flops and the clock signal. The flip-flop samples the value of the input at the “end” of a clock cycle and outputs the sampled value during the “next” clock cycle. Flip-flops play a crucial role in bounding the segments of time during which signals may be instable. Flip-flops and combinational circuits have opposite roles.

Combinational circuits compute interesting Boolean functions but increase uncertainty. Flip-flops, on the other hand, output the same value that is fed as input but they provide certainty.

20 / 1