ENEE 244 (01**). Spring Homework 6. Due back in class on Wednesday, May 10.

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

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

Lecture 8: Synchronous Digital Systems

Module 3: Floyd, Digital Fundamental

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

Digital Logic Design Sequential circuits

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

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

Lesson 12 Sequential Circuits: Flip-Flops

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

Counters & Shift Registers Chapter 8 of R.P Jain

Counters and Decoders

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

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

Asynchronous Counters. Asynchronous Counters

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

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

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

ASYNCHRONOUS COUNTERS

Design: a mod-8 Counter

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

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

Flip-Flops and Sequential Circuit Design

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

BINARY CODED DECIMAL: B.C.D.

CS311 Lecture: Sequential Circuits

Chapter 8. Sequential Circuits for Registers and Counters

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

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

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

Memory Elements. Combinational logic cannot remember

CHAPTER 3 Boolean Algebra and Digital Logic

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

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

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

Systems I: Computer Organization and Architecture

Contents COUNTER. Unit III- Counters

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

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

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

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

DIGITAL TECHNICS II. Dr. Bálint Pődör. Óbuda University, Microelectronics and Technology Institute 5. LECTURE: REGISTERS AND RELATED

Counters. Present State Next State A B A B

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

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.

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

7. Latches and Flip-Flops

ECE380 Digital Logic

Upon completion of unit 1.1, students will be able to

Sequential Logic Design Principles.Latches and Flip-Flops

Lecture-3 MEMORY: Development of Memory:

CHAPTER 11 LATCHES AND FLIP-FLOPS

Combinational Logic Design Process

The string of digits in the binary number system represents the quantity

Chapter 2 Logic Gates and Introduction to Computer Architecture

Layout of Multiple Cells

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

Fig1-1 2-bit asynchronous counter

EXPERIMENT 8. Flip-Flops and Sequential Circuits

Theory of Logic Circuits. Laboratory manual. Exercise 3

The components. E3: Digital electronics. Goals:

Engr354: Digital Logic Circuits

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

Operating Manual Ver.1.1

Cascaded Counters. Page 1 BYU

(1) /30 (2) /30 (3) /40 TOTAL /100

Copyright Peter R. Rony All rights reserved.

Digital Electronics Detailed Outline

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

Lab 1: Study of Gates & Flip-flops

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

CHAPTER 11: Flip Flops

CSE140 Homework #7 - Solution

Master/Slave Flip Flops

Design Verification & Testing Design for Testability and Scan

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

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

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

3.Basic Gate Combinations

We r e going to play Final (exam) Jeopardy! "Answers:" "Questions:" - 1 -

Course Requirements & Evaluation Methods

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

CSE140: Components and Design Techniques for Digital Systems

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

Chapter 5. Sequential Logic

Lecture 7: Clocking of VLSI Systems

DEPARTMENT OF INFORMATION TECHNLOGY

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

Chapter 9 Latches, Flip-Flops, and Timers

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

MEP Y9 Practice Book A

Binary Adders: Half Adders and Full Adders

DATA SHEETS DE COMPONENTES DA FAMÍLIA LÓGICA TTL GATES AND INVERTERS POSITIVES NAND GATES AND INVERTERS DESCRIÇÃO

Registers & Counters

Reading 13 : Finite State Automata and Regular Expressions

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

A New Paradigm for Synchronous State Machine Design in Verilog

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

Digital Controller for Pedestrian Crossing and Traffic Lights

Transcription:

ENEE 244 (01**). Spring 2006 Homework 6 Due back in class on Wednesday, May 10. 1. Design a modulo-6 counter, which counts 0,1,2,3,4,5,0,1,... The counter counts the clock pulses if its enable input,w, is equal to 1. Use D flip flops in your circuit. If the circuit ever finds itself in an unused state (6 or 7), it should transition to state 0 with the next clock trigger to avoid being stuck in an unused state. Use a formal design procedure. No credit for doing an intuitive design! Drawing the state table for the given modulo 6 counter. Present state Input Next state Q1 Q0 W + Q1+ Q0+ 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 1 0 0 1 1 0 1 0 0 1 0 0 0 1 0 0 1 0 1 0 1 1 0 1 1 0 0 1 1 0 1 1 1 1 0 0 1 0 0 0 1 0 0 1 0 0 1 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 0 0 1 1 0 0 0 0 0 1 1 0 1 0 0 0 1 1 1 0 0 0 0 1 1 1 1 0 0 0 For D flip-flops, the input into the flip flops is the same as the next state that are shown in the table. (D2=+, D1 = Q1+, D0 = Q0+). Now drawing 4-variable K maps for D flip flop inputs D2, D1 and D0 we get the following result (K-maps not shown): D2 = Q1 Q0 + Q1 W + W D1 = + Q1W + Q1 Q0W D0 = Q0 W + Q1 Q0 W + Q0W + Q1 Q0W. The above equations completely define the required circuit. 2. Design a counter with T flip flops that goes through the following binary repeated sequence 0,1,3,7,6,4. Show that when the states 010 and 101 are considered as don't care conditions the counter may not operate properly. 1

