Systems I: Computer Organization and Architecture



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

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

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

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

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

Digital Logic Design Sequential circuits

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

Counters & Shift Registers Chapter 8 of R.P Jain

Lecture-3 MEMORY: Development of Memory:

DEPARTMENT OF INFORMATION TECHNLOGY

Module 3: Floyd, Digital Fundamental

Contents COUNTER. Unit III- Counters

Counters. Present State Next State A B A B

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

Counters and Decoders

Systems I: Computer Organization and Architecture

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

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

BINARY CODED DECIMAL: B.C.D.

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

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

Asynchronous Counters. Asynchronous Counters

Binary Adders: Half Adders and Full Adders

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

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

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

ASYNCHRONOUS COUNTERS

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

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

Chapter 8. Sequential Circuits for Registers and Counters

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

Lecture 8: Synchronous Digital Systems

Memory Elements. Combinational logic cannot remember

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

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

DIGITAL ELECTRONICS. Counters. By: Electrical Engineering Department

The components. E3: Digital electronics. Goals:

Copyright Peter R. Rony All rights reserved.

Registers & Counters

exclusive-or and Binary Adder R eouven Elbaz reouven@uwaterloo.ca Office room: DC3576

Operating Manual Ver.1.1

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

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

Let s put together a Manual Processor

Microprocessor & Assembly Language

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

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

CHAPTER 11: Flip Flops

Chapter 2 Logic Gates and Introduction to Computer Architecture

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

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

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

LAB #4 Sequential Logic, Latches, Flip-Flops, Shift Registers, and Counters

COMBINATIONAL CIRCUITS

Cascaded Counters. Page 1 BYU

DM54161 DM74161 DM74163 Synchronous 4-Bit Counters

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

DATA SHEET. HEF40193B MSI 4-bit up/down binary counter. For a complete data sheet, please also download: INTEGRATED CIRCUITS

Lesson 12 Sequential Circuits: Flip-Flops

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

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

Flip-Flops and Sequential Circuit Design

FORDHAM UNIVERSITY CISC Dept. of Computer and Info. Science Spring, Lab 2. The Full-Adder

6-BIT UNIVERSAL UP/DOWN COUNTER

CSE140 Homework #7 - Solution

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

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

List of Experiment. 8. To study and verify the BCD to Seven Segments DECODER.(IC-7447).

Lab 1: Study of Gates & Flip-flops

3.Basic Gate Combinations

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

Sequential Logic Design Principles.Latches and Flip-Flops

74F168*, 74F169 4-bit up/down binary synchronous counter

DM74LS169A Synchronous 4-Bit Up/Down Binary Counter

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


MICROPROCESSOR. Exclusive for IACE Students iacehyd.blogspot.in Ph: /422 Page 1

DM74LS191 Synchronous 4-Bit Up/Down Counter with Mode Control

More Verilog. 8-bit Register with Synchronous Reset. Shift Register Example. N-bit Register with Asynchronous Reset.

Gates, Plexers, Decoders, Registers, Addition and Comparison

Chapter 9 Latches, Flip-Flops, and Timers

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

54191 DM54191 DM74191 Synchronous Up Down 4-Bit Binary Counter with Mode Control

Engr354: Digital Logic Circuits

CHAPTER 11 LATCHES AND FLIP-FLOPS

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

Digital Fundamentals

Lecture 7: Clocking of VLSI Systems

Sistemas Digitais I LESI - 2º ano

Digital Electronics Detailed Outline

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

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

A single register, called the accumulator, stores the. operand before the operation, and stores the result. Add y # add y from memory to the acc

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

74AC191 Up/Down Counter with Preset and Ripple Clock

CS101 Lecture 26: Low Level Programming. John Magee 30 July 2013 Some material copyright Jones and Bartlett. Overview/Questions

Course Requirements & Evaluation Methods

Transcription:

Systems I: omputer Organization and Architecture Lecture 8: Registers and ounters Registers A register is a group of flip-flops. Each flip-flop stores one bit of data; n flip-flops are required to store n bits of data. There are several different types of registers available commercially. The simplest design is a register consisting only of flipflops, with no other gates in the circuit. Loading the register transfer of new data into the register. The flip-flops share a common clock pulse (frequently using a buffer to reduce power requirements). Output could be sampled at any time. learing the flip-flop (placing zeroes in all its bit) can be done through a special terminal on the flip- flop.

