Computer Architecture and Organization: L09: CPU Organization

Similar documents
CHAPTER 8: Central Processing Unit (CPU)

COMPUTER ARCHITECTURE AND PARALEL PROCESSING STUDY NOTES

Computer Architecture and Organization: L04: Micro-operations

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

Computer Architecture

CPU Design John D. Carpinelli, All Rights Reserved 1

Darshan Institute of Engineering & Technology for Diploma Studies Unit - 1

STRUCTURE OF DESKTOP COMPUTERS

Introduction. 3 major parts of CPU : Fig Design Examples of simple CPU. In this chapter : Chap. 8. Chap. 8 Central Processing Unit

Computer Architecture

Lecture1: introduction. Outline: History overview Central processing unite Register set Special purpose address registers Datapath Control unit

Chapter 5. Computer Architecture Organization and Design. Computer System Architecture Database Lab, SANGJI University

Fig: Computer memory with Program, data, and Stack. Blog - NEC (Autonomous) 1

Microcomputer Architecture and Programming

TYPES OF INTERRUPTS: -

Blog -

Computer Architecture and Organization: L06: Instruction Cycle

Class Notes. Dr.C.N.Zhang. Department of Computer Science. University of Regina. Regina, SK, Canada, S4S 0A2

Digital System Design Using Verilog. - Processing Unit Design

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

Computer Architecture Programming the Basic Computer

CHAPTER ASSEMBLY LANGUAGE PROGRAMMING

Chapter 3 : Control Unit

MICROPROGRAMMED CONTROL

CENTRAL PROCESSING UNIT

8/26/2010. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to Three Units of 8085

12-Dec-11. Gursharan Singh Maninder Kaur. Introduction to 8085 BLOCK DIAGRAM OF INTEL Introduction to Introduction to 8085

Computer Organization and Architecture

Lecture 5:8086 Outline: 1. introduction 2. execution unit 3. bus interface unit

C.P.U Organization. Memory Unit. Central Processing Unit (C.P.U) Input-Output Processor (IOP) Figure (1) Digital Computer Block Diagram

Basic characteristics & features of 8086 Microprocessor Dr. M. Hebaishy

Computer architecture Assignment 3

Computer Architecture and Organization: L10: I/O Organization

CPE 323 MSP430 INSTRUCTION SET ARCHITECTURE (ISA)

CENTRAL PROCESSING UNIT

8086 INTERNAL ARCHITECTURE

2. ADDRESSING METHODS

Register Transfer and Micro-operations

Chapter 2 Instruction Set Architecture

The von Neumann Architecture. IT 3123 Hardware and Software Concepts. The Instruction Cycle. Registers. LMC Executes a Store.

REGISTER TRANSFER LANGUAGE

ELEG3924 Microprocessor

THE MICROPROCESSOR Von Neumann s Architecture Model

Machine code. Nils Jansen December 12, 2017

Grundlagen Microcontroller Processor Core. Günther Gridling Bettina Weiss

CPU Structure and Function

Assembly Language. Lecture 2 x86 Processor Architecture

ECE 375 Computer Organization and Assembly Language Programming Winter 2018 Solution Set #2

Assembly Language. Lecture 2 - x86 Processor Architecture. Ahmed Sallam

UNIT - V MEMORY P.VIDYA SAGAR ( ASSOCIATE PROFESSOR) Department of Electronics and Communication Engineering, VBIT

Chapter 16. Control Unit Operation. Yonsei University

William Stallings Computer Organization and Architecture

9/25/ Software & Hardware Architecture

ELEG3923 Microprocessor Ch.2 Assembly Language Programming

CHAPTER 4: Register Transfer Language and Microoperations

Intel 8086 MICROPROCESSOR. By Y V S Murthy

The functional block diagram of 8085A is shown in fig.4.1.

Instruction : A command to the microprocessor to perform a given task on specified data. Each instruction has two parts

omputer Design Concept adao Nakamura

Microcontrollers. Microcontroller

Assembly Language Programming of 8085

Intel 8086 MICROPROCESSOR ARCHITECTURE

