Top Banner
Computer Orgnization Rabie A. Ramadan Lecture 4
16

lecture4

Mar 29, 2016

Download

Documents

aya mohsen

Rabie A. Ramadan Lecture 4 Computer Orgnization Processing Unit Design  Control Unit (CU)  ALU  Register Set  The next instruction to be executed, whose address is obtained from the PC, is fetched from the memory and stored in the IR.  Results are transferred from CPU registers to the memory, if needed.  The instruction is decoded.  The instruction is executed.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: lecture4

Computer Orgnization

Rabie A. RamadanLecture 4

Page 2: lecture4

Processing Unit Design

Page 3: lecture4

CPU Register Set

ALU

Control Unit (CU)

Page 4: lecture4

Simple Execution Cycle The next instruction to be executed, whose address is obtained from

the PC, is fetched from the memory and stored in the IR.

The instruction is decoded.

Operands are fetched from the memory and stored in CPU registers, if needed.

The instruction is executed.

Results are transferred from CPU registers to the memory, if needed.

Page 5: lecture4

Register Set Fast memory locations

• General Purpose • Can be assigned by the programmer

• Special Purpose• Used only for specific functions

• Ex. PC to hold the address of instruction to be executed

Page 6: lecture4

Register Set Memory Access Registers

• Memory Data Register (MDR)• Memory Address Register (MAR)

Instruction Fetching Registers• Program Counter (PC)• Instruction Register (IR)

• To hold the fetched instruction

Condition Registers/Flags • Maintain status information.

• special program status word (PSW) register.

Page 7: lecture4

Special-Purpose Address Registers Index Register

• The address of the operand is obtained by adding a constant to the content of a register.

Stack Pointer• Push and Pop operations• Implemented in 80x86

Stack

Page 8: lecture4

DATAPATH Data Section of the CPU Performs certain operations on the data Local Bus

• Holds the data internally between registers System Bus

• Holds external data • Move data between registers and memory

Page 9: lecture4

One-bus Organization Simplest organization Slow – needs 2 cycles for two operand operations Two registers are needed to save the I/p data

Page 10: lecture4

Two-bus Organization Faster than one-bus

• Two operands can be fetched at the same cycle One register (A) might be needed for the o/p data

Page 11: lecture4

Two-bus Organization One bus for the I/P (in-bus) One bus for the O/P Additional register is needed to save one of the operands

• In-bus moves the data into registers • Out-bus moves the data out of registers

Page 12: lecture4

Three-Bus Organization Two buses are used for moving the data out of the registers (out

buses) One-bus as destination – move the data to the registers

Page 13: lecture4

Fetch instructions The contents of the PC are loaded into the MAR.

The value in the PC is incremented. (This operation can be done in parallel with a memory access.)

As a result of a memory read operation, the instruction is loaded into the MDR.

The contents of the MDR are loaded into the IR.

Page 14: lecture4

Fetch Example – One-bus OrganizationReads the

instruction from the memory

IR takes the instruction

data

Page 15: lecture4

Group Activity Show the same fetch on three-bus

organizations?

Page 16: lecture4

Fetch Example – Three-bus Organization

t0 MAR PCt1 MDR Mem[MAR]; PC PC + 4t2 IR MDR