Systems I: Computer Organization and Architecture



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

Let s put together a Manual Processor

Binary Adders: Half Adders and Full Adders

Systems I: Computer Organization and Architecture

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

5 Combinatorial Components. 5.0 Full adder. Full subtractor

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

Chapter 2 Logic Gates and Introduction to Computer Architecture

Systems I: Computer Organization and Architecture

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

ECE410 Design Project Spring 2008 Design and Characterization of a CMOS 8-bit Microprocessor Data Path

BASIC COMPUTER ORGANIZATION AND DESIGN

Gates, Circuits, and Boolean Algebra

1. True or False? A voltage level in the range 0 to 2 volts is interpreted as a binary 1.

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

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

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

DEPARTMENT OF INFORMATION TECHNLOGY

Understanding Logic Design

Logic in Computer Science: Logic Gates

Computer organization

CPU Organisation and Operation

Digital Electronics Detailed Outline

CSE140 Homework #7 - Solution

Chapter 01: Introduction. Lesson 02 Evolution of Computers Part 2 First generation Computers

Lecture 8: Synchronous Digital Systems

CHAPTER 3 Boolean Algebra and Digital Logic

Programming A PLC. Standard Instructions

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

MICROPROCESSOR AND MICROCOMPUTER BASICS

Sistemas Digitais I LESI - 2º ano

Two's Complement Adder/Subtractor Lab L03

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. COURSE CURRICULUM COURSE TITLE: COMPUTER ORGANIZATION AND ARCHITECTURE (Code: )

COMBINATIONAL CIRCUITS

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

CHAPTER 7: The CPU and Memory

A s we saw in Chapter 4, a CPU contains three main sections: the register section,

Central Processing Unit (CPU)

Figure 8-1 Four Possible Results of Adding Two Bits

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

Microprocessor & Assembly Language

COMBINATIONAL and SEQUENTIAL LOGIC CIRCUITS Hardware implementation and software design

Digital Fundamentals. Lab 8 Asynchronous Counter Applications

UNIVERSITY OF CALIFORNIA, DAVIS Department of Electrical and Computer Engineering. EEC180B Lab 7: MISP Processor Design Spring 1995

EXPERIMENT 4. Parallel Adders, Subtractors, and Complementors

BINARY CODED DECIMAL: B.C.D.

3.Basic Gate Combinations

CHAPTER IX REGISTER BLOCKS COUNTERS, SHIFT, AND ROTATE REGISTERS

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

MACHINE ARCHITECTURE & LANGUAGE

Computer Architecture

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

Counters and Decoders

Chapter 9 Computer Design Basics!

Design and Development of Virtual Instrument (VI) Modules for an Introductory Digital Logic Course

PROGRAMMABLE LOGIC CONTROLLERS Unit code: A/601/1625 QCF level: 4 Credit value: 15 TUTORIAL OUTCOME 2 Part 1

Combinational Logic Design

Upon completion of unit 1.1, students will be able to

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

United States Naval Academy Electrical and Computer Engineering Department. EC262 Exam 1

Advanced Computer Architecture-CS501. Computer Systems Design and Architecture 2.1, 2.2, 3.2

Central Processing Unit

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

Lecture N -1- PHYS Microcontrollers

Memory Elements. Combinational logic cannot remember

ECE 3401 Lecture 7. Concurrent Statements & Sequential Statements (Process)

How It All Works. Other M68000 Updates. Basic Control Signals. Basic Control Signals

Building a computer. Electronic Numerical Integrator and Computer (ENIAC)

LSN 2 Computer Processors

Registers & Counters

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

RUTGERS UNIVERSITY Department of Electrical and Computer Engineering 14:332:233 DIGITAL LOGIC DESIGN LABORATORY

Lab 1: Full Adder 0.0

Programming Logic controllers

CHAPTER 4 MARIE: An Introduction to a Simple Computer

1. Convert the following base 10 numbers into 8-bit 2 s complement notation 0, -1, -12

Computer Architecture Lecture 2: Instruction Set Principles (Appendix A) Chih Wei Liu 劉 志 尉 National Chiao Tung University

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

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

Computer Organization. and Instruction Execution. August 22

SIM-PL: Software for teaching computer hardware at secondary schools in the Netherlands

2011, The McGraw-Hill Companies, Inc. Chapter 3

University of St. Thomas ENGR Digital Design 4 Credit Course Monday, Wednesday, Friday from 1:35 p.m. to 2:40 p.m. Lecture: Room OWS LL54

