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

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

csitnepal Unit 3 Basic Computer Organization and Design

UNIT:2 BASIC COMPUTER ORGANIZATION AND DESIGN

Computer Organization (Autonomous)

CHAPTER SIX BASIC COMPUTER ORGANIZATION AND DESIGN

CHAPTER 5 Basic Organization and Design Outline Instruction Codes Computer Registers Computer Instructions Timing and Control Instruction Cycle

BASIC COMPUTER ORGANIZATION AND DESIGN

Unit II Basic Computer Organization

5-1 Instruction Codes

Basic Computer Organization and Design Part 2/3

COMPUTER ORGANIZATION

BASIC COMPUTER ORGANIZATION AND DESIGN

Basic Computer Organization - Designing your first computer. Acknowledgment: Most of the slides are adapted from Prof. Hyunsoo Yoon s slides.

BASIC COMPUTER ORGANIZATION AND DESIGN

Computer Architecture and Organization: L06: Instruction Cycle

Computer Architecture

Computer Organization and Design

Computer architecture Assignment 3

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

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

جامعة بنها - كمية العموم قسم الرياضيات المستوي الرابع )علوم حاسب( يوم االمتحان: االحد تاريخ االمتحان: 1024 / 21 / 12 المادة :

Blog -

Register Transfer and Micro-operations

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

REGISTER TRANSFER LANGUAGE

Roll No TCS 402/TIT 402

REGISTER TRANSFER AND MICROOPERATIONS

PSIM: Processor SIMulator (version 4.2)

REGISTER TRANSFER AND MICROOPERATIONS

THE MICROPROCESSOR Von Neumann s Architecture Model

Processing Unit CS206T

Computer Architecture Programming the Basic Computer

CHAPTER 8: Central Processing Unit (CPU)

Computer Organization II CMSC 3833 Lecture 33

Outcomes. Lecture 13 - Introduction to the Central Processing Unit (CPU) Central Processing UNIT (CPU) or Processor

The CPU and Memory. How does a computer work? How does a computer interact with data? How are instructions performed? Recall schematic diagram:

MICROPROGRAMMED CONTROL

Computer Architecture

Combinational and sequential circuits (learned in Chapters 1 and 2) can be used to create simple digital systems.

Computer Architecture and Organization: L04: Micro-operations

Chapter 16. Control Unit Operation. Yonsei University

Programming Level A.R. Hurson Department of Computer Science Missouri University of Science & Technology Rolla, Missouri

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

COMPUTER ORGANIZATION AND ARCHITECTURE

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

For Example: P: LOAD 5 R0. The command given here is used to load a data 5 to the register R0.

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

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

CHAPTER 4: Register Transfer Language and Microoperations

session 7. Datapath Design

UNIT-III REGISTER TRANSFER LANGUAGE AND DESIGN OF CONTROL UNIT

UNIT-II. Part-2: CENTRAL PROCESSING UNIT

Assembly Language Programming of 8085

CSC 220: Computer Organization Unit 12 CPU programming

CS 265. Computer Architecture. Wei Lu, Ph.D., P.Eng.

Digital System Design Using Verilog. - Processing Unit Design

Computer Architecture and Organization: L09: CPU Organization

ASSIGNMENT ECE514 (COMPUTER ORGANIZATION) ASSIGNMENT NO. 3

William Stallings Computer Organization and Architecture

SCRAM Introduction. Philipp Koehn. 19 February 2018

CPU Design John D. Carpinelli, All Rights Reserved 1

Examining the complete instruction cycle for one instruction illustrates the operation of the P8 CPU. Assume the following conditions: C C C

Computer Organization (Autonomous)

Department of Computer and Mathematical Sciences. Lab 4: Introduction to MARIE

DC57 COMPUTER ORGANIZATION JUNE 2013

Computer Organization and Architecture

Chapter 4 The Von Neumann Model

Chapter 10 Computer Design Basics

Course Description: This course includes concepts of instruction set architecture,

Midterm Examination # 2 Wednesday, March 18, Duration of examination: 75 minutes

Chapter 2 Instruction Set Architecture

TYPES OF INTERRUPTS: -

CPU Structure and Function

Chapter 4 The Von Neumann Model

Little Man Computer (LMC)

Teaching London Computing

Microcontroller Systems

Advanced Parallel Architecture Lesson 3. Annalisa Massini /2015

Chapter 9 Computer Design Basics

The Stored Program Computer

CPU Structure and Function. Chapter 12, William Stallings Computer Organization and Architecture 7 th Edition

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

CC312: Computer Organization

The Itanium Bit Microprocessor Report

CPU Structure and Function

Chapter 1. Microprocessor architecture ECE Dr. Mohamed Mahmoud.

CPU ARCHITECTURE. QUESTION 1 Explain how the width of the data bus and system clock speed affect the performance of a computer system.

2 MARKS Q&A 1 KNREDDY UNIT-I

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

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

COMPUTER ARCHITECTURE AND DIGITAL DESIGN

STRUCTURE OF DESKTOP COMPUTERS

2010 Summer Answers [OS I]

Hardware Level Organization

Chapter 3 : Control Unit

Block diagram view. Datapath = functional units + registers

Copyright 2000 N. AYDIN. All rights reserved. 1

Running Applications

2.2 THE MARIE Instruction Set Architecture

Chapter 05: Basic Processing Units Control Unit Design. Lesson 15: Microinstructions

Transcription:

C.P.U Organization 1.1 Introduction A computer system is sometimes subdivided into two functional entities "Hardware" and "Software". The H/W of the computer consists of all the electronic components and the electromechanical devices that comprise the physical entity of the device. Computer S/W consists of the instructions and data that the computer manipulates to perform various data processing tasks. Memory Unit Central Processing Unit (C.P.U) Control Unit A.L.U Registers Processor Unit Input Devices Input-Output Processor (IOP) Output Devices Figure (1) Digital Computer Block Diagram 1.2 Some Definitions When dealing with H/W it is customary to distinguish between what is referred to as: Computer Organization: Which is concerned with the way the H/W components operate and the way they are connected to form the computer system. Computer Design: Which is concerned with the determination of what H/W should be used and how these parts should be connected. Computer Architecture: Which is concerned with the structure and behavior of the computer as seen by the user; it includes instruction format, instruction set and techniques or addressing memory. 1

1.3 Design of a simple computer The minimum requirements to design a simple computer are the following: 1- Computer Memory. 2- Computer Registers. 3- Arithmetic Logic Shift Unit (ALSU). 4- Common Bus System. 5- Control Unit. 1. Computer Memory: A RAM (random access memory) of size 4096 word of 16-bit, 4K x u, was chosen to the design of a simple computer. This memory was used to store the computer programs. 4KL X 16 Memory Read Write Figure (2) Computer Memory 2. Computer Registers: A simple computer has six registers, the list of registers and it operations are given in table (1) below. A register with parallel load capability was used to construct the simple computer. Table (1) computer register Register Size Description AR 12 Address Register, hold memory address. PC 12 Program Counter, hold instruction address. DR 16 Data Register, hold memory operand. AC 16 Accumulator, it is a processor register. IR 16 Instruction Register, hold instruction code. TR 16 Temporary Register, hold temporary data. 2

3. Arithmetic Logic Shift Unit (ALSU): The simple computer also has an ALSU to perform data processing instruction (arithmetic logic and shifting instructions) on the data stored on the Accumulator and data registers. 4. Common Bus System: A common bus was used to ensure the connections between the simple computer memory and registers as shown in figure bellow. The common bus system was constructed with 16Mux of size 8x1 of three selection variables (C2 C1 C0) to determine the output to the bus as shown in table (2). The register whose load (LD) input is enabled receives the data from the bus. Figure (3) Simple Computer Configuration 5. Control Unit: The simple computer has also a hardwired control unit that generate the control signals for the computer register, memory, ALSU, and the common bus system 3

Table (2) Bus Control C2 C1 C0 Bus 0 0 0 Nothing 0 0 1 AR 0 1 0 PC 0 1 1 DR 1 0 0 AC 1 0 1 IR 1 1 0 TR 1 1 1 Memory 4

1.2 Instruction of a simple computer 1.2.1 Some definitions Computer instruction: is a binary code that specifies a sequence of microoperations for the computer. Instruction code: is a group of bits that instruct the computer to perform a specific operation. Operation: is part of an instruction stored in computer memory. Operation code: is a group of bits that define such operations as add, subtract, multiply, shift, and complement. Instruction word of the simple computer consists of 16-bits; 12-bits are needed to specify the address of the operand in a 4K word memory. This leaves 4-bit for the Opcode field of the instruction as shown in figure bellow 15 12 11 0 Opcode Address Figure (4) Simple Computer Instruction Format The 4-bit Opcode means only 16-instructions can be specified. The simple computer contain ten instructions only which listed in table (3). Although this is not efficient, but by using limited number of instructions, it is possible to show the detailed logic design of the computer without much complexity. Table (3) The Simple Computer Instructions Instruction Code Description Example INC 0000 H Increment AC ACAC+1 CMA 1000 H Complement AC AC- AC Shr 2000 H Shift right AC AC Shr[AC] Shl 3000 H Shift left AC AC Shl[AC] IDA 4000 H Load Memory word to AC AC M[AR] STA 5xxx H Store Content of AC in memory M[AR]AC ADD 6xxx H Add memory word to AC ACAC+DR AND 7xxx H AND Memory word to AC ACAC ^ DR OR 8xxx H OR Memory word to AC ACAC V DR BUN 9xxx H Branch Unconditionally PCDR 5

1.2.2 Instruction Cycle A program residing in memory of a computer consists of a sequence of instructions. The program is executed in the computer by going through a cycle for each instruction. Each instruction cycle in turn is subdivided into a sequence of sub cycles or phases. In the simple computer each instruction cycle consist of the phases shown in figure (5) which continue until HALT instruction is occur. Fetch Decode Execute Figure (5) Instruction Cycle 1- The Fetch Phase: the sequence counter (SC) is cleared to 0, provided coming signal T 0. The Program Counter (PC) is loaded with the access of the fast instruction in the program. The fetch phase required two timing signal to complete. T 0 : AR PC T 1 : IR M [AR], PC PC+1 2- The Decode Phase: After fetching the instruction, it must be decoded to determine the type, this performed in the next timing signal T 2. T 2 : D 0,.., D 15 IR (12-15) AR IR (0-11) 3- The Execute Phase: This the last phase during it the instruction is executed and perform its required operation. It start with the timing signal T 3 and when finished clear the Sequence Counter (SC 0) to return to the fetch phase T 0, as shown in figure(4) 6

SC 0 AR PC IR M[AR] PC PC+1 Fetch Phase D 0,.., D 15 IR (12-15) AR IR (0-11) Decode Phase Execute the Instruction SC 0 Execute Phase Figure (6) Instruction Cycle Flowchart in a Simple Computer Example: The content of PC in the simple computer is 3AF H. The content of AC is 6EC3 H. The content of memory at address 3AF H is 632E H. The content of memory at address 32E H is 849F H. a. What is the instruction that will be fetched and execute. b. Show the binary operation that will be performed in AC when the instruction is executed. c. Give the contents of registers PC, AR, DR, AC, and IR at the end of instruction cycle. 7

Solution T 0 : AR PC T 1 :IR M[AR] PC PC+1 T 2 : D 0,.., D 15 IR (12-15) AR IR (0-11) D 6 T 3 : DR M[AR] D 6 T 4 : ACAC+DR AR=3AF H IR= 632E H D 6 ADD instruction AR= 32E H DR= M[32E H ] = 849F H AC= 6EC3 H + 849F H = F362 H 8