You are on page 1of 17

Hello

Let’s get started!


Lecture 06

Processor Structure and Organization


Read More

Reference Book : “Computer Organization and Architecture” by


Stallings

Yasas Sri Wickramasinghe 2


CPU Structure

Yasas Sri Wickramasinghe 3


Requirements of Processor

Remember Fetch – Decode – Execute Cycle???

Yasas Sri Wickramasinghe 4


Requirements of Processor

To do these those required things, the processor needs to:


• store some data temporarily
• remember the location of the next instruction

While an instruction is being executed:


• the processor needs a small internal memory.

Yasas Sri Wickramasinghe 5


Yasas Sri Wickramasinghe 6
Yasas Sri Wickramasinghe 7
CPU

Registers

Registers in the processor perform two roles


1. User-visible registers
• Used as internal memory by the assembly language programmer

2. Control and Status registers


• Used to control the operation of the processor
• Used to check the status of the processor / ALU;

Yasas Sri Wickramasinghe 8


User-Visible Registers

Referenced by the programmer, categorized into 4 categories

1. General purpose
• Can be assigned to a variety of functions by the programmer
o Memory reference & backup
o Register reference & backup
o Data reference & backup
2. Data
• May be used only to hold data and cannot hold addresses
o Must be able to hold values of most data types
o Some machines allow two contiguous registers to be used, For holding
double-length values

Yasas Sri Wickramasinghe 9


User-Visible Registers
3. Address
• Used to hold addresses, examples,
o Stack Pointer
o Program Counter
o Index Registers
• Must be at least long enough to hold the largest address

4. Condition Codes/Flags
• Holding Condition Codes/Flags which are bits set by processor as the
result of operations
• Condition code bits are collected into one or more control register
• As an example, an arithmetic operation can produce,
o positive result
o negative result
o zero result
Yasas Sri Wickramasinghe o overflow result 10
Control and Status Registers

Employed to control the operation of the processor which are mostly not
visible to the user.

Examples,
• Program Counter (PC): Contains instruction address to be fetched
• Instruction Register (IR): Contains last instruction fetched
• Memory Address Register (MAR): Contains memory location address
• Memory Buffer Register (MBR): Contains a word of data to be written to
memory or a word of data read from memory

Yasas Sri Wickramasinghe 11


Yasas Sri Wickramasinghe 12
Now that we know more about the inner workings of,

• CPU
• Registers
• Bus

Yasas Sri Wickramasinghe 13


Yasas Sri Wickramasinghe 14
The Interruption Cycle
• Contents of the PC must be saved
• Thus the contents of the PC are
o Transferred to the MBR to be written into memory
o Special memory location is loaded into the MAR
§ E.g.: stack pointer (SP)
• PC is loaded with the address of the interrupt routine.

Yasas Sri Wickramasinghe 15


What are some of the Techniques to
Increase Processor Performance?

• Increase Frequency (Hz) - Faster number of clock ticks per unit of time.
• Increase Cache-levels - Reduce number of read / writes from high latency memory.
• Multi-core architecture - Parallel Processing
• Reduce Physical size of the processor - Electrical signals travel shorter distances

And One More Technique…

CPU PIPELINING
Yasas Sri Wickramasinghe 16
Stay Safe – Stay Home

Yasas Sri Wickramasinghe 17

You might also like