Chapter 5 Sequential Systems. Introduction

Similar documents
`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Engr354: Digital Logic Circuits

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

Chapter 3 Unit Combinational

Problems with D-Latch

Chapter 5 Synchronous Sequential Logic

Chapter 5 Sequential Circuits

Sequential Logic Circuits

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

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

Page 1. Some Definitions. Chapter 3: Sequential Logic. Sequential Logic. The Combinational Logic Unit. A NOR Gate with a Lumped Delay

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

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

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

Asynchronous (Ripple) Counters

Chapter 5 Sequential Circuits

Overview of Chapter 4

Experiment 8 Introduction to Latches and Flip-Flops and registers

Digital Logic Design I

CS8803: Advanced Digital Design for Embedded Hardware

CHAPTER 4: Logic Circuits

Sequential Circuits. Introduction to Digital Logic. Course Outline. Overview. Introduction to Digital Logic. Introduction to Sequential Circuits

Unit 11. Latches and Flip-Flops

Other Flip-Flops. Lecture 27 1

Logic Design. Flip Flops, Registers and Counters

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.

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

Combinational / Sequential Logic

Digital Circuit And Logic Design I. Lecture 8

Digital Circuit And Logic Design I

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

Flip-Flops and Sequential Circuit Design

Lecture 8: Sequential Logic

ECE 3401 Lecture 12. Sequential Circuits (II)

Sequential Circuits: Latches & Flip-Flops

Learning Outcomes. Unit 13. Sequential Logic BISTABLES, LATCHES, AND FLIP- FLOPS. I understand the difference between levelsensitive

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

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

Chapter 11 Latches and Flip-Flops

CHAPTER 4: Logic Circuits

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

ECE 3401 Lecture 11. Sequential Circuits

Chapter 9 Counters. Clock Edge Output Q 2 Q 1 Q

ECE 341. Lecture # 2

CMSC 313 Preview Slides

D Latch (Transparent Latch)

Digital Fundamentals: A Systems Approach

Lecture 11: Synchronous Sequential Logic

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

Sequential Logic Circuit

Chapter 6 Sequential Circuits

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

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

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

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

Chapter 5: Synchronous Sequential Logic

Synchronous Sequential Logic

2 Sequential Circuits

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.

Review of digital electronics. Storage units Sequential circuits Counters Shifters

CHAPTER1: Digital Logic Circuits

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

Figure 30.1a Timing diagram of the divide by 60 minutes/seconds counter

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

Fundamentals of Computer Systems

Agenda. EE 260: Introduction to Digital Design Counters and Registers. Asynchronous (Ripple) Counters. Asynchronous (Ripple) Counters

Sequential Circuits. Building Block: Flip-Flops

EET2411 DIGITAL ELECTRONICS

Chapter 5 Synchronous Sequential Logic

Introduction to Microprocessor & Digital Logic

ELCT201: DIGITAL LOGIC DESIGN

Logic Design II (17.342) Spring Lecture Outline

CS 261 Fall Mike Lam, Professor. Sequential Circuits

Chapter. Synchronous Sequential Circuits

We are here. Assembly Language. Processors Arithmetic Logic Units. Finite State Machines. Circuits Gates. Transistors

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Synchronous Sequential Logic. Chapter 5

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

CprE 281: Digital Logic

Momentary Changes in Outputs. State Machine Signaling. Oscillatory Behavior. Hazards/Glitches. Types of Hazards. Static Hazards

EECS 270 Midterm Exam Spring 2011

Synchronous Sequential Logic

TMEL53, DIGITALTEKNIK. INTRODUCTION TO SYNCHRONOUS CIRCUITS, FLIP-FLOPS and COUNTERS

Counter dan Register

COMP2611: Computer Organization. Introduction to Digital Logic

ELCT201: DIGITAL LOGIC DESIGN

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

The outputs are formed by a combinational logic function of the inputs to the circuit or the values stored in the flip-flops (or both).

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Digital Circuits ECS 371

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

Administrative issues. Sequential logic

Course Administration

Part 4: Introduction to Sequential Logic. Basic Sequential structure. Positive-edge-triggered D flip-flop. Flip-flops classified by inputs

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

CS8803: Advanced Digital Design for Embedded Hardware

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

Sequential Logic Counters and Registers

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Part II. Chapter2: Synchronous Sequential Logic

Transcription:

hapter 5 Seuential Systems Latches and Flip-flops Synchronous ounter synchronous ounter 7822 igital Logic esign @epartment of omputer Engineering U. Introduction Up to now everything has been combinational the output at any instant of time depends only on what inputs are at the time. Later on of this course: seuential systems systems that have memory. Thus, the output will depend not only on the present input but also on the past history what has happened earlier. 7822 igital Logic esign @epartment of omputer Engineering U. 2 lock Signals Two versions of a clock signal are as below. In the first, the clock signal is half of the time and half of the time. In the second, it is for a shorter part of the cycle. The period of the signal (T on the diagram) is the length of one cycle. The freuency is the inverse (/T). T 7822 igital Logic esign @epartment of omputer Engineering U. 3

Terminology State: what is stored in memory. State table: shows for each input combination and each state, what the output is and what the net state is what is to be stored in memory after the net clock. State diagram (or state graph): a graphical representation of the state table. (Finite) State Machine 7822 igital Logic esign @epartment of omputer Engineering U. 4 State Table and State iagram present state net state output * z input / / / / / / / / / State table State diagram 7822 igital Logic esign @epartment of omputer Engineering U. 5 The net state is a function of the present state and the input. The output also depends on the present state (and on the input). It may change on a clock transition, but it may change where the input changes, as well. In state diagram, there must be one path from each state for each possible input combination. 7822 igital Logic esign @epartment of omputer Engineering U. 6 2

Moore vs. Mealy Models Moore model circuit (state-based) the outputs depend on the present state of the system but not on the inputs. Mealy model circuit (input-based) the outputs depend on the inputs as well as the present state of the system. 7822 igital Logic esign @epartment of omputer Engineering U. 7 Moore: system with no input and three outputs, that represent a number from to 7, such that the outputs cycle through the seuence 3 2 4 5 7 and repeat on consecutive clock inputs. Mealy: system with two inputs, and 2, and three outputs, Z, Z 2 and Z 3, that represent a number from to 7, such that the output counts up if and down if and recycles if 2 and saturates if 2. Thus, the following output seuences might be seen: 7822 igital Logic esign @epartment of omputer Engineering U. 8 2 2 3 4 5 6 7 2 3 4 5 6 7.. 2 2 3 4 5 6 7 7 7 7 7 7.. 2 7 6 5 4 3 2 7 6 5 4 3 2.. 2 7 6 5 4 3 2.. 7822 igital Logic esign @epartment of omputer Engineering U. 9 3

esign Process of Seuential Systems Table 5. Page 338 State table Timing trace State table with binary states Truth table -map euations 7822 igital Logic esign @epartment of omputer Engineering U. esign Process of Seuential Systems * z State table Timing trace clk 2 3 4 5 6 7 8 9 2 z 7822 igital Logic esign @epartment of omputer Engineering U. esign Process of Seuential Systems State assignment 2 State table with binary states * 2 * z 7822 igital Logic esign @epartment of omputer Engineering U. 2 4

esign Process of Seuential Systems Truth table for system design 2 * 2 * z 2 2 2 2 * S + R State assignment 7822 igital Logic esign @epartment of omputer Engineering U. 3 Latches and Flip-flops latch is a binary storage device, composed of two or more gates, with feedback. The latch can store either a (Q and P ) or a (Q and P ) The P output is just labelled Q 7822 igital Logic esign @epartment of omputer Engineering U. 4 Latches (cont.) Eample: a latch constructed with 2 NORs. S R P Q The euations for this system: P S + Q and Q R + P Normal storage stage both inputs inactive (S R ). P Q and Q P 7822 igital Logic esign @epartment of omputer Engineering U. 5 5

Latches (cont.) ase : If S and R P (+ Q) Q ( + ) ase 2: If S and R Q (+ P) P ( + ) ase 3: Finally, the flip-flop is not operated with both S and R active (). P (+ Q) Q (+ P) S R P Q 7822 igital Logic esign @epartment of omputer Engineering U. 6 Latches (cont.) flip-flops (elay flip-flops) SR flip-flops (Set/Reset flip-flops) T flip-flops (Toggle flip-flops) flip-flops 7822 igital Logic esign @epartment of omputer Engineering U. 7 flip-flops * * * 7822 igital Logic esign @epartment of omputer Engineering U. 8 6

S SR flip-flops R * - - S * S + R Not allowed R * - SR SR R S S R R 7822 igital Logic esign @epartment of omputer Engineering U. 9 T flip-flops T * T * *T T 7822 igital Logic esign @epartment of omputer Engineering U. 2 flip-flops * * * + 7822 igital Logic esign @epartment of omputer Engineering U. 2 7

Latches (cont.) Edge-triggered rising/leading edge-triggered falling/trailing edge-triggered Level-triggered high level-triggered low level-triggered 7822 igital Logic esign @epartment of omputer Engineering U. 22 nalysis of Seuential Systems Figure 5.2 Page 342 ircuit Euations State table Timing trace Timing diagram Euations *,* State diagram 7822 igital Logic esign @epartment of omputer Engineering U. 23 Flip-flop esign Techniues 2 * 2 * z Main truth table From the truth table, it s clear that z 2 We need to create the appropriate flip-flop design table to obtain a truth table for the flip-flop inputs. * Input(s) flip-flops flip-flops SR flip-flops T flip-flops 7822 igital Logic esign @epartment of omputer Engineering U. 24 8

esign with Flip-flop * * From the main truth table 2 * 2 2 * 7822 igital Logic esign @epartment of omputer Engineering U. 25 esign with Flip-flop (cont.) 2 2 + 2 + 2 2 7822 igital Logic esign @epartment of omputer Engineering U. 26 Implementation using Flip-flops Fig 5.26 page 352 7822 igital Logic esign @epartment of omputer Engineering U. 27 9

7822 igital Logic esign @epartment of omputer Engineering U. 28 esign with Flip-flop * * * 2 * 2 2 2 From the main truth table 7822 igital Logic esign @epartment of omputer Engineering U. 29 esign with Flip-flop (cont.) 2 2 2 ; ; + 2 2 2 2 2 2 7822 igital Logic esign @epartment of omputer Engineering U. 3 esign with SR Flip-flop S - * R S R * * 2 * R S R 2 S 2 2 From the main truth table

esign with SR Flip-flop (cont.) 2 2 2 2 2 2 S 2 S2 2 ; ; R R2 + 2 7822 igital Logic esign @epartment of omputer Engineering U. 3 esign with T Flip-flop T * * T From the main truth table 2 * 2 * T T 2 7822 igital Logic esign @epartment of omputer Engineering U. 32 esign with T Flip-flop (cont.) 2 2 T + + 2 T2 2 + 2 2 7822 igital Logic esign @epartment of omputer Engineering U. 33

2 7822 igital Logic esign @epartment of omputer Engineering U. 34 * * + * * + ecause Notice that when nd when * + 7822 igital Logic esign @epartment of omputer Engineering U. 35 esign of Synchronous ounters esign a decimal or decade counter using flip-flops: * * * *,, 2, 3, 4, 5, 6, 7, 8, 9,,, 7822 igital Logic esign @epartment of omputer Engineering U. 36 esign of Synchronous ounters (cont.) * * * * * * * *

3 7822 igital Logic esign @epartment of omputer Engineering U. 37 esign of Synchronous ounters (cont.) * * ; From the main truth table of the * 7822 igital Logic esign @epartment of omputer Engineering U. 38 esign of Synchronous ounters (cont.) * * From the main truth table of the * 7822 igital Logic esign @epartment of omputer Engineering U. 39 esign of Synchronous ounters (cont.) * * ; From the main truth table of the *

4 7822 igital Logic esign @epartment of omputer Engineering U. 4 esign of Synchronous ounters (cont.) * * From the main truth table of the * 7822 igital Logic esign @epartment of omputer Engineering U. 4 2 * * 2 3 * 4 * 4 3 7822 igital Logic esign @epartment of omputer Engineering U. 42 esign of synchronous ounters Page 35. Figure 5.3(2-bit counter)&5.32(timing delay) dvantage: Simplicity of the hardware no combinational logic reuired isadvantage: Speed

erivation of State tables and State iagrams onsider the problem: system with one input and one output z such that z at a clock time iff is currently and was also at the previous two clock times. nother way of wording this same problem is Mealy system with one input and one output z such that z iff has been for three consecutive clock times. 7822 igital Logic esign @epartment of omputer Engineering U. 43 sample input/output trace is z First approach: save the previous 2 inputs. nowing them and the present input output. 2 * 2 * z ust discard the older input stored in memory and store the newer one plus the current input. 7822 igital Logic esign @epartment of omputer Engineering U. 44 Second approach: store in memory the number of consecutive s as follows: none, that is, the last input was one two or more / one / / / no s / two or more s / * z 7822 igital Logic esign @epartment of omputer Engineering U. 45 5

The second approach reuires only 3 states, whereas the first reuires 4. oth, however, use 2 flip-flops. onsider: the system produces a if the input has been for 25 consecutive clock times. Now the first approach reuires to store the last 24 inputs and a state table of 2 24 rows. The second approach reuires 25 states which can be coded with 5 flip-flops. 7822 igital Logic esign @epartment of omputer Engineering U. 46 6