Rabie A. Ramadan Lecture 3

Slides:



Advertisements
Similar presentations
Lecture 23: Registers and Counters (2)
Advertisements

CSE 205: Digital Logic Design
Registers and Counters
CENG 241 Digital Design 1 Lecture 11
Dr. ClincyLecture1 Appendix A – Part 2: Logic Circuits Current State or output of the device is affected by the previous states Circuit Flip Flops New.
1 Review: Counters and Registers CS 231 Review October 26, 2007 By Joshua Smith Please note the NOTES in the PPT file for help with the examples.
Chapter 7 Henry Hexmoor Registers and RTL
Homework Reading Machine Projects Labs Tokheim Chapter 9.1 – 9.6
Logic and Computer Design Fundamentals Registers and Counters
ENGIN112 L27: Counters November 5, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 27 Counters.
CS370 Counters. Overview °Counter: A register that goes through a prescribed series of states °Counters are important components in computers. °Counters.
ENGIN112 L26: Shift Registers November 3, 2003 ENGIN 112 Intro to Electrical and Computer Engineering Lecture 26 Shift Registers.
Sequential Circuit Introduction to Counter
C HAPTER S IX R EGISTERS AND C OUNTERS 1. A clocked sequential circuit consists of a group of flip-flops and combinational gates connected to form a feedback.
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:
Mantıksal Tasarım – BBM231 M. Önder Efe
Registers and Counters
Counters and Registers
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.
A presentation on Counters
Registers and Counters
Chapter 1_4 Part II Counters
1 Sequential Circuits Registers and Counters. 2 Master Slave Flip Flops.
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 & Counters M. Önder Efe
1 Registers and Counters A register consists of a group of flip-flops and gates that affect their transition. An n-bit register consists of n-bit flip-flops.
Registers and Counters
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 )
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Lecture 17 Dr. Shi Dept. of Electrical and Computer Engineering.
Registers and Counters by Dr. Amin Danial Asham. References  Digital Design 5 th Edition, Morris Mano.
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.
Registers and Counters Chapter 6. Digital Circuits 2 Clocked sequential circuits a group of flip-flops and combinational gates connected to form a feedback.
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.
REGISTER A register is a group of flip-flops. Each flip- flop is capable of storing one bit of informa­ tion. An n-bit register consists of a group of.
Abdullah Said Alkalbani University of Buraimi
Sequential logic circuits
CHAPTER 6 Sequential Circuits’ Analysis CHAPTER 6 Sequential Circuits’ Analysis Sichuan University Software College.
Registers and Counters
C HAPTER S IX R EGISTERS AND C OUNTERS 1. A clocked sequential circuit consists of a group of flip-flops and combinational gates connected to form a feedback.
Counters.
Chap 5. Registers and Counters
Chapter 1_0 Registers & Register Transfer. Chapter 1- Registers & Register Transfer  Chapter 7 in textbook.
REGISTER TRANSFER LANGUAGE (RTL) INTRODUCTION TO REGISTER Registers1.
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN Dr. Shi Dept. of Electrical and Computer Engineering.
Logic Design (CE1111 ) Lecture 6 (Chapter 6) Registers &Counters Prepared by Dr. Lamiaa Elshenawy 1.
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.
Homework Reading Machine Projects Labs Tokheim Chapter 9.1 – 9.6
Registers and Counters
EKT 221 – Counters.
EKT 221 : Digital 2 COUNTERS.
Counters Next, we’ll look at different kinds of counters and discuss how to build them. These are not only examples of sequential analysis and design,
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.
COE 202: Digital Logic Design Sequential Circuits Part 4
29-Nov-18 Counters Chapter 5 (Sections ).
ECEN 248: INTRODUCTION TO DIGITAL SYSTEMS DESIGN
Computer Architecture and Organization: L02: Logic design Review
Counters Next, we’ll look at different kinds of counters and discuss how to build them. These are not only examples of sequential analysis and design,
Digital Logic Department of CNET Chapter-6
Digital Logic Department of CNET Chapter-6
Flip-Flops.
Outline Registers Counters 5/11/2019.
Counters Next, we’ll look at different kinds of counters and discuss how to build them. These are not only examples of sequential analysis and design,
Digital Electronics and Logic Design
Presentation transcript:

Rabie A. Ramadan Lecture 3 Digital Design Rabie A. Ramadan Lecture 3

Registers and Counters

Registers A circuit with flip-flops is considered a sequential circuit even in the absence of combinational logic. Register – is a group of flip-flops. Its basic function is to hold information within a digital system so as to make it available to the logic units during the computing process. However, A register may also have additional capabilities associated with it.

