Chapter 10. Counters (a short discussion)

Similar documents
Ripple Counters. Lecture 30 1

University of Technology

1. Prove that if you have tri-state buffers and inverters, you can build any combinational logic circuit. [4]

Verilog Lecture Gandhi Puvvada, USC always statements, Coding a Flip-Flop. blocking and non-blocking assignments. Copyright 2008 Gandhi Puvvada 1

Real Digital Problem Set #6

Lecture 24: Sequential Logic Design. Let s refresh our memory.

L5: Simple Sequential Circuits and Verilog

EXPERIMENT #8: BINARY ARITHMETIC OPERATIONS

L5: Simple Sequential Circuits and Verilog

CS/EE Homework 7 Solutions

ECE 341 Midterm Exam

Spring 2013 EE201L Instructor: Gandhi Puvvada. Time: 7:30-10:20AM SGM124 Total points: Perfect score: Open-Book Open-Notes Exam

L11: Major/Minor FSMs

Code No: R Set No. 1

ECE 341 Midterm Exam

L5: Simple Sequential Circuits and Verilog

ECE 331: N0. Professor Andrew Mason Michigan State University. Opening Remarks

DIGITAL SYSTEM DESIGN

R10. II B. Tech I Semester, Supplementary Examinations, May

L5: Simple Sequential Circuits and Verilog

Digital Circuit Design and Language. Datapath Design. Chang, Ik Joon Kyunghee University

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF ELECTRICAL AND ELECTRONICS ENGINEERING QUESTION BANK NAME OF THE SUBJECT: EE 2255 DIGITAL LOGIC CIRCUITS

Summer 2003 Lecture 21 07/15/03

BUILDING BLOCKS OF A BASIC MICROPROCESSOR. Part 1 PowerPoint Format of Lecture 3 of Book

REGISTER TRANSFER LANGUAGE

ECE 645: Lecture 1. Basic Adders and Counters. Implementation of Adders in FPGAs

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

Code No: R Set No. 1

EECS150 - Digital Design Lecture 5 - Verilog Logic Synthesis

Chapter 5 Registers & Counters

Injntu.com Injntu.com Injntu.com R16

Modeling Synchronous Logic Circuits. Debdeep Mukhopadhyay IIT Madras

HANSABA COLLEGE OF ENGINEERING & TECHNOLOGY (098) SUBJECT: DIGITAL ELECTRONICS ( ) Assignment

II/IV B.Tech (Regular/Supplementary) DEGREE EXAMINATION. Answer ONE question from each unit.

EE 3170 Microcontroller Applications

COMPUTER ARCHITECTURE AND ORGANIZATION Register Transfer and Micro-operations 1. Introduction A digital system is an interconnection of digital

Computer Architecture: Part III. First Semester 2013 Department of Computer Science Faculty of Science Chiang Mai University

MASSACHUSETTS INSTITUTE OF TECHNOLOGY Department of Electrical Engineering and Computer Sciences

FPGA Design Challenge :Techkriti 14 Digital Design using Verilog Part 1

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

Outcomes. Spiral 1 / Unit 6. Flip Flops FLIP FLOPS AND REGISTERS. Flip flops and Registers. Outputs only change once per clock period

Question Total Possible Test Score Total 100

Final Exam Solution Sunday, December 15, 10:05-12:05 PM

St.MARTIN S ENGINEERING COLLEGE Dhulapally, Secunderabad

SHRI ANGALAMMAN COLLEGE OF ENGINEERING. (An ISO 9001:2008 Certified Institution) SIRUGANOOR, TIRUCHIRAPPALLI

3. The high voltage level of a digital signal in positive logic is : a) 1 b) 0 c) either 1 or 0

ELCT 501: Digital System Design

ACS College of Engineering. Department of Biomedical Engineering. Logic Design Lab pre lab questions ( ) Cycle-1

Mark Redekopp, All rights reserved. EE 352 Unit 8. HW Constructs

