Introduction to Digital Logic Missouri S&T University CPE 2210 Flip-Flops

Similar documents
Engr354: Digital Logic Circuits

CSE140: Components and Design Techniques for Digital Systems. More D-Flip-Flops. Tajana Simunic Rosing. Sources: TSR, Katz, Boriello & Vahid

ELCT201: DIGITAL LOGIC DESIGN

Sequential Logic. E&CE 223 Digital Circuits and Systems (A. Kennings) Page 1

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Introduction to Sequential Circuits

ELCT201: DIGITAL LOGIC DESIGN

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

ECE 545 Digital System Design with VHDL Lecture 2. Digital Logic Refresher Part B Sequential Logic Building Blocks

Logic Design. Flip Flops, Registers and Counters

Flip-Flops and Sequential Circuit Design

ECE 545 Digital System Design with VHDL Lecture 1B. Digital Logic Refresher Part B Sequential Logic Building Blocks

Chapter 11 Latches and Flip-Flops

Sequentielle Schaltelemente

ECE 545 Digital System Design with VHDL Lecture 1. Digital Logic Refresher Part B Sequential Logic Building Blocks

Chapter. Synchronous Sequential Circuits

Unit 11. Latches and Flip-Flops

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

NAME SYMBOL CHARACTERISTIC TABLE EXCITATION TABLE. S R Q(next) 0 0 Q. (hold) (reset) (set) 1 1? (undefined) J K Q(next) (hold) (reset) (set) 1 1 Q'

ECE 341. Lecture # 2

6. Sequential Logic Flip-Flops

LATCHES & FLIP-FLOP. Chapter 7

Experiment 8 Introduction to Latches and Flip-Flops and registers

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Lecture 8: Sequential Logic

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

Other Flip-Flops. Lecture 27 1

Rangkaian Sekuensial. Flip-flop

CMSC 313 Preview Slides

Flip-Flops. Because of this the state of the latch may keep changing in circuits with feedback as long as the clock pulse remains active.

DEPARTMENT OF ELECTRICAL &ELECTRONICS ENGINEERING DIGITAL DESIGN

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

EET2411 DIGITAL ELECTRONICS

COE 202: Digital Logic Design Sequential Circuits Part 1. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 2 Logistics

Combinational vs Sequential

Digital Circuits ECS 371

CS 261 Fall Mike Lam, Professor. Sequential Circuits

RS flip-flop using NOR gate

CprE 281: Digital Logic

CprE 281: Digital Logic

Clocks. Sequential Logic. A clock is a free-running signal with a cycle time.

Sequential Design Basics

Registers & Counters. Logic and Digital System Design - CS 303 Erkay Savaş Sabanci University

Chapter 5 Sequential Systems. Introduction

Sequential circuits. Same input can produce different output. Logic circuit. William Sandqvist

Flip-flop and Registers

Switching Circuits & Logic Design

Unit 9 Latches and Flip-Flops. Dept. of Electrical and Computer Eng., NCTU 1

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Latches, Flip-Flops, and Registers. Dr. Ouiem Bchir

INTRODUCTION TO SEQUENTIAL CIRCUITS

cascading flip-flops for proper operation clock skew Hardware description languages and sequential logic

Spring 2017 EE 3613: Computer Organization Chapter 5: The Processor: Datapath & Control - 1

CprE 281: Digital Logic

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

Last time, we saw how latches can be used as memory in a circuit

Sequential Circuits: Latches & Flip-Flops

Lec 24 Sequential Logic Revisited Sequential Circuit Design and Timing

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

Introduction to Digital Logic Missouri S&T University CPE 2210 Introduction and Application Areas

Chapter 5 Synchronous Sequential Logic

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

CHAPTER 1 LATCHES & FLIP-FLOPS

Switching Circuits & Logic Design

Digital Fundamentals

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

Sequential Logic Circuits

RS flip-flop using NOR gate

Digital Fundamentals: A Systems Approach

ELE2120 Digital Circuits and Systems. Tutorial Note 7

ECEN454 Digital Integrated Circuit Design. Sequential Circuits. Sequencing. Output depends on current inputs

12/31/2010. Overview. 12-Latches and Flip Flops Text: Unit 11. Sequential Circuits. Sequential Circuits. Feedback. Feedback

Digital Logic Design I

Introduction to Microprocessor & Digital Logic

Synchronous Sequential Logic

EKT 121/4 ELEKTRONIK DIGIT 1

Introduction to Digital Logic Missouri S&T University CPE 2210 Exam 3 Logistics

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

Universal Asynchronous Receiver- Transmitter (UART)

Logic Design ( Part 3) Sequential Logic- Finite State Machines (Chapter 3)

MC9211 Computer Organization

Asynchronous (Ripple) Counters

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Flip-Flops and Registers

D Latch (Transparent Latch)

