DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Similar documents
DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

Logic and Computer Design Fundamentals. Chapter 7. Registers and Counters

Chapter 5 Synchronous Sequential Logic

1. Convert the decimal number to binary, octal, and hexadecimal.

EE292: Fundamentals of ECE

CSE Latches and Flip-flops Dr. Izadi. NOR gate property: A B Z Cross coupled NOR gates: S M S R Q M

1.b. Realize a 5-input NOR function using 2-input NOR gates only.

CHAPTER 4: Logic Circuits

CHAPTER 4: Logic Circuits

Synchronous Sequential Logic

YEDITEPE UNIVERSITY DEPARTMENT OF COMPUTER ENGINEERING. EXPERIMENT VIII: FLIP-FLOPS, COUNTERS 2014 Fall

ECE 301 Digital Electronics

Final Exam review: chapter 4 and 5. Supplement 3 and 4

Synchronous Sequential Logic. Chapter 5

UNIT III. Combinational Circuit- Block Diagram. Sequential Circuit- Block Diagram

Logic Design II (17.342) Spring Lecture Outline

CPS311 Lecture: Sequential Circuits

Synchronous Sequential Logic

Logic Design. Flip Flops, Registers and Counters

Lecture 8: Sequential Logic

NH 67, Karur Trichy Highways, Puliyur C.F, Karur District UNIT-III SEQUENTIAL CIRCUITS

MC9211 Computer Organization

Unit 11. Latches and Flip-Flops

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

Chapter 5 Sequential Circuits

Sequential Logic Circuits

D Latch (Transparent Latch)

MODU LE DAY. Class-A, B, AB and C amplifiers - basic concepts, power, efficiency Basic concepts of Feedback and Oscillation. Day 1

Vignana Bharathi Institute of Technology UNIT 4 DLD

Synchronous sequential circuits

Other Flip-Flops. Lecture 27 1

St. MARTIN S ENGINEERING COLLEGE

Asynchronous (Ripple) Counters

Digital Design, Kyung Hee Univ. Chapter 5. Synchronous Sequential Logic

WEEK 10. Sequential Circuits: Analysis and Design. Page 1

(CSC-3501) Lecture 7 (07 Feb 2008) Seung-Jong Park (Jay) CSC S.J. Park. Announcement

Using minterms, m-notation / decimal notation Sum = Cout = Using maxterms, M-notation Sum = Cout =

ECE 331 Digital System Design

ECE 301 Digital Electronics

More design examples, state assignment and reduction. Page 1

Sequential Logic. Analysis and Synthesis. Joseph Cavahagh Santa Clara University. r & Francis. TaylonSi Francis Group. , Boca.Raton London New York \

Department of Electrical and Computer Engineering Mid-Term Examination Winter 2012

EXPERIMENT: 1. Graphic Symbol: OR: The output of OR gate is true when one of the inputs A and B or both the inputs are true.

ELCT201: DIGITAL LOGIC DESIGN

Microprocessor Design

RS flip-flop using NOR gate

Sequential Logic and Clocked Circuits

ELCT201: DIGITAL LOGIC DESIGN

Sequential Design Basics

Subject : EE6301 DIGITAL LOGIC CIRCUITS

ELCT201: DIGITAL LOGIC DESIGN

The word digital implies information in computers is represented by variables that take a limited number of discrete values.

Flip-Flops and Sequential Circuit Design

Computer Architecture and Organization

Chapter 4. Logic Design

Chapter 6. Flip-Flops and Simple Flip-Flop Applications

Chapter 5: Synchronous Sequential Logic

1. a) For the circuit shown in figure 1.1, draw a truth table showing the output Q for all combinations of inputs A, B and C. [4] Figure 1.

MODEL QUESTIONS WITH ANSWERS THIRD SEMESTER B.TECH DEGREE EXAMINATION DECEMBER CS 203: Switching Theory and Logic Design. Time: 3 Hrs Marks: 100

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Flip-flop and Registers

LAB 7. Latches & Flip Flops

VU Mobile Powered by S NO Group

Chapter 8 Sequential Circuits

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

DIGITAL TECHNICS. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute

CHAPTER1: Digital Logic Circuits

Sequential Digital Design. Laboratory Manual. Experiment #3. Flip Flop Storage Elements

problem maximum score 1 28pts 2 10pts 3 10pts 4 15pts 5 14pts 6 12pts 7 11pts total 100pts

EMT 125 Digital Electronic Principles I CHAPTER 6 : FLIP-FLOP

Principles of Computer Architecture. Appendix A: Digital Logic

Bachelor Level/ First Year/ Second Semester/ Science Full Marks: 60 Computer Science and Information Technology (CSc. 151) Pass Marks: 24

Course Administration

L5 Sequential Circuit Design

