1. 1. Output depends uniquely on inputs:  Contains only logic gates, AND, OR,...  No feedback interconnects 2. Output depends on inputs and memory:

Slides:



Advertisements
Similar presentations
ELEC Digital Logic Circuits Fall 2008 Finite State Machines (FSM) (Chapter 7-10) Vishwani D. Agrawal James J. Danaher Professor Department of.
Advertisements

Introduction to Sequential Circuits
ENGG3190 Logic Synthesis “Sequential Circuit Synthesis”
Clocked Synchronous State-machine Analysis
Sequential Circuits Storage elements
State-machine structure (Mealy)
التصميم المنطقي Second Course
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Multiplexors Sequential Circuits and Finite State Machines Prof. Sin-Min Lee Department of Computer Science.
Circuits require memory to store intermediate data
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
FSMs 1 Sequential logic implementation  Sequential circuits  primitive sequential elements  combinational logic  Models for representing sequential.
Give qualifications of instructors: DAP
Logic and Computer Design Fundamentals Registers and Counters
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
Applications of Synchronous Circuits (Class 10.2 – 3/28/2013) CSE 2441 – Introduction to Digital Logic Spring 2013 Instructor – Bill Carroll, Professor.
Digital Computer Design Fundamental
Introduction to Digital Logic Design Appendix A of CO&A Dr. Farag
Zvi Kohavi and Niraj K. Jha 1 Capabilities, Minimization, and Transformation of Sequential Machines.
Synchronous Circuit Design (Class 10.1 – 10/30/2012) CSE 2441 – Introduction to Digital Logic Fall 2012 Instructor – Bill Carroll, Professor of CSE.
B-1 Appendix B - Reduction of Digital Logic Principles of Computer Architecture by M. Murdocca and V. Heuring © 1999 M. Murdocca and V. Heuring Principles.
Module 9.  Digital logic circuits can be categorized based on the nature of their inputs either: Combinational logic circuit It consists of logic gates.
Chapter 10 State Machine Design. 2 State Machine Definitions State Machine: A synchronous sequential circuit consisting of a sequential logic section.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
Important Components, Blocks and Methodologies. To remember 1.EXORS 2.Counters and Generalized Counters 3.State Machines (Moore, Mealy, Rabin-Scott) 4.Controllers.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
Module : FSM Topic : types of FSM. Two types of FSM The instant of transition from the present to the next can be completely controlled by a clock; additionally,
Introduction to State Machine
2017/4/24 1.
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
ELEC Digital Logic Circuits Fall 2015 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) Vishwani D. Agrawal James J. Danaher Professor.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10) Vishwani D. Agrawal James J. Danaher Professor.
Chapter 8. Sequential machine. Sequential machine M = ( I, O, S, , ) I : set of input O : set of output S : set of states  (state transition) : I 
A sequential logic circuit (a.k.a. state machine) consists of both combinational logic circuit(s) and memory devices (flip flops). The combinational circuits.
Digital Logic Design Basics Combinational Circuits Sequential Circuits Pu-Jen Cheng Adapted from the slides prepared by S. Dandamudi for the book, Fundamentals.
Introduction to Sequential Logic Design Finite State-Machine Analysis.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
State Diagrams Tuesday, 12 September State diagram Graphical representation of a state table. –Provides the same information as a state table. –A.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
Lecture 1 Gunjeet kaur Dronacharya group of institutions.
Capabilities, Minimization, and Transformation of Sequential Machines
Sequential Logic Design

Week #7 Sequential Circuits (Part B)
Figure 8.1. The general form of a sequential circuit.
Introduction to Sequential Logic Design
© Copyright 2004, Gaetano Borriello and Randy H. Katz
Sequential logic design principles
Adapted by Dr. Adel Ammar
SLIDES FOR CHAPTER 12 REGISTERS AND COUNTERS
FIGURE 5.1 Block diagram of sequential circuit
Asynchronous Inputs of a Flip-Flop
Reading: Hambley Chapters
FINITE STATE MACHINES (FSMs)
332:437 Lecture 12 Finite State Machine Design
Sequential logic circuits
Digital Design Fundamentals
Instructor: Alexander Stoytchev
CSE 370 – Winter Sequential Logic-2 - 1
Introduction to Sequential Circuits
CSE 370 – Winter Sequential Logic-2 - 1
Sequential Circuit Analysis & Design
ECE 352 Digital System Fundamentals
Presentation transcript:

1

1. Output depends uniquely on inputs:  Contains only logic gates, AND, OR,...  No feedback interconnects 2. Output depends on inputs and memory:  Contains logic gates, latches and flip-flops  May have feedback interconnects  Contents of flip-flops define internal state; N flip-flops provide 2 N states; finite memory means finite states, hence the name “finite state machine (FSM)”.  Clocked memory – synchronous FSM  No clock – asynchronous FSM 2

