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.

Slides:



Advertisements
Similar presentations
COE 202: Digital Logic Design Sequential Circuits Part 1 Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office: Ahmad Almulhem, KFUPM.
Advertisements

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
Classification of Digital Circuits  Combinational. Output depends only on current input values.  Sequential. Output depends on current input values and.
1 KU College of Engineering Elec 204: Digital Systems Design Lecture 12 Basic (NAND) S – R Latch “Cross-Coupling” two NAND gates gives the S -R Latch:
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.
Sequential Circuits : Part I Read Sections 5-1, 5-2, 5-3.
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.
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. 2 State Optimization Equivalent States:  Two states are equivalent if, for each member of the set of inputs,  they give exactly.
Sequential Circuits and Finite State Machines Prof. Sin-Min Lee
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.
Sequential Circuits. 2 Sequential vs. Combinational Combinational Logic:  Output depends only on current input −TV channel selector (0-9) Sequential.
A clocked synchronous state-machine changes state only when a triggering edge or “tick” occurs on the clock signal. ReturnNext  “State-machine”: is a.
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,
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 logic and systems
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
Latches, Flip-Flops BIL- 223 Logic Circuit Design Ege University Department of Computer Engineering.
COE 202: Digital Logic Design Sequential Circuits Part 1
Overview Part 1 Part 2 Sequential Circuit Design
Eng. Mohammed Timraz Electronics & Communication Engineer University of Palestine Faculty of Engineering and Urban planning Software Engineering Department.
Chapter 5 - Part Sequential Circuit Design Design Procedure  Specification  Formulation - Obtain a state diagram or state table  State Assignment.
Flip Flop
EE2174: Digital Logic and Lab Professor Shiyan Hu Department of Electrical and Computer Engineering Michigan Technological University CHAPTER 9 Sequential.
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 =
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
Synchronous Sequential Logic Part II
Unit 14 Derivation of State Graphs
1 Boolean Algebra & Logic Gates. 2 Objectives Understand the relationship between Boolean logic and digital computer circuits. Learn how to design simple.
Chap 4. Sequential Circuits
Lecture 4 – State Machine Design 9/26/20081ECE Lecture 4.
Sequential Circuits. Two primary differences between combinational circuits and sequential circuits –Sequential circuits are synchronous (use a clock)
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
Charles Kime & Thomas Kaminski © 2008 Pearson Education, Inc. (Hyperlinks are active in View Show mode) Chapter 5 – Sequential Circuits Part 2 – Sequential.
Chapter 10 Flip-Flops and Registers 1. Objectives You should be able to: Explain the internal circuit operation of S-R and gated S-R flip-flops. Explain.
Other Flip-Flop Types: J-K and T flip-flops (Section 5-6)
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.
5 Chapter Synchronous Sequential Circuits 1. Logic Circuits- Review 2 Logic Circuits Sequential Circuits Combinational Circuits Consists of logic gates.
ENG241 Digital Design Week #7 Sequential Circuits (Part B)
Revision Mid 1 Prof. Sin-Min Lee Department of Computer Science.
CS151 Introduction to Digital Design Chapter 5: Sequential Circuits 5-1 : Sequential Circuit Definition 5-2: Latches 1Created by: Ms.Amany AlSaleh.
ECE 301 – Digital Electronics Brief introduction to Sequential Circuits and Latches (Lecture #14)
ECE 331 – Digital System Design Introduction to Sequential Circuits and Latches (Lecture #16)
Sequential Circuit Design 05 Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.
State Machine Design Shiva choudhary En No.: Electronics and comm. Dept K.I.T.,Jamnagar 1.
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,
4.
FIGURE 5.1 Block diagram of sequential circuit
Digital Design Lecture 9
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
ECE 352 Digital System Fundamentals
Chapter5: Synchronous Sequential Logic – Part 3
Chapter 5 – Sequential Circuits
Presentation transcript:

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 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, output should be 0. State Assignment Example

2 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 State definitions: –INIT: initial state –A0: A had 10 but not 00 on the previous clock ticks. –A1: A had 01 but not 11 on the previous clock ticks. –OK0: A had 00, or when OK B=1 and last A=0 –OK1: A had 11, or when OK B=1 and last A=1 State Assignment Example (cont.) A: B: Z:

3 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 How to choose the best state assignment? Formal way: try all assignments! –To much work, not practical. Guidelines for reasonable state assignments: –Choose an initial state into which the machine can easily be forced at reset (00…0 or 11…1). –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. –Exploit symmetries in the problem specifications. –Don’t limit the choice of coded states to the first m n-bit integers. –Decompose the set of state variables into individual bits or fields, where each bit or field has a well-defined meaning wrt the input effects or output behavior. –Consider using more than the minimum number of state variables to make, a decomposed assignment, possible.

4 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Ex: Decomposed State Assignment StateQ1Q2Q3Q1Q2Q3 INIT000 A0100 A1101 OK0110 OK1111 Easy to force reset state When Q 1 =1 Q 2 indicates an OK state Q 3 indicates the previous value of A

5 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Ex: One-hot State Assignment StateQ 1 —Q 5 Q 1 —Q 4 (almost one-hot) INIT A A OK OK One bit to each state Simple structure Requires more than minimum number of FFs.

6 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Note on unused states Minimal Risk: –Consider getting one of the unused (or illegal) states (can be hardware failure, design error, etc). –Identify unused states, create next-state transitions to initial, idle or a safe state. Minimal Cost: –Assumes the machine never enters to the unused states. –In the next-state table unused states can be marked as don’t cares. –Simplifies excitation logic, but may create problems.

7 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 State Minimization Should minimize the cost of the final sequential clocked circuit (scct) either by –Reducing the number of gates, or –Reducing the number of FFs One possible way for this minimization is –Elimination of equivalent states. Equivalent states: –If it is impossible to distinguish them by observing the current and future outputs of the machine.

8 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 E  G F  D Present State Next State X=0 X=1 Output X=0 X=1 AAB00 BCD00 CAD00 DEF01 EAF01 FGF01 GAF01 Example on equivalent states: Present State Next State X=0 X=1 Output X=0 X=1 AAB00 BCD00 CAD00 DED01 EAD01

9 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 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

10 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 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

11 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 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 D C K J J C K

12 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 T Flip-flop Behavior –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

13 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 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 C D T T C

14 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 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

15 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 D Flip-Flop Descriptors Characteristic Table Characteristic Equation Q(t+1) = D Excitation Table D 0 1 Operation Reset Set 0 1 Q(t1) + Q(t+1) D Operation Reset Set

16 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 T Flip-Flop Descriptors Characteristic Table Characteristic Equation Q(t+1) = T  Q Excitation Table No change Complement Operation 0 1 TQ(t1) Q(t) Q(t) + Q(t + 1) Q(t) 1 0 T No change Complement Operation Q(t)

17 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 S-R Flip-Flop Descriptors Characteristic Table Characteristic Equation Q(t+1) = S + R Q, S. R = 0 Excitation Table OperationS R No change Reset Set Undefined 0 1 ? Q(t+1) Q(t) Operation No change Set Reset No change S X Q(t+ 1) Q(t) R X 0 1 0

18 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 J-K Flip-Flop Descriptors Characteristic Table Characteristic Equation Q(t+1) = J Q + K Q Excitation Table No change Set Reset Complement OperationJ K 0 1 Q(t +1) Q(t) Q(t) Q(t + 1) Q(t) Operation X X 0 1 K 0 1 X X J No change Set Reset No Change

19 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Flip-flop Behavior Example Use the characteristic tables to find the output waveforms for the flip- flops shown: T C Clock D,T QDQD QTQT D C

20 KU College of Engineering Elec 204: Digital Systems Design Lecture 17 Flip-Flop Behavior Example (continued) Use the characteristic tables to find the output waveforms for the flip- flops shown: J C K S C R Clock S,J Q SR Q JK R,K ?