Overview Part 1 - Storage Elements and Sequential Circuit Analysis

Slides:



Advertisements
Similar presentations
EE 5900 Advanced Algorithms for Robust VLSI CAD, Spring 2009 Sequential Circuits.
Advertisements

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.
1 Fundamentals of Computer Science Sequential Circuits.
Computer Architecture CS 215
Princess Sumaya University
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.
Overview Part 1 - Storage Elements and Analysis
CPEN Digital System Design Chapter 5 Sequential Circuits Storage Elements and Sequential Circuit Analysis C. Gerousis © Logic and Computer Design.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Logic and Computer.
Circuits require memory to store intermediate data
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 1 – Storage.
Sequential Circuit Analysis & Design Dr. Aiman H. El-Maleh Computer Engineering Department King Fahd University of Petroleum & Minerals Dr. Aiman H. El-Maleh.
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
Sequential circuit Digital electronics is classified into combinational logic and sequential logic. In combinational circuit outpus depends only on present.
Sequential Circuit Design
Sequential Circuit Design
Overview Sequential Circuit Design Specification Formulation
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 3 – Combinational Logic Design Part 1 –
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
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.
Digital Computer Design Fundamental
Latches, Flip-Flops BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
Overview Part 1 Part 2 Sequential Circuit Design
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
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.
Combinational Logic Design CS341 Digital Logic and Computer Organization F2003.
Chap 4. Sequential Circuits
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 2 – Combinational Logic Circuits Part 2.
1.Overview of Course Objective 2.Details of course website, BLOG 3.Details of Syllabus 4.Recommended Books 5.Details of Lab Sessions 6.Introductory concepts.
Chap 4. Sequential Circuits
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. Circuit Optimization Logic and Computer Design Fundamentals.
Sequential Circuits. Two primary differences between combinational circuits and sequential circuits –Sequential circuits are synchronous (use a clock)
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.
CPEN Digital System Design Chapter 5 - Sequential Circuits Sequential Circuit Design C. Gerousis © Logic and Computer Design Fundamentals, 4 rd Ed.,
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Logic and Computer.
1 Lecture 22 Sequential Circuits Analysis. 2 Combinational vs. Sequential  Combinational Logic Circuit  Output is a function only of the present inputs.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use ECE/CS 352: Digital Systems.
Charles Kime & Thomas Kaminski © 2004 Pearson Education, Inc. Terms of Use (Hyperlinks are active in View Show mode) Terms of Use Logic and Computer Design.
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
Other Flip-Flop Types: J-K and T flip-flops (Section 5-6)
5 Chapter Synchronous Sequential Circuits 1. Logic Circuits- Review 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates.
Sequential Circuit Design Section State Machines Design Procedure 1.Specification- obtain (produce) problem description 2.Formulation - Obtain.
Sequential Circuit: Design BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
ECE 331 – Digital System Design Introduction to Sequential Circuits and Latches (Lecture #16)
1. 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates whose outputs are determined from the current combination of inputs.
State Diagrams Tuesday, 12 September State diagram Graphical representation of a state table. –Provides the same information as a state table. –A.
Digital Design: With an Introduction to the Verilog HDL, 5e M. Morris Mano Michael D. Ciletti Copyright ©2013 by Pearson Education, Inc. All rights reserved.
1 Lecture #15 EGR 277 – Digital Logic Reading Assignment: Chapter 5 in Digital Design, 3 rd Edition by Mano Example: (Problem 5-17 from Digital Design,
Overview Part 1 - Storage Elements and Sequential Circuit Analysis
4.
Sequential Circuit Design
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
Synchronous Sequential Circuits
Sequential Circuits Most digital systems like digital watches, digital phones, digital computers, digital traffic light controllers and so on require.
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.
332:437 Lecture 12 Finite State Machine Design
KU College of Engineering Elec 204: Digital Systems Design
Example: Re-design with Moore Model
KU College of Engineering Elec 204: Digital Systems Design
Reference: Chapter 5 Sequential Circuits Moris Mano 4th Ediditon
Sequential Circuit Analysis & Design
Chapter5: Synchronous Sequential Logic – Part 3
Chapter 5 – Sequential Circuits
Presentation transcript:

Overview Part 1 - Storage Elements and Sequential Circuit Analysis Part 2- Sequential Circuit Design Specification Formulation State Assignment Flip-Flop Input and Output Equation Determination Verification

The Design Procedure Specification Formulation - Obtain a state diagram or state table State Assignment - Assign binary codes to the states Flip-Flop Input Equation Determination - Select flip-flop types and derive flip-flop equations from next state entries in the table Output Equation Determination - Derive output equations from output entries in the table Optimization - Optimize the equations Technology Mapping - Find circuit from equations and map to flip-flops and gate technology Verification - Verify correctness of final design

State Assignment – Example 1 Present State Next State x=0 x=1 Output x=0 x=1 A B 1 How may assignments of codes with a minimum number of bits? Two – A = 0, B = 1 or A = 1, B = 0 Does it make a difference? Only in variable inversion, so small, if any.

State Assignment – Example 2 Present State Next State x=0 x=1 Output x=0 x=1 A A B 0 0 B A C C D C D 0 1 How may assignments of codes with a minimum number of bits? 4  3  2  1 = 24 Does code assignment make a difference in cost?

State Assignment – Example 2 (continued) Counting Order Assignment: A = 0 0, B = 0 1, C = 1 0, D = 1 1 The resulting coded state table: Present State Next State x = 0 x = 1 Output 0 0 0 1 1 0 1 1 1

State Assignment – Example 2 (continued) Gray Code Assignment: A = 0 0, B = 0 1, C = 1 1, D = 1 0 The resulting coded state table: Present State Next State x = 0 x = 1 Output 0 0 0 1 1 1 1 0 1

Find Flip-Flop Input and Output Equations: Example 2 – Counting Order Assignment Assume D flip-flops Interchange the bottom two rows of the state table, to obtain K-maps for D1, D2, and Z: D1 D2 Z Y2 Y1 X 1 Y2 Y1 X 1 Y2 Y1 X 1

Optimization: Example 2: Counting Order Assignment Performing two-level optimization: D1 = Y1Y2 + XY1Y2 D2 = XY1Y2 + XY1Y2 + XY1Y2 Z = XY1Y2 Gate Input Cost = 22 D1 D2 Z Y2 Y1 X 1 Y2 Y1 X 1 Y2 Y1 X 1

Find Flip-Flop Input and Output Equations: Example 2 – Gray Code Assignment Assume D flip-flops Obtain K-maps for D1, D2, and Z: D1 D2 Z Y2 Y1 X 1 Y2 Y1 X 1 Y2 Y1 X 1

Optimization: Example 2: Assignment 2 Performing two-level optimization: D1 = Y1Y2 + XY2 Gate Input Cost = 9 D2 = X Select this state assignment to Z = XY1Y2 complete design in slide D1 D2 Z Y2 Y1 X 1 Y2 Y1 X 1 Y2 Y1 X 1

One Flip-flop per State (One-Hot) Assignment Example codes for four states: (Y3, Y2, Y1, Y0) = 0001, 0010, 0100, and 1000. In equations, need to include only the variable that is 1 for the state, e. g., state with code 0001, is represented in equations by Y0 instead of Y3 Y2 Y1 Y0 because all codes with 0 or two or more 1s have don’t care next state values. Provides simplified analysis and design Combinational logic may be simpler, but flip-flop cost higher – may or may not be lower cost

State Assignment – Example 2 (continued) One-Hot Assignment : A = 0001, B = 0010, C = 0100, D = 1000 The resulting coded state table: Present State Next State x = 0 x = 1 Output 0001 0010 0100 1000 1

Optimization: Example 2: One Hot Assignment Equations read from 1 next state variable entries in table: D0 = X(Y0+ Y1 + Y3) or X Y2 D1 = X(Y0+ Y3) D2 = X(Y1+ Y2) or X(Y0+ Y3 ) D3 = X Y2 Z = XY3 Gate Input Cost = 15 Combinational cost intermediate plus cost of two more flip-flops needed.

Map Technology Library: Initial Circuit: D Flip-flops with Reset (not inverted) NAND gates with up to 4 inputs and inverters Initial Circuit: Clock D C R Y2 Z Y1 X Reset

Mapped Circuit - Final Result Clock D C R Y2 Z Y1 X Reset

Sequential Design: Example Design a sequential modulo 3 accumulator for 2-bit operands Definitions: Modulo n adder - an adder that gives the result of the addition as the remainder of the sum divided by n Example: 2 + 2 modulo 3 = remainder of 4/3 = 1 Accumulator - a circuit that “accumulates” the sum of its input operands over time - it adds each input operand to the stored sum, which is initially 0. Stored sum: (Y1,Y0), Input: (X1,X0), Output: (Z1,Z0)

Example (continued) Complete the state table 00 01 11 10 Z1Z0 A (00) X State Assignment: (Y1,Y0) = (Z1,Z0) Codes are in gray code order to ease use of K-maps in the next step X1X0 Y1Y0 00 01 11 10 Z1Z0 Y1(t+1), Y0(t+1) A (00) X B (01) - (11) C (10) Add entry 01 in (00),(01) Add entry 10 in (00)(10) Add entry 01 in (01)(00) Add entry 10 in (01)(01) Add entry 00 in (01)(10) Add entry 10 in (10)(00) Add entry 00 in (10)(01) Add entry 01 in (10)(10)

Example (continued) Complete the state diagram: 00 A/00 Reset 01 C/10 Add arc labeled 10 from state A to state C Add arc labeled 00 from state B to state B Add arc labeled 01 from state B to state C Add arc labeled 10 from state B to state A Add arc labeled 00 from state C to state C Add arc labeled 01 from state C to state A Add arc labeled 10 from state C to state B B/01

Example (continued) Y0 Y1 D1 D0 X1 X X0 Find optimized flip-flop input equations for D flip-flops D1 = D0 = D1 Y0 Y1 X1 X0 X D0 Entries in locations 0 through 15 for D1 = 0,0,1,X; 0,1,0,X;1,0,0,X; X,X,X,X Entries in locations 0 through 15 for D0 = 0,1,0,X; 1,0,0,X;0,0,1,X; X,X,X,X Prime implicants (all essential) are given in the equations below: D1 = Y1X1’X0’ + Y0X0 + Y1’Y0’X1 D0 = Y0X1’X0’ + Y1X1 + Y1’Y0’X0

Circuit - Final Result with AND, OR, NOT X1 D C R Y1 Z1 X0 Y0 D Z0 C R Reset Clock

Other Flip-Flop Types J-K and T flip-flops Behavior Implementation Basic descriptors for understanding and using different flip-flop types Characteristic tables Characteristic equations Excitation tables For actual use, see Reading Supplement - Design and Analysis Using J-K and T Flip-Flops

J-K Flip-flop Behavior Same as S-R flip-flop with J analogous to S and K analogous to R Except that J = K = 1 is allowed, and For J = K = 1, the flip-flop changes to the opposite state As a master-slave, has same “1s catching” behavior as S-R flip-flop If the master changes to the wrong state, that state will be passed to the slave E.g., if master falsely set by J = 1, K = 1 cannot reset it during the current clock cycle

J-K Flip-flop (continued) Implementation To avoid 1s catching behavior, one solution used is to use an edge-triggered D as the core of the flip-flop Symbol J C K D C K J

T Flip-flop Behavior Same as a J-K flip-flop with J = K = T Has a single input T For T = 0, no change to state For T = 1, changes to opposite state Same as a J-K flip-flop with J = K = T As a master-slave, has same “1s catching” behavior as J-K flip-flop Cannot be initialized to a known state using the T input Reset (asynchronous or synchronous) essential

T Flip-flop (continued) Implementation To avoid 1s catching behavior, one solution used is to use an edge-triggered D as the core of the flip-flop Symbol T C C D T

Basic Flip-Flop Descriptors Used in analysis Characteristic table - defines the next state of the flip-flop in terms of flip-flop inputs and current state Characteristic equation - defines the next state of the flip-flop as a Boolean function of the flip-flop inputs and the current state Used in design Excitation table - defines the flip-flop input variable values as function of the current state and next state

D Flip-Flop Descriptors Characteristic Table Characteristic Equation Q(t+1) = D Excitation Table D 1 Operation Reset Set Q(t 1) + Q(t +1) 1 D Operation Reset Set

T Flip-Flop Descriptors Characteristic Table Characteristic Equation Q(t+1) = T Å Q Excitation Table T Q(t + 1) Operation Q ( t ) No change 1 Q ( t ) Complement + Q(t 1) T Operation Q ( t ) No change Q ( t ) 1 Complement

S-R Flip-Flop Descriptors Characteristic Table Characteristic Equation Q(t+1) = S + R Q, S.R = 0 Excitation Table S R Q(t + 1) Operation Q ( t ) No change 1 Reset 1 1 Set 1 1 ? Undefined Operation No change Set Reset S X 1 Q(t+ 1) Q(t) R

J-K Flip-Flop Descriptors Characteristic Table Characteristic Equation Q(t+1) = J Q + K Q Excitation Table 1 No change Set Reset Complement Operation J K Q(t + 1) Q ( t ) Q(t) Q(t + 1) J K Operation X No change 1 1 X Set 1 X 1 Reset 1 1 X No Change

Flip-flop Behavior Example Use the characteristic tables to find the output waveforms for the flip-flops shown: Clock D,T D C QD T C QT

Flip-Flop Behavior Example (continued) Use the characteristic tables to find the output waveforms for the flip-flops shown: Clock S,J R,K S C R QSR ? J C K QJK