Chapter 6: Sequential devices – latches, flip-flops. Chapter 7: Modular sequential logic – registers, shift registers, counters. Chapter 8: Specification and analysis of FSM. Chapter 9: Synchronous (clocked) FSM design. 3

Mealy machine: Output is a function of inputs and the present state. Moore machine: Output is a function of the present state alone. 4 S0 S1 1/1 1/0 0/0 0/1 Mealy machine S0/1 S1/0 1/1 1/0 0/1 0/0 Moore machine G. H. Mealy, “A Method for Synthesizing Sequential Circuits,” Bell Systems Tech. J., vol. 34, pp , September E. F. Moore, “Gedanken-Experiments on Sequential Machines,” Annals of Mathematical Studies, no. 34, pp ,1956, Princeton Univ. Press, NJ.

The general hardware architecture of an FSM, known as Huffman model, consists of: Flip-flops for storing the state. Combinational logic to generate outputs and next state from inputs and present state. Clock to synchronize state changes. Initialization hardware to set the machine in a known state. 5 Combinational logic Flip- flops OutputsInputs Present state Next state Clock Clear

A robot moves in straight line, encounters obstacle and turns right or left until path is clear; on alternate obstacle encounters use right and left turn strategies. Define input: One bit X = 0, no obstacle X = 1, an obstacle encountered Define outputs: Two bits Z1, Z2 = 00no turn Z1, Z2 = 01turn right by a predetermined angle Z1, Z2 = 10turn left by a predetermined angle Z1, Z2 = 11output not used 6

Because turning strategy depends on the action for the previous obstacle, the robot must remember the past. Therefore, we define internal memory states: State A = no obstacle detected, last turn was left State B = obstacle detected, turning right State C = no obstacle detected, last turn was right State D = obstacle detected, turning left 7

Construct state diagram. 8 A DC B A: no obstacle, last left turn B: obstacle, turn right C: no obstacle, last right turn D: obstacle, turn left Input:X = 0, no obstacle X = 1, obstacle Outputs: Z1, Z2 = 00, no turn Z1, Z2 = 01, right turn Z1, Z2 = 10, left turn 0/00 1/01 0/00 1/01 1/10 XZ1 Z2

Construct state table. 9 A DC B 0/00 1/01 0/00 1/01 1/10 XZ1 Z2 A/00 C/00 A/00 B/01 D/10 X Present 0 1 state A B C D Next state Outputs Z1, Z2

X Y1 Y State assignment: Need log 2 4 = 2 binary state variables for 4 to represent 4 states. Let memory variables be Y1,Y2: A: Y1, Y2 = 00; B: Y1, Y2 = 01; C: Y1, Y2 = 11, D: Y1, Y2 = A/00 C/00 A/00 B/01 D/10 X Present 0 1 state A B C D 00/00 11/00 00/00 01/01 10/10

X Y1 Y Construct truth tables for outputs, Z1 and Z2, and excitation variables, Y1 and Y /00 11/00 00/00 01/01 10/10 Next State, Y1*, Y2* Outputs Z1, Z2 InputPresent state OutputsNext state XY1Y2Z1Z2Y1*Y2*

Synthesize logic functions, Z1, Z2, Y1*, Y2*. 12 InputPresent state OutputsNext state XY1Y2Z1Z2Y1*Y2* Z1 = XY1  Y2 + XY1 Y2 = XY1 Z2 = X  Y1  Y2 + X  Y1 Y2 = X  Y1 Y1* =  X  Y1 Y Y2* =  X  Y1 Y2 +...

Synthesize logic functions, Z1, Z2, Y1*, Y2* X Y1 Y X 11 X Y1 Y2 11 X Y1 Y2 Y1 Z1 Z2 Y1* Y2*

Synthesize logic and connect memory elements (flip-flops). 14 Y2 Y1  Y1  Y2 X Z1 Z2 Y1* Y2* CK CLEAR Combinational logic

Examine specified function to identify inputs, outputs and memory states. Draw a state diagram. Minimize states (see Section 9.1). Assign binary codes to states (Section 9.4). Derive truth tables for state variables and output functions. Minimize multi-output logic circuit. Connect flip-flops for state variables. Don’t forget to connect clock and clear signals. 15

An FSM contains flip-flops and combinational logic: Number of flip-flops, N ff = log 2 N s, N s = #states Size of combinational logic depends on state assignment. Examples: 1. N s = 16, N ff = log 2 16 = 4 2. N s = 17, N ff = log 2 17 = = 5 16 Ceiling operator

Two states of an FSM are equivalent (or indistinguishable) if for each input they produce the same output and their next states are identical. 17 Si Sj Sm Sn 1/0 0/0 Si,j Sm Sn 1/0 0/0 Si and Sj are equivalent and merged into a single state.

