ceng 241 digital design 1 lecture 7

19
CENG 241 Digital Design 1 Lecture 7 Amirali Baniasadi [email protected]

Upload: ike

Post on 06-Jan-2016

54 views

Category:

Documents


2 download

DESCRIPTION

CENG 241 Digital Design 1 Lecture 7. Amirali Baniasadi [email protected]. This Lecture. Chapter 5: Synchronous Sequential Logic. Sequential Circuits. There are two types of sequential circuits: Synchronous and Asynchronous. Synchronous Sequential Circuits. Synchronous Circuits: - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: CENG 241 Digital Design 1 Lecture 7

CENG 241Digital Design 1

Lecture 7

Amirali [email protected]

Page 2: CENG 241 Digital Design 1 Lecture 7

2

This Lecture

Chapter 5: Synchronous Sequential Logic

Page 3: CENG 241 Digital Design 1 Lecture 7

3

Sequential Circuits

There are two types of sequential circuits: Synchronous and Asynchronous

Page 4: CENG 241 Digital Design 1 Lecture 7

4

Synchronous Sequential Circuits

Synchronous Circuits:A system whose behavior can be defined from the knowledge of its signals at discrete instants of time Asynchronous Circuits:The output depends on the input signals at any instant of time and the order which inputs change

Page 5: CENG 241 Digital Design 1 Lecture 7

5

Flip-Flops

Sequential Circuits use flip-flops as storage elements

Flip-Flop is a binary storage device that saves one bit of information

The outputs can come from flip-flops or combinational logic

Flip-flop inputs come from combinational logic or clock generators

Page 6: CENG 241 Digital Design 1 Lecture 7

6

Latches

Different flip-flops are different based on the number of inputs and how the inputsaffect the binary state.

Basic types of flip-flops operate with signal levels and are called latches.

Example: SR latch

Page 7: CENG 241 Digital Design 1 Lecture 7

7

SR Latches with NAND gates

Page 8: CENG 241 Digital Design 1 Lecture 7

8

SR Latches with Control input

S and R are allowed to change the flip-flop only when C = 1.

If C=0, S and R can’t change output

Page 9: CENG 241 Digital Design 1 Lecture 7

9

D Latch

Want to get rid of the undesirable SR condition where both S and R are 1.

Also called a transparent latch

0

1

1

11

0

1

1

1

0

Page 10: CENG 241 Digital Design 1 Lecture 7

10

D Latch

Want to get rid of the undesirable SR condition where both S and R are 1.

Also called a transparent latch

1

1

1

10

1

0

0

1

1

Page 11: CENG 241 Digital Design 1 Lecture 7

11

Graphic symbols for Latches

Page 12: CENG 241 Digital Design 1 Lecture 7

12

FLIP-FLOPS

Many flip-flops are edge triggered: They respond to the input only during transition from 0 to 1 or from 1 to 0.

Page 13: CENG 241 Digital Design 1 Lecture 7

13

Edge-Triggered D Flip-Flop

The output can change only when clock goes from 1 to 0.

1

1

0

1Data blocked here while CLK =1

Page 14: CENG 241 Digital Design 1 Lecture 7

14

Edge-Triggered D Flip-Flop

The output can change only when clock goes from 1 to 0.

0

1

1

1Data passes here while CLK =0

1

Page 15: CENG 241 Digital Design 1 Lecture 7

15

Positive Edge-Triggered D Flip-Flop

How is this a positive edge triggered? Lets look at all possible scenarios:

a) CLK = 0, then S=R=1 which causes the output to stay unchanged.

0

1

1

Page 16: CENG 241 Digital Design 1 Lecture 7

16

Positive Edge-Triggered D Flip-Flop

What if CLK goes from 0 to 1? (Positive-edge)

a) D = 0, when CLK becomes 1, R changes to 0. Flip-Flop goes to reset state. Q=0.If D changes while CLK = 1, R remains 0. Q does not change.

1

0 1

1

1

1

1

S used to be 1 when CLK was 0

10

0 Since one input is 0 changes in D can’t change Q

Page 17: CENG 241 Digital Design 1 Lecture 7

17

Positive Edge-Triggered D Flip-Flop

What if CLK goes from 0 to 1? (Positive-edge)

b) D = 1, when CLK becomes 1, S changes to 0. Flip-Flop goes to set state. Q=1.If D changes while CLK = 1, R remains 0. Q does not change.

1

1 0

0

0

1

11

1

1

S and R used to be 1 when CLK was 0

1

11 0

0

Since one input is 0 changes in D can’t change Q

Page 18: CENG 241 Digital Design 1 Lecture 7

18

Graphic Symbols

Page 19: CENG 241 Digital Design 1 Lecture 7

19

Summary

Latches, Flip-Flops: SR, D Edge-triggered flip-flops