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

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

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

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

Section 6.8 Synthesis of Sequential Logic Page 1 of 8

EE292: Fundamentals of ECE

More design examples, state assignment and reduction. Page 1

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

Chapter 5 Synchronous Sequential Logic

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

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

Switching Theory And Logic Design UNIT-IV SEQUENTIAL LOGIC CIRCUITS

Vignana Bharathi Institute of Technology UNIT 4 DLD

Logic Design II (17.342) Spring Lecture Outline

Asynchronous (Ripple) Counters

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

Lecture 8: Sequential Logic

EECS150 - Digital Design Lecture 19 - Finite State Machines Revisited

Microprocessor Design

CHAPTER 4: Logic Circuits

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

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

ECE 301 Digital Electronics

CPS311 Lecture: Sequential Circuits

EECS150 - Digital Design Lecture 15 Finite State Machines. Announcements

MC9211 Computer Organization

Flip-Flops and Sequential Circuit Design

Switching Circuits & Logic Design, Fall Final Examination (1/13/2012, 3:30pm~5:20pm)

Chapter 2. Digital Circuits

Synchronous Sequential Logic

CHAPTER 4: Logic Circuits

ECE 331 Digital System Design

ECE 301 Digital Electronics

Chapter 5 Sequential Circuits

Synchronous sequential circuits

University of California at Berkeley College of Engineering Department of Electrical Engineering and Computer Science SOLUTIONS

DIGITAL CIRCUIT LOGIC UNIT 9: MULTIPLEXERS, DECODERS, AND PROGRAMMABLE LOGIC DEVICES

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

Synchronous Sequential Logic

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

Sequential Logic Circuits

Introduction to Sequential Circuits

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

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