CSE115: Digital Design Lecture 23: Latches & Flip-Flops

Chapter 8 Sequential Circuits

CHAPTER1: Digital Logic Circuits

Topic D-type Flip-flops. Draw a timing diagram to illustrate the significance of edge

Sequential Circuit Design: Part 1

Fundamentals of Computer Systems

ECE 25 Introduction to Digital Design. Chapter 5 Sequential Circuits ( ) Part 1 Storage Elements and Sequential Circuit Analysis

Chapter 4. Logic Design

COSC 243. Sequential Logic. COSC 243 (Computer Architecture) Lecture 5 - Sequential Logic 1

MUX AND FLIPFLOPS/LATCHES

Sequential Circuits. Output depends only and immediately on the inputs Have no memory (dependence on past values of the inputs)

CHAPTER 11 LATCHES AND FLIP-FLOPS

Transcription:

Introduction to igital Logic Missouri S&T University CPE 2210 Flip-Flops Egemen K. Çetinkaya Egemen K. Çetinkaya epartment of Electrical & Computer Engineering Missouri University of Science and Technology cetinkayae@mst.edu http://web.mst.edu/~cetinkayae/teaching/cpe2210spring2018 7 March 2018 rev. 18.0 2014 2018 Egemen K. Çetinkaya

Introduction Flip-flops and types Summary Flip-Flops Outline 2

igital Logic Circuit Types What are the type of digital circuits? 3

igital Logic Circuit Types What are the type of digital circuits? Combinatorial output solely depends on present values of input(s) no memory basic blocks of circuits e.g.: lamp with light sensor Sequential output depends on present and past values of input(s) output depends on present state e.g.: calculator 4

Sequential Logic Circuits Examples Egemen K. Çetinkaya What are examples of sequential circuit elements? 5

Sequential Logic Circuits Examples Examples of sequential logic elements: Latches Flip-flops Registers Controllers Counters 6

Basic SR Latch Using NOR Gates We can change state of simple memory using latch NOR gates are connected cross-coupled style S (set) SR latch S R t ( ) 0 0 1/0 0/1 no change R (reset) 0 1 1 0 1 0 0 1 1 1 0 0 7

Level-Sensitive SR Latch Circuit and Symbol SR latch with enable input is a level-sensitive SR latch C is the enable input S C R Level-sensitive SR latch S1 R1 C S R (t+1) 0 x x no change 1 0 0 no change 1 0 1 0 1 1 0 1 1 1 1 x S C R Level-sensitive SR latch symbol 8

Level-Sensitive Latch Circuit and Symbol SR latch with enable input and inverter is a latch C is the enable input S S1 latch C (t+1) C 0 x no change 1 0 0 C R R1 1 1 1 latch symbol 9

Review uestion Overview Can we do latch functions using NAN gates? instead of NOR gates 10

Review uestion Overview 11

Review uestion Overview 12

Latch Problem elay When C is 1, how many latches will the signal travel? Y 1 1? 1? 1? 1 1 2 2 3 3 4 4 C1 C2 C3 C4 Clk 13

Latch Problem elay When C is 1, how many latches will the signal travel? epends on clk signal: Clk_A: signal may travel through multiple latches Clk_B: signal may travel through fewer latches Y 1 1? 1? 1? 1 1 2 2 3 3 4 4 C1 C2 C3 C4 Clk Clk_A Clk_B 14

1 S1 Latch Problem elay latch 0 >1 0 >1 2 0 >1 S2 0 >1 latch C1 C2 3 3 4 4 Clk Clk 1 1/2 S2 R2 2 R1 1 0 >1 Long clock 2nd latch set 1 >0 15 Clk 1 1/2 S2 R2 2 R2 1 >0 2 0 >1 Short clock C3 1 doesn't change C4

Latch Problem elay Issue: how to adjust clock cycle for right timing? Can we design bit storage that only stores a value on the rising edge of the clock signal? 16

Latch Problem elay Issue: how to adjust clock cycle for right timing? Can we design bit storage that only stores a value on the rising edge of the clock signal? rising edges Clk Level-sensitive vs. edge-triggered: level-sensitive: sensitive to signal level edge-triggered: sensitive to rise/fall of the signal 17

Edge-Triggered Flip-Flop Master-Servant esign Flip-flop: stores 1 bit on clock edge flip-flop uses two latches Master-servant is one design, there are others flip-flop latch m m s latch s Cm Cs s master servant Clk 18

Clk=0 Edge-Triggered Flip-Flop Timing iagram Egemen K. Çetinkaya master enabled, loads, appears at m, servant disabled Clk=1 Clk master disabled, m stays same servant latch enabled, loads m, appears at s latch m Cm m master s Cs flip-flop latch s servant s 19 Clk /m Cm m/s Cs s

Edge-Triggered Flip-Flop Symbols Egemen K. Çetinkaya Symbol for rising-edge triggered flip-flop rising edges Clk Symbol for falling-edge triggered flip-flop Clk falling edges 20

