Module 3 - Organisation of Processor
Module 3 - Organisation of Processor
Architecture
Module 3 - Organization of
Processors
Organization of Processor
• Processor Organization
• Register Organization
• Instruction Cycle
• Instruction Pipelining/ Dealing with Branches
Von Neumann Architecture
CPU Internal Structure
Registers
• It holds data temporarily during the execution
of instruction.
• They are a part of CPU.
• Length of register = No. of bits it can store.
Two types -
• Special Purpose Registers
• General Purpose Registers
List of Special Purpose Registers
• Decoder
• Program Control Register (Program Counter)
• Memory Address Register
• Memory Buffer Register
• Instruction Register
• I/O Register
• Accumulator
List of Special Purpose Registers
De c o d e r
• It interprets the instruction to be executed.
Program Control Register
• It holds the address of next instruction to be
executed. In case of branch instruction, system
passes the address part of branch instruction to PC.
Memory Address Register
• It holds the address of the active memory location.
List of Special Purpose Registers
Memory Buffer Register
• It holds the content of accessed memory
word. It holds the data word when it is transferred
to and from the main memory.
Instruction Register
• It holds the instruction being executed. Instruction
is divided into two parts :
• Operation Part - Given to MAR
• Address part - Given to Decoder
List of Special Purpose Registers
I/O Register
• It is used for communication with the I/O devices.
• An input unit transfers all the contents to this
register & then system picks up the data & vice-
versa.
Accumulator
• It holds the data under execution, intermediate
results & result of operations.
Result Accumulator MBR Main Memory
Example Register Org.
Micro-Operations
• A computer executes a program
• Fetch/execute cycle
• Each cycle has a number of steps
—see pipelining
• Called micro-operations
• Each step does very little
• Atomic operation of CPU
Constituent Elements of
Program Execution
Instruction Cycle
Fetch
Interrupt Indirect
Indirect
Execute
Instruction Cycle
• Each phase decomposed into sequence of
elementary micro-operations
• E.g. fetch, indirect, and interrupt cycles
• Execute cycle
—One sequence of micro-operations for each opcode
• Need to tie sequences together
• Assume new 2-bit register
—Instruction cycle code (ICC) designates which part of
cycle processor is in
– 00: Fetch
– 01: Indirect
– 10: Execute
– 11: Interrupt
Fetch Sequence
• Address of next instruction is in PC
• Address (MAR) is placed on address bus
• Control unit issues READ command
• Result (data from memory) appears on data bus
• Data from data bus copied into MBR
• PC incremented by 1 (in parallel with data fetch
from memory)
• Data (instruction) moved from MBR to IR
• MBR is now free for further data fetches
Fetch Sequence (symbolic)
• t1: MAR <- (PC)
• t2: MBR <- (memory)
• PC <- (PC) +1
• t3: IR <- (MBR)
• (tx = time unit/clock cycle)
or
• t1: MAR <- (PC)
• t2: MBR <- (memory)
• t3: PC <- (PC) +1
• IR <- (MBR)
Rules for Clock Cycle Grouping
• Proper sequence must be followed
—MAR <- (PC) must precede MBR <- (memory)
• Conflicts must be avoided
—Must not read & write same register at same time
—MBR <- (memory) & IR <- (MBR) must not be in
same cycle
• Also: PC <- (PC) +1 involves addition
—Use ALU
—May need additional micro-operations
Indirect Cycle
• MAR <- (IRaddress) - address field of IR
• MBR <- (memory)
• IRaddress <- (MBRaddress)