`COEN 312 DIGITAL SYSTEMS DESIGN - LECTURE NOTES Concordia University

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

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

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

Introduction. Serial In - Serial Out Shift Registers (SISO)

CHAPTER 6 COUNTERS & REGISTERS

CS8803: Advanced Digital Design for Embedded Hardware

0 0/1 0/1 0/1 0/1 0/1 0/1 0/1 0/1 1 1 Stop bits. 11-bit Serial Data format

ELCT201: DIGITAL LOGIC DESIGN

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

VU Mobile Powered by S NO Group

REPEAT EXAMINATIONS 2002

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.

Synchronous Sequential Logic. Chapter 5

MUHAMMAD NAEEM LATIF MCS 3 RD SEMESTER KHANEWAL

Digital Logic Design Sequential Circuits. Dr. Basem ElHalawany

Counters


NH 67, Karur Trichy Highways, Puliyur C.F, Karur District DEPARTMENT OF INFORMATION TECHNOLOGY CS 2202 DIGITAL PRINCIPLES AND SYSTEM DESIGN

Advanced Digital Logic Design EECS 303

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

The basic logic gates are the inverter (or NOT gate), the AND gate, the OR gate and the exclusive-or gate (XOR). If you put an inverter in front of

Combinational / Sequential Logic

Counter dan Register

UNIT IV. Sequential circuit

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.

Chapter 5: Synchronous Sequential Logic

Chapter 4. Logic Design

D Latch (Transparent Latch)

Chapter Contents. Appendix A: Digital Logic. Some Definitions

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

UNIT 1: DIGITAL LOGICAL CIRCUITS What is Digital Computer? OR Explain the block diagram of digital computers.

A Review of logic design

Computer Architecture and Organization

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

Combinational vs Sequential

Subject : EE6301 DIGITAL LOGIC CIRCUITS

Lecture 11: Synchronous Sequential Logic

More on Flip-Flops Digital Design and Computer Architecture: ARM Edition 2015 Chapter 3 <98> 98

Flip-flop and Registers

THE KENYA POLYTECHNIC

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Registers

Objectives. Combinational logics Sequential logics Finite state machine Arithmetic circuits Datapath

Chapter 5. Introduction

Midterm Examination II

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

SEMESTER ONE EXAMINATIONS 2002

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

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

WINTER 15 EXAMINATION Model Answer

Principles of Computer Architecture. Appendix A: Digital Logic

Flip Flop. S-R Flip Flop. Sequential Circuits. Block diagram. Prepared by:- Anwar Bari

Outline. CPE/EE 422/522 Advanced Logic Design L03. Review: Clocked D Flip-Flop with Rising-edge Trigger. Sequential Networks

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.

MODULE 3. Combinational & Sequential logic

Sequential Logic and Clocked Circuits

EECS 270 Final Exam Spring 2012

Transcription:

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

27.2.2. 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 SYNTHESIS OF SYNCHRONOUS CIRCUITS: GENERAL PROCEDURE. 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. 4 2

27.2.2. STATE MACHINE General scheme of a state machine. 5 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 = log 2 (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. 6 3

27.2.2. SYNTHESIS: A SIMPLE EXAMPLE 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 7 STATE TRANSITION DIAGRAM A B C D 8 4

27.2.2. IMPLEMENTATION Example solution: Logic diagram 9 SYNTHESIS Example is same as before, but use JK FFs (a): transition table; (b): Excitation tables; (c): Excitation maps 5

27.2.2. IMPLEMENTATION Example JK FF solution: Logic diagram J = X Y2 _ K = X Y2 J2 = X Y + X Y K2 = X Y + X Y COMPARISON OF TWO DESIGNS 2 6

27.2.2. 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 3 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. 4 7

27.2.2. 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. 5 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 6 8

27.2.2. 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. 7 STATE TRANSITION TABLE AND DIAGRAM even odd 8 9

27.2.2. 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. 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. 2

27.2.2. STATE FUNCTIONS AND THE OUTPUT FUNCTION 2 STATE FUNCTIONS AND THE OUTPUT FUNCTION 22

27.2.2. 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 23 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 24 2

27.2.2. CONTROL OF FLIP-FLOP Q _ K = Q 2 J = Q 2 Note the role of the don t care terms in the minimization. 25 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. 26 3

27.2.2. 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. 27 THE OUTPUT FUNCTION Z Note the chessboard pattern! This implies XOR function: Z = X Q 3 + X Q 3 = = X Q 3 28 4

27.2.2. THE LOGIC DIAGRAM OF THE PARITY CHECK CIRCUIT 4th cycle cycle counter 29 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. _ 3 5

27.2.2. 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 3 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. 32 6

27.2.2. 8-BIT PARITY INDICATOR State transition diagram 33 8-BIT PARITY INDICATOR State table and encoding 34 7

27.2.2. 8-BIT PARITY INDICATOR: LOGIC DIAGRAM 35 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. 36 8

27.2.2. 9 4-BIT GRAY CODE COUNTER: CONCEPTUAL DIAGRAM 37 Q3 D3 Q2 D2 Q D Q D3 Combinational feedback circuit 4 Clock STATE TRANSITION TABLE 38 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

27.2.2. KARNAUGH MAPPING D3 D2 39 KARNAUGH MAPPING D D 4 2

27.2.2. 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 4 modular logic, or PROM. 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 Gives a three-level combinational network (7 AND, 3 OR, 2 XOR, and INV). 42 2

27.2.2. UP/DOWN 3-BIT GRAY CODE COUNTER State transition diagram Next-state table UP/DOWN control input: Y 43 UP/DOWN 3-BIT GRAY CODE COUNTER Variables: Q2, Q, Q, and Y 44 22

27.2.2. UP/DOWN 3-BIT GRAY CODE COUNTER Logic expressions for flip-flop control 45 UP/DOWN 3-BIT GRAY CODE COUNTER 46 23

27.2.2. 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. 47 STATE MACHINE WITH MEMORY The standard state machine configuration 48 24

27.2.2. STATE MACHINE WITH MEMORY Toward a microprocessor: Replacing the combinational logic with a memory. 49 STATE MACHINE WITH MEMORY To start with, let's assume a state machine with no external inputs or outputs. Then the state machine's present state (PS) becomes an address which is input to the ROM. The data word stored in the ROM at that address then corresponds to the next state (NS). This correspondence had been initially programmed into the ROM, just as the specic combinational logic in an old state machine had to be pre-determined. So if the PS as defined at the data register are, for example,, then the ROM data word at address will be the NS which is then passed back to the register. When there are also external inputs, as there will be for most anything of interest, these are combined with the PS bits to form a longer address for the ROM. Similarly, any external outputs are combined with the NS bits in the data word. 5 25

27.2.2. EXAMPLE: DIVIDE BY 2 OR 3 COUNTER Design a counter which either divides by 2 or by 3, depending upon the value of an external input bit P. 3 states are required, use 2 bits, describe four states: A B C D P = divide by 2 P = divide by 3 Output R = if present state is B, otherwise R =. State D is normally unused. 5 DIVIDE BY 2 OR 3 COUNTER: STATE TRANSITION DIAGRAM, A B,, D C 52 26

27.2.2. EXAMPLE: DIVIDE BY 2 OR 3 COUNTER ROM: 3 address bits (2 for PS, for input P). Data word length 3 bit (2 for BS for output R). ROM size 8x3=24 bits. 53 EXAMPLE: DIVIDE BY 2 OR 3 COUNTER The programming of the ROM is straightforward and can be read directly from the truth table. Addresses are encoded as PQ Q and the data words as D D R. For example take the 5th row of the truth table. The address would be and the data word at this address would be. The remaining bits of the ROM would be programmed in the same way. So one would initially burn in" these bit patterns into the ROM and put it into the circuit. 54 27

27.2.2. ANOTHER EXAMPLE Design a sequential circuit with two D flip-flops Q and Q, and one input X. When X =, the state of the circuit remains the same. When X =, the circuit goes through the state transitions from to to to back to, and repeats. 55 STATE TRANSITION TABLE PROGRAMMING Control present state next state X Q n Q n Q n+ Q n+ ROM address (3 bits) ROM contents (2 bits) 56 28

27.2.2. GENERALIZATION TO MICROPROCESSORS A state machine with zero input bits can perform a counterlike function, but not more: its next state is limited to be a function only of the present state. A single input bit can be used to program" the state machine to behave in one of two possible ways for each present state, as was illustrated with the examples. E.g. in an up/down counter. On the other hand, with n inputs, the machine can perform 2 n different operations. So, e.g. with n = 8 the machine can perform one of 256 different operations on each clock cycle. This allows for tremendous potential and flexibility. 57 GENERALIZATION TO MICROPROCESSORS The input bits can themselves be sequenced and stored externally in a specific sequence which is then applied step by step to the state machine inputs on successive clock cycles. Such a stored sequence of operations is a program and the 256 operations represent the programming operations. Here we have essentially configured a simple micro-processor. The inputs and outputs would need to be connected to buses (via 3-state buffers where appropriate), which in turn are also connected to memories which store the program and any output or input data. The buses would also be connected to various input/output devices, mass storage devices, etc. 58 29

27.2.2. 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. 59 END OF LECTURE 6 3