Synchronous Sequential Logic

Similar documents
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 7 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Sequential Synchronous Circuit Analysis

Digital Logic and Design (Course Code: EE222) Lecture 19: Sequential Circuits Contd..

Sequential vs. Combinational

Chapter 5 Synchronous Sequential Logic

ELCT201: DIGITAL LOGIC DESIGN

Lecture (08) Synchronous Sequential Logic

Finite State Machine. By : Ali Mustafa

Different encodings generate different circuits

Synchronous Sequential Logic. Chapter 5

Chapter 4 Part 2 Sequential Circuits

Overview of Chapter 4

Synchronous Sequential Logic Part I. BME208 Logic Circuits Yalçın İŞLER

Synchronous Sequential Logic Part I

Lecture 14: State Tables, Diagrams, Latches, and Flip Flop

Sequential Logic. Rab Nawaz Khan Jadoon DCS. Lecturer COMSATS Lahore Pakistan. Department of Computer Science

I. Motivation & Examples

Chapter 5 Synchronous Sequential Logic

Analysis and Design of Sequential Circuits: Examples

Problem Set 9 Solutions

Gates and Flip-Flops

Chapter 7 Sequential Logic

The Design Procedure. Output Equation Determination - Derive output equations from the state table

Sequential Logic Circuits

Chapter 4. Sequential Logic Circuits

Digital Design. Sequential Logic

EE40 Lec 15. Logic Synthesis and Sequential Logic Circuits

Topic 8: Sequential Circuits

Synchronous Sequential Circuit

Sequential Circuit Analysis

11.1 As mentioned in Experiment 10, sequential logic circuits are a type of logic circuit where the output of

ELE2120 Digital Circuits and Systems. Tutorial Note 9

COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

Lecture 3 Review on Digital Logic (Part 2)

Vidyalankar S.E. Sem. III [ETRX] Digital Circuits and Design Prelim Question Paper Solution

Sequential Circuits Sequential circuits combinational circuits state gate delay

Lecture 17: Designing Sequential Systems Using Flip Flops

Unit II Chapter 4:- Digital Logic Contents 4.1 Introduction... 4

UNIVERSITY OF BOLTON SCHOOL OF ENGINEERING BENG (HONS) ELECTRICAL & ELECTRONICS ENGINEERING EXAMINATION SEMESTER /2017

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

Week-5. Sequential Circuit Design. Acknowledgement: Most of the following slides are adapted from Prof. Kale's slides at UIUC, USA.

COE 202: Digital Logic Design Sequential Circuits Part 3. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Department of Electrical & Electronics EE-333 DIGITAL SYSTEMS

Chapter 14 Sequential logic, Latches and Flip-Flops

LOGIC CIRCUITS. Basic Experiment and Design of Electronics

L4: Sequential Building Blocks (Flip-flops, Latches and Registers)

CSE140: Components and Design Techniques for Digital Systems. Midterm Information. Instructor: Mohsen Imani. Sources: TSR, Katz, Boriello & Vahid

S.Y. Diploma : Sem. III [CO/CM/IF/CD/CW] Digital Techniques

Introduction EE 224: INTRODUCTION TO DIGITAL CIRCUITS & COMPUTER DESIGN. Lecture 6: Sequential Logic 3 Registers & Counters 5/9/2010

Fundamentals of Digital Design

ELEC Digital Logic Circuits Fall 2014 Sequential Circuits (Chapter 6) Finite State Machines (Ch. 7-10)

S.Y. Diploma : Sem. III [DE/ED/EI/EJ/EN/ET/EV/EX/IC/IE/IS/IU/MU] Principles of Digital Techniques

Synchronous Sequential Circuit Design. Digital Computer Design

CPE100: Digital Logic Design I

Topic 8: Sequential Circuits. Bistable Devices. S-R Latches. Consider the following element. Readings : Patterson & Hennesy, Appendix B.4 - B.

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Using the NOT realization from the NAND, we can NOT the output of the NAND gate making it a NOT NOT AND or simply an AND gate.

ELEN Electronique numérique