4-bit Register lock I A I A I 2 A 2 I 3 A 3 lear Registers With Parallel Load The clock usually provides a steady stream of pulses which are applied to all flip-flops in the system. A separate control system is needed to determine when to load a particular register. The Register with Parallel Load has a separate load input. When it is cleared, the register receives it output as input. When it is set, it received the load input. 2

4-bit Register With Parallel Load Load I A I A I 2 A 2 A 3 I 3 lock Shift Registers A shift register is a register which can shift its data in one or both directions. The simplest shift register simply connects the flip-flops to their respective neighbor with the clock controlling the operation. If we wish to shift on some clock pulses but not others, we can inhibit the clock pulses on which we do not to shift. 3

4-Bit Shift Register Serial Input Serial Output lock Serial Transfer A digital system is operating in a serial mode when information is transferred and manipulated one bit at a time, with bits transferred out of the source register into the destination register. This is different from parallel transfer where all the bits of a register are transferred at once. Serial transfer of information from register A to register B is done with shift registers, where the serial output from register A serves as the serial input for register B. 4

Serial Transfer From Register A to Register B SI Shift Register A SO SI Shift Register B SO L L lock Shift control lock Shift control L T T 2 T 3 T 4 Serial Transfer State Table Timing Pulse Initial value After T After T 2 After T 3 After T 4 Shift Register A Shift Register B 5

Serial Addition While operations are usually parallel because it is faster, serial operations require less equipment. Serial addition can demonstrate this point, allowing us to perform addition with a single full adder and our two addends stored in a pair of shift registers, with the carry-out going into a -type flip-flop (and going back in as the carry-in). Initially, register A and the carry flip-flop are cleared to. The augend is initially placed in register B and serial addition is used to place it into register A. The sum is placed in shift register A, replacing the augend. Serial Adder Shift control L SI Shift Register A SO x y z FA S Serial input SI Shift Register B SO lear 6

Redesigning the Serial Adder We will use a pair of shift registers whose outputs will be x and y respectively. These are corresponding bits of the addends. S is the sum bit produced and a flip-flop will hold the carry bit as the flip-flop s state. We will implement it using a flip-flop State Table for the Serial Adder Present State (t) Inputs Y Next State (t+) Output S Flip-flop Inputs 7

arnaugh Map for xy = xy arnaugh Map for xy = x y = (x + y) 8

arnaugh Map for S xy S = x y Serial Adder Shift control L SI Shift Register A SO = x Serial input SI Shift Register B SO = y lear 9

Bi-directional Shift Registers A shift register that can shift in one direction is called a unidirectional shift register. A shift register that can shift in either direction is called a bi-directional shift register. Some shift register also allow for the simple transfer of data. General Shift Register The most general shift register have all of these capabilities: An input for clock pulses to synchronize all operations. A shift-right operation and serial line input line associated with the shift-right. A shift-left operation and serial line input line associated with the shift- left. A parallel load operation and n input lines associated with the parallel transfer. n parallel output lines. A control state that leaves the information in the register unchanged even though the clock pulses are applied.

Function Table For General Shift Register S S Register operation No change Shift Right (down) Shift Left (up) Parallel load Bidirectional Shift Register With Parallel Load I S S Serial Input S S 4 MU 2 3 A I S S 4 MU 2 3 A I 2 S S 4 MU 2 3 A 2 Serial Input I 3 lock S S 4 MU 2 3 A 3

ounters A register that goes through a prescribed sequences of states upon the application of an input pulse is called a counter. The input pulse may be a clock pulse or may have some other origin. A counter that goes through a binary sequence is called a binary counter. An n-bit binary counter uses n flip-flops and can count from to 2 n-. Ripple ounters ounters are either ripple counters or synchronous counters. In synchronous counters, all flip-flops receive the common clock pulse; therefore they change at the same time. In ripple counters, the output of one flip-flop is used as a source for triggering others. 2