Computer Science 281 Binary and Hexadecimal Review

Instruction Set Architecture (ISA)

EE 261 Introduction to Logic Circuits. Module #2 Number Systems

The components. E3: Digital electronics. Goals:

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

2.0 Chapter Overview. 2.1 Boolean Algebra

Module 3: Floyd, Digital Fundamental

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

An Overview of Stack Architecture and the PSC 1000 Microprocessor

S7 for Windows S7-300/400

Addressing The problem. When & Where do we encounter Data? The concept of addressing data' in computations. The implications for our machine design(s)

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

earlier in the semester: The Full adder above adds two bits and the output is at the end. So if we do this eight times, we would have an 8-bit adder.

CHAPTER 2. Logic. 1. Logic Definitions. Notation: Variables are used to represent propositions. The most common variables used are p, q, and r.

Adder.PPT(10/1/2009) 5.1. Lecture 13. Adder Circuits

Floating Point Fused Add-Subtract and Fused Dot-Product Units

PROBLEMS (Cap. 4 - Istruzioni macchina)

Transcription:

Systems I: Computer Organization and Architecture Lecture 9 - Register Transfer and Microoperations Microoperations Digital systems are modular in nature, with modules containing registers, decoders, arithmetic elements, control logic, etc. These digital components are defined by the registers that they contain and the operations performed on their data. These operations are called microoperations. Microoperations are elementary operations performed on the information stored in one or more registers.

Hardware Organization The hardware organization of a digital computer is best defined by specifying: The set of register that it contains and their function. The sequence of microoperations performed on the binary information stored in the registers. The control signals that initiates the sequence of microoperations. Register Transfer Language A register transfer language is a notation used to describe the microperation transfers between registers. It is a system for epressing in symbolic form the microoperation sequences among register that are used to implement machine-language instructions.

Registers and Register Transfer Registers are denoted by capital letters and are sometimes followed by numerals, e.g., MAR Memory Address Register (holds addresses for the memory unit) PC Program Counter (holds the net instruction s address) IR Instruction Register (holds the instruction being eecuted) R Register (a CPU register) We can indicate individual bits by placing them in parentheses, e.g., PC(8-5), R2(5), etc. Block Diagrams of Registers R Register R 7 6 5 4 3 2 Showing Individual Bits 5 5 8 7 R PC(H) PC(L) Numbering of Bits Divided Into Two Parts

Register Transfer Language Instructions Register Transfer R2 R Simultaneous Transfer R2 R, R R2 Conditional Transfer (Control Function) P: R2 R or If (P = ) Then R2 R Conditional, Simultaneous Transfer T: R2 R, R R2 Basic Symbols For Register Transfer Symbol Description Eamples Letters (and numerals) Parentheses ( ) Arrow Comma, Denotes a register Denotes a part of a register Denotes Transfer of information Separates 2 microoperations MAR, R2 R2(-7), R2(L) R2 R R2 R, R R

Register Transfer and Hardware Every statement in Register Transfer Language implies the eistence of hardware that implements the microoperation. The statement P: R2 R implies the eistence of the necessary circuitry to implement the transfer as well as the mechanism to set and clear the control variable P. Transfer from R to R2 when P = Control circuit Load R2 Clock n R

The Bus A bus is a set of common wires that carries data between registers. There is a separate wire for every bit in the registers. There are also a set of control signals which determines which register is selected by the bus at a particular time. A bus can be constructed using multipleer which enable a sets of registers to share a common bus for data transfer. Data Transfer Using the Bus The select lines S and S indicate which of four register will have its contents transferred to the bus. In general, a bus system will multiple k registers of n bit each to produce a n line common bus. It will require n k multipleers. The bus is connected to the inputs of all destination registers. and will activate the load control of the selected register when it is ready to transfer data. This can be written as: R2 BUS, BUS R or R2 R

Function Table for the Bus S S Register Selected A B C D S S Bus System For 4 Registers 4 Common- Bus Line 4 MUX 3 4 MUX 2 4 MUX 4 MUX 3 2 3 2 3 2 3 2 D 2 C 2 B 2 D C B D C B D 2 D D C 2 C C B 2 B B 3 2 3 2 3 2 3 2 Register D Register C Register B Register A

Three State-Bus Buffers A bus can be built using three-state buffers instead of multipleers. A three-state gate has three states:, and a highimpedance state, which behaves like an open circuit. It is possible to connect a large number of threestate gates in a common bus line without overloading it. Graphic Symbols For Three State-Buffer Normal input A Output Y = A if C = High-impedance if C= Control input C