Computers also need devices capable of Storing data and information Performing mathematical operations on such data

Sequential Circuit Design

LOGIC CIRCUITS. Basic Experiment and Design of Electronics. Ho Kyung Kim, Ph.D.

University of Minnesota Department of Electrical and Computer Engineering

I. Motivation & Examples

Boolean Algebra and Digital Logic 2009, University of Colombo School of Computing

Reg. No. Question Paper Code : B.E./B.Tech. DEGREE EXAMINATION, NOVEMBER/DECEMBER Second Semester. Computer Science and Engineering

Digital Logic: Boolean Algebra and Gates. Textbook Chapter 3

KUMARAGURU COLLEGE OF TECHNOLOGY COIMBATORE

MAHARASHTRA STATE BOARD OF TECHNICAL EDUCATION (Autonomous) (ISO/IEC Certified) State any two Boolean laws. (Any 2 laws 1 mark each)


P2 (10 points): Given the circuit below, answer the following questions:

Lab #10: Design of Finite State Machines

ALU, Latches and Flip-Flops

FYSE420 DIGITAL ELECTRONICS

King Fahd University of Petroleum and Minerals College of Computer Science and Engineering Computer Engineering Department

Appendix B. Review of Digital Logic. Baback Izadi Division of Engineering Programs

CPE100: Digital Logic Design I

Synchronous Sequential Circuit Design. Dr. Ehab A. H. AL-Hialy Page 1

Latches. October 13, 2003 Latches 1

Integrated Circuits & Systems

Lecture 8: Sequential Networks and Finite State Machines

XI STANDARD [ COMPUTER SCIENCE ] 5 MARKS STUDY MATERIAL.

WORKBOOK. Try Yourself Questions. Electrical Engineering Digital Electronics. Detailed Explanations of

EE 209 Logic Cumulative Exam Name:

ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN. Week 9 Dr. Srinivas Shakkottai Dept. of Electrical and Computer Engineering

Sample Test Paper - I

Schedule. ECEN 301 Discussion #25 Final Review 1. Date Day Class No. 1 Dec Mon 25 Final Review. Title Chapters HW Due date. Lab Due date.

COE 202: Digital Logic Design Sequential Circuits Part 3. Dr. Ahmad Almulhem ahmadsm AT kfupm Phone: Office:

Fundamentals of Boolean Algebra

Memory Elements I. CS31 Pascal Van Hentenryck. CS031 Lecture 6 Page 1

DIGITAL LOGIC CIRCUITS

Roger L. Tokheim. Chapter 8 Counters Glencoe/McGraw-Hill


Digital Electronics Sequential Logic

Clocked Synchronous State-machine Analysis

3. Complete the following table of equivalent values. Use binary numbers with a sign bit and 7 bits for the value

Lecture 7: Sequential Networks

Review for B33DV2-Digital Design. Digital Design

Adders, subtractors comparators, multipliers and other ALU elements

MAHALAKSHMI ENGINEERING COLLEGE TIRUCHIRAPALLI

Chapter 7. Synchronous Sequential Networks. Excitation for

Transcription:

1 IT 201 DIGITAL SYSTEMS DESIGN MODULE4 NOTES Synchronous Sequential Logic Sequential Circuits - A sequential circuit consists of a combinational circuit and a feedback through the storage elements in the circuit. Inputs Combinational Circuit Outputs Memory Element - Sequential circuits can be categorized as being synchronous or asynchronous. - A synchronous sequential circuit usually has a clock pulse (clocked sequential circuits). - Flip-flops are storage elements which are used in clocked sequential circuits. - Each flip-flop can store one bit. - A synchronous clocked sequential circuit is shown below: Inputs Combinational Circuit Clock Pulse Outputs Memory Element Clock Pulse Latches - Latches are the basic types of flip-flops. - The SR latch is a latch with two inputs S (set) and R (reset), and an output Q. - Q = 1 (Q = 0) represents the set state and Q = 0 (Q = 1) represents the reset state.