4-Bit Ripple ounter Using T-Type Flip-flop A 3 A 2 A A T R T R T R T R Logic- Reset ount 4-Bit Ripple ounter Using -Type Flip-flop A 3 A 2 A A R R R R Logic- Reset ount 3

4 4-Bit Ripple ounter Using -Type Flip-flop R A ount Reset R A R A 2 R A 3 Binary ount Sequence A A A 2 A 3

B Ripple ounter A binary-coded decimal ripple counter will return to after it reaches 9, this necessarily changes the logic 8 4 2 Logic- ount Three-ecade B ounter 8 4 2 8 4 2 8 4 2 B ounter B ounter B ounter ount pulse 2 digit digit digit 5

Binary ounters A counter is a register that goes through a predetermined sequence of states as input pulses are applied. Almost all digital equipment will contain counters; they are used for counting the occurrences of a particular event and are useful in generating timing signals. An n-bit counter uses n flip-flops and are have any value in the range to 2 n -. We notice in our sequences that the lowest significance bit is complemented with every count and the other bits are complemented from one count to the next when all the lower bits are set. 4-bit Synchronous Binary ounter ount Enable A A A 2 lock A 3 Output carry 6

Up-own Binary ounter A count-down binary counter will go through binary states in reverse order. E.g., a 4-bit count-down binary counter will start at, go to, then, and so on down to. As in regular counters, the least significant bit is always complemented. But higher bits are complemented only if the lower bits are all. We can design a counter that can go in either direction, depending on the control inputs. 4-Bit Up-own Binary ounter Up own T A T A T A 2 T A 3 lock 7

8 B ounter B counters only go through states to up to. The pattern is as regular as binary counter, so we must go through the design process. State Table for B ounter T T 2 T 4 T 8 y 2 4 8 2 4 8 Present State Next State Output Flip-flop Inputs

8 4 2 arnaugh Map For T 8 T 8 = 8 + 4 2 8 4 2 arnaugh Map For T 4 T 4 = 2 9

8 4 2 arnaugh Map For T 2 T 2 = 8 8 4 2 arnaugh Map For T T = 2

4-Bit ounter With Parallel Load & Synchronous lear ounters often need to be preset with a prespecified value before counting begins. We also need the capability of clearing all bits simultaneously. Function Table For 4-Bit Parallel Load ounter lock lear Load ount Operation No change Increment count Load inputs I through I 3 lear outputs 2

Load 4-bit counter with parallel load & synchronous clear ount I A I A I 2 A 2 I 3 lock lear A 3 ounters With Unused States An n-bit counter has 2n states, but there are occasions when we wish to use less than the total number of states available. The unused states may be treated as don tcare conditions (or assigned to specific next states). Because outside interference may land the counter in these states, we must ensure that the counter can find its way back to a valid state. 22

23 State Table For ounter With Unused States B B A A B A B A Next State Present State Flip-flop Inputs arnaugh Maps for A and A B A B A A = B A = B

arnaugh Maps for B and B A B B = A B B = arnaugh Maps for and A B = B A B = 24

State iagram For ounter With Unused States Logic iagram For ounter With Unused States A B lock Logic 25

Ring ounter omputers need timing signals that indicate the sequence in which certain operations will take place. These can be generated by ring counters, circular shift registers with only one flip-flop set at any time. The alternative to a 4-bit ring counter is a 2-bit counter that goes through 4 distinct states and uses a decoder. Ring ounter Vs. ounter and ecoder Shift right T T T 2 T 3 T T T 2 T 3 Ring counter (initial value = ) 2 x 4 decoder ount enable 2-bit counter ounter and decoder 26

Sequence of Timing Signals From the Ring ounter L T T T 2 T 3 Switch-tail Ring ounters Switch-tail ring counter can double the number of states that a ring counter can provide. A B E A B E L 4-stage switch-tail ring counter 27

State Table For Switch-tail ounter Flip-flop Outputs Seq. Num. A B E AN gate required for output A E 2 AB 3 B 4 E 5 AE 6 A B 7 B 8 E ohnson ounters A A B B E E L Seq. # 2 3 4 5 6 7 8 28