Bus Line With Three-State Buffers A Bus line for bit B C D Selects S S 2 4 decoder 2 Enable E 3 Memory Transfer There are two primary operations involving memory: Read transferring data from memory Write transferring data into memory To indicate in Register Transfer Language that we are moving data from a memory address to the data register, we write: Read: DR M[AR] To indicate in RTL that we are moving data from Register to a memory location, we write: Write: M[AR] R

Microoperations Microoperations are classified into four categories: Register transfer microoperations (data moves from register to register) Arithmetic microoperations (perform arithmetic on data in registers) Logic microoperations (perform bit manipulation on data in registers) Shift microoperations (perform shift on data in registers) Arithmetic Microoperations Unlike register transfer microoperations, arithmetic microoperations change the information content. The basic arithmetic microoperations are: addition subtraction increment decrement shift

Arithmetic Microoperations (continued) The RTL statement: R3 R + R2 indicates an add microoperation. We can similarly specify the other arithmetic microoperations. Multiplication and division are not considered microoperations. Multiplication is implemented by a sequence of adds and shifts. Division is implemented by a sequence of substracts and shifts. Arithmetic Microoperations Symbolic Designation R3 R + R2 R3 R R2 R2 R2 R2 R2 + R3 R+R2 + R R + R R - Description Contents of R plus R2 transferred to R3 Contents of R minus R2 transferred to R3 Complement contents of R2 ( s comp.) 2 s complment contens of R2 (negate) R plus 2 s comp. of R2 Increment content of R by Decrement content of R by

Binary Adder We implement a binary adder with registers to hold the data and a digital circuit to perform the addition (called a binary adder). The binary adders is constructed using full adders connected in cascade so that the carry produced by one full adder becomes an input for the net. Adding two n-bit numbers requires n full adders. The n data bits for A and B might come from R and R2 respectively 4-Bit Binary Adder B 3 A 3 B 2 A 2 B A B A C 3 C 2 C FA FA FA FA C S 3 S 2 C 4 S S

Adder-Subtracter Subtracting A B is most easily done by adding B to A and then adding. This makes it convenient to combine both addition and subtraction into one circuit, called an addersubtracter. M is the mode indicator M = indicates addition (B is left alone and C is ) M = indicates subtraction (B is complement and C is ). 4-Bit Adder-Subtractor B 3 A 3 B 2 A 2 B A B A M C 3 C 2 C FA FA FA FA C S 3 S 2 C 4 S S

Binary Incrementer The binary incrementer adds to the contents of a register, e.g., a register storing would have in it after being incremented. There are times when we want incrementing done independent of a register. We can accomplish this with a series of cascading half-adders. 4-Bit Binary Incrementer A 3 A 2 A A y y y y HA HA HA HA C S C S C S C S C 4 S 3 S 2 S S

Arithmetic Circuit We can implement 7 arithmetic microoperations (add, add with carry, subtract, subtract with borrow, increment, decrement and transfer) with one circuit. We provide a series of cascading full adders with A i and the output of a 4 multipleer. The multipleers inputs are two selects, B i, B i, logical and logical. Which of these four values we provide (together with the carry) determines which microoperation is performed. Arithmetic Circuit Function Table S S C in Y D = A + Y + C in Microoperation Select Input Output B D = A + B Add B D = A + B + Add with Carry B D = A + B Subtract with Borrow B D = A + B + subtract D = A Transfer A D = A + Increment A D = A Decrement A D = A Transfer A

c in S S 4-Bit Arithmetic Circuit A X C B A S S 2 3 4 MUX FA D Y C X C B A 2 B 2 A 3 S S 2 3 S S 2 3 4 MUX 4 MUX Y X 2 Y 2 X 3 FA D C 2 C 2 FA D 2 C 3 C 3 FA D 3 B 3 S S 2 3 4 MUX Y 3 C 4 c out The Microoperations of the Arithmetic Circuit When S S =, the MUX provides B. The result is Add (for C in = ) or Add With Carry (for C in = ). When S S =, the MUX provides B. The result is Subtract with Borrow (for C in = ) or Subtract (for C in = ). When S S =, the MUX provides. The result is Transfer (for C in = ) or Increment (for C in = ). When S S =, the MUX provides. The result is Decrement (for C in = ) or Transfer (for C in = ).