Counters Counter – is essentially a register that goes through a predetermined sequence of states. The gates in the counter are connected in such a way as to produce the prescribed sequence of binary states.

4-bit Register Clear will reset all of the FFs

Register with Parallel Load If all the bits in a register are loaded at the same time, the loading is done in parallel. The feedback connection from output to input is necessary because the D flip-flop does not have a “no change” condition.

Shift Registers Registers capable of shifting their binary contents in one or both directions. Q0(t+1) = SI Q1(t+1) = Q0(t) Q2(t+1) = Q1(t) Q3(t+1) = Q2(t) Each clock pulse shifts the contents of the register one bit position to the right.

Serial Transfer Serial transfer of information from register A to register B is done with shift registers: Assume that the binary content of A before the shift is 1011 and that of B is 0010. The serial transfer occurs in four steps as shown in the table below:

Serial Addition Bits in the two registers are added one pair at a time through a single full adder (FA) circuit. The carry out of the FA is transferred to a D flip-flop. The output of this flip-flop is then used as the carry input for the next pair of significant bits.

Counters

We’ll soon look at some extensions to this basic idea. Introducing counters Counters are a specific type of sequential circuit. The state, or the flip-flop values themselves, serves as the “output.” The output value increases by one on each clock cycle. After the largest value, the output “wraps around” back to 0. Using two bits, we’d get something like this: 00 01 10 11 1 We’ll soon look at some extensions to this basic idea.

What good are counters? Counters can act as simple clocks to keep track of “time.” You may need to record how many times something has happened. How many bits have been sent or received? How many steps have been performed in some computation? All processors contain a program counter, or PC. Programs consist of a list of instructions that are to be executed one after another (for the most part). The PC keeps track of the instruction currently being executed. The PC increments once on each clock cycle, and the next program instruction is then executed.

A slightly fancier counter Let’s try to design a slightly different two-bit counter: Again, the counter outputs will be 00, 01, 10 and 11. Now, there is a single input, X. When X=0, the counter value should increment on each clock cycle. But when X=1, the value should decrement on successive cycles. We’ll need two flip-flops again. Here are the four possible states: 00 01 10 11

The complete state diagram and table Here’s the complete state diagram and state table for this circuit. Make sure you know how to come up with these – this is a typical sequential design problem! 00 01 10 11 1

D flip-flop inputs If we use D flip-flops, then the D inputs will just be the same as the desired next states. D1 =?? D0 =??

D flip-flop inputs If we use D flip-flops, then the D inputs will just be the same as the desired next states. Equations for the D flip-flop inputs are shown at the right. D1 = Q1  Q0  X D0 = Q0’

Circuit Here are some D Flip Flop devices They have both normal and complemented outputs, so we can access Q0’ directly without using an inverter. (Q1’ is not needed in this example.) This circuit counts normally when Reset = 1. But when Reset is 0, the flip-flop outputs are cleared to 00 immediately.

Standard Counters Ripple Counters Synchronous Counters The FF output serves as a trigger to other FFs Synchronous Counters The trigger (Clock ) is common to all FFs 1 clock Q1 Q2

Binary Ripple Counter Negative edge FFs Least significant FF (e.g. A0) output is an input to the next one . Logic -1 is an input The least significant FF toggles the output with each clock

Binary Ripple Counter Part of the output Simply, A1 will toggle its state when A0 output changes from 1 to 0 A2 toggles its state when A1 output changes from 1 to 0 A3 toggles its state when A2 output changes from 1 to 0 A0 A1 A2 A3 1 .

Another Ripple Counter

BCD Ripple Counter Counts to 9 and back to 0 again How many FFs required ? 4

BCD Ripple Counter Q1 triggers Q2 and Q8 Q2 triggers Q4 Q2 and Q4 inputs to J in Q8

Synchronous counters Clock is common to all FFs Change in all FFs done at the same time Change decision is based on the input circuits

Binary Counters

Up-Down Binary Counter Up/Down Counter can either count up or down on each clock cycle Up counter counts from 0000 to 1111 and then changes back to 0000 Down counter counts from 1111 to 0000 and then back to 1111 Counter counts up or down each clock cycle Output changes occur on clock rising edge

Counters with Parallel Load Counters with parallel load can have a preset value Load signal indicates that data (I3…I0) should be loaded into the counter Clear resets counter to all zeros Carry output could be used for higher-order bits

Summary Binary counters can be ripple or synchronous Ripple counters use flip flop outputs as flop triggers Some delay before all flops settle on a final value Do no require a clock signal Synchronous counters are controlled by a clock All flip flops change at the same time Up/Down counters can either increment or decrement a stored binary value Control signal determines if counter counts up or down Counters with parallel load can be set to a known value before counting begins