2 - The SR latch can be implemented by NOR gates or NAND gates. 0 0 1 1 R S R Q Q Q 1 0 1 0 (Set state) 0 0 1 0 (After S=1, R=0) 0 1 0 1 (Reset state) S Q 0 0 0 1 (After S=0, R=1) 1 1 0 0 (Undefined) - Assume S=1 and R=0 in the above circuit. Then the output of the bottom gate (Q ) is definitely 0 (note that the output of a NOR gate is zero if at least one of its inputs is 1). This means that the output of the top gate (Q) is 1, as both of its inputs are 0. This is called the set state. - Assume now that right after the above state, S becomes 0. Since from the previous state we have Q=1, hence the output of the bottom gate stays at 0 and consequently the output of the top gate also stays at 1, as both of its inputs are equal to 0. - Similarly, if S=0 and R=1, then we will have Q=0 and Q =1, which is the reset state (this can be concluded from the symmetrical configuration of the circuit as well). Again, if R becomes 0 right after the reset state, the outputs will remain unchanged (Q=0 and Q =1). - After any change in the input, it has to go to zero so that the circuit becomes ready for the next state. - In undefined state the next output is not predictable when both inputs go back to zero (it depends whether the S or R input goes to zero first). - NAND gate implementation:

3 S R Q Q S Q 1 0 0 1 1 1 0 1 (After S=1, R=0) 0 1 1 0 R Q 1 1 1 0 (After S=0, R=1) 0 0 1 1 (Undefined) - Assume S=0 and R=1 in the above circuit. Then the output of the top gate (Q) is definitely 1 (note that the output of a NAND gate is 1 if at least one of its inputs is 0). This means that the output of the bottom gate (Q ) is 0, as both of its inputs are 1. - Assume now that right after the above state, S becomes 1. Since from the previous state we have Q=1, hence the output of the bottom gate stays at 0 and consequently the output of the top gate also stays at 1, as one of its inputs is equal to 0. - One should make sure that both inputs are not connected to zero simultaneously. - SR latch with control input is shown below: S C S R Next state of Q Q 0 x x No change 1 0 0 No change C 1 0 1 Q=0 (Reset state) (Control input) Q 1 1 0 Q=1 (Set state) R 1 1 1 Undefined - D latch (data latch) is an element which holds data in its internal storage and the output becomes equal to D each time C enables the circuit (by changing to 1).

4 D C Q C D Next State of Q 0 x No change Q 1 0 Q=0 (Reset state) 1 1 Q=1 (Set state) - D latch is also called a transparent latch. - Block diagram of latches are shown below. S S D R R C SR latch (NOR gate implementation) SR latch (NAND gate implementation) D latch Flip-Flops - The problem with the latch is that it responds to a change during a positive level (or a negative level) of a clock pulse but in a sequential circuit we need to trigger the element only at a signal transition instant. Positive-edge response Negative-edge response - Two different ways to construct a D flip-flop from latches are shown below.

5 1. X Y Q D D latch D D latch C (master) C (slave) CLK - The value of D is being transferred to Y during CLK = 1 but it is being transferred to Q only when CLK changes from 1 to 0. - One can change the position of the inverter to make the circuit a positive-edge triggered D flip-flop. CLK X Y Q 2. More efficient construction (using three SR latches) Y S Q CLK R Q D Z

6 - S and R are equal to 1 while CLK = 0 (which causes no change in the output). - If D = 0 when CLK becomes 1, R changes to 0 (Since S = 1, Z = 1, CLK = 1) and this resets the flip-flop, making Q = 0. - Now if D changes its value (while CLK = 1), since R = 0, we will still have Z = 1 and it will not change the value of R. - When clock goes to 0, R goes to 1 which is a normal condition (as S is still 1), causing no change in the output. - Now if D = 1 when CLK goes to 1, it makes Z = 0 (D = 1, R = 1) and it causes Y = 1 and since CLK = 1, Y = 1, so S becomes 0, and this sets the output (S = 0, R = 1) - Any change in D while CLK = 1 does not affect the output. - Setup time is the minimum time the D input is required to stay at a constant value prior to the next clock change. - Hold time is the minimum time the D input is required to stay unchanged after the clock change. - Propagation delay is the interval between the trigger edge and the stabilization of the output to a new state. - The symbols for D flip-flop are shown in the following figures. D C Positive-edge triggered D flip-flop D C Negative-edge triggered D flip-flop - There are three operations that can be performed with a flip-flop: set, reset, or complement the output. JK Flip-Flop: - The JK flip-flop can be derived from the D flip-flop using the Boolean function D = J.Q + K.Q as follows:

7 J K CLK D Q C Q - The symbol for JK flip flop is shown in the following figure. - All three operations set, reset, and complement can be performed by a JK flip-flop. - When J=0 and K=0, then D=Q, which implies that the output remains unchanged (after the next clock edge). - When J=0 and K=1, then D=0, which implies that the output is reset (after the next clock edge). - When J=1 and K=0, then D=1, which implies that the output is set (after the next clock edge). K - When J=1 and K=1, then D=Q, which implies that the output is complemented (after the next clock edge). - The characteristic table and the characteristic equation describe the operation of a flip-flop through a table and an algebraic equation, respectively. - The characteristic table of the D flip-flop and the JK flip-flop are as follows: J C D Q(t+1) J K Q(t+1) Next state (one clock later) 0 0 0 0 Q(t) No change 1 1 0 1 0 Reset 1 0 1 Set 1 1 Q (t) Compliment

8 - The characteristic equation of the D flip-flop and the JK flip-flop are as follows: Q(t+1)=D, Q(t+1)=J.Q (t)+k.q(t) T Flip-Flop - The T (toggle) flip-flop can be derived from the D flip-flop using the Boolean function D = T Q = T.Q + T.Q as follows. T D Q - It can also be derived from a JK flip-flop as follows. C Q T J Q C K Q - When T=0, then D is equal to Q, which means that the output remains unchanged after the next clock edge. - When T=1, then D becomes equal to Q, which implies that the output is complemented after the next clock edge. - The characteristic equation of the T flip-flop can be obtained as follows. D = T Q = T.Q'+T '.Q Q(t +1) = T.Q'+T '.Q - The characteristic table of the T flip-flop is given below. T Q(t+1) 0 Q(t) No change 1 Q (t) Compliment - The graphic symbol of the T flip-flop is as follows. T C

9 - Direct inputs: Sometimes asynchronous inputs are used to change the state of a flipflop to a preset (direct set) or clear (direct reset) state at any desired time (regardless of clock pulses). Preset y CLK S R Q Q D Clear x - Start with S = R = 1 (normal condition). Assume that Clear = 0. Then Q = 1, and since S = 1 and Preset = 1, it resets the flip-flop (Q = 0). - Start again with S = R = 1 (normal condition). Assume now that Preset = 0. Then Q will be equal to 1, and since R = 1 and Clear = 1, thus Q goes to zero, which sets the flip-flop (Q = 1). - Thus, if Clear is zero, the flip-flop will be cleared to zero, i.e. Q = 0, and if Preset is equal to 0, it forces the flip-flop into Q = 1. - In general case, we will have the following representation of the D flip-flop with direct reset ( represents the positive edge of the CLK). Data D Q CLK C R Q Reset Reset C D Q Q 0 X X 0 1 1 0 0 1 1 1 1 0

10 Analysis of Clocked Sequential Circuits - A clocked sequential circuit can be analyzed by using: (i) The state equation obtained by replacing flip-flop input equations in its characteristic equation, or (ii) a state table. - Analysis with D flip-flops: Write the Boolean expression for each flip-flop input, which is, in fact, the flip-flop output right after the next active clock edge. - Example: x D A C A D B CLK C B y - State equation can be written as: A(t +1) = A(t).x(t) + B(t).x(t) B(t +1) = A (t).x(t) - or simply: A(t +1) = A.x + B.x B(t +1) = A.x - The output is given by: y(t) = [A(t) + B(t)].x (t) - or simply: y = [ A + B].x - State table or transition table lists all possible binary combinations of present state and inputs.