William Stallings Computer Organization and Architecture

Basics of Microprocessor

Computer Organization II CMSC 3833 Lecture 33

William Stallings Computer Organization and Architecture. Chapter 11 CPU Structure and Function

Unit II Basic Computer Organization

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Computer Organization and Technology Processor and System Structures

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

PESIT Bangalore South Campus

VARDHAMAN COLLEGE OF ENGINEERING (AUTONOMOUS) Shamshabad, Hyderabad

Micro computer Organization

The Instruction Set. Chapter 5

Central Processing Unit

Note that none of the above MAY be a VALID ANSWER.

icroprocessor istory of Microprocessor ntel 8086:

CC312: Computer Organization

Computer Systems Lecture 9

Faculty of Engineering Systems & Biomedical Dept. First Year Cairo University Sheet 6 Computer I

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

ASSIGNMENT ECE514 (COMPUTER ORGANIZATION) ASSIGNMENT NO. 3

Rui Wang, Assistant professor Dept. of Information and Communication Tongji University.

Processing Unit CS206T

Computer Organization

Microcomputer Architecture..Second Year (Sem.2).Lecture(2) مدرس المادة : م. سندس العزاوي... قسم / الحاسبات

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

CISC Processor Design

Computer Architecture Lecture No.4 5-Instruction Set Architecture and Design 5-1 Memory locations and Operations. word

Computer Organisation CS303