General Purpose Programmable Peripheral Devices. Assistant Professor, EC Dept., Sankalchand Patel College of Engg.,Visnagar

END-TERM EXAMINATION

Spiral 1 / Unit 6. Flip-flops and Registers

Outcomes. Spiral 1 / Unit 6. Flip Flops FLIP FLOPS AND REGISTERS. Flip flops and Registers. Outputs only change once per clock period

EXPERIMENT NUMBER 11 REGISTERED ALU DESIGN

Department of Electrical and Computer Engineering Introduction to Computer Engineering I (ECSE-221) Assignment 3: Sequential Logic

University of Toronto Mississauga. Flip to the back cover and write down your name and student number.

One and a half hours. Section A is COMPULSORY UNIVERSITY OF MANCHESTER SCHOOL OF COMPUTER SCIENCE

VALLIAMMAI ENGINEERING COLLEGE. SRM Nagar, Kattankulathur DEPARTMENT OF ELECTRONICS AND COMMUNICATION ENGINEERING EC6302 DIGITAL ELECTRONICS

PART B. 3. Minimize the following function using K-map and also verify through tabulation method. F (A, B, C, D) = +d (0, 3, 6, 10).

Digital Fundamentals. Lab 6 2 s Complement / Digital Calculator

KING FAHD UNIVERSITY OF PETROLEUM & MINERALS COMPUTER ENGINEERING DEPARTMENT

Computer Architecture Programming the Basic Computer

CMPE 413/ CMSC 711. Project Specification: 16 bit 2 s complement Adder and 8 bit 2 s complement multiplier. GND. Input bus. Latches I[8]-I[15]

Writing Circuit Descriptions 8

register:a group of binary cells suitable for holding binary information flip-flops + gates

Last Lecture. Talked about combinational logic always statements. e.g., module ex2(input logic a, b, c, output logic f); logic t; // internal signal

Binary Adders: Half Adders and Full Adders

Contents. Chapter 9 Datapaths Page 1 of 28

Principles of Digital Techniques PDT (17320) Assignment No State advantages of digital system over analog system.

University of Toronto Faculty of Applied Science and Engineering Edward S. Rogers Sr. Department of Electrical and Computer Engineering

1 ( 42 points) 25 min.

Henry Lin, Department of Electrical and Computer Engineering, California State University, Bakersfield Lecture 7 (Digital Logic) July 24 th, 2012

Techniques for Digital Systems Lab. Verilog HDL. Tajana Simunic Rosing. Source: Eric Crabill, Xilinx

Verilog for High Performance

NADAR SARASWATHI COLLEGE OF ENGINEERING AND TECHNOLOGY Vadapudupatti, Theni

Hours / 100 Marks Seat No.

Federal Urdu University of Arts, Science and Technology, Islamabad VLSI SYSTEM DESIGN. Prepared By: Engr. Yousaf Hameed.

ECE 2300 Digital Logic & Computer Organization. More Sequential Logic Verilog

Controller Implementation--Part I. Cascading Edge-triggered Flip-Flops. Clock Skew. Cascading Edge-triggered Flip-Flops. Why Gating of Clocks is Bad!

In this lecture, we will focus on two very important digital building blocks: counters which can either count events or keep time information, and

Code No: R Set No. 1

1 MALP ( ) Unit-1. (1) Draw and explain the internal architecture of 8085.

Written exam for IE1204/5 Digital Design Thursday 29/

Philadelphia University Student Name: Student Number:

10EC33: DIGITAL ELECTRONICS QUESTION BANK

DE Solution Set QP Code : 00904

Counters. Counter Types. Variations. Modulo Gray Code BCD (Decimal) Decade Ring Johnson (twisted ring) LFSR

R07. Code No: V0423. II B. Tech II Semester, Supplementary Examinations, April

Dec Hex Bin ORG ; ZERO. Introduction To Computing

Outline. CPE/EE 422/522 Advanced Logic Design L05. Review: General Model of Moore Sequential Machine. Review: Mealy Sequential Networks.

