You are on page 1of 17

COMPUTER ORGANIZATION AND

ARCHITECTURE
Dr. S. Gayathri Sivakumar
Assistant Professor(Senior Grade)
School of Electronics
VIT, Chennai
MODULE-1

L2: FUNCTIONAL COMPONENTS OF COMPUTER


Role of a building architect
Role of a computer architect
Design Goals
Our focus: performance, only touch on cost, power, reliability
High performance
• “Fast” is only meaningful in the context of a set of important tasks
• Not just “Gigahertz” – truck vs sports car analogy
Reliable
• Does it continue to perform correctly?
• Impossible goal: fastest possible design for all programs
BASIC OPERATIONAL CONCEPTS
• Computer activity is governed by instructions.

• To perform certain operation, program need list of instructions which stored in me


mory

•Instructions and data(operands) are stored in the memory are brought into
processor for execute the operations.

• A typical instruction is,


Load R2, LOC

•Instruction read content of memory address LOC and load into processor
Register R2.

•Control unit determine the operation to be performed. Next, operand at LOC fetched
from memory into processor register R2.
•After operand loaded , arithmetic or logic operations can be performed

Add R4, R2, R3

•Add contents of registers R2 and R3 and place their sum in register R4. R4 is
overwritten

Store R4, LOC

•After completing operation, the results from register R4 are transferred to LOC.
The original content of LOC are overwritten.

•For load and store instructions, data transfer between memory and processor are initia
ted by sending memory location address to memory unit and
asserting control signals.
CPU Structure

CPU function:
Fetch instructions
Interpret instructions
Fetch data
Process data
Write data
Registers
• CPU must have some working space (temp
orary storage)
• Called registers
• Number and function vary between process
or designs Control & Status Registers
• One of the major design decisions • Program Counter
• Top level of memory hierarchy • Instruction Decoding Register
• Memory Address Register
General Purpose • Memory Buffer Register
• Make them general purpose
• Increase flexibility and programmer opti
ons
• Increase instruction size & complexity
• Between 8 - 32
• Large enough to hold full address
• Large enough to hold full word
Example Register Organizations
FUNCTIONAL COMPONENTS OF COMPUTER
Basic Function of Computer
• Execution of a program, which consists of set of instructions stored in memory

Two steps of Instructions Cycle


• Fetch
• Execute

Reference:William Stallings, “Computer Organization and Architecture”, 2016, 10th edition, Pearson / PHI, USA
FETCH CYCLE
• Register called program counter (PC) holds the address of the instruction to
be fetched next.
•PC get incremented after each instruction fetch
•The fetched instruction is loaded into a register in the processor known as
the instruction register (IR)
EXECUTE CYCLE
Processor interprets instruction and performs required actions, such as:
• Processor - memory
-data transfer between CPU and main memory
• Processor - I/O
-data transfer between CPU and I/O module
• Data processing
-Some arithmetic or logical operation on data
• Control
- Alteration of sequence of operations
EXAMPLE OF PROGRAM EXECUTION
Add the contents of Memory location 940 to the contents of 941

Reference:William Stallings, “Computer Organization and Architecture”, 2016, 10th edition, Pearson / PHI, USA
INSTRUCTION CYCLE WITH INTERRUPT
INTERRUPT
• Processor suspend current program operation
• Branching off the program to service I/O device known as an interrupt
handler
• Resuming the original execution after the device is serviced.

Reference:William Stallings, “Computer Organization and Architecture”, 2016, 10th edition, Pearson / PHI, USA
Data Flow (Interrupt)

• Current PC saved to allow resum


ption after interrupt
• Contents of PC copied to MBR
• Special memory location (e.g. st
ack pointer) loaded to MAR
• MBR written to memory
• PC loaded with address of interr
upt handling routine
• Next instruction (first of interrupt
handler) can be fetched

You might also like