Cod Chapter 1
Cod Chapter 1
CPU Organization
Mrs. J. D. Pakhare
• Objectives:
• Upon completion of this unit you will be able to --
• Many computers have cache memory positioned between CPU and main
memory.
• CM is smaller and faster than main memory and may reside on the same
chip as the CPU.
• CM allows the CPU to perform memory load(read) or store(write)
operation in a single clock cycle.
• Cache Memory
• Cache Memory is a special very high-speed memory.
• It is used to speed up and synchronizing with high-speed CPU.
• Cache memory is used to reduce the average time to access
data from the Main memory.
• It is a smaller and faster than main memory and reside on the
same chip.
CPU communication with I/O devices:
• CPU communicates with I/O devices in the
same way as it communicates with
memory.
• I/O devices are associated with
addressable resisters called I/O ports.
memory referencing instruction, is called I/O treated as IO and Both memory and IO treated
memory mapped I/O. memory treated as as memory.
memory
• i.e. memory locations and I/O ports
Control signals for IO Control signals for memory -
share the same set of addresses.
- ~IOR, ~IOW ~MEMR, ~MEMW
• User Mode:
– Handles a specific application.
– e.g. word processing, paint etc.
• Supervisor Mode (privileged mode)
– In normal operation CPU switches back and forth between user and supervisor
program.
• e.g. while executing user program there is need for information that is available only on
hard disk
• This causes supervisor to temporarily suspend the execution of user program and execute
the routine that initiate the required data transfer operation and the resume execution of
user program.
– It manages various routines of the computer system
– It is part of the computers OS.
– e.g. controlling graphics interface, transferring data between secondary and main
• Interrupt:
– Interrupt is a signal emitted by hardware or software when a
process or an event needs immediate attention.
• An interrupt is a signal sent to the processor that interrupts the current
process.
• An interrupt is a condition that causes the microprocessor to
temporarily work on a different task, and then later return to its
previous task.
• Addressing Modes:
– Different ways to specify operands is termed as addressing modes.
• Immediate address:
– Operation and its operands within the instruction. MVI A,99
• Direct address:
– Address of the operand is specified in the instruction.
• Indirect Address:
– Operands address is specified by register or memory pointer.
Types of instructions:
Zero, one, two and three address machine
• Zero address add instruction:
ADD (add top two operands X and Y from stack)
•There is a special CPU register, called the stack pointer(SP) which is used to access the stack
area of memory.
•The Stack Pointer register will hold the address of the top
location of the stack.
Instruction contain no explicit address called zero
address machine
Implement X:=A*B+C*C
Program to execute operation
X:=A*B+C*C in one address , two
address and three address
processors
T- temporary register
RISC CISC
RISC stands for Reduced Instruction CISC stands for Complex
Set Computer. Instruction Set Computer.
RISC processors have simple CSIC processor has complex
instructions taking about one clock instructions that take up multiple
cycle. clocks for execution.
It has a hard-wired unit of It has a microprogramming unit.
programming.
The instruction set is reduced i.e. it The instruction set has a variety
has only a few instructions in the of different instructions that can
instruction set. Many of these be used for complex operations.
instructions are very primitive.