Lecture-55 System Interface:

Recommended Design Techniques for ECE241 Project Franjo Plavec Department of Electrical and Computer Engineering University of Toronto

Arithmetic Logic Unit. Digital Computer Design

EECS 150 Homework 7 Solutions Fall (a) 4.3 The functions for the 7 segment display decoder given in Section 4.3 are:

N-input EX-NOR gate. N-output inverter. N-input NOR gate

Sequential Circuit Design: Principle

2 ( = 46 points) 30 min.

Adders, Subtracters and Accumulators in XC3000

NODIA AND COMPANY. GATE SOLVED PAPER Computer Science Engineering Digital Logic. Copyright By NODIA & COMPANY

CARLETON UNIVERSITY School of Computer Science. COMP 2003A Computer Organization Fall 2005 Mid-term Examination Solution Key

Transcription:

EE2L_ClassNotes_Ch_Counters_transparencies.fm Chapter Counters (a short discussion) ecimal count sequence: Ex: 788, 789, 79,... Ex: 798, 799, 8,... Generalization: 2 Binary count sequence: In a multi-bit up counter, a bit (such as 2) will flip (increment) when all its right neighbors ( and ) are (all s / all s). In a multi-bit down counter, a bit (such as 2) will flip (decrement) when all its right neighbors ( and ) are (all s / all s). 3 Basic element in building a counter: A toggle flip-flop 2 2 A JK FF with its J and K tied to (, /,) acts as a toggle FF. If the J and K are tied to (, /,), the FF remains stay put. 4 Ripple counter K Which of the following is an up-counter and which is a down-counter? What are the rest? o you call the counter a positive-edge triggered counter or a negative-edge triggered counter or a mixed-edge triggered counter? Whey are these called ripple counters? J K J 4/24/6 EE2L Class Notes - Chapter # Counters Page / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm J K J K J K J K J K J K J K J K J K J K J K J K The above 4 hook-ups are reproduced below with an inverter in clock input of the left-most FF. Answer the same question for these 4 hook-ups. J K J K J K J K J K J K J K J K J K J K J K J K 4/24/6 EE2L Class Notes - Chapter # Counters Page 2 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm J K J K J K J K J K J K J K J K J K J K J K J K The above 4 hook-ups are reproduced below with an inverter in clock input of the left-most FF. Answer the same question for these 4 hook-ups. J K J K J K J K J K J K J K J K J K J K J K J K 4/24/6 EE2L Class Notes - Chapter # Counters Page 2 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 5 Building a toggle flip-flop using a -FF Which of the following -FF hook-ups act as a toggle FF? How do you describe the others? Which of the following -latch hook-ups act as a toggle latches!? How do you describe the others? 6 Ripple counter using -FFs In lab #4, you built a ripple counter, using negative-edge triggered JK Flip-Flops. Build a 4-bit ripple UP counter using the four -FF hookups given below. This counter shall count-up whenever the produces a positive edge. Label the four outputs R 3 R 2 R R (R is the LB. "R" stands for "ripple). To change the above design so as to make the counter to count on the negative edges of the, would you change just one of the four FFs to a negative-edge triggered FF or all the four? If one, which one? 4/24/6 EE2L Class Notes - Chapter # Counters Page 3 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 5 Building a toggle flip-flop using a -FF Which of the following -FF hook-ups act as a toggle FF? How do you describe the others? Which of the following -latch hook-ups act as a toggle latches!? How do you describe the others? 6 Ripple counter using -FFs In lab #4, you built a ripple counter, using negative-edge triggered JK Flip-Flops. Build a 4-bit ripple UP counter using the four -FF hookups given below. This counter shall count-up whenever the produces a positive edge. Label the four outputs R 3 R 2 R R (R is the LB. "R" stands for "ripple). To change the above design so as to make the counter to count on the negative edges of the, would you change just one of the four FFs to a negative-edge triggered FF or all the four? If one, which one? 4/24/6 EE2L Class Notes - Chapter # Counters Page 3 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 7 Ripple counter vs. ynchronous counter: You may have seen in one of the episodes of "I love Lucy". Lucy tries to dance by looking at other dancers rather than by following the beat of the drum. If the FF propagation delay is ns, then, in the case of a 32-bit ripple counter In the case of a synchronous counter design, each FF shall be prepared individually to toggle if appropriate on the tick of the next clock. 8 A synchronous counter with, LOA, and controls A A B B 3 I I I2 I I I2 Y Y BA BA B 2 * I I I2 I I I2 Y Y LOA I I I2 I I I2 Y Y * 2* 2 To build the three bit incrementer, do you need 3 full-adders or 3 half-adders? A A A B B A implify this further! NC (no connection) 4/24/6 EE2L Class Notes - Chapter # Counters Page 4 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 7 Ripple counter vs. ynchronous counter: You may have seen in one of the episodes of "I love Lucy". Lucy tries to dance by looking at other dancers rather than by following the beat of the drum. If the FF propagation delay is ns, then, in the case of a 32-bit ripple counter In the case of a synchronous counter design, each FF shall be prepared individually to toggle if appropriate on the tick of the next clock. 8 A synchronous counter with, LOA, and controls A A B B 3 I I I2 I I I2 Y Y BA BA B 2 * I I I2 I I I2 Y Y LOA I I I2 I I I2 Y Y * 2* 2 To build the three bit incrementer, do you need 3 full-adders or 3 half-adders? A A A B B A implify this further! NC (no connection) 4/24/6 EE2L Class Notes - Chapter # Counters Page 4 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 9 A 4-bit free-running synchronous counter Label the outputs A A A3 B B B3 3 * * 2* 2 3* 3 Instead of looking at half-adders building an incrementer, you can explain the design slightly differently. The XOR gate in front of the -FF acts like an inverter if the control input is a. Else (if the control input is a zero), it (the XOR gate) acts like a non-inverter. o basically, the control input (CTRL) is telling the - FF (through the XOR gate) whether it should be toggling on the next clock. CTRL i i Can you replace this with a 3-input and gate to improve performance? CTRL i = i-. i-2..... Make a 5-bit counter using this building block. Transitional values at the output of counters during transition all s ( ) rolling over to all s ( ), is it possible that any 6-bit number may appear at the output of the counter for a very short time during the transition? (Yes / No). oes your answer assume that the counter is a ripple counter or a synchronous counter or any of the two types? Is there any harm due to these transitional values? 4/24/6 EE2L Class Notes - Chapter # Counters Page 5 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 9 A 4-bit free-running synchronous counter Label the outputs A A A3 B B B3 3 * * 2* 2 3* 3 Instead of looking at half-adders building an incrementer, you can explain the design slightly differently. The XOR gate in front of the -FF acts like an inverter if the control input is a. Else (if the control input is a zero), it (the XOR gate) acts like a non-inverter. o basically, the control input (CTRL) is telling the - FF (through the XOR gate) whether it should be toggling on the next clock. CTRL i i Can you replace this with a 3-input and gate to improve performance? CTRL i = i-. i-2..... Make a 5-bit counter using this building block. Transitional values at the output of counters during transition all s ( ) rolling over to all s ( ), is it possible that any 6-bit number may appear at the output of the counter for a very short time during the transition? (Yes / No). oes your answer assume that the counter is a ripple counter or a synchronous counter or any of the two types? Is there any harm due to these transitional values? 4/24/6 EE2L Class Notes - Chapter # Counters Page 5 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm Enable control Consider the following two designs. Are they both right designs? Is one of them better if you want to build a "fast" counter? A A B B * I I I2 Y * Y I I I2 2* 2 A A B B * * 2* 2 2 Truncated Counters Complete the following two incomplete designs of a truncated counter with 5 states,, 2, 3, 4, (from 4 back to ). Which is better if we want to build a "fast" counter. A A B B * I I I2 Y * Y I I I2 2* 2 A A B B * I I I2 Y * Y I I I2 2* 2 3 pecial 3-bit counter skipping,, and 2 ( 3, 4, 5, 6, 7, 3, 4, 5, 6, 7,...) Complete the following two designs. Why one of them is a "bad" design? A A B B * I I I2 Y * Y I I I2 2* 2 LOA A A B B * PRE * PRE 2* 2 4/24/6 EE2L Class Notes - Chapter # Counters Page 6 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm Enable control Consider the following two designs. Are they both right designs? Is one of them better if you want to build a "fast" counter? A A B B * I I I2 Y * Y I I I2 2* 2 A A B B * * 2* 2 2 Truncated Counters Complete the following two incomplete designs of a truncated counter with 5 states,, 2, 3, 4, (from 4 back to ). Which is better if we want to build a "fast" counter. A A B B * I I I2 Y * Y I I I2 2* 2 A A B B * I I I2 Y * Y I I I2 2* 2 3 pecial 3-bit counter skipping,, and 2 ( 3, 4, 5, 6, 7, 3, 4, 5, 6, 7,...) Complete the following two designs. Why one of them is a "bad" design? A A B B * I I I2 Y * Y I I I2 2* 2 LOA A A B B * PRE * PRE 2* 2 4/24/6 EE2L Class Notes - Chapter # Counters Page 6 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 4 Cascading Counters: Build a 6-bit counter by cascading two 3-bit counters A A B B * I I I2 Y * Y I I I2 2* 2 A A B B 3* 3 I I I2 Y 4* 4 Y I I I2 5* 5 Try completing this alternative design and also criticize the same. A A B B * I I I2 Y * Y I I I2 2* 2 A A B B 3* 3 4* 4 5* 5 _ 4/24/6 EE2L Class Notes - Chapter # Counters Page 7 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 4 Cascading Counters: Build a 6-bit counter by cascading two 3-bit counters A A B B * I I I2 Y * Y I I I2 2* 2 A A B B 3* 3 I I I2 Y 4* 4 Y I I I2 5* 5 Try completing this alternative design and also criticize the same. A A B B * I I I2 Y * Y I I I2 2* 2 A A B B 3* 3 4* 4 5* 5 _ 4/24/6 EE2L Class Notes - Chapter # Counters Page 7 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 5 Fix Mr. Bruin, I mean, Mr. Bruin s design of a stop watch. This stop watch goes from : to :59 ( Min. 59 ec.) and rolls back to :. It has a CLEAR and TART/TOP controls. A A A3 B B B3 3 I I I2 I3 I I I2 I3 Y Y Y3 I I I2 I3 I I I2 I3 TART/TOP Y Y Y3 * * * 3* CLEAR 3 A A A3 B B B3 3 I I I2 I3 I I I2 I3 Y Y Y3 T* I I I2 Y T* I3 Y I I Y3 T* I2 I3 T3* T T T T3 CLEAR M 6 Timing analysis of a counter 4/24/6 EE2L Class Notes - Chapter # Counters Page 8 / 8 C Copyright 26 Gandhi Puvvada

EE2L_ClassNotes_Ch_Counters_transparencies.fm 5 Fix Mr. Bruin, I mean, Mr. Bruin s design of a stop watch. This stop watch goes from : to :59 ( Min. 59 ec.) and rolls back to :. It has a CLEAR and TART/TOP controls. A A A3 B B B3 3 I I I2 I3 I I I2 I3 Y Y Y3 I I I2 I3 I I I2 I3 TART/TOP Y Y Y3 * * * 3* CLEAR 3 A A A3 B B B3 3 I I I2 I3 I I I2 I3 Y Y Y3 T* I I I2 Y T* I3 Y I I Y3 T* I2 I3 T3* T T T T3 CLEAR M 6 Timing analysis of a counter 4/24/6 EE2L Class Notes - Chapter # Counters Page 8 / 8 C Copyright 26 Gandhi Puvvada