Sequential Circuit Design. 2 State Optimization Equivalent States:  Two states are equivalent if, for each member of the set of inputs,  they give exactly.

Slides:



Advertisements
Similar presentations
These slides incorporate figures from Digital Design
Advertisements

General Sequential Design
State-machine structure (Mealy)
VIII - Working with Sequential Logic © Copyright 2004, Gaetano Borriello and Randy H. Katz 1 Finite state machine optimization State minimization  fewer.
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
Sequential Design Part II. Output A(t+1) =D A = AX + BX B(t+1) =D B = AX Y = AX + BX.
CS 151 Digital Systems Design Lecture 25 State Reduction and Assignment.
Sequential Circuit Design
ECE 331 – Digital System Design Introduction to and Analysis of Sequential Logic Circuits (Lecture #20) The slides included herein were taken from the.
ECE 331 – Digital System Design State Reduction and State Assignment (Lecture #22) The slides included herein were taken from the materials accompanying.
ECE C03 Lecture 111 Lecture 11 Finite State Machine Optimization Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
1 EE365 Sequential-circuit design Sequential-circuit synthesis.
5. Choose a flip-flop type for the state memory. ReturnNext 7.4 Clocked Synchronous State-Machine Design 1. Construct a state/output table corresponding.
Sequential Logic Design
Sequential Circuit Design
Overview Sequential Circuit Design Specification Formulation
EECC341 - Shaaban #1 Lec # 16 Winter State Machine Design Procedure 1. Build state/output table (or state diagram) from word description.
Spring 2002EECS150 - Lec15-seq2 Page 1 EECS150 - Digital Design Lecture 15 - Sequential Circuits II (Finite State Machines revisited) March 14, 2002 John.
Synchronous circuit design and analysis. Synchronous circuit design To implement a synchronous circuit corresponding to a given specification Revision.
ECE 301 – Digital Electronics Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #17)
ECE 331 – Digital Systems Design Introduction to Sequential Logic Circuits (aka. Finite State Machines) and FSM Analysis (Lecture #19)
ENGIN112 L25: State Reduction and Assignment October 31, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 25 State Reduction and Assignment.
Overview Part 1 - Storage Elements and Sequential Circuit Analysis
Sequential circuit design
Clocked Synchronous State Machine Design
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Design a clock synchronous sequential circuit with two inputs A, B and a single.
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
T Flip-Flop A T (toggle) flip-flop is a complementing flip-flop and can be obtained from a JK flip-flop when the two inputs are tied together. When T =
Rabie A. Ramadan Lecture 2
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
Synchronous Circuit Design (Class 10.1 – 10/30/2012) CSE 2441 – Introduction to Digital Logic Fall 2012 Instructor – Bill Carroll, Professor of CSE.
Synchronous Sequential Logic Part II
Chap 4. Sequential Circuits
Lecture 4 – State Machine Design 9/26/20081ECE Lecture 4.
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.
Introduction to Sequential Logic Design Finite State-Machine Design.
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
Introduction to State Machine
Fall 2004EE 3563 Digital Systems Design EE3563 Chapter 7, 8, 10 Reading Assignments  7.1, 7.2, 7.3  8.1, ,   8.5.1, 8.5.2,
EE121 John Wakerly Lecture #11
1 Finite State Machines (FSMs) Now that we understand sequential circuits, we can use them to build: Synchronous (Clocked) Finite State Machines Finite.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
Digital Circuits State Reduction and Assignment State Reduction reductions on the number of flip-flops and the number of gates a reduction in the.
DESIGN OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
CEC 220 Digital Circuit Design Timing Analysis of State Machines
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.
1Sequential circuit design Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA by Erol Sahin and Ruken Cakici.
Learning to Design Counters
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
Sequential Circuit Design 05 Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
FIGURES FOR CHAPTER 16 SEQUENTIAL CIRCUIT DESIGN
State Diagrams Tuesday, 12 September State diagram Graphical representation of a state table. –Provides the same information as a state table. –A.
State Machine Design Shiva choudhary En No.: Electronics and comm. Dept K.I.T.,Jamnagar 1.
Mealy and Moore Machines Lecture 8 Overview Moore Machines Mealy Machines Sequential Circuits.
1 Clocked synchronous seq. circuits A.k.a. “state machines” Use edge-triggered flip-flops All flip-flops are triggered from the same master clock signal,
CHAPTER 16 SEQUENTIAL CIRCUIT DESIGN
Synchronous Sequential Logic
4.
Sequential logic design principles
FINITE STATE MACHINES (FSMs)
State Reduction and State Assignment
KU College of Engineering Elec 204: Digital Systems Design
Lecture 14 Reduction of State Tables
KU College of Engineering Elec 204: Digital Systems Design
CHAPTER 15 REDUCTION OF STATE TABLES STATE ASSIGNMENT
DESIGN OF SEQUENTIAL CIRCUITS
Chapter5: Synchronous Sequential Logic – Part 3
CSE 370 – Winter Sequential Logic-2 - 1
Presentation transcript:

Sequential Circuit Design

2 State Optimization Equivalent States:  Two states are equivalent if, for each member of the set of inputs,  they give exactly the same output and  send the circuit either to the same state or to an equivalent state.  If two states are equivalent, one can be eliminated without effecting the behavior of the FSM.

3 State Optimization Algorithm: Row Matching  Two states are equivalent if any of the conditions are true: 1.If two states have the same output AND both transition are to the same next state, 2.If two states have the same output AND both transition are to each other 3.If two states have the same output AND both self- loop,  Combine the equivalent states into a new renamed state.  Repeat until no more states are combined.

4 Row Matching Example NS output PS x=0 x=1 x=0 x=1 a a b 0 0 b c d 0 0 c a d 0 0 d e f 0 1 e a f 0 1 f g f 0 1 g a f 0 1 State Transition Table

5 Row Matching Example (cont) NS output PS x=0 x=1 x=0 x=1 a a b 0 0 b c d 0 0 c a d 0 0 d e f 0 1 e a f 0 1 f e f 0 1 NS output PS x=0 x=1 x=0 x=1 a a b 0 0 b c d 0 0 c a d 0 0 d e d 0 1 e a d 0 1 Reduced State Transition Diagram

6 State Optimization Algorithm Implication Chart Prese nt State Next StatePresent Output X=01 adc0 bfh0 ced1 dae0 eca1 ffb1 gbh0 hcg1

7 State Optimization Algorithm Implication Chart After First Pass  Processing order is important

8 State Optimization Algorithm Implication Chart After Second Pass Present State Next State Output X=01 aac0 bfh0 cca1 ffb1 gbh0 hcg1

9 Equivalent Sequential Circuits Definition:  Sequential circuit N1 is equivalent to sequential circuit N2 if  for each state p in N1, there is a state q in N2 such that p≡q, and  conversely, for each state s in N2, there is a state t in N1 such that s≡t.

10 Example X=0X=1X=0X=1 ABA00 BCD01 CAC01 DCB00 X=0X=1X=0X=1 S0S0 S3S3 S1S1 01 S1S1 S3S3 S0S0 00 S2S2 S0S0 S2S2 00 S3S3 S2S2 S3S3 01

11 Implication Tables: X=0X=1X=0X=1 ABA00 BCD01 CAC01 DCB00 X=0X=1X=0X=1 S0S0 S3S3 S1S1 01 S1S1 S3S3 S0S0 00 S2S2 S0S0 S2S2 00 S3S3 S2S2 S3S3 01

12 State Encoding  The simplest assignment of s coded states to 2 n possible states is to use the first s binary integers in binary counting order.  000, 001, 010, 011, 100  However, the simplest state assignment does not always lead to the simplest circuit.  In fact, the state assignment often has a major effect on circuit cost (was previously shown).  In general, the only formal way to find the best assignment is to try all the assignments.  That’s too much work!!

13 Example  Design a clocked synchronous state machine with two inputs, A and B, and a single output Z that is 1 if: – A had the same value at each of the two previous clock ticks, or – B has been 1 since the last time that the first condition was true. – Otherwise, the output should be 0. A B Z

14 Timing Diagram

15 Moore Machine Reset/0 00 init A0 A0: got 0 on A A /01 01 A1: got 1 on A OK00 OK OK00: got 00 on A OK11: got 11 on A OKA0 OKA OKA0: still OK (because from an OK state, got B=1), and got a 0 on A OKA1: still OK (because from an OK state, got B=1), and got a 1 on A

16 State Table  OK00 and OKA0 are equivalent  OK11 and OKA1 are equivalent

17 Moore Machine Reset/0 00 init A0 A0: got 0 on A A /01 A1: got 1 on A OK0 OK OK00: got 00 on A OK11: got 11 on A OKA0: still OK (because from an OK state, got B=1), and got a 0 on A OKA1: still OK (because from an OK state, got B=1), and got a 1 on A 01 11

18 State Encoding Guidelines:  Choose an initial coded state into which the machine can easily be forced at reset  or in typical circuits.  Minimize the number of state variables that change on each transition.  Maximize the number of state variables that don’t change in a group of related states  i.e., a group of states in which most of transitions stay in the group.

19 State Encoding Samples:

20 Synthesis Using D FF Present State Next State Output

21 State Assignment Unused States:  Each of the m states must be assigned a unique code  Minimum number of bits required is n such that n ≥ log2 m where x is the smallest integer ≥ x  There are 2 n - m unused states

22 State Assignment Unused States:  Minimal risk:  Assumes that it is possible for the state machine somehow to get into one of the unused (or “illegal”) states,  (due to a hardware failure, an unexpected input).  Therefore, all of the unused state-variable combinations are identified, and explicit next-state entries are made so that, for any input combination, the unused states go to the “initial” state  Minimal cost:  Assumes that the machine will never enter an unused state.  Therefore, in the transition and excitation tables, the next-state entries of the unused states can be marked as “don’t-cares”.

23 Case 1: Minimal Risk Assumption:  Unused states go to 000 (minimal risk) D1 = Q1  Q2  Q3

24 Case 1: D2 Equation D2 = Q1.Q3  A  Q1.Q3.A + Q1.Q2.B

25 Case 1: D3 Equation D3 = Q1.A  Q2  Q3  A

26 Case 1: Z Equation Z = Q1.Q2.Q3  Q1.Q2.Q3 = Q1.Q2

27 Case 2: Minimal Cost Assumption:  next states of unused states are “don’t-cares” (minimal cost).  Z = don’t care for unused states. D1  1

28 Case 2: D2 Equation D2  Q1.Q3  A  Q3.A  Q2.B

29 Case 2: D3 Equation D3  A

30 Case 2: Z Equation Z = Q2

31 Case 2: Logic Diagram

32 Case 3: Synthesis Using JK FF No change Set Reset Complement OperationJ K 0 1 Q(t+1) Q(t) Q(t+1) Q(t) Operation X X 0 1 K 0 1 X X J No change Set Reset No Change Characteristic Table: Excitation Table:

33

34 Case 3: Synthesis Using JK FF  Needs separate logic for J and K. J1  Q2  Q3

35 Case 3: Synthesis Using JK FF K1  0

36 Case 3: Synthesis Using JK FF J2  Q1.Q3  A  Q1.Q3.A

37 Case 3: Synthesis Using JK FF K2  Q1  Q3  A.B  Q3.A  B

38 Case 3: Synthesis Using JK FF J3  Q2  A  Q1.A

39 Case 3: Synthesis Using JK FF K3  Q1  A

40 Case 3: Synthesis Using JK FF  These equations take two more gates to realize than minimal-risk equations using D flip-flops  so J-K flip-flops didn’t save us anything

41 Case 3: Synthesis Using JK FF  Minimal cost using JK FF J1  1, K1  0 J2  Q1.Q3  A  Q3.A K2  Q3  A. B  Q3. A  B J3  A K3  A

42 Case 3: Synthesis Using JK FF  This circuit has two more gates than the minimal-cost D circuit  J-K flip-flops still didn’t save us anything.

43 Sequential Circuit Design Using ROM or PLA Z Q1Q1 Q2Q2 Q3Q3 X=0X=1X=0X=1 ABCDEHKABCDEHK

44 Sequential Circuit Design Using ROM or PLA XQ1Q1 Q2Q2 Q3Q3 ZD1D1 D2D2 D3D x001101xx x001101xx x011110xx x011110xx x100010xx x100010xx x000100xx x000100xx *ROM OUTPUTS (Z,D 1,D 2 and D 3 ) *ROM INPUTS (X,Q 1,Q 3 and Q 3 )

45 Sequential Circuit Design Using ROM A ROM with four inputs (2 4 words) and four outputs is required.

46 Sequential Circuit Design Using PLA Segment of Sequential PAL