Example: States A... I, Inputs I1, I2, Output, Z 18 Present state Next state, output (Z) Input I1 I2 AD, 0C, 1 BE, 1A, 1 CH, 1D, 1 DD, 0C, 1 EB, 0G, 1 FH, 1D, 1 GA, 0F, 1 HC, 0A, 1 IG, 1H, 1 A and D are equivalent A and E produce same output. Can they be equivalent?

19 A B CD E FG H BCDEFGHIBCDEFGHI √ BD CG AD CF √ CD AC EH AD EH AD EG AH Present state Next state, output (Z) Input I1 I2 AD, 0C, 1 BE, 1A, 1 CH, 1D, 1 DD, 0C, 1 EB, 0G, 1 FH, 1D, 1 GA, 0F, 1 HC, 0A, 1 IG, 1H, 1 AD CF CD AC BC AG BD CG AC AF GH DH GH DH AB FG

20 A B CD E FG H BCDEFGHIBCDEFGHI √ BD CG AD CF √ CD AC EH AD EH AD EG AH AD CF CD AC BC AG BD CG AC AF GH DH GH DH Equivalent states: S1:A, D, G S2:B, C, F S3:E, H S4:I AB FG

21 Present state Next state, output (Z) Input I1 I2 AD, 0C, 1 BE, 1A, 1 CH, 1D, 1 DD, 0C, 1 EB, 0G, 1 FH, 1D, 1 GA, 0F, 1 HC, 0A, 1 IG, 1H, 1 Present state Next state, output (Z) Input I1 I2 S1 = (A, D, G)S1, 0S2, 1 S2 = (B, C, F)S3, 1S1, 1 S3 = (E, H)S2, 0S1, 1 S4 = IS1, 1S3, 1 OriginalMinimized Number of flip-flops is reduced from 4 to 2.

State assignment means assigning distinct binary patterns (codes) to states. N flip-flops generate 2 N codes. While we are free to assign these codes to represent states in any way, the assignment affects the optimality of the combinational logic. Rules based on heuristics are used to determine state assignment. 22

Optimize: Logic gates, or Delay, or Power consumption, or Testability, or Any combination of the above Up to 4 or 5 flip-flops: can try all assignments and select the best. More flip-flops: Use an existing heuristic (one discussed next) or invent a new heuristic. 23

Inputs are A and B State variables are Y1 and Y2 An output is F(A, B, Y1, Y2) A next state function is G(A, B, Y1, Y2) A B Y1 Y2 Karnaugh map of output function or next state function  Larger clucsers produce smaller logic function.  Clustering minterms differ in one variable.

Number of product terms determine number of gates. Number of literals in a product term determine number of gate inputs, which is proportional to number of transistors. Hardware α (number of literals) Examples of four minterm functions: F1 = ABCD +  A  B  C  D +  A  BCD +  AB  CD has 16 literals F2 = ABC +  A  CD has 6 literals 25

States that have the same next state for a given input should be assigned logically adjacent codes. 26 Combinational logic Flip- flops Outputs Fixed Inputs Present state Next state Clock Clear Si Sj Sk

States that are the next states of the same state under logically adjacent inputs, should be assigned logically adjacent codes. 27 Combinational logic Flip- flops Outputs Adjacent Inputs Fixed present state Next state Clock Clear Sk Sm Si I1 I2

28 Present state Next state, output (Z) Input, X 0 1 AC, 0D, 0 BC, 0A, 0 CB, 0D, 0 DA, 1B, 1 DB A C 0/0 1/0 1/1 0/1 A adj B (Rule 1) A adj C (Rule 1) B adj D (Rule 2) Figure 9.19 of textbookC adj D (Rule 2) AB CD

29 Present state Y1, Y2 Next state, output Y1*Y2*, Z Input, X 0 1 A = 0010, 011, 0 B = 0110, 000, 0 C = 1001,011, 0 D = 1100, 101, 1 InputPresent state OutputNext state XY1Y2ZY1*Y2*

X Y1 Y X 1 1 X Y1 Y2 Y1 Z Y1* Y2* Result: 5 products, 10 literals.

31 Y2 Y1  Y1  Y2 X Z Y2* Y1* CK CLEAR Combinational logic

32 Present state Y1, Y2 Next state, output Y1*Y2*, Z Input, X 0 1 A = 0011, 010, 0 B = 0111, 000, 0 C = 1101,010, 0 D = 1000, 101, 1 InputPresent state OutputNext state XY1Y2ZY1*Y2*

X Y1 Y X 1 1 X Y1 Y2 Y1 Z Y1* Y2* Result: 6 products, 14 literals.

34 Y2 Y1  Y1  Y2 X Z Y2* Y1* CK CLEAR Comb. logic

State minimization through partioning (Section 9.2.2). Incompletely specified sequential circuits (Section 9.3). Further rules for state assignment and use of implication graphs (Section 9.4). Asynchronous or fundamental-mode sequential circuits (Chapter 10). 35