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

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

Chapter 5 Synchronous Sequential Logic

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

Finite State Machine. By : Ali Mustafa

6 Synchronous State Machine Design

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

Digital Circuits and Systems

Analysis and Design of Sequential Circuits: Examples

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

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

Digital Logic Design - Chapter 5

Synchronous Sequential Logic

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Synchronous Sequential Logic. Chapter 5

Synchronous Sequential Circuit Design. Digital Computer Design

Lecture (08) Synchronous Sequential Logic

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Different encodings generate different circuits

EEE2135 Digital Logic Design

Sequential Synchronous Circuit Analysis

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Lecture 10: Synchronous Sequential Circuits Design

Sequential logic and design

FSM model for sequential circuits

CprE 281: Digital Logic

ENGG 1203 Tutorial _03 Laboratory 3 Build a ball counter. Lab 3. Lab 3 Gate Timing. Lab 3 Steps in designing a State Machine. Timing diagram of a DFF

Counters. We ll look at different kinds of counters and discuss how to build them

The Design Procedure. Output Equation Determination - Derive output equations from the state table

Finite State Machine (FSM)

Lecture 17: Designing Sequential Systems Using Flip Flops

ECE 341. Lecture # 3

EXPERIMENT Traffic Light Controller

EECS150 - Digital Design Lecture 23 - FSMs & Counters

10/12/2016. An FSM with No Inputs Moves from State to State. ECE 120: Introduction to Computing. Eventually, the States Form a Loop

Digital Logic Design - Chapter 4

FYSE420 DIGITAL ELECTRONICS

Chapter 7. Synchronous Sequential Networks. Excitation for

ELCT201: DIGITAL LOGIC DESIGN

Clocked Sequential Circuits UNIT 13 ANALYSIS OF CLOCKED SEQUENTIAL CIRCUITS. Analysis of Clocked Sequential Circuits. Signal Tracing and Timing Charts

Synchronous Sequential Circuit Design

Ch 7. Finite State Machines. VII - Finite State Machines Contemporary Logic Design 1

CS221: Digital Design. Dr. A. Sahu. Indian Institute of Technology Guwahati

Sequential Circuit Design

EGR224 F 18 Assignment #4

Sequential Logic Circuits

Synchronous Sequential Logic Part I

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

ELE2120 Digital Circuits and Systems. Tutorial Note 9

State Machines ELCTEC-131

Synchronous Sequential Logic Part I. BME208 Logic Circuits Yalçın İŞLER

Parity Checker Example. EECS150 - Digital Design Lecture 9 - Finite State Machines 1. Formal Design Process. Formal Design Process

EECS Components and Design Techniques for Digital Systems. FSMs 9/11/2007

Chapter 4 Part 2 Sequential Circuits

Chapter 6. Synchronous Sequential Circuits

Analysis of Clocked Sequential Circuits

ECE380 Digital Logic. Synchronous sequential circuits

Chapter 4. Sequential Logic Circuits

Logic Design II (17.342) Spring Lecture Outline

Fundamentals of Digital Design

CSE 140: Components and Design Techniques for Digital Systems. Lecture 9: Sequential Networks: Implementation

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

Homework #4. CSE 140 Summer Session Instructor: Mohsen Imani. Only a subset of questions will be graded

EECS150 - Digital Design Lecture 17 - Sequential Circuits 3 (Counters)

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

Lecture 8: Sequential Networks and Finite State Machines

Models for representing sequential circuits


CSE140: Digital Logic Design Registers and Counters

ASYNCHRONOUS SEQUENTIAL CIRCUITS

Exam for Physics 4051, October 31, 2008

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.

CPE100: Digital Logic Design I

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

CPE100: Digital Logic Design I

Sequential Circuits Sequential circuits combinational circuits state gate delay

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

CpE358/CS381. Switching Theory and Logical Design. Class 16

DE58/DC58 LOGIC DESIGN DEC 2014

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

Chapter 15 SEQUENTIAL CIRCUITS ANALYSIS, STATE- MINIMIZATION, ASSIGNMENT AND CIRCUIT IMPLEMENTATION

14.1. Unit 14. State Machine Design

EECS150 - Digital Design Lecture 18 - Counters

EECS150 - Digital Design Lecture 18 - Counters

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

Digital Design. Sequential Logic

Philadelphia University Student Name: Student Number:

Chapter 7. Sequential Circuits Registers, Counters, RAM

I. Motivation & Examples

Philadelphia University Student Name: Student Number:

ELE2120 Digital Circuits and Systems. Tutorial Note 10

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

Last lecture Counter design Finite state machine started vending machine example. Today Continue on the vending machine example Moore/Mealy machines