11 m flip-flops n inputs A.x+B.x A.x A.x +B.x Present state Input Next state Output 2 m+n rows A B x A B y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 1 0 1 1 1 1 0 1 0 0 0 0 1 1 0 1 1 0 0 1 1 0 0 0 1 1 1 1 1 0 0 - For some applications (like state reduction) we may use the following form of the state table: Next state Output Present state x=0 x=1 x=0 x=1 A B A B A B y y 0 0 0 0 0 1 0 0 0 1 0 0 1 1 1 0 1 0 0 0 1 0 1 0 1 1 0 0 1 0 1 0 - State diagram: Present state Next state AB AB Input/output - The state diagram follows directly from the state table. - For the previous example:

12 0/0 1/0 00 0/1 10 1/0 0/1 0/1 1/0 01 1/0 11 Fig. 5.1 - Flip-flop input equations or excitation equations (for a circuit with D flip-flops, it is the same as the state equation): D A = A.x + B.x D B = A.x - Each interconnection with the corresponding initial and final states can be built by using a combinational circuit. - Example (analysis with D flip-flop): In the circuit below, we have D A = A x y x D A y CLK C Present inputs Next state state A x y A 0 0 0 0 0 0 1 1 0 1 0 1 0 1 1 0 1 0 0 1 1 0 1 0 1 1 0 0 1 1 1 1

13 - When the output is not specified, we assume that the output is the output of the flipflop. 01,10 00,11 0 1 00,11 01,10 - Analysis with JK flip-flops: It is desired to find the state table (or transition table), from which one can easily obtain the state diagram. To this end, one can find the flipflop input equations (from the combination circuit which generates the input signals) and replace them in the characteristic equation to find state equation (or transition equation). Then, next state and also output(s) can be obtained for different values of the input. Alternatively, one can add some additional columns to the transition table (one for each flip-flop input) and find the elements of these added columns for different values of the input (and present state). The values of the next state can then be obtained directly from the flip-flop inputs. - Example: x J C K A J C K B CLK J A = B K A = B.x (5.1) J B = x K B = A x = A.x + A.x

14 Present state Input Next State Flip-Flop inputs A B x A B J A K A J B K B 0 0 0 0 1 0 0 1 0 0 0 1 0 0 0 0 0 1 0 1 0 1 1 1 1 1 0 0 1 1 1 0 1 0 0 1 1 0 0 1 1 0 0 1 1 1 0 1 1 0 0 0 0 0 1 1 0 0 0 1 1 1 1 1 1 1 1 1 1 0 0 0 These are obtained from the boolean expressions (just like ordinary truth table) based on the present states. Note that this is not part of the table. - One can also find the next state from the state equations by substituting the input equations into the flip-flop characteristic equations, as pointed out earlier. - Characteristic equation for the JK flip-flop is: ' A(t +1) = J A.A + K A.A B(t +1) = J B.B + K B '.B - Substituting the flip-flop input equations given in (5.1) into the above equations: state equations : A(t +1) = B.A + (B.x ).A = A.B + A.B + A.x B(t +1) = x.b + ( A x).b = B.x + A.B.x + A.B.x - Next states in the table can now be obtained directly (no need for the flip-flop inputs). 1 1 00 0 11 0 0 01 1 10 1 Fig. 5.2

15 - Analysis with T flip-flops: Similar to the analysis with JK flip-flops, the state table can be obtained by using state equation, or by adding flip-flop input columns to the table. - Example: x A y T 0 C R C R T B T A = B.x T B = x y = A.B CLK reset - Characteristic equations: A(t +1) = T A A B(t +1) = T B B - Substituting the input equations into the characteristic equations: A(t +1) = (B.x).A + (B.x).A = A.B + A.x + A.B.x B(t +1) = x B Present state Input Next State Output A B x A B y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 1 0 0 1 1 1 0 0 1 0 0 1 0 0 1 0 1 1 1 0 1 1 0 1 1 1 1 1 1 0 0 1

