COE 202: Digital Logic Design Sequential Circuits Part 3

Slides:



Advertisements
Similar presentations
COE 202: Digital Logic Design Sequential Circuits Part 2
Advertisements

General Sequential Design
State-machine structure (Mealy)
State Machine Design Procedure
COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
A. Abhari CPS2131 Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and.
Sequential Circuits1 DIGITAL LOGIC DESIGN by Dr. Fenghui Yao Tennessee State University Department of Computer Science Nashville, TN.
Sequential Design Part II. Output A(t+1) =D A = AX + BX B(t+1) =D B = AX Y = AX + BX.
Sequential Logic Design with Flip-flops
Registers.1. Register  Consists of N Flip-Flops  Stores N bits  Common clock used for all Flip-Flops Shift Register  A register that provides the.
Sequential Circuit Design
ECE C03 Lecture 101 Lecture 10 Finite State Machine Design Hai Zhou ECE 303 Advanced Digital Design Spring 2002.
Contemporary Logic Design Finite State Machine Design © R.H. Katz Transparency No Chapter #8: Finite State Machine Design Finite State.
Sequential Circuit Design
Overview Sequential Circuit Design Specification Formulation
COE 202: Digital Logic Design Sequential Circuits Part 4 KFUPM Courtesy of Dr. Ahmad Almulhem.
ECE 301 – Digital Electronics
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)
MOHD. YAMANI IDRIS/ NOORZAILY MOHAMED NOOR1 Sequential Circuit Design.
ECE 331 – Digital Systems Design Sequential Logic Circuits: FSM Design (Lecture #20)
Rabie A. Ramadan Lecture 2
1 COMP541 State Machines Montek Singh Feb 8, 2012.
(Sequential Logic Circuit)
Synchronous Sequential Logic Part I
Digital Design Lecture 10 Sequential Design. State Reduction Equivalent Circuits –Identical input sequence –Identical output sequence Equivalent States.
Synchronous Sequential Logic Part II
CSCE 211: Digital Logic Design Chin-Tser Huang University of South Carolina.
Chap 4. Sequential Circuits
Digital Logic Design Sequential circuits
Digital Logic Design Review Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM 2010.
Chapter 8 -- Analysis and Synthesis of Synchronous Sequential Circuits.
Sequential Circuit Design. Outline  Flip-flop Excitation Tables  Sequential Circuit Design  Design: Example #1  Design: Example #2  Design: Example.
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.
1 © 2014 B. Wilkinson Modification date: Dec Sequential Logic Circuits Previously, we described the basic building blocks of sequential circuits,
DLD Lecture 26 Finite State Machine Design Procedure.
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.
1 State Reduction Goal: reduce the number of states while keeping the external input-output requirements unchanged. State reduction example: a: input 0.
Princess Sumaya University
Lecture 20: Sequential Logic (5)
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
Synthesis Synchronous Sequential Circuits synthesis procedure –Word description of problem /hardest; art, not science/ –Derive state diagram & state table.
Synchronous Sequential Logic
Week #7 Sequential Circuits (Part B)
Sequential Circuit Design
Adapted by Dr. Adel Ammar
FIGURE 5.1 Block diagram of sequential circuit
Sequential Circuit: Counter
CSCE 211: Digital Logic Design
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
ECE 301 – Digital Electronics
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.
CSCE 211: Digital Logic Design
FINITE STATE MACHINES (FSMs)
CENG 241 Digital Design 1 Lecture 11
CSCE 211: Digital Logic Design
COE 202: Digital Logic Design Sequential Circuits Part 4
CSCE 211: Digital Logic Design
Analysis of Synchronous Sequential Circuits
CSE 370 – Winter Sequential Logic-2 - 1
Analysis of Synchronous Sequential Circuits
DESIGN OF SEQUENTIAL CIRCUITS
Analysis with JK flip-flops
Chapter5: Synchronous Sequential Logic – Part 4
CSCE 211: Digital Logic Design
Chapter5: Synchronous Sequential Logic – Part 3
COE 202: Digital Logic Design Sequential Circuits Part 3
Presentation transcript:

COE 202: Digital Logic Design Sequential Circuits Part 3 Courtesy of Dr. Ahmad Almulhem KFUPM

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

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 KFUPM

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 KFUPM

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) KFUPM

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) KFUPM

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) KFUPM

Step3: Obtaining the State Equations Using K-Maps A(t + 1) = DA = ∑(3,5,7) = A x + B x B(t + 1) = DB = ∑(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) KFUPM

Step4: Draw Circuits Using K-Maps A(t + 1) = DA = ∑(3,5,7) = A x + B x B(t + 1) = DB = ∑(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) KFUPM

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 + + KFUPM

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 KFUPM

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

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

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

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

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

Example 1 (cont.) Step 3: State Equations use k-map JA = BX’ KA = BX + B’X’ DB = X Y = ABX’ KFUPM

Example 1 (cont.) Step 4: Draw Circuit JA = BX’ KA = BX + B’X’ DB = X Y = ABX’ KFUPM

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, … KFUPM

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

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

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

Example 2 (cont.) Step3: State Equations KFUPM

Example 2 (cont.) Step4: Draw Circuit TA0 = 1 TA1 = A0 TA2 = A1A0 KFUPM

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). KFUPM

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

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

Example 3 (cont.) Step4: Draw Circuit For step3, use k-maps as usual JA = XB KA = X’ DB = X(A+B) Z = A.B KFUPM

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

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 NS only NS Signal green EW Signal red EW & NS Alternate No traffic Previous state W E S KFUPM

Example 4 (cont.) Step1: State Diagram 11, 10 NS / 01 EW / 10 00, 01 00, 10 11, 01 INPUTS Sensors X1, X0 X0: car coming on NS X1 : car coming on EW OUTPUTS Light S1, S0 S0 : NS is green S1 : EW is green STATES NS: NS is green EW: EW is green KFUPM

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

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. KFUPM

Example 5 (cont.) Present State Inputs Next State FF Inputs A B E X JA KA JB KB 1 00 01 10 11 KFUPM

Example 5 (cont.) Y X E JA = BEX + B’EX’ KA = BEX + B’EX’ JB = E 00 01 11 10 1 x EX AB 00 01 11 10 x 1 Y X JA C A A’ KA E clock JB B B’ KB JA = BEX + B’EX’ KA = BEX + B’EX’ EX AB 00 01 11 10 1 x EX AB 00 01 11 10 x 1 X JB = E KB = E KFUPM

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

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! KFUPM

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 KFUPM

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

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 KFUPM

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 KFUPM

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 KFUPM

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 KFUPM

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

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

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 KFUPM