There are ceiling(log2 6) = 3 flip-flops required. Drawing the state table: Present state Next state Excitation Q1 Q0 + Q1+ Q0+ T2 T1 T0 0 0 0 0 0 1 0 0 1 0 0 1 0 1 1 0 1 0 0 1 0 X X X X X X 0 1 1 1 1 1 1 0 0 1 0 0 0 0 0 1 0 0 1 0 1 X X X X X X 1 1 0 1 0 0 0 1 0 1 1 1 1 1 0 0 0 1 Drawing the K maps for T2, T1 and T0: K map for T2 T2 = Q1 + Q1 K map for T1 T1 = + Q1 Q0 K map for T0 T0 = Q0 + Q0 In the K-maps, all the don t cares were assigned to 1 in our choice, so the flip-flops will all toggle in states 010 and 101. Thus if the counter finds itself in state 010, it will transition to 101, and vice versa. This constitutes an infinite cycle of unused states. Hence the counter is not self-correcting -- if the counter ever finds itself in an unused state, it will remain in unused states forever. 2

3. Design a circuit that is a serial even parity generator. The circuit has two bits of input x and s, where x is the data input and s is the start. The input number is applied bit-by-bit to the x input. The start signal s is supposed to be set to 1 by the user to indicate the start of a new number. The new number s first bit is applied at the same time as s=1. A signal s=0 implies that the old number is continuing and x is the next bit of the old number. There is one output bit p which outputs the even parity bit of the number seen so far beginning from the cycle of the most-recently seen s=1 signal. In this way, this circuit can be used to compute the even parity of numbers of any length desired by the user. At startup, until the first s=1 is seen, the output is undefined. Design a Moore machine using JK flip-flops. Use a formal design procedure. Draw the resulting circuit. Recall that an even parity bit is such a bit that makes the number of 1s in the number seen so far, including the parity bit, to be even (i.e, the number of bits in the number seen so far is odd). The state needs to keep track only of whether the number of 1s seen since the last s=1 is even or odd; hence only two states are needed. State S0 outputs p=0 (number of 1s seen so far is even). State S1 outputs p=1 (number of 1s seen so far is odd). The start state is S0. State diagram: x=0,s=0 x=0,s=0 x=1,s=0 or 1 S0/0 x=1,s=0 S1/1 x=0,s=1 x=0,s=1 x=1,s=1 Number of flip-flops: ceiling (log2 2) = 1. Let that single flip-flop have inputs J,K and output Q. State assignment: S0 (Q =0); S1 (Q =1). No separate circuit is needed for the output since p=q. From this we can make a state table and excitation table: Present state Inputs Next state Excitation Q x s Q+ J K 0 0 0 0 0 X 0 0 1 0 0 X 0 1 0 1 1 X 0 1 1 1 1 X 1 0 0 1 X 0 1 0 1 0 X 1 1 1 0 0 X 1 1 1 1 1 X 0 3

Next, 3-variable K-maps (not shown) are used to derive J,K in terms of Q, x, s. This yields: J = x K = x s + xs 4. Design a three-bit up/down counter using T flip flops. It should include a control input called Up/Down.If Up/Down =0, then the cicuit behaves as an up counter. If Up/Down =1, then the circuit should behave as a down counter. Do not use a formal design procedure; instead use your intuition or a variant of a design in the book. For designing a 3 bit Up/Down counter we use 3 T flip flops and two 2 x 1 MUX The design is as shown below. 1 In the diagram above the following are the symbols used: T : T flip flop M: 2 x 1 multiplexer 7408: AND gate The T flip flops are triggered by the same clock, which is not shown. The intuition is that the least significant (leftmost) bit toggles in every cycle, but for higher bits, they toggle when all the bits that are less significant are either all one (up counter) or all zero (down counter). The MUXs are used select between these two possibilities. 5. Design a 4-bit binary synchronous counter with D flip flops. Use an intuitive design procedure or a variant of a circuit in the book. 4

Refer to figure 6.33 of the Givone textbook. We see that a 4 bit synchronous circuit has been implemented using T flip-flops. Now we need to convert these T flip flops to D flip flops. We know that if the input to a T flip flop is T then if we need to use a D flip flop instead the input to the D flip flop must be D = Q T. This follows from how a T flip-flop is built from a D flip-flop in figure 6.23 earlier in the text. The circuit given in the book in terms of FF equations is: T0 = E T1 = Q0.E T2 = Q0.Q1.E T3 = Q0.Q1..E where E is the Count enable input. So the inputs to the D flip-flop should be D0 = Q0 E D1 = Q1 (Q0.E) D2 = (Q0.Q1.E) D3 = Q3 (Q0.Q1..E) The above equations completely specify the required counter with D flip-flops. 5