1 © 2014 B. Wilkinson Modification date: Dec 30 2014 Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,

Slides:



Advertisements
Similar presentations
State-machine structure (Mealy)
Advertisements

State Machine Design Procedure
COE 202: Digital Logic Design Sequential Circuits Part 3
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
Computer Architecture CS 215
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.
Computing Machinery Chapter 5: Sequential Circuits.
Circuits require memory to store intermediate data
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits – I Flip-Flops A sequential circuit is a logic components whose outputs.
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
1 Lecture 23 More Sequential Circuits Analysis. 2 Analysis of Combinational Vs. Sequential Circuits °Combinational : Boolean Equations Truth Table Output.
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.
ECE 331 – Digital System Design
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
1 COMP541 State Machines Montek Singh Feb 6, 2007.
Overview Sequential Circuit Design Specification Formulation
Sequential Circuits Problems(I) Prof. Sin-Min Lee Department of Mathematics and Computer Science Algorithm = Logic + Control.
ECE 301 – Digital Electronics
Digital Logic Design Lecture 26. Announcements Exams will be returned on Thursday Final small quiz on Monday, 12/8. Final homework will be assigned Thursday,
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)
9/15/09 - L22 Sequential Circuit Design Copyright Joanne DeGroat, ECE, OSU1 Sequential Circuit Design Creating a sequential circuit to address a.
Sequential circuit design
Lecture 10 Topics: Sequential circuits Basic concepts Clocks
Clocked Synchronous State Machine Design
IKI c-Synthesis of Sequential Logic Bobby Nazief Semester-I The materials on these slides are adopted from: Prof. Daniel Gajski’s transparency.
Digital Computer Design Fundamental
ECE 331 – Digital Systems Design Sequential Logic Circuits: FSM Design (Lecture #20)
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
Digital Design Lecture 10 Sequential Design. State Reduction Equivalent Circuits –Identical input sequence –Identical output sequence Equivalent States.
Unit 14 Derivation of State Graphs
CS1Q Computer Systems Lecture 8
Chap 4. Sequential Circuits
1 © 2015 B. Wilkinson Modification date: January 1, 2015 Designing combinational circuits Logic circuits whose outputs are dependent upon the values placed.
Lecture 4 – State Machine Design 9/26/20081ECE Lecture 4.
Introduction to Sequential Logic Design Finite State-Machine Design.
1 Lecture #12 EGR 277 – Digital Logic Synchronous Logic Circuits versus Combinational Logic Circuits A) Combinational Logic Circuits Recall that there.
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
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
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,
DLD Lecture 26 Finite State Machine Design Procedure.
ANALYSIS OF SEQUENTIAL CIRCUITS by Dr. Amin Danial Asham.
Analysis and Synthesis of Synchronous Sequential Circuits A “synchronizing” pulse/edge signal (clock) controls the operation of the memory portion of the.
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.
Digital System Design using VHDL
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
Synchronous Counter Design
1 Lecture #14 EGR 277 – Digital Logic Self-starting counters Counters are considered to be self-starting if all unused counts eventually lead to the correct.
5-1-2 Synchronous counters. Learning Objectives: At the end of this topic you will be able to: draw a block diagram showing how D-type flip-flops can.
COMBINATIONAL AND SEQUENTIAL CIRCUITS Guided By: Prof. P. B. Swadas Prepared By: BIRLA VISHVAKARMA MAHAVDYALAYA.
Chapter 3 Boolean Algebra and Digital Logic T103: Computer architecture, logic and information processing.
State Machine Design Shiva choudhary En No.: Electronics and comm. Dept K.I.T.,Jamnagar 1.
Week #7 Sequential Circuits (Part B)
Chapter #6: Sequential Logic Design
ANALYSIS OF SEQUENTIAL CIRCUITS
Adapted by Dr. Adel Ammar
FIGURE 5.1 Block diagram of sequential circuit
Asynchronous Inputs of a Flip-Flop
ECE 301 – Digital Electronics
Reading: Hambley Chapters
FINITE STATE MACHINES (FSMs)
CSE 140L Discussion Finite State Machines.
DESIGN OF SEQUENTIAL CIRCUITS
FINITE STATE MACHINES.
EGR 2131 Unit 12 Synchronous Sequential Circuits
Digital Electronics and Logic Design
Presentation transcript:

1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits, namely flip-flops, and briefly showed how flip-flops can be used to create counters. Now we shall describe a formal way of describing and designing any sequential logic circuit. This material is for the sole and exclusive use of students at UNC-Charlotte. It is not to be sold, reproduced, or generally distributed.

2 A practical sequential circuit exists in a finite number of states. Hence called finite state machines or simply state machines. The states represented by binary signals called state variables. The state variables are stored in flip-flops, activated by the external clock signal.

3 Synchronous Sequential Circuit 1 - Moore Model Note in this model, outputs are a function of the state variables only.

4 Question How many flip-flops are needed for a state machine having forty-eight states? Answer

5 Design problem 1 – Arbitrary code counter with two sequences Suppose a synchronous counter is required that follows one of two repeating sequences, dependent upon a control input, C. When C = 0, the sequence is 00, 01, 11. When C = 1, the sequence is 00, 11, 01. The Moore model is suitable since the flip-flop state outputs as also the outputs of the sequential circuit

6 Design steps Step 1 Derive the state diagram Needs two flip flops, which has four states, three used here. The fourth state might appear upon switch-on, mapped to lead to state 1. State encoding (here arbitrary) C State number

7 Step 2 Derive the state table Shows the transitions from one state to another state, so more accurate name for table is state transition table.

8 Step 3 Draw the assigned state table Replace state numbers with assigned state variables: Y 2 Y 1 for next state, which will become inputs to the flip- flops, see model y 2 y 1 for present state flip- flop outputs State 1 State 2 State 3 State 4 In this case just arbitrary assignment, see later for a more formal way

9 Step 4 Derive inputs to state flip-flops If we use D-type flip-flops, Y inputs are simply the state values of the y outputs required after the next activating clock Work out Boolean expressions for Y 2, Y 1 in terms of y 2, y 1, and C, see next slide

10 Draw Karnaugh maps for the Y 2, Y 1 functions: Not minimal, so as to reuse term in Y 2

11 Step 5 Draw Circuit

12 Question Identify an alternative set of D-type flip-flop input equations that share a term.

13 In the previous design, the state variables were also the circuit outputs. Let us now design a synchronous sequential circuit whose circuit outputs are some function of the state variables, and whose state encoding is not immediately obvious from the design specification. (It is clear with a counter that the state variables should follow the defined counter sequence.)

14 Design problem 2 – sequence detector Design a synchronous sequential logic circuit that will detect the pattern appearing on a single data input, x. Output Z to become a 1 immediately after the last bit appears in the sequence. A circuit of this form might find application in several areas, including detecting the synchronization pattern recorded on magnetic disks before or after data, or synchronization patterns in data communications.

15 Design procedure Step 1 Derive the state diagram Step 2 Draw the state table Step 3aAssign state variable patterns to states Step 3bDraw the assigned state table Step 4aDerive the flip-flop input functions (on Karnaugh maps), and in our design: Step 4bDerive the output function of a Karnaugh map, and finally, Step 5Draw the logic circuit

16 Step 1 Derive the state diagram Input, x

17 Step 2 Draw the state table Notice now an output function

18 Step 3 Assign state variable patterns to states and draw assigned state table Very large number of possible assignments and each would lead to specific next state and output functions. Usually prefer an assignment that leads to the simplest functions, but unfortunately a general method that would work in all cases is not known.

19 Some strategies (A simpler minimized function is obtained if the 1’s on Karnaugh maps are adjacent.) Rule 1 – Assign codes which differ in one variable to states that lead to the same next state. If this cannot be done, then: Rule 2 – Assign codes that differ in one variable for next states of a present state. Rules 1 and 2 are intended to create the simplest next state functions. These rules are only suggestions and cannot guarantee a design with minimum logic.

20 If this cannot be done, then: Rule 3 – Assign codes that differ in one variable to states with the same output (with the same inputs) Rule 3 is intended to create the simplest output function

21 Gray code Has the characteristic that adjacent codes differ by one bit. Many possible Gray codes. A Gray code is used in Karnaugh map labelling. For three variables, the pattern of this Gray code is 000, 001, 011, 010, 110, 111, 101, 100. Hence a Gray code would be a suitable encoding for a series of states, where one state leads to one other state.

22 For our problem: using rule 1 on states 4, 5 and 8 (states 4, 5 and 8 can lead to state 1), and using rule 1 on states 3, 6 and 7 (states 3, 6 and 7 can lead to state 2), we make the assignment: State 1 = 000State 2 = 111 State 4 = 001State 3 = 101 State 5 = 010State 6 = 110 State 8 = 100State 7 = 011 Using 000 for state 1 enables the flip-flops to be initialized to state 1 easily.

23 Assigned state table for sequence detector

24 Step 4 Derive inputs to state flip-flops If we use D-type flip-flops,Y inputs are simply the state values of the y outputs required after the next activating clock Work out Boolean expressions for Y 3,Y 2, Y 1 in terms of y 3, y 2, y 1, and x, see next slide

25

26 Output function Work out Boolean expressions for Z in terms of y 3, y 2, y 1.

27 Step 5 Draw Circuit

28 Synchronous Sequential Circuit-Mealy Model Note: Outputs are a function of the state variables and the inputs. Differs from a Moore model in that the outputs depend not only on the actual state but the inputs occurring to take it to that state.

29 Mealy model designs Often the Mealy model state diagram has less states than a Moore model state diagram for the same problem, and potentially less state variables and state flip-flops. However, the output function may be more complex as it will use the input variables as well as the state variables. Perhaps more importantly, the outputs could change if the inputs change between clock transitions. This may, or may not, be significant in a system design depending upon the application.

30 Let us look at a Mealy model solution to our sequence detector problem detecting the sequence The same design steps have to be done, namely: Step 1 Derive the state diagram Step 2 Draw the state table Step 3aAssign state variable patterns to states Step 3bDraw the assigned state table Step 4aDerive the flip-flop input functions (on Karnaugh maps), and in our design: Step 4bDerive the output function of a Karnaugh map, and finally, Step 5Draw the logic circuit

31 Mealy model state diagram indicates the outputs on the arcs leading to the state, together with the inputs that caused the transition to that state. Step 1 Derive the state diagram

32 State 8 now eliminated. Transition from state 7 to state 8 replaced by a transition from state 7 to state 1 when final bit of sequence received. Now circuit could have one of two output values in state 1: either Z = 0 if the sequence has not been received, or Z = 1 if the sequence has been received.

33 Step 2 Draw the state table Step 3 Assigned state state table

34 Step 4 Derive inputs to state flip-flops Work out Boolean expressions for Y 3,Y 2, Y 1 in terms of y 3, y 2, y 1, and x, see next slide

35

36 Output Function Work out Boolean expressions for Z in terms of y 3, y 2, y 1, and x, see next slide

37 Output function

38 Question What would happen, if anything, to the Z output if x changes from a 1 to a 0 while Z is a 0?

39 Questions

40 To add using S-R and J-K flip flops Not done, state minimization Uisng state transition expressions

41 State diagrams using transition expressions If transition from one state to another state specified by several input variables, previous state diagrams clumsy. A more convenient notation is to give Boolean condition necessary for the transition or no transition in so-called transition expressions. Very important that all combinations of variable values accounted for in diagram. Also, a particular combination of values must not make more than one transition expression true as this would be ambiguous.