CPU: SOFTWARE ARCHITECTURE INSTRUCTION SET (PART

The register set differs from one computer architecture to another. It is usually a combination of general-purpose and special purpose registers

Expectations. Why learn Assembly Language? Administrative Issues. Assignments. CSC 3210 Computer Organization and Programming

Description of the Simulator

CPU Structure and Function

EE 5340/7340 Motorola 68HC11 Microcontroler Lecture 1. Carlos E. Davila, Electrical Engineering Dept. Southern Methodist University

EC-333 Microprocessor and Interfacing Techniques

Computer Organization CS 206 T Lec# 2: Instruction Sets

CSIS1120A. 10. Instruction Set & Addressing Mode. CSIS1120A 10. Instruction Set & Addressing Mode 1

Register Are Two Names For The Same Place

Transcription:

Computer Architecture and Organization: L09: CPU Organization By: A. H. Abdul Hafez Abdul.hafez@hku.edu.tr, ah.abdulhafez@gmail.com, hafez@research.iiit.ac.in 1 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Outlines 1. Introduction 2. General Register Organization 3. Stack Organization 4. Instruction formats 5. Addressing Modes 6. End 2 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

CPU Organization Central Processing Unit (CPU): performs a bulk of data-processing operations. Register set: stores intermediate data used during the execution of the instructions. Arithmetic Logic Unit (ALU): performs the required microoperations for executing the instructions. Control Unit: supervises the transfer of information among the registers and instructs the ALU as to which operations to perform. 3 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU Based on register set, there are three types of CPU Organization: 1. Single accumulator organization: like basic computer design. 2. General register organization: a set of general registers to store data. 3. Stack organization.

2- General Register Organization In single accumulator organization, memory locations are needed for storing counters, return address, temporary results, and partial products during multiplication. Memory access is the most time consuming operation in a computer. More convenient and more efficient to store these intermediate values in processor registers. They are connected among themselves through a common bus system. 4 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Example R1 R2 + R3 - MUX A selector (SELA): to place the content of R2 into bus A. - MUX B selector (SELB): to place the content of R3 into bus B. - ALU operation selector (OPR): to provide the arithmetic addition A + B. - Decoder destination selector (SELD): to transfer the content of the output bus into R1. 5 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Control Word - Control word of 14 bits is needed to specify a microoperation in the CPU. - Control words are stored in the control memory. - Binary control word for the CPU (microops) will come from the outputs of the control memory. - 3 bits of SELA select a source register for A input of the ALU. - 3 bits of SELB select a source register for B input of the ALU. - 3 bits of SELD select a destination register using the decoder and its seven load outputs. - 5 bits of OPR select one of the operations in the ALU. When SELA or SELB = 000 Selection of external input data. When SELD = 000 Selection of external output data. 6 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Operation Selection OPR field has five bits and each operation is designated with a symbolic name. 7 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Examples of Microoperations R1 R2 R3 R2 = A input R3 = B input A - B R1 = Destination register 8 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Other Microoperations - We assign 000 to any unused field when formulating the binary contol word. - ALU operation TSFA places the data from register, through the ALU, into the output terminals. - Direct transfer from input to output is accomplished with a control word of all 0 s. 9 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

3- Stack Organization Stack is a memory unit with an address register that can count only (after an initial value is loaded into it). The register that holds the address for the stack is called a Stack Pointer (SP). SP always points at the top item in the stack. Two operations of the stack: - Insertion: PUSH - Deletion: POP Incrementing or Decrementing SP 10 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Register Stack Stack of 64 words reserved into the memory (SP = 6). LIFO: Last In First Out PUSH A, B, C: SP is incremented. POP C, B, A: SP is decremented. At the first: SP = 0 At the end of PUSH: SP = 3 (Increment) At the end of POP: SP = 0 (Decrement) - First item is stored at address 1. - Last item is stored at address 0. 11 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

When EMTY = 1: EMTY: one bit register, EMTY = 1: when stack is empty. FULL: one bit register, FULL = 1: when stack is full. SP SP + 1: increment SP. M[SP] DR: write item on top of stack. If SP = 0 then FULL 1: check if stack is full. EMTY 0: mark the stack not empty. PUSH write into stack from DR When EMTY = 0: DR M[SP]: read item from top of stack. SP SP - 1: decrement SP. If SP = 0 then EMTY 1: check if stack is empty. FULL 0: mark the stack not full. POP read from stack to DR 12 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Memory Stack Portion of computer memory partitioned into 3 segments: - Program (pointed by PC): fetch phase. - Data (pointed by AR): execute phase (read an operand). - Stack (pointed by SP): PUSH or POP into or from the stack. PUSH operation: SP SP - 1 M[SP] DR Overflow (full stack): Processor register holds the upper limit = 3000. Underflow (empty stack): Processor register holds the lower limit = 4001. POP operation: DR M[SP] SP SP + 1 13 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

The end of the Lecture Thanks for your time Questions are welcome 14 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

4- Instruction formats Structure computers is normally described in reference manuals provided with the system. Internal construction of the CPU: processor registers, all hardware-implemented instructions Interpret each instruction code by the control unit. Control functions needed to process the instruction. 15 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Instruction format : rectangular box symbolizing the bits of the instruction as they appear in memory words. The most common fields found in instruction formats are: - Operation code: specifies the operation to be performed. - Addresse field: designates a memory address or a processor register. - Mode field: specifies the way the operand or the effective address is determined. Address Field Operands in memory: specified by their memory addresses. Operands in processor registers: specified by register address of k K bits one of 2 registers in the CPU. 16 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

CPU Organization 1- Single accumulator organization: ADD X : AC AC + M[X] (one address field ) 2- General register organization: ADD R1, R2, R3: R1 R2 + R3 (3 register address fields) ADD R1, R2: R1 R1 + R2 (2 register address fields) MOV R1, R2: R1 R2 (2 register address fields) ADD R1,X: R1 R1 + M[X] (2 address fields) 3- Stack organization: ADD: (no address field) is performed on the two items that are on top of the stack. POP the two numbers from the stack (source). PUSH the sum into the stack (destination). 17 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

Influence of the number of addresses on computer programs X = (A + B) * (C + D) General Register Computer with Three-Address Instructions 18 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

X = (A + B) * (C + D) General Register Computer with Tow-Address Instructions 19 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

X = (A + B) * (C + D) Accumulator type Computer with One-Address Instructions 20 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

X = (A + B) * (C + D) Stack Organized Computer with Zero-Address Instructions 21 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU

X = (A + B) * (C + D) RISC Instructions RISC : Reduced Instruction Set Computer 22 CAO, by Dr. A.H. Abdul Hafez, CE Dept. HKU