Generalized FSM model: Moore and Mealy

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Example: vending machine

CSE 140 Midterm 2 Tajana Simunic Rosing. Spring 2008

Review: Designing with FSM. EECS Components and Design Techniques for Digital Systems. Lec 09 Counters Outline.

Transcription:

COE 202: Digital Logic Design Sequential Circuits Part 3 Dr. Ahmad Almulhem Email: ahmadsm AT kfupm Phone: 860-7554 Office: 22-324

Objectives Important Design Concepts State Reduction and Assignment Design of Synchronous Sequential Circuits Procedure Examples

State Reduction Two sequential circuits may exhibits the same input-output behavior, but have a different number of states State Reduction: The process of reducing the number of states, while keeping the input-output behavior unchanged. It results in less Flip flops It may increase the combinational logic!

State Reduction (Example) Is it possible to reduce this FSM? How many states? How many input/outputs? Notes: we use letters to denote states rather than binary codes we only consider input/output sequence and transitions

State Reduction (Example) Step 1: get the state table

State Reduction (Example) Step 1: get the state table Step 2: find similar states e and g are equivalent states remove g and replace it with e

State Reduction (Example) Step 1: get the state table Step 2: find similar states e and g are equivalent states remove g and replace it with e

State Reduction (Example) Step 1: get the state table Step 2: find similar states d and f are equivalent states remove f and replace it with d

State Reduction (Example) Step 1: get the state table Step 2: find similar states d and f are equivalent states remove f and replace it with d

State Reduction (Example) Reduced FSM Verify sequence: State a a b c d e f f g f input 0 1 0 1 0 1 1 0 1 output 0 0 0 0 0 1 1 0 1

State Assignmnet State Assignment: Assign unique binary codes to the states For m states, we need log 2 m bits (FF) Example Three Possible Assignments:

Design of Synchronous Sequential Circuits The design of a clocked sequential circuit starts from a set of specifications and ends with a logic diagram (Analysis reversed!) Building blocks: flip-flops, combinational logic Need to choose type and number of flip-flops Need to design combinational logic together with flip-flops to produce the required behavior The combinational part is flip-flop input equations output equations

Design of Synchronous Sequential Circuits Design Procedure: Obtain a state diagram from the word description State reduction if necessary Obtain State Table State Assignment Choose type of flip-flops Use FF s excitation table to complete the table Derive state equations Obtain the FF input equations and the output equations Use K-Maps Draw the circuit diagram

Step1: Obtaining the State Diagram A very important step in the design procedure. Requires experience! Example: Design a circuit that detects a sequence of three consecutive 1 s in a string of bits coming through an input line (serial bit stream)

Step1: Obtaining the State Diagram A very important step in the design procedure. Requires experience! Example: Design a circuit that detects a sequence of three consecutive 1 s in a string of bits coming through an input line (serial bit stream)

Step2: Obtaining the State Table Assign binary codes for the states We choose 2 D-FF Next state specifies what should be the input to each FF Example: Design a circuit that detects a sequence of three consecutive 1 s in a string of bits coming through an input line (serial bit stream)

Step3: Obtaining the State Equations Using K-Maps A(t + 1) = D A = (3,5,7) = A x + B x B(t + 1) = D B = (1,5,7) = A x + B x y = (6,7) = A B Example: Design a circuit that detects a sequence of three consecutive 1 s in a string of bits coming through an input line (serial bit stream)

Step4: Draw Circuits Using K-Maps A(t + 1) = D A = (3,5,7) = A x + B x B(t + 1) = D B = (1,5,7) = A x + B x y = (6,7) = A B Example: Design a circuit that detects a sequence of three consecutive 1 s in a string of bits coming through an input line (serial bit stream)

Design with Other types of FF In designing with D-FFs, the input equations are obtained from the next state (simple!) It is not the case when using JK-FF and T-FF! Excitation Table: Lists the required inputs that will cause certain transitions. Characteristic tables used for analysis, while excitation tables used for design + +

Example 1 Problem: Design of A Sequence Recognizer Design a circuit that reads as inputs continuous bits, and generates an output of 1 if the sequence (1011) is detected X Y Input 1 1 1 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 0 1 1 0 1 1 1 1 1 1 Output 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0

Example 1 (cont.) Step1: State Diagram Sequence to be detected:1011

Example 1 (cont.) Step 2: State Table OR

Example 1 (cont.) Step 2: State Table state assignment Q: How many FF? log 2 (no. of states)

Example 1 (cont.) Step 2: State Table choose FF In this example, lets use JK FF for A and D-FF for B

Example 1 (cont.) Step 2: State Table complete state table use excitation tables for JK FF and D-FF Next State output D FF excitation table JK FF excitation table

