Steps of sequential circuit design (cont'd)

Similar documents
Counters and Decoders

DIGITAL COUNTERS. Q B Q A = 00 initially. Q B Q A = 01 after the first clock pulse.

Take-Home Exercise. z y x. Erik Jonsson School of Engineering and Computer Science. The University of Texas at Dallas

WEEK 8.1 Registers and Counters. ECE124 Digital Circuits and Systems Page 1

ETEC 2301 Programmable Logic Devices. Chapter 10 Counters. Shawnee State University Department of Industrial and Engineering Technologies

Counters are sequential circuits which "count" through a specific state sequence.

Module 3: Floyd, Digital Fundamental

Digital Logic Design. Basics Combinational Circuits Sequential Circuits. Pu-Jen Cheng

Lecture 8: Synchronous Digital Systems

ENEE 244 (01**). Spring Homework 5. Due back in class on Friday, April 28.

Counters & Shift Registers Chapter 8 of R.P Jain

Experiment # 9. Clock generator circuits & Counters. Eng. Waleed Y. Mousa

Design: a mod-8 Counter

Design Example: Counters. Design Example: Counters. 3-Bit Binary Counter. 3-Bit Binary Counter. Other useful counters:

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

To design digital counter circuits using JK-Flip-Flop. To implement counter using 74LS193 IC.

CHAPTER 11 LATCHES AND FLIP-FLOPS

Flip-Flops and Sequential Circuit Design. ECE 152A Winter 2012

Flip-Flops and Sequential Circuit Design

Asynchronous counters, except for the first block, work independently from a system clock.

Sequential Logic. (Materials taken from: Principles of Computer Hardware by Alan Clements )

IE1204 Digital Design F12: Asynchronous Sequential Circuits (Part 1)

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

CS311 Lecture: Sequential Circuits

Latches, the D Flip-Flop & Counter Design. ECE 152A Winter 2012

Digital Logic Design Sequential circuits

Asynchronous Counters. Asynchronous Counters

Contents COUNTER. Unit III- Counters

Digital Electronics Part I Combinational and Sequential Logic. Dr. I. J. Wassell

Upon completion of unit 1.1, students will be able to

Finite State Machine. RTL Hardware Design by P. Chu. Chapter 10 1

ASYNCHRONOUS COUNTERS

Gray Code Generator and Decoder by Carsten Kristiansen Napier University. November 2004

Combinational Logic Design Process

Digital Electronics Detailed Outline

Chapter 5. Sequential Logic

Having read this workbook you should be able to: recognise the arrangement of NAND gates used to form an S-R flip-flop.

Lesson 12 Sequential Circuits: Flip-Flops

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute. 2nd (Spring) term 2012/2013

Decimal Number (base 10) Binary Number (base 2)

Simplifying Logic Circuits with Karnaugh Maps

Flip-Flops, Registers, Counters, and a Simple Processor

Lecture 7: Clocking of VLSI Systems

CHAPTER 3 Boolean Algebra and Digital Logic

RAM & ROM Based Digital Design. ECE 152A Winter 2012

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

Napier University. School of Engineering. Electronic Engineering A Module: SE42205 Digital Design

ECE380 Digital Logic

BINARY CODED DECIMAL: B.C.D.

SEQUENTIAL CIRCUITS. Block diagram. Flip Flop. S-R Flip Flop. Block Diagram. Circuit Diagram

Engr354: Digital Logic Circuits

Introduction to CMOS VLSI Design (E158) Lecture 8: Clocking of VLSI Systems

DEPARTMENT OF INFORMATION TECHNLOGY

3.Basic Gate Combinations

Cascaded Counters. Page 1 BYU

Modeling Sequential Elements with Verilog. Prof. Chien-Nan Liu TEL: ext: Sequential Circuit

Gates, Circuits, and Boolean Algebra

Let s put together a Manual Processor

Chapter 8. Sequential Circuits for Registers and Counters

Chapter 4 Register Transfer and Microoperations. Section 4.1 Register Transfer Language

Chapter 7. Registers & Register Transfers. J.J. Shann. J. J. Shann

So far we have investigated combinational logic for which the output of the logic devices/circuits depends only on the present state of the inputs.

EXPERIMENT 8. Flip-Flops and Sequential Circuits

CDA 3200 Digital Systems. Instructor: Dr. Janusz Zalewski Developed by: Dr. Dahai Guo Spring 2012

The components. E3: Digital electronics. Goals:

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Operating Manual Ver.1.1

(Refer Slide Time: 00:01:16 min)

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

Theory of Logic Circuits. Laboratory manual. Exercise 3

Sequential Logic Design Principles.Latches and Flip-Flops

Registers & Counters

Memory Elements. Combinational logic cannot remember

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

EE 42/100 Lecture 24: Latches and Flip Flops. Rev B 4/21/2010 (2:04 PM) Prof. Ali M. Niknejad

CpE358/CS381. Switching Theory and Logical Design. Class 10

Systems I: Computer Organization and Architecture

Binary Adders: Half Adders and Full Adders

EE360: Digital Design I Course Syllabus

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

Lecture 12: More on Registers, Multiplexers, Decoders, Comparators and Wot- Nots

INTEGRATED CIRCUITS. For a complete data sheet, please also download:

A New Paradigm for Synchronous State Machine Design in Verilog

Lecture 10 Sequential Circuit Design Zhuo Feng. Z. Feng MTU EE4800 CMOS Digital IC Design & Analysis 2010

BOOLEAN ALGEBRA & LOGIC GATES

Counters. Present State Next State A B A B

7. Latches and Flip-Flops

Copyright Peter R. Rony All rights reserved.

Sequential Logic: Clocks, Registers, etc.

Lecture 11: Sequential Circuit Design

Wiki Lab Book. This week is practice for wiki usage during the project.

Lecture 10: Sequential Circuits

Sequential Circuit Design

Sequential Circuits. Combinational Circuits Outputs depend on the current inputs

1.1 The 7493 consists of 4 flip-flops with J-K inputs unconnected. In a TTL chip, unconnected inputs

Digital Controller for Pedestrian Crossing and Traffic Lights

Academic year: 2015/2016 Code: IES s ECTS credits: 6. Field of study: Electronics and Telecommunications Specialty: -

Latch Timing Parameters. Flip-flop Timing Parameters. Typical Clock System. Clocking Overhead

NOTE: The Flatpak version has the same pinouts (Connection Diagram) as the Dual In-Line Package.

Transcription:

Design of Clocked Synchronous Sequential Circuits Design of a sequential circuit starts with the verbal description of the problem (scenario). Design process is similar to computer programming. First, the problem in the physical (real) world should be described and appropriately modeled. Then the circuit should be designed to solve the problem. Design of a sequential circuit has the following steps: License: http://creativecommons.org/licenses/by-nc-nd/3./. Verbal description of the problem (functional requirements of the circuit). Timing diagrams can be used to avoid uncertainties. 2. The design model (Mealy or Moore) of the circuit is determined. 3. The states of the FSM are determined. State transitions according to the inputs and current states are determined. State transition and output tables are formed. State transition diagrams can be used if they will make the design easier. State reduction is performed (if applicable). The purpose is to build a correctly functioning machine with the least possible number of states. This step is similar to computer programming; that is why an intuitional approach is required. 8. Steps of sequential circuit design (cont'd) 4. Coding States: Binary codes are assigned to the states. If there are n states, the number of variables (number of flip-flops) m is computed as follows: m= log 2 n Here x denotes ceiling function. For example 4. = 5 and 4. = 4 State transition and output table is formed using state variables. 5. Type of flip-flop is determined. 6. Using the flip-flop transition tables, inputs of the flip-flops are determined. Function (F) that drives flip-flops are obtained. 7. From the output table, output function (G) is obtained. 8. Combinational circuits of the functions (F and G) are designed and implemented with the minimum cost. 8.2

Synchronous Circuit Design Example: A sequential circuit with a single input () and single output () will be designed. After two sequential ""s at the input, the output should be "" as long as the input is "". Timing diagram can be used to better understand the problem. Clock st 2nd st 2nd The design should be according to the Mealy model so that circuit has the functionalities shown in the above timing diagram. Since the output is effected by the input simultaneously (without the active edge of the clock signal). 8.3. Forming state transition diagram from the verbal description (timing diagrams). This step requires intuitional approach and experience. Machine can be designed with 3 states: A: No zeros are arrived B: First zero is arrived C: Second zero is arrived 2. State, output table S, S A B, A, B C, A, C C, A, / State coding: A: B: C: State variables: Q, Q C (Alternative coding is possible) / / A / =/= / B State transition, output table: Q Q,,,,,,, øø,ø øø,ø Alternative state coding is possible. For example, A:, B:, C: is also possible. In this case the internal structure of the circuit will be different. However, the functionality of the circuit will be the same. 8.4

3. Transitions of state variables are determined: Using the state transition table of the circuit, transitions of each state variable (flip-flop) is determined separately. To simplify notation, symbolic names are assigned to transitions and tables are re-organized with the symbols. symbol QQ α β Q transitions: Transition of each state variable (flip-flop) for each input value and state is determined. Q Q, State transition table Q Q,,,,,, øø,ø øø,ø Q transitions: Q Q Q Q ø ø ø ø Q Q Q Q α α β β β ø ø ø ø 8.5 4. Determining the input functions of the flip-flops: D flip-flops will be used in this example. In the previous (3.) step, transitions were determined for all flip-flops. In this step, the input values of the flip-flops for a required transition will be investigated. The transition table of the flip-flop will be used for this purpose. D flip-flop transition table: symbol QQ D α β This table shows the inputs of the D flip-flop for each transition. Different types of flip-flops have different transition tables. Transition table of D flip-flop is simple. The input value of the D flip-flop is equal to the next value of its state variable. 8.6

The required input values of the flip-flops are calculated using the transition tables. Q transitions: Q Q α β ø ø Q transitions: Q Q α β β ø ø D flip-flop transition table: symbol QQ D α β Input of D : Input of D : D D ø ø ø ø To obtain expressions easily, tables are formed as Karnaugh maps. Rows and columns are in Gray code. D = 'Q D = ' State transition function (F) that determines the next state is obtained. {D, D } = F(Input "", State "Q i ") 8.7 5. Using the output table, output function (G) is obtained. ø ø = 'Q During the design of functions F and G, design methods for combinational circuits (prime implicants, prime implicant chart) that are covered in the first part of the course should be used. There is no need to minimize the functions in this example because they are simple. = G(Input "", State "Q i ") 6. Implementation and drawing of the designed circuit using logical gates. D D Q Q D Q D Q Clock 8.8

Example: Same circuit designed with JK flip-flops The first three steps are the same. 4. Positive edge triggered JK flip-flops will be used. JK flip-flop transition table: symbol QQ J K ø α ø β ø ø Using JK flip-flops instead of D flip-flops will produce simpler logical functions for the next state. As the functions in this example are already simple, no further simplification is achieved. The transitions of state variables were determined from the state transition table in step 3. Q transitions: Q transitions: Q Q, Q Q Q Q Q Q,, α,, α β,, β β øø,ø øø,ø ø ø ø ø 8.9 The required input values of the flip-flops are calculated using the transition tables. Q transitions: Q transitions: Transition table for JK flip-flop: Q Q Q Q symbol QQ J K α ø α β α ø β β β ø ø ø ø ø ø J K ø ø ø ø ø ø ø ø ø ø J = 'Q K = J K ø ø ø ø ø ø ø ø ø ø J = ' K = The function (F) that determines the next state is obtained. 8.

5. The output function (G) is determined using output table. Q Q ø ø = 'Q 6. Implementation and drawing of the designed circuit. J K J K Q Q J J Q K Q K Clock 8. Transition tables for flip-flops: Transition tables for different types of flip-flops are given below. Transition table for SR flip-flop : symbol QQ S R ø α β ø Transition table for JK flip-flop : symbol QQ J K ø α ø β ø ø Transition table for D flip-flop: symbol QQ D α β Transition table for T flip-flop : symbol QQ T α β 8.2

Synchronous Circuit Design Example 2: Moore Model Design using the Moore model has the same design stages that are already shown. Important points are: outputs depend ONLY on the states, because of this, each state corresponds to a single output. Problem: A synchronous sequential circuit with 2 inputs (,Y) and a single output () will be designed. If the number of incoming s to the input is 4 or a multiple of 4, the output of the circuit is. Otherwise the output should be. If there is no incoming, the output should be. Solution: The circuit should perform modulo 4 operation, and if the result of the operation is, the output should be. This FSM can be implemented with 4 states:. Modulo : S Output = number of incoming s mod 4 = 2. Modulo : S Output = number of incoming s mod 4 = 3. Modulo 2: S2 Output = number of incoming s mod 4 = 2 4. Modulo 3: S3 Output = number of incoming s mod 4 = 3 8.3 State/output table: S Meaning S Y Modulo S S S S2 S Modulo S S S2 S3 S2 Modulo 2 S2 S2 S3 S S3 Modulo 3 S3 S3 S S S State coding: S: S: S2: S3: State variables: Q, Q Coded state/output table: Q Q QQ Y Q Y D Y QQ Q Y Q Y Q Y D Y QQ Q Y Q Y The characteristic function of the D flip-flop is used: Q =D. D= Q ' Y Q' Y Q ' Y' Q Y' D= Q' ' Y Q' Y' Q ' Y' Q' Y Q Y Q Y = Q' Q' 8.4

Using Multiplexers for Synchronous Circuit Implementation If a synchronous sequential circuit is designed using D flip-flops, simpler implementations are possible if the inputs of the flip-flops are driven with multiplexers. In this method, Input of each D flip-flop is driven by a separate multiplexer. The state variables (flip-flop outputs) are connected to the selection inputs of the multiplexers. Therefore, each multiplexer selects its inputs according to the qurrent state. The inputs of the multiplexer should have the necessary values that produces the next state of the machine. The inputs of the multiplexers are obtained from the rows of the state transition table. The same circuit designed in the previous example will be redesigned using multiplexers. 8.5 D input values of the flip-flop: (From the previous example) D Y QQ Y to multiplexer: Y Y ( Y) ( Y) D Y QQ to multiplexer : Y ( Y) ( Y) Y I I I 2 I 3 4: MU VS s s D D Q Q Q ' Clock s s 4: MU I I I 2 I 3 D Q D Q Q ' 8.6

Counter Design Counters that count with a certain sequence can be designed as a synchronous sequential circuit. Moore model is appropriate for counter design. Each output value of the counter can be accepted as a different state. Outputs can be obtained directly from the state variables (Moore Model). Example: Design the counter shown below that has a single control input (). Counter should count in the natural order of --2-3. Counter should go back to after 3. When = it should count up, if = it should count down. up/down Counter clock z z Counter output Most significant bit (MSB) Least significant bit (LSB) 8.7 = State diagram: = = = = = = = State variables and outputs have the same values. Designing the counter using D flip-flops: Recall: Q =D D D = ' (Q Q) (Q Q)' D = Q Q State table: Q Q Rows are replaced according to the Gray code so that state table can also be used as a Karnaugh diagram. D D = Q' Output: = Q = Q 8.8

Logical gates (AND, OR, OR etc.) or multiplexers can be used to implement counters. Below, since D input has a very simple expression ( D = Q' ) a logical gate (single inverter) is preferred instead of a multiplexer. A multiplexer is used to drive D input. Remember: State variables ( ) will be connected to the selection inputs of the multiplexer. ' D to multiplexer: ' ' D D Q Q I s s I 4: I 2 z I MU 3 D D Q Q Clock 8.9 Example: Design a counter that counts in --2-3-4-5 sequence and has a single control input (). If = count up by one, if = count up by 2. = = = = = = = = = = State table organized as a Karnaugh diagram: = = Q 2 Q Q Q Q 2 Q ØØØ ØØØ ØØØ ØØØ State table: Q 2 Q Q Q 2 ØØØ ØØØ ØØØ ØØØ 8.2

In this example, T flip-flops will be used. Remember: Transition table for T flip-flop: symbol QQ T α β Q 2 Q Q Q Q 2 Q ØØØ ØØØ ØØØ ØØØ T 2 Q Q 2 Q Ø Ø Ø Ø T 2 ' = Q ' ' Q 2 ' Q ' T 2 = (Q ) (Q 2 Q ) T Q Q 2 Q Ø Ø Ø Ø T = Q 2 ' Q 2 ' Q T Q Q 2 Q Ø Ø Ø Ø T = ' 8.2 T 2 = (Q ) (Q 2 Q ) T = Q 2 ' Q 2 ' Q T = ' T 2 T Q Q 2 Q 2 ' 2 T T Q Q Q ' Q2 Q2' Q Q Clock T T Q Q Q ' 8.22

Implementation of synchronous circuits using PAL As combinational circuits, it is also possible to use PAL units to implement synchronous circuits. For this purpose, PAL units that include flip-flops are used. At the right, a 6R8 PAL circuit is shown. 8.23