1 Authors: Mircea R. Stan, Alexandre F. Tenca and Milos D. Ercegovac Reader: Pushpinder Kaur Chouhan Long and Fast Up/Down Counters.

Slides:



Advertisements
Similar presentations
COUNTERS Counters with Inputs Kinds of Counters Asynchronous vs
Advertisements

Lecture 23: Registers and Counters (2)
Registers and Counters
Digital Logic Chapter 5 Presented by Prof Tim Johnson
Sequential Circuits A Basic sequential circuit is nothing but a combinational circuit with some feedback paths between its output and input terminals.
Counters and Registers
Logic and Computer Design Fundamentals Registers and Counters
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
COE 202: Digital Logic Design Sequential Circuits Part 4 KFUPM Courtesy of Dr. Ahmad Almulhem.
ECE 331 – Digital System Design Counters (Lecture #18)
Lab 5 :JK Flip Flop and Counter Fundamentals:
Introduction Flip-flops are synchronous bistable devices. The term synchronous means the output changes state only when the clock input is triggered. That.
KU College of Engineering Elec 204: Digital Systems Design
A.Abhari CPS2131 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers:
What is shift register? A shift register is a digital memory circuit found in calculators, computers, and data-processing systems. Bits (binary digits)
Registers and Counters
Sequential Circuit  It is a type of logic circuit whose output depends not only on the present value of its input signals but on the past history of its.
Counters  A counter is a device which stores (and sometimes displays) the number of times a particular event or process has occurred, often in relationship.
Three Other Types of Counters (BCD Counter, Ring Counter, Johnson Counter) Hun Wie (Theo) SJSU, 2011 Spring Prof: Dr. Sin-Min Lee CS147 Computer Organization.
Design of Counters ..
A presentation on Counters
Electronics Technology
Counters.
A State Element “Zoo”.
Registers and Counters
Chapter 1_4 Part II Counters
EE345: Introduction to Microcontrollers Register and Counters Prof. Ahmad Abu-El-Haija.
Lecture 27 Counters Give qualifications of instructors: DAP
Sequential Circuits Chapter 4 S. Dandamudi To be used with S. Dandamudi, “Fundamentals of Computer Organization and Design,” Springer,  S.
Registers and Counters
Registers and Counters
Electronics Technology
Rabie A. Ramadan Lecture 3
Counter Application (Part B) By : Pn Siti Nor Diana Ismail CHAPTER 3.
SEQUENTIAL CIRCUITS Component Design and Use. Register with Parallel Load  Register: Group of Flip-Flops  Ex: D Flip-Flops  Holds a Word of Data 
2017/4/24 CHAPTER 6 Counters Chapter 5 (Sections )
Synch 1.1 Synchronous Counters 1 ©Paul Godin Created January 2008.
Counters By Taweesak Reungpeerakul
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 17 Dr. Shi Dept. of Electrical and Computer Engineering.
Counters. November 5, 2003 Introduction: Counters  Counters are circuits that cycle through a specified number of states.  Two types of counters: 
7-6 단일 레지스터에서 Microoperation Multiplexer-Based Transfer  Register 가 서로 다른 시간에 둘 이상의 source 에서 data 를 받을 경우 If (K1=1) then (R0 ←R1) else if (K2=1) then.
1 Registers & Counters Logic and Digital System Design - CS 303 Erkay Savaş Sabancı University.
ENG241 Digital Design Week #8 Registers and Counters.
Chap 5. Registers and Counters. Chap Definition of Register and Counter l a clocked sequential circuit o consist of a group of flip-flops & combinational.
© 2009 Pearson Education, Upper Saddle River, NJ All Rights ReservedFloyd, Digital Fundamentals, 10 th ed Digital Fundamentals Tenth Edition Floyd.
ECA1212 Introduction to Electrical & Electronics Engineering Chapter 9: Digital Electronics – Sequential Logic by Muhazam Mustapha, November 2011.
Chapter 1_4 Part III more on … Counters Chapter 1_4 Part III more on … Counters.
Sequential logic circuits
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
Decade Counter (BCD Counter). Introduction A counter which is reset at the 10 th clock pulse is called decade counter. The decade counter is otherwise.
Registers and Counters
Counters and Registers Synchronous Counters. 7-7 Synchronous Down and Up/Down Counters  In the previous lecture, we’ve learned how synchronous counters.
COUNTERS Why do we need counters?
Counters.
Basic terminology associated with counters Technician Series
Digital System Design using VHDL
Chap 5. Registers and Counters
Chapter 1_0 Registers & Register Transfer. Chapter 1- Registers & Register Transfer  Chapter 7 in textbook.
THEME 6: Frequency dividers. Digital counters with reduced counting modulus. Programmable digital counters. If the input pulses are more than K, the counter.
Counters and registers Eng.Maha Alqubali. Registers Registers are groups of flip-flops, where each flip- flop is capable of storing one bit of information.
Counters In digital logic and computing, a counter is a device which stores (and sometimes displays) the number of times a particular event or process.
1 Registers A register is a group of n flip-flops each of them capable of storing one bit of information There are two types of registers: parallel and.
Sequential logic circuits First Class 1Dr. AMMAR ABDUL-HAMED KHADER.
FLIP FLOPS Binary unit capable of storing one bit – 0 or 1
Hun Wie (Theo) SJSU, 2011 Spring Prof: Dr. Sin-Min Lee
EKT 221 – Counters.
Prof. Hsien-Hsin Sean Lee
EKT 221 : Digital 2 COUNTERS.
Registers and Counters Register : A Group of Flip-Flops. N-Bit Register has N flip-flops. Each flip-flop stores 1-Bit Information. So N-Bit Register Stores.
Hun Wie (Theo) SJSU, 2011 Spring Prof: Dr. Sin-Min Lee
Presentation transcript:

1 Authors: Mircea R. Stan, Alexandre F. Tenca and Milos D. Ercegovac Reader: Pushpinder Kaur Chouhan Long and Fast Up/Down Counters

2  Introduction  Basic Counters  Counters Classification  Prescaled Counters  Constant-Time Up/down Counters  Alternative Design  Conclusion  References

3 Long and Fast Up/Down Counters  Introduction  Definition of counter  What is the article about  Basic Counters  Counters Classification  Prescaled Counters  Constant-Time Up/down Counters  Alternative Design  Conclusion  References

4  Counter is a special type of adder in which one operand is kept constant.  Mod number – number of states 2 n in a counter (n is number of flip-flops)  Generally counter can be written as Binary modulo 2 n n-bit counter, where the value s(t) of the counter is incremented by one in each clock cycle: s(t+1) = s(t) mod 2 n Introduction In Out Up/Down Load CNT Reset CLK TC N N Black-box generic counter model with the most common control signals

5 Introduction  Problem- When the up/down counter changes direction from counting up to counting down or vise versa.  Solution-  use Shadow register for storing the previous counter state.  restore the previous state in constant time, by storing the carry bits in a Carry/Borrow register.

6 Long and Fast Up/Down Counters  Introduction  Basic Counters  Asynchronous Counter  Synchronous Counter  Synchronous Decade Counter  Ring Counter  Twisted-ring Counter  Counters Classification  Prescaled Counters  Constant-Time Up/down Counters  Alternative Design  Conclusion  References

7 Basic Counters Asynchronous Counter –

8 Basic Counters Asynchronous up/down Counter – Sequence Table -

9 Basic Counters Synchronous Counter – Synchronous up/down Counter –

10 Basic Counters Asynchronous Decade Counter –

11 Basic Counters Ring Counter – Q3Q3 Q1Q1 Q0Q0 Q2Q2 D Q 3 CLK Q 3 D Q 2 CLK Q 2 D Q 1 CLK Q 1 D Q 0 CLK Q

12 Basic Counters Twisted-ring Counter – Q1Q1 Q0Q0 Q2Q2 D Q 2 CLK Q 2 D Q 1 CLK Q 1 D Q 0 CLK Q

13 Long and Fast Up/Down Counters  Introduction  Basic Counters  Counters Classification  Based on initialization of the state  Based on counting sequence  Based on the way of supplying the clock signal  Based on the state diagram  Based on the number of states  Based on the state encoding  Prescaled Counters  Constant-Time Up/down Counters  Alternative Design  Conclusion  References

14 Counters Classification Based on initialization of the state –  Noninitalizable  Resettable  Loadable Based on counting sequence –  Up-only  Down-only  Up/down Based on the way of supplying the clock signal –  Asynchronous  Semisynchronous  Synchronous Based on the state diagram –  Periodic  Aperiodic

15 Counters Classification Based on initialization of the state – Based on counting sequence – Based on the way of supplying the clock signal – Based on the state diagram – Based on the number of states –  Modulo-2 N  Modulo-P Based on the state encoding –  Binary  Quasi-Binary  Non-Binary

16 Long and Fast Up/Down Counters  Introduction  Basic Counters  Counters Classification  Prescaled Counters  Characteristics  Basic idea  Block Diagram  Partitioning  Constant-Time Up/down Counters  Alternative Design  Conclusion

17 Prescaled Counter Characteristics –  Binary counting sequence  Clock period independent of counter size  Readable on the fly  Space complexity linear in the number of bits i.e., (O(N))  Count up, down, or up/down  Resettable

18 Prescaled Counter Basic Idea – Characteristic of binary number system. i.e., The higher order bits are stable for long periods of time and the terminal count (TC) output from the two least significant bits, which becomes a CARRY-in into the most significant block, is periodic with a lower frequency than the clock signal. Binary Sequence Counting Up

19 Prescaled Counter Prescaling long counters requires partitioning them into a series of sub-blocks of increasing sizes in order to take advantage of the reduced frequency required by high order bits.

20 Partitioning methods -  Top-down manner – First determine the size of most significant block, which is chosen as large as possible and then recursively determine the size of the lower order blocks. N-bit counter is first partitioned into an (N - log 2 N ) most significant block and into another log 2 N block. Eg:- 64-bit counter is partitioned in block sizes 58, 3, 2, 1 and 128-bit counter in 121, 4, 2, 1.  Bottom-up manner - First determine the size of least significant block, then choose the second block as large as possible and then the third and so on. Least significant block with n 0 = 1-bit the second block with n 1 = 2 to the power n 0 = 2-bits and the third block with n 2 = 2 the power (n 0 + n 1 ) = 8 bits and so on. Eg:- 64-bit counter is partitioned in block sizes 51, 8, 2, 1 and 128-bit counter in 117, 8, 2, 1. Prescaled Counter

21 Long and Fast Up/Down Counters  Introduction  Basic Counters  Counters Classification  Prescaled Counters  Constant-Time Up/down Counters  Main idea  Block Diagram  Least-Significant Bit Counter  Configuration Bit  Clock Period  Up/Down Ring Counter  Partitioning  Incrementer/Decrementer  Alternative Design  Conclusion

22 Constant-Time Up/down Counters Main idea - Store the previous block value in the Shadow register whenever the block is loaded with a new value and simply load this value when necessary, instead of trying to compute it. Issues that determine the structure of the new counter  The prescaled TC generation must itself be up/down, for that up/down ring counter is used.  Each block needs to be configurable for counting either up or down. A separate configuration bit for each block is needed to keep track of the block configuration.  Each sub-block has a shadow register that stores the previous block value. When the block configuration is “up”, the shadow register stores the present value minus one LSB and when the configuration is “down”, it stores the present value plus one LSB.

23 Constant-Time Up/down Counters

24 Partitioning Determining the partition sizes for the proposed up/down counter proceeds top-down, the minimum clock period (T clk ) is larger than the combinational unit delay due to the extra complexity. If we consider T clk = pd, where d is the unit delay, the partitioning first divides the N-bit counter into a most significant N - (log 2 N/P) block and into another (log 2 N/P) block which is recursively divided in the same manner until the smaller block is a 1-bit counter. Example: For p = 4 and N = 64, the partitioning leads to the sizes: 60, 3, 1.

25 Up/Down Ring Counter  The ring counter inside each block is used to generate the TC in constant time for the block.  When counting up, TC=1 when the state of the enable counter is s(t)=1000…0  When counting down, TC=1 when the state of the enable counter is s(t)=0000…0

26 Incrementer/decrementer Incrementer/decrementer can be easily implemented as a ripple carry chain. For an n-bit block, the delay through the ripple chain will be n times the unit logic delay.

27 Least-Significant Bit Counter  A 1- bit counter counts in the same sequence, so it does not effect whether it count up or down.  It act as both 1-bit least significant bit and as a ring counter for the second block.  There is no need for a shadow register or configuration bit for the first block.

28 Configuration Bit A configuration bit for each higher order block keeps track of how the block is configured (up/down). There are four cases:  Block is configured up and a carry-in comes from ring counter.  Block is configured down and a borrow-in comes from ring counter.  Block is configured up and a borrow-in comes from ring counter.  Block is configured down and a carry-in comes from ring counter.

29 Example- 64bit ( 60,3,1) Up/ down TC-in (RC) Configuration bit Increase/ decrease Swap signal Shadow register RegisterLSB counter (1) up carryupinc (4) down carryup upcarryupinc upcarryupinc (3) up borowdown (2) down borowdowndec

30 Constant-Time Up/down Counters

31 Long and Fast Up/Down Counters  Introduction  Basic Counters  Counters Classification  Prescaled Counters  Constant-Time Up/down Counters  Alternative Design  Use of Carry/Borrow Register  Conclusion  Comment  References

32 Alternative Design Store the bit-wise XOR between the previous state and the current state in a Carry/Borrow register. With this information available, it is possible to restore the desired previous state in one gate delay.

33 Long and Fast Up/Down Counters  Introduction  Basic Counters  Counters Classification  Prescaled Counters  Constant-Time Up/down Counters  Alternative Design  Conclusion  Comment  References

34 Conclusion  Use Shadow register to store the previous value of the counter and just swap the value when counter change the direction.  Use the Carry/Borrow register to store the bit- wise XOR between the previous state and current state.  Use of shadow register is better than the carry/borrow register, as CBreg restore the value in one gate delay.

35 Long and Fast Up/Down Counters  Introduction  Basic Counters  Counters Classification  Prescaled Counters  Constant-Time Up/down Counters  Alternative Design  Conclusion  Comment  References

36 Comment  Use twisted-ring counter instead of ring counter in constant up/down counter with shadow register will be fast and may use less clock period.  Mod-N Twisted-ring counter can be constructed by connecting N/2 flip-flops, where as in Mod-N ring counter N flip-flops are required.  We can use Bottom-up manner partitioning, as in top- down manner partitioning the counters of different sizes will require different partition sizes.  The state bits in the twisted-ring counter are such that the s(t)=(100…0) state can be detected by the two most significant bits and the s(t)=(000…0) state can be detected by testing the most and least significant bits.

37 Up/Down Twisted-ring Counter

38 Long and Fast Up/Down Counters  Introduction  Basic Counters  Counters Classification  Prescaled Counters  Constant-Time Up/down Counters  Alternative Design  Conclusion  Comment  References

39  Digital Systems Principles and Application By Ronald J. Tocci.  Computer Arithmetic Algorithms and Hardware Designs By Behrooz Parhami  counter.html counter.html  nter01.html nter01.html  References

40 Questions ?

41 Basic Counters Synchronous Decade Counter –  Q0 toggles on each clock pulse.  Q1 changes on the next clock pulse each time Q0=1 and Q3=0.  Q2 changes on the next clock pulse each time Q0=Q1=1.  Q3 changes on the next clock pulse each time Q0=1, Q1=1 and Q2=1 (count 7), or when Q0=1 and Q3=1 (count 9).

42 Basic Counters Differential Counter - ∆ = k (d1-d2)