Logic Microoperations Logic microoperations are binary operations performed on corresponding bits of two bit strings. Eample: P: R R R2 Content of R Content of R2 Content of R after P = Special Symbols used for logic operations: - AND - OR - XOR This avoids confusing AND with multiplication, OR with addition, etc. Truth Tables for 6 2-Variable Function y F F F 2 F 3 F 4 F 5 F 6 F 7

Truth Tables for 6 2-Variable Function (continued) y F 8 F 9 F F F 2 F 3 F 4 F 5 Siteen Logic Microoperations Boolean Function F = F = y F 2 = y F 3 = F 4 = y F 5 = y F 6 = y F 7 = + y Microoperation F F A B F A B F A F A B F B F A B F A B Name Clear AND Transfer A Transfer B Eclusive-OR OR

Siteen Logic Microoperations (continued) Boolean Function F 8 = ( + y) F 9 = ( y) F = y F = + y F 2 = F 3 = + y F 4 = (y) F 5 = Microoperation F A B F A B F B F A B F A F A B F A B F all s Name NOR Eclusive-NOR Complement B Complement A NAND Set to all s One Stage of Logic Circuit S S S Output Operation A i B i S 4 MUX E = A ^ B E = A B AND OR 2 E = A B XOR 3 E = A Complement

Logic Applications Logic Operations allow us to manipulate individual bits in ways that we could not do otherwise. These applications include: selective set selective complement select clear mask insert clear Selective-Set Selective-set sets to the bits in register A where there is a corresponding in register B: Content of A before Content of B (logic operand) Content of A after This is done using the logical-or operation.

Selective Complement Selective-complement complements the bits in register A where there is a corresponding in register B: Content of A before Content of B (logic operand) Content of A after This is done using the eclusive-or operation. Selective Clear Selective-clear clears to the bits in register A where there is a corresponding in register B: Content of A before Content of B (logic operand) Content of A after This is done using the logical-and operation and B.

Mask Mask clears to the bits in register A where there is a corresponding in register B: Content of A before Content of B (logic operand) Content of A after This is done using the logical-and operation and B. Insert Insert inserts a new value into a set of bits in register A. First we mask out the upper four bits (in our 8-bit value): Content of A before Content of B (logic operand) Content of A after In the second step, we insert the new values: Content of A before Content of B (logic operand) Content of A after The masking is done using an AND and the insertion is done with an OR.

Clear Clear compares A and B and produces all s if the numbers are equal. the bits in register A where there is a corresponding in register B: Content of A before Content of B (logic operand) A A B If A& B are both or both, this produces.this is done using the logical-and operation and B. Shift Microoperations Shift microoperations are used for serial transfer of data and are used in conjunction with arithmetic and logic operations. The register contents can be shifted to the left or to the right. There are three types of shift operations: Logical shifts transfers through the serial input, with all the bits involved in the shifting. Arithmetic shifts multiplies (or divides) a signed number by 2. Circular shifts circulates the bits of the register around the two ends with no loss of information.

Shift Microoperations Symbolic Designation R shl R R shr R R cil R R cir R R ashl R R ashr R Description Shift-left register R Shift-right register R Circular shift-left register R Circular shift-right register R Arithmetic Shift-left register R Arithmetic Shift-right register R Arithmetic Shift Right R n- R n- R R Sign bit

Select shift right shift left Serial input I R 4-Bit Combinational Circuit Shifter S MUX H A S MUX H A A 2 S MUX H 2 A 3 Serial input I L S MUX H 3 Arithmetic Logic Shift Unit Instead of having individual registers performing the various microoperations, computers use an Arithmetic Logic Unit which combine these functions.

S 3 One Stage of Arithmetic Logic Shift Unit S 2 S C i S One stage of Arithmetic Circuit D i Select C i+ 2 3 4 MUX F i B i One stage of Logic Circuit E i A i A i- A i+ shr shl Function Table for Arithmetic Logic Shift Unit Operation Select S 3 S 2 S S C in Operation F =A F = A + F = A + B F = A + B + F = A + B F = A + B + F = A F = A Function Transfer A Increment A Addition Add with Carry Subtract with Borrow Subtraction Decrement A Transfer A

Function Table for Arithmetic Logic Shift Unit Operation Select S 3 S 2 S S C in Operation F = A B Function AND F = A B OR F = A B XOR F = A F = shr A F = shl A Complement A Shift-Right A into F Shift-Left A into F