16 - The state diagram will be: 0 0 1 00/0 1 01/0 1 11/1 1 10/0 0 0 Fig. 5.3 - The output is only a function of current state, not the input, and that is why the output is written inside state circles. - Mealy model: A Mealy model is the one that the output is a function of both input x and current states. For example Figure 5.1. - Moore model: A Moore model is the one that the output is a function of the present state only, For example, Figures 5.2 and 5.3. - If the output(s) are not shown in the circuits, the flip-flop states are the outputs. - Note that since in a Moore model the outputs are functions of only flip-flop states, the outputs are synchronized with the clock. - However, in a Mealy model, the outputs may change asynchronously. This can occur when the inputs change during the constant value of the clock cycle. - In a Mealy model momentary false values may occur in the output as a result of the flip-flop delays. State Reduction and Assignment - The number of states reduces by reducing the number of flip-flops. - Example:

17 0/0 a 1/0 0/0 0/0 0/0 b 0/0 c 1/0 1/0 0/0 g 1/1 d 0/0 e 1/1 1/1 f 1/1 - In Particular, for the input sequence 01010110100 and assuming that the initial state is a, we will have: State a a b c d e f f g f g a Input 0 1 0 1 0 1 1 0 1 0 0 Output 0 0 0 0 0 1 1 0 1 0 0 - State reduction means to reduce the number of states in a sequential circuit with an identical input-output relationship. - The easiest way of state reduction is through state table as follows:

18 Present Next state Output state 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 - Two states are equivalent if for identical inputs they give exactly the same output and result in a transition to the same state (or an equivalent state). - If two states are equivalent, one of them can be removed without changing the inputoutput operation of the circuit. - We have to find a pair of equivalent states and delete one. - States g and e are equivalent and we can delete g and replace it with e. Present Next state Output state 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 - Now we can see that d and f also have similar rows associated with them. - Reduced table:

19 Present Next state Output state 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 0/0 0/0 1/0 a 0/0 e 0/0 1/0 b c 0/0 1/0 1/0 d 1/1 - Reducing the number of states does not necessarily mean a circuit with fewer gates and/or flip-flops. - For the above reduced diagram and the input sequence that was given before, we will have: a a b c d e d d e d e a 0 1 0 1 0 1 1 0 1 0 0 0 0 0 0 0 1 1 0 1 0 0 - Note that state reduction in general may lead to a circuit with more gates than the original system (for the combinational circuit which provides inputs to the flip-flops).

20 - State assignment using coded binary values is required for designing a sequential circuit. - The number of bits (n) in the code must be such that 2 n m, where m is the number of states. state Assignement 1 Assignement 2 Assignement 3 Binary Gray code One-hot a 0 0 0 0 0 0 0 0 0 0 1 b 0 0 1 0 0 1 0 0 0 1 0 c 0 1 0 0 1 1 0 0 1 0 0 d 0 1 1 0 1 0 0 1 0 0 0 e 1 0 0 1 1 0 1 0 0 0 0 - Using binary assignment 1, the previous simplified state table will be: Present Next state Output state x=0 x=1 x=0 x=1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 1 0 0 1 1 0 0 0 1 0 0 0 0 0 1 1 0 0 0 1 1 1 0 0 0 1 1 0 1 1 0 0 0 0 0 0 1 1 0 1 Design Procedure 1. Translating the design specifications to the state diagram 2. State reduction 3. Assigning binary values to the states 4. Obtaining binary coded state table 5. Choosing the type of flip-flop 6. Deriving the simplified flip-flop input equations and output equations 7. Drawing the logic diagram

21 - Example: Design a circuit that detects three or more consecutive 1 s in a string of bits coming through an input line. 0 S 0 /0 S 1 /0 1 0 0 0 1 S 3 /1 1 S 2 /0 1 - Note that this is a Moore model as the output only depends on the states. Synthesis using D Flip-Flops - We have to find the state table first. Input Present state Next State Output A B x A B y 0 0 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 1 1 0 0 1 0 0 0 0 0 1 0 1 1 1 0 1 1 0 0 0 1 1 1 1 1 1 1 - Find the flip-flop input equations: A(t +1) = D A ( A, B, x) = (3,5,7) B(t +1) = D B ( A, B, x) = (1,5,7) y( A, B, x) = (6,7)

22 - Simplify using K-map: B B Bx 00 01 11 10 A A 0 0 0 1 0 A 1 0 1 1 0 x x x D A = A.x + B.x B B A A 0 Bx 00 01 11 10 0 1 0 0 A 1 0 1 1 0 x x x D B = A.x + B.x

23 B B Bx 00 01 11 10 A A 0 0 0 0 0 A 1 0 0 1 1 x x x y = A.B D A x C D B CLK C B y - Design with other types of flip-flops is not straightforward as the next state cannot directly be related to the input equations. - In such cases we should use excitation tables, which list the required input for a given change of state.

24 Q(t) Q(t+1) J K Q(t) Q(t+1) T 0 0 0 x 0 0 0 0 1 1 x 0 1 1 1 0 x 1 1 0 1 1 1 x 0 1 1 0 Excitation table of a Excitation table of a JK flip-flop T flip-flop Synthesis using JK Flip-Flops - Example: Consider the sequential circuit given by the following table: Present state Input Next State A B x A B 0 0 0 0 0 0 0 1 0 1 0 1 0 1 0 0 1 1 0 1 1 0 0 1 0 1 0 1 1 1 1 1 0 1 1 1 1 1 0 0 - Assume that it is desired to design this sequential circuit using JK flip-flops. - Using the excitation table of JK flip-flops, we will have:

25 Present state Input Next State Flip-Flop Inputs A B x A B J A K A J B K B 0 0 0 0 0 0 x 0 x 0 0 1 0 1 0 x 1 x 0 1 0 1 0 1 x x 1 0 1 1 0 1 0 x x 0 1 0 0 1 0 x 0 0 x 1 0 1 1 1 x 0 1 x 1 1 0 1 1 x 0 x 0 1 1 1 0 0 x 1 x 1 B J A = B.x B B K A = B.x B Bx 00 01 11 10 Bx A A 00 01 11 10 A 0 0 0 0 1 A 0 x x x x A 1 x x x x A 1 0 0 1 0 x x x x x x B B B B Bx A 00 01 11 10 Bx A 00 01 11 10 A 0 0 1 x x A 0 x x 0 1 A 1 0 1 x x A 1 x x 1 0 x x x x x x J B = x K B = ( A x)

26 - The logic diagram can be obtained from the input equations given above: x J A C K A J B C K B CLK Synthesis using T Flip-Flops: - Example: Consider a 3-bit binary counter shown in the following diagram: 000 001 111 010 110 11 101 100 - In fact the only input to the circuit is the clock and the output is the present state of the flip-flops. - The state table for this example is as follows:

27 Present State Next State A2 A 1 A 0 A 2 A 1 A 0 T A 2 From Excitation table Flip-Flop Inputs T A 1 TA 0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 0 0 1 1 0 1 0 0 1 1 0 0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 0 1 0 0 1 1 0 1 1 1 0 0 1 1 1 1 0 1 1 1 0 0 1 1 1 1 0 0 0 1 1 1 - The most efficient way to construct a binary counter is by using T flip-flops, because of their complement property. A 1 A 1 A 2 A 1 A 0 00 01 11 10 A 2 0 0 0 1 0 A 2 1 0 0 1 0 A 0 A 0 A 0 T A 2 = A.A 1 0

28 A 1 A 1 A 2 A 1 A 0 00 01 11 10 A 2 0 0 1 1 0 A 2 1 0 1 1 0 A 0 A 0 A 0 T A = A 0 1 A 1 A 1 A 2 A 1 A 0 00 01 11 10 A 2 0 1 1 1 1 A 2 1 1 1 1 1 - Logic diagram of the counter: A 0 A 0 A 0 T A 0 = 1 A 2 A 1 A 0 C T C T C T CLK 1

29 Reference: [1] Digital Design 3rd Edition, By Morris Mano, Publisher Prentice Hall, 4th Edition.