Edge-Triggered Flip-Flop Timing iagram Egemen K. Çetinkaya Solves problem of not knowing through how many latches a signal travels when C=1 How many flip-flops does signal travel in each cycle Y 1 1 2 2 3 3 4 4 Two latches inside each flip-flop Clk Clk_A Clk_B 21

Edge-Triggered Flip-Flop Timing iagram Solves problem of not knowing through how many latches a signal travels when C=1 How many flip-flops does signal travel in each cycle? Signal travels exactly one flip-flop per cycle Y 1 1 2 2 3 3 4 4 Two latches inside each flip-flop Clk Clk_A Clk_B 22

Latch vs. Flip-Flop Comparison Latch is level-sensitive, stores when C=1 Flip-flop is edge triggered, stores when C 0 1 Clk 1 2 3 ( latch) 4 7 5 ( flip-flop) 9 10 6 8 Latch follows while Clk is 1 Flip-flop only loads during Clk rising edge 23

Review uestion Overview Construct the timing diagram for the following a Clock Clk a Clock b a b b c c c 24

Review uestion Overview Construct the timing diagram for the following a Clock Clk a Clock b a b b c c c 25

Similar to SR latch SR Flip-Flop Overview However, instead of changing state with level change It changes state with edge rise/fall 26

SR Flip-Flop Symbol and Characteristic Table SR flip-flop: Similar to SR latch, edge-triggered Egemen K. Çetinkaya S R S R (t+1) 0 0 no change (t) 0 1 0 1 0 1 1 1 X 27

T flip-flop: toggle flip-flop T Flip-Flop Overview The output toggles on the rising edge of clock The circuit diagram: T Clock 28

T Flip-Flop Symbol and Characteristic Table T flip-flop: toggle flip-flop The output toggles on the rising edge of clock T T (t+1) 0 (t) 1 (t) 29

T flip-flop: toggle flip-flop T Flip-Flop Timing iagram The output toggles on the rising edge of clock T T (t+1) 0 (t) 1 (t) Clock T 30

T flip-flop: toggle flip-flop T Flip-Flop Timing iagram The output toggles on the rising edge of clock T T (t+1) 0 (t) 1 (t) Clock T 31

JK Flip-Flop Overview JK flip-flop: combines features of SR and T flip-flops Instead of T only, we use J and K inputs = J +K The circuit: J K Clock 32

JK Flip-Flop Symbol and Characteristic Table JK flip-flop: toggle flip-flop Egemen K. Çetinkaya J K J K (t+1) 0 0 no change (t) 0 1 0 1 0 1 1 1 toggle (t) 33

Flip-Flops Clear and Preset It might be needed to have clear and preset button If clear is 0, is forced to be in 0 e.g. clear counter to be initial state to be 0 If preset is 0, is forced to be in 1 e.g. insert specific value as initial value of a counter Preset Clear 34

Clock Signals Overview Clock input is connected to clock signal It is from an oscillator signal Generates pulsing signal What is the period? What is the frequency? How many cycles are there? Osc. Clk 1 Clk 0 Time: 0 ns 10 ns 20 ns 30 ns 40 ns 50 ns 60 ns 0 1 0 1 0 1 0 35

Clock Signals Overview Clock input is connected to clock signal It is from an oscillator signal Generates pulsing signal What is the period? 20 ns What is the frequency? 1/20 ns=50 MHz How many cycles are there? 3.5 Osc. Clk 1 Clk 0 Time: 0 ns 10 ns 20 ns 30 ns 40 ns 50 ns 60 ns 0 1 0 1 0 1 0 36

Clock Signals Overview Clock input is connected to clock signal It is from an oscillator signal Generates pulsing signal T=1/f Synchronous circuit: storage elements change with clock Asynchronous circuit: storage elements that does not use clock 37

Storing Multiple Bits Registers Register: multiple flip-flops sharing common clock More about registers later I3 I2 I1 I0 clk 4-bit register I3 I2 I1 I0 reg(4) 3 2 1 0 3 2 1 0 38

Flip-flops store one bit Flip-Flops Summary Latches are level-sensitive Flip-flops are edge-triggered Signal travels one cycle per flip-flop -flip-flops are most commonly used Flip-flop types: SR, JK,, T Two types of flip-flops: edge-triggered: active edge of the clock impacts the state master-slave: with two gated latches 39

References and Further Reading [V2011] Frank Vahid, igital esign with RTL esign, VHL, and Verilog, 2nd edition, Wiley, 2011. [BV2009] Stephen Brown and Zvonko Vranesic, Fundamentals of igital Logic with VHL esign, 3rd edition, McGraw-Hill, 2009. [S2017] John Seiffertt, igital Logic for Computing, 1st edition, Springer, 2017. 40

End of Foils 41