Example 1 (cont.) Step 3: State Equations use k-map J A = BX K A = BX + B X D B = X Y = ABX

Example 1 (cont.) Step 4: Draw Circuit J A = BX K A = BX + B X D B = X Y = ABX

Example 2 Problem: Design of A 3-bit Counter Design a circuit that counts in binary form as follows 000, 001, 010, 111, 000, 001,

Example 2 (cont.) Step1: State Diagram - The outputs = the states - Where is the input? - What is the type of this sequential circuit?

Example 2 (cont.) Step2: State Table No need for state assignment here

Example 2 (cont.) Step2: State Table T FF excitation table We choose T-FF 0

Example 2 (cont.) Step3: State Equations

Example 2 (cont.) Step4: Draw Circuit T A0 = 1 T A1 = A 0 T A2 = A 1 A 0

Example 3 Problem: Design of A Sequence Recognizer Design a Moore machine to detect the sequence (111). The circuit has one input (X) and one output (Z).

Example 3 (cont.) Step1: State Diagram Sequence to be detected:111 0 1 1 0 1 S0/0 S1/0 S2/0 S3/1 1 0 0

Example 3 (cont.) Step2: State Table Use binary encoding Use JK-FF and D-FF 0 1 1 0 S0/0 S1/0 S2/0 1 S3/1 1 0 0

Example 3 (cont.) Step4: Draw Circuit For step3, use k-maps as usual J A = XB K A = X D B = X(A+B) Z = A.B

Example 3 (cont.) Timing Diagram (verification) Question: Does it detect 111?

Example 4 Problem: Design a traffic light controller for a 2-way intersection. In each way, there is a sensor and a light N Traffic Action EW only EW Signal green NS Signal red W E NS only NS Signal green EW Signal red EW & NS Alternate No traffic Previous state S

Example 4 (cont.) Step1: State Diagram 11, 10 00, 01 00, 10 NS / 01 EW / 10 11, 01 STATES NS: NS is green EW: EW is green INPUTS Sensors X 1, X 0 X 0 : car coming on NS X 1 : car coming on EW OUTPUTS Light S 1, S 0 S 0 : NS is green S 1 : EW is green

Example 4 (cont.) Exercise: Complete the design using: D-FF JK-FF T-FF

Example 5 Problem: Design Up/Down counter with Enable Design a sequential circuit with two JK flip-flops A and B and two inputs X and E. If E = 0, the circuit remains in the same state, regardless of the input X. When E = 1 and X = 1, the circuit goes through the state transitions from 00 to 01 to 10 to 11, back to 00, and then repeats. When E = 1 and X = 0, the circuit goes through the state transitions from 00 to 11 to 10 to 01, back to 00 and then repeats.

Example 5 (cont.) Present State Inputs Next State FF Inputs 00 01 00 01 00 01 11 10 11 11 10 11 10 11 10 10 00 01 00 01 A B E X A B J A K A J B K B 0 0 0 0 0 0 0 X 0 X 0 0 0 1 0 0 0 X 0 X 0 0 1 0 1 1 1 X 1 X 0 0 1 1 0 1 0 X 1 X 0 1 0 0 0 1 0 X X 0 0 1 0 1 0 1 0 X X 0 0 1 1 0 0 0 0 X X 1 0 1 1 1 1 0 1 X X 1 1 0 0 0 1 0 X 0 0 X 1 0 0 1 1 0 X 0 0 X 1 0 1 0 0 1 X 1 1 X 1 0 1 1 1 1 X 0 1 X 1 1 0 0 1 1 X 0 X 0 1 1 0 1 1 1 X 0 X 0 1 1 1 0 1 0 X 0 X 1 1 1 1 1 0 0 X 1 X 1

Example 5 (cont.) EX AB 00 01 11 10 EX AB 00 01 11 10 E X 00 0 0 0 1 01 0 0 1 0 00 x x x x 01 x x x x Y 11 x x x x 10 x x x x 11 0 0 1 0 10 0 0 0 1 J A C A J A = BEX + B EX K A = BEX + B EX K A A EX AB 00 01 11 10 EX AB 00 01 11 10 B 00 0 0 1 1 01 x x x x 00 x x x x 01 0 0 1 1 J B C K B B 11 x x x x 10 0 0 1 1 J B = E 11 0 0 1 1 10 x x x X K B = E clock

More Design Examples More design examples can be found at Homework 5 Textbook Course CD Google

Summary To design a synchronous sequential circuit: Obtain a state diagram State reduction if necessary Obtain State Table State Assignment Choose type of flip-flops Use FF s excitation table to complete the table Derive state equations Use K-Maps Obtain the FF input equations and the output equations Draw the circuit diagram