Combinational vs Sequential

Chapter. Synchronous Sequential Circuits

UNIT IV. Sequential circuit

ME 515 Mechatronics. Introduction to Digital Electronics

DIGITAL SYSTEM FUNDAMENTALS (ECE421) DIGITAL ELECTRONICS FUNDAMENTAL (ECE422) LATCHES and FLIP-FLOPS

LAB #4 SEQUENTIAL LOGIC CIRCUIT

Advanced Digital Logic Design EECS 303

Part II. Chapter2: Synchronous Sequential Logic

Name Of The Experiment: Sequential circuit design Latch, Flip-flop and Registers

SEQUENTIAL LOGIC. Satish Chandra Assistant Professor Department of Physics P P N College, Kanpur

Combinational / Sequential Logic

Introduction to Sequential Circuits

A clock is a free-running signal with a cycle time. A clock may be either high or low, and alternates between the two states.

Introduction. NAND Gate Latch. Digital Logic Design 1 FLIP-FLOP. Digital Logic Design 1

LESSON PLAN. Sub Code: EE2255 Sub Name: DIGITAL LOGIC CIRCUITS Unit: I Branch: EEE Semester: IV

UNIVERSITI TEKNOLOGI MALAYSIA

EKT 121/4 ELEKTRONIK DIGIT 1

Synchronous Sequential Logic

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

RS flip-flop using NOR gate

R13 SET - 1 '' ''' '' ' '''' Code No: RT21053

Logic. Andrew Mark Allen March 4, 2012

Solution to Digital Logic )What is the magnitude comparator? Design a logic circuit for 4 bit magnitude comparator and explain it,

DIGITAL ELECTRONICS MCQs

Chapter Contents. Appendix A: Digital Logic. Some Definitions

Transcription:

26.3.9. DIGITAL TECHNICS II Dr. Bálint Pődör Óbuda University, Microelectronics and Technology Institute 5. LECTURE: ANALYSIS AND SYNTHESIS OF SYNCHRONOUS SEQUENTIAL CIRCUITS 2nd (Spring) term 25/26 5. LECTURE Analysis and synthesis of synchronous sequential circuits: Design examples and case studies 2

26.3.9. SYNTHESIS: GENERAL CONCEPTS Synchronous sequential circuits synthesis procedure Word description of problem (hardest; art, not science) Derive state diagram and state table Minimize (moderately hard) Assign states (very hard) Produce state and output transition tables Determine what FFs to use and find their excitation maps Derive output equations/k-maps Obtain the logic diagram This is the so called next state method (c.f. Zsom Vol II) INTRODUCTORY EXAMPLES Control of an alarm system role of memory Two-flip-flop circuit - designing with next-state 4 2

26.3.9. EXAMPLE : CONTROL OF AN ALARM SYSTEM Sensor Set Reset Memory element On/Off Alarm Control of an alarm system is one of the simplest case of sequential logic. Alarm is ON when the sensor generates a positive voltage, SET, in response to an undesirable event. Once alarm is on, it can only be turned off manually through a RESET button. Memory is needed to remember the alarm has to be active until the reset signal arrives. 5 EXAMPLE : APPLICATION OF THE SR LATCH An important application of SR latches is for recording short lived events e.g. pressing an alarm bell in a hospital bed button bed2 button master reset R S R S RS Latch RS Latch Q Q bed light bed2 light warning bell 3

26.3.9. SYNTHESIS OF SYNCHRONOUS SEQUENTIAL CIRCUIT: EXAMPLE 2 Synthesize the synchronous circuit which operates according to the given state table. E.g. if the system in state C and the X input variable is, then in the next clock period the system goes to state D and the output variable will take the value. 7 STATE TRANSITION DIAGRAM / / / A B C / / / / D / 8 4

26.3.9. SYNTHESIS: EXAMPLE 2 Example: Find D FF realization of circuit defined in table (a) (b): state assignment (c): transition table (d): output K- map (e): excitation K-map 9 STATE ENCODING 5

26.3.9. FLIP-FOP CONTROL: D-FF Example solution: Logic diagram IMPLEMENTATION x z Clock 2 6

26.3.9. SYNTHESIS WITH JK FLIP-FLOPS Example is same as before, but use JK FFs (a): transition table; (b): Excitation tables; (c): Excitation maps 3 SYNTHESIS: JK FLIP-FLOP 4 7

26.3.9. FLIP-FLOP- CONTROL 5 FLIP-FLOP-2 CONTROL 6 8

26.3.9. IMPLEMENTATION Example JK FF solution: Logic diagram x z J = X Y2 _ K = X Y2 J2 = X Y + X Y K2 = X Y + X Y Clock 7 COMPARISON OF TWO DESIGNS x z x z Clock Clock 8 9

26.3.9. COMPARISON OF DIFFERENT DESIGNS Flip-flop: D D JK JK Logic: AND-OR XOR AND-OR XOR Pin count: 2 6 28 5 Gate count: 9 7 7 9 SYNTHESIS OF SYNCHRONOUS CIRCUITS: GENERAL PROCEDURE (EMPHASIS). Constructing the state transition diagram. 2. Selection or specifying the encoding of the states. 3. Constructing the state transition tables. It gives for each cycle the next-state of each flip-flop in the function of the previous states of all flip-flops and in the function of the control conditions (up/down). 4. Selection or specifying the type of flip-flop used in the implementation. Excitation table of the flip-flop type. 5. Determination of the logic functions of the control input(s) of each flip-flop. Performing the necessary or appropriate minimization. 6. Selection of the types of logic gates to be used and implementation of the feedback/control network. 2

26.3.9. STATE MACHINE General scheme of a state machine. 2 STATE MACHINE SYNTHESIS The strategy for applying this scheme to a given problem consists of the following:. Identify the number of required states, m. The number of bits of memory (e.g. number of flip-flops) required to specify the m states is at minimum n = log2(m). 2. Make a state diagram which shows all states, inputs, and outputs. 3. Make a truth table for the logic section. The table will have n + k inputs and n + m outputs. 4. Implement the truth table using combinational logic techniques. 22

26.3.9. SYNTHESIS OF SEQUENTIAL CIRCUIT: A CASE STUDY Synthetize a network which determines the parity of a four bit serial code word. Should indicate the parity of the incoming code word after receiving the 4-th bit as - if the parity is odd, - if the parity is even. The output is irrelevant (don t care) during the first three cycle of the period. 23 4-BIT PARITY INDICATOR Mealy machine When checking the parity the order of the bits is irrelevant. Construct the state transition diagram of the Mealy-machine. 24 2

26.3.9. 4-BIT PARITY INDICATOR: STATE TRANSITION DIAGRAM left (s)- even right (n) - odd red - incoming bit green - incoming bit The output Z is defined only in the fourth cycle, otherwise it is don t care. For the code word a c d f a even odd 25 CHARACTERISTICS Because there are two input conditions, two connecting lines emanate from each node. The network returns to its initial state after the fourth cycle. The operation of the network is cyclic, the length of the period is four cycles. 26 3

26.3.9. STATE TRANSITION TABLE AND DIAGRAM even odd 27 THE NUMBER OF INTERNAL STATES AND THEIR ENCODING Total number of internal states: seven Three flip-flops (Q, Q 2, Q 3 ) are necessary and enough for the encoding. The actual state encoding greatly influences the complexity and structure of the network. Here we use the final (optimal) state encoding. 28 4

26.3.9. STATE ENCODING In the firs row, we make use of the redundancy. To the states in the same level of the state transition diagram, the same Q and Q2 codes are ascribed. Q, Q2: cycle counters. Q3: indicates whether the system is in the even or on the odd branch of the state transition diagram. 29 STATE FUNCTIONS AND THE OUTPUT FUNCTION 3 5

26.3.9. STATE FUNCTIONS AND THE OUTPUT FUNCTION 3 STATE FUNCTIONS AND THE OUTPUT FUNCTION Q n+ = 4 (2,3,6,7,,,4,5); Q n+ 2 = 4 (-3,8-2); Q n+ 3 = 4 (3,7,8,9,); x:(4,5,2,3); Z n = 4 (5,2); x:(-3,6-,4,5); The weighing of the variables: X n 8 Q n 4 Q 2 n 2 Q 3 n 32 6

26.3.9. EXCITATION TABLE OF THE JK FLIP-FLOP The logic synthesis is based on the excitation table of the flipflop chosen for the implementation. Q n Q n+ J K X X X X 33 CONTROL OF FLIP-FLOP Q _ K = Q 2 J = Q 2 Note the role of the don t care terms in the minimization. 34 7

26.3.9. CONTROL OF FLIP-FLOP Q 2 _ K 2 = Q J 2 = Q Due to the proper state-encoding, the X input variable is not present in the control equations of Q és Q 2.These two flipflops act as cycle counter. 35 CONTROL OF FLIP-FLOP Q 3 _ K 3 = X Q 2 + X Q 2 = X Q 2 J 3 = X The X input is among the variables controlling the flip-flop. The state of Q 3 will represent the actual parity. Q 3 will remember then parity of the input sequence. 36 8

26.3.9. THE OUTPUT FUNCTION Z Note the chessboard pattern! This implies XOR function: Z = X Q 3 + X Q 3 = = X Q 3 37 THE LOGIC DIAGRAM OF THE PARITY CHECK CIRCUIT 4th cycle cycle counter 38 9

26.3.9. IMPLEMENTATION ALTERNATIVE USING D FLIP-FLOPS D = Q 2 D 2 = Q _ D 3 = X Q + X Q 3 + X Q Q 2 Due to the clever sate encoding, the control of the two flipflops acting as the cycle counter corresponds to the usual one. However the control network of the third flip-flop is somewhat more complex than in the former implementation. _ 39 IMPLEMENTATION USING T FLIP-FLOPS The feedback network is somewhat more complicated than in the case of D flip-flops. Main reason: Counting in Gray code with T flip-flops needs more gates for the feedback. Perhaps somebody might check a design with T flip-flops, the cycle counter operating in the simple binary code 4 2

26.3.9. 8-BIT PARITY INDICATOR Generalization to 8 bit s is straightforward. Design procedure and the state transition diagram is similar. There will be 5 states, therefore four flip-flops are necessary. If the encoding is the same as previously, then three FFs form the cycle counter, and the fourth will store the information concerning the parity. 4 8-BIT PARITY INDICATOR Input Input State transition diagram 42 2

26.3.9. 8-BIT PARITY INDICATOR State table and encoding 43 8-BIT PARITY INDICATOR: LOGIC DIAGRAM 44 22

26.3.9. SYNCHRONOUS COUNTER DESIGN EXAMPLE AND CASE STUDY Consider the synthesis of a 4-bit up-counter in Gray-code using D flip-flops. A Gray-code counter using D flip-flops can be designed by finding the appropriate function of each D terminal. Given a present state of the counter, the D terminal of each flip-flop should be made equal to the value of the same bit position of the next-number in the Gray code. 45 4-BIT GRAY CODE COUNTER: CONCEPTUAL DIAGRAM Q3 Q2 Q Q D3 D2 D D3 Clock 4 Combinational feedback circuit 46 23

26.3.9. 24 STATE TRANSITION TABLE 47 Minterm index Q3 n Q2 n Q n Q n Q3 n+ D3 Q2 n+ D2 Q n+ D Q n+ D 3 2 6 7 5 4 2 3 5 4 9 8 KARNAUGH MAPPING 48 D3 D2

26.3.9. KARNAUGH MAPPING D D 49 FLIP-FLOP CONTROL EQUATIONS Q3 n+ = D3 = Q3Q + Q3Q + Q2QQ Q2 n+ = D2 = Q2Q + Q2Q + Q3QQ Q n+ = D = QQ +Q3Q2Q + Q3Q2Q Q n+ = D = Q3Q2Q +Q3Q2Q +Q3Q2Q +Q3Q2Q Implementation options: two-level AND-OR (3 AND, 4 OR) in modular logic or PLA, or two-level NAND-NAND in 5 modular logic, or PROM. 25

26.3.9. FLIP-FLOP CONTROL EQUATIONS Design alternative: D and D controls can be implemented in AND-OR-XOR LOGIC too. Q n+ = D = QQ +Q3Q2Q + Q3Q2Q = QQ + (Q3 Q2)Q Q n+ = D = Q3Q2Q +Q3Q2Q +Q3Q2Q +Q3Q2Q = Q3 Q2 Q Give a three-level combinational network (7 AND, 3 OR, 2 XOR, and INV). 5 UP/DOWN 3-BIT GRAY CODE COUNTER State transition diagram Next-state table UP/DOWN control input: Y 52 26

26.3.9. UP/DOWN 3-BIT GRAY CODE COUNTER Variables: Q2, Q, Q, and Y 53 UP/DOWN 3-BIT GRAY CODE COUNTER Logic expressions for flip-flop control 54 27

26.3.9. UP/DOWN 3-BIT GRAY CODE COUNTER 55 4-BIT BI-DIRECTIONAL GRAY CODE COUNTER Features of design provided by one of the students of my previous course. Compared designs using D or T flip-flops. Using T flip-flops, some several common terms could be realized by XOR gate or XOR gate and inverter, leading to further simplification of the feedback circuit. Complexity: 6 NAND gates (2,3 or 4 inputs), 2 XOR gates and 2 inverters. Estimated the maximum clock frequency of the counter when using high speed CMOS logic components. 56 28

26.3.9. SYNTHESIS OF SYNCHRONOUS CIRCUITS: RECAPITULATION. Constructing the state transition diagram. 2. Selection or specifying the encoding of the states. 3. Constructing the state transition tables. It gives for each cycle the next-state of each flip-flop in the function of the previous states of all flip-flops and in the function of the control conditions (up/down). 4. Selection or specifying the type of flip-flop used in the implementation. Excitation table of the flip-flop type. 5. Determination of the logic functions of the control input(s) of each flip-flop. Performing the necessary or appropriate minimization. 6. Selection of the types of logic gates to be used and implementation of the feedback/control network. 57 END OF LECTURE 58 29