ELE2120 Digital Circuits and Systems. Tutorial Note 9

Similar documents
Sequential Circuit Analysis

ELE2120 Digital Circuits and Systems. Tutorial Note 10

Chapter 5 Synchronous Sequential Logic

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

Synchronous Sequential Logic

Digital Circuits and Systems

Sequential Synchronous Circuit Analysis

Chapter 4 Part 2 Sequential Circuits

Analysis and Design of Sequential Circuits: Examples

Chapter 14 Sequential logic, Latches and Flip-Flops

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

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

Finite State Machine. By : Ali Mustafa

Clocked Synchronous State-machine Analysis

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

Simplify the following Boolean expressions and minimize the number of literals:

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

Lecture (08) Synchronous Sequential Logic

EEE2135 Digital Logic Design

Different encodings generate different circuits

6 Synchronous State Machine Design

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Sequential vs. Combinational

CprE 281: Digital Logic

Fundamentals of Digital Design

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

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

Digital Logic Design. Midterm #2

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

Lecture 17: Designing Sequential Systems Using Flip Flops

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

Chapter 7 Sequential Logic

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

Synchronous Sequential Logic Part I

Combinational Logic. By : Ali Mustafa

Sequential Circuit Design

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

Lecture 8: Sequential Networks and Finite State Machines

Lecture 10: Synchronous Sequential Circuits Design

ELCT201: DIGITAL LOGIC DESIGN

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

Synchronous Sequential Logic. Chapter 5

Chapter 7. Synchronous Sequential Networks. Excitation for

EE 209 Logic Cumulative Exam Name:

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

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

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

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

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

Synchronous Sequential Circuit Design

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

Finite State Machine (FSM)

Logical design of digital systems

ELCT201: DIGITAL LOGIC DESIGN

ECE/Comp Sci 352 Digital Systems Fundamentals. Charles R. Kime Section 2 Fall Logic and Computer Design Fundamentals

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

PAST EXAM PAPER & MEMO N3 ABOUT THE QUESTION PAPERS:

(Boolean Algebra, combinational circuits) (Binary Codes and -arithmetics)

Sample Test Paper - I

Experiment 9 Sequential Circuits

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

University of Guelph School of Engineering ENG 2410 Digital Design Fall There are 7 questions, answer all questions.

Logic Design II (17.342) Spring Lecture Outline

COMBINATIONAL LOGIC FUNCTIONS

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

I. Motivation & Examples

Synchronous Sequential Circuit Design. Digital Computer Design

Philadelphia University Student Name: Student Number:

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

CPE100: Digital Logic Design I


PG - TRB UNIT-X- DIGITAL ELECTRONICS. POLYTECHNIC-TRB MATERIALS

Mealy & Moore Machines

CSCI 2150 Intro to State Machines

Latches. October 13, 2003 Latches 1

Analysis of Clocked Sequential Circuits

Design of Sequential Circuits

Principles of Computer Architecture. Appendix B: Reduction of Digital Logic. Chapter Contents

Lecture 14 Finite state machines

FSM model for sequential circuits

Hardware testing and design for testability. EE 3610 Digital Systems

Sequential Logic Circuits

Boolean Algebra & Digital Logic

Philadelphia University Student Name: Student Number:

Additional Gates COE 202. Digital Logic Design. Dr. Muhamed Mudawar King Fahd University of Petroleum and Minerals

DIGITAL LOGIC CIRCUITS

or 0101 Machine

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

Discrete Mathematics. CS204: Spring, Jong C. Park Computer Science Department KAIST

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Adders, subtractors comparators, multipliers and other ALU elements

Synchronous Sequential Circuit

CPE100: Digital Logic Design I

Review for Final Exam

DIGITAL CIRCUIT LOGIC BOOLEAN ALGEBRA

Experiment 7: Magnitude comparators

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

Sequential Circuits Sequential circuits combinational circuits state gate delay

Chapter 5 Synchronous Sequential Logic

Transcription:

ELE2120 Digital Circuits and Systems Tutorial Note 9

Outline 1. Exercise(1) Sequential Circuit Analysis 2. Exercise (2) Sequential Circuit Analysis 3. Exercise (3) Sequential Circuit Analysis 4. Ref. Construction of State Diagram 5. Ref. State Reduction 6. Exercise (4) Sequential Circuit Design

Exercise(1) Sequence Circuit Analysis Assume that we have such a circuit and inputs. what are the outputs of Y and Z ( The initial state of the flip-flops are both Q=0 )

Exercise(1) Sequence Circuit Analysis Y Q1 Q2 Q1 Q2 Z Q1 Q2 Q1 Q2 CLK t A Q1 Q2 Y Z

Exercise(1) Sequence Circuit Analysis Sequential Circuit State equations Specify next state as a function of present state and input(s) Similar to Boolean equations State tables List out all combination of input and present state to show the output and next state Similar to truth table State diagrams Graphical representation for state tables You can know the others if you already have 1 clue. Easy to convert between sequential circuit and state equations Easy to convert between state tables and state diagrams Difficult to find relationship between state table / state equations. We need some tools (e.g. K-map, excitation table, etc ) for help.

Exercise (2) Sequential Circuit Analysis A sequential circuit has one flip-flop Q, two inputs x and y, and one output S(Sum). It consists of a full-adder circuit connected to a D flip-flop, as shown in the figure below. Derive the state table, state equation and state diagram of the circuit.

Exercise (2) Sequential Circuit Analysis Tabulate present state and inputs as three independent Boolean variables, the produce the output S (Sum) and C (Carry) according to the full-adder operation, followed by producing the next states according the D flip-flop operation. The state diagram has two states only. State equation and output equation:

Exercise (2) Sequential Circuit Analysis State Table State Diagram Present States Inputs Next States Outputs Q(t) x y Q(t+1) S 0 0 0 0 0 0 0 1 0 1 0 1 0 0 1 0 1 1 1 0 1 0 0 0 1 1 0 1 1 0 1 1 0 1 0 1 1 1 1 1

Exercise (3) Sequential Circuit Analysis A basic state table for our example circuit is shown right. 1. Complete the state table 2. Draw the state diagram Present State Inputs Next State Outputs Q 1 Q 0 X Q 1 Q 0 Z 0 0 0 0 0 1 0 1 0 0 1 1 1 0 0 1 0 1 1 1 0 1 1 1 9

1.Determine the output The output depends on the current state (Q0 and Q1) as well as the inputs. From the diagram, you can see that Z = Q 1 Q 0 X Output at the current time Present State Inputs Next State Outputs Q 1 Q 0 X Q 1 Q 0 Z 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 1 1 1

2.Flip-Flop Input Equations Finding the next states is harder. To do this, we have to figure out how the flip-flops are changing. Step 2a: Find Boolean expressions for the flip-flop inputs. i.e. How do the inputs (say, J & K) to the flipflops depend on the current state and input Step 2b: Use these expressions to find the actual flip-flop input values for each possible combination of present states and inputs. i.e. Fill in the state table (with new intermediate columns) Step 2c: Use flip-flop characteristic tables or equations to find the next based on the flip-flop input values and the present states. states,

Step 2a: Flip-flop input equations For our example, the flip-flop input equations are: J 1 = X Q 0 K 1 = X + Q 0 J 0 = X + Q 1 K 0 = X JK flip-flops each have two inputs, J and K. (D and T flipflops have one input each.)

Step 2b: Flip-flop input values With these equations, we can make a table showing J 1, K 1, J 0 and K 0 for the different combinations of present state Q 1 Q 0 and input X. J 1 = X Q 0 J 0 = X + Q 1 K 1 = X + Q 0 K 0 = X Present State Inputs Flip-flop Inputs Q 1 Q 0 X J 1 K 1 J 0 K 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0 1 0 1 1 0 1 0 1 1 0 1 1 0 1 0 0 0 0 1 1 1 0 1 0 1 1 0 1 1 0 1 1 1 1 1 1 1 0 1 1 0

Step 2c: Find the next states Finally, use the JK flip-flop characteristic tables or equations to find the next state of each flip-flop, based on its present state and inputs. The general JK flip-flop characteristic equation is: Q(t+1) = K Q(t) + JQ (t) In our example circuit, we have two JK flip-flops, so we have to apply this equation to each of them: Q 1 (t+1) = K 1 Q 1 (t) + J 1 Q 1 (t) Q 0 (t+1) = K 0 Q 0 (t) + J 0 Q 0 (t) We can also determine the next state for each input/current state combination directly from the characteristic table. J K Q(t+1) Operation 0 0 Q(t) No change 0 1 0 Reset 1 0 1 Set 1 1 Q (t) Complement

Step 2c Conclusion Finally, here are the next states for Q 1 and Q 0, using these equations: Q 1 (t+1) = K 1 Q 1 (t) + J 1 Q 1 (t) Q 0 (t+1) = K 0 Q 0 (t) + J 0 Q 0 (t) Present State Inputs FF Inputs Next State Q 1 Q 0 X J 1 K 1 J 0 K 0 Q 1 Q 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 1 0 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 1 1 0 0 1 1 0 0 0 0 1 1 1 1 1 0 1 0 1 1 0 0 1 1 1 0 1 1 1 1 0 0 1 1 1 0 1 1 0 0 1

3.State diagrams We can also represent the state table graphically with a state diagram. A diagram corresponding to our example state table is shown below. Present State Inputs Next State Outputs Q 1 Q 0 X Q 1 Q 0 Z 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 input output 0/0 1/0 00 1/0 01 0/0 1/1 1/0 0/0 11 0/0 10 state

4.Sizes of state diagrams Always check the size of your state diagrams. If there are n flip-flops, there should be 2 n nodes in the diagram. If there are m inputs, then each node will have 2 m outgoing arrows. In our example, We have two flip-flops, and thus four states or nodes. There is one input, so each node has two outgoing arrows. Present State Inputs Next State Outputs Q 1 Q 0 X Q 1 Q 0 Z 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 1 0 0 0 1 1 0 1 0 1 0 0 1 1 0 1 0 1 0 1 0 1 1 0 0 0 0 1 1 1 0 1 1 0/0 1/0 A 00 01 11 1/0 1/1 0/0 1/0 0/0 D 0/0 B C 10

5.State diagram Construction Identify all possible states (they are the nodes) Identify how the process moves from a state to another (they are the links) Identify how the outputs are generated

For example, the directed line from state 00 to 01 is labelled 1/0, meaning that, if the sequential circuit is in a present state and the input is 1, then the next state is 01 and the output is 0. If it is in a present state 00 and the input is 0, it will remain in that state. A directed line connecting a circle with itself indicates that no change of state occurs. The state diagram provides exactly the same information as the state table and is obtained directly from the state table. 4.Ref. Construction of State Diagram The directed lines are labelled with two binary numbers separated by a slash (/). The input value that causes the state transition is labelled first. The number after the slash symbol / gives the value of the output.

Equivalent property 5.Ref. State Reduction Two states said to be equivalent if, for all sequence of inputs, the sequential machine produces the same output sequence when it is started in either state. Output must be identical Next states may not be identical provided that it is possible to establish an equivalence between the unlike states

5.Ref. State Reduction Distinct states generate different sequences of outputs for same set of input sequence. Equivalent states generate same output sequence for all possible input sequence pattern. One state can be assigned to the equivalent states without affecting output sequence pattern

State Reduction 1.Find the Equivalent table based on the reduced table: 2. Find out the terms that should be reduced based on the reduced table: A B with input 1, since A and B are equivalent, A A with input 1. State B can be reduced, or state A can be reduced.(if one choose to reduce state A, then use B instead of A) B Reduced Table Present States Next State X=0 X=1 A C B B C B C C A Same Output with the same input, A and B are Equivalent!

Exercise (4) Design, using D flip-flop, circuit is based on state table below.

Solution Determine input expression for D flip-flop and y output

Solution From expression built, draw logic diagram