DDCO Module 3 Notes
DDCO Module 3 Notes
ARCHITECTURE
MODULE-3
BASIC STRUCTURE OF COMPUTERS
Functional units
Basic operational concepts
Bus structures
Performance and metrics
Instructions and instruction sequencing
Hardware
Software interface
Instruction set architecture
Addressing modes
BASIC STRUCTURE OF COMPUTERS:
Computer Organization:
It refers to the operational units and their interconnections that realize the
architectural specifications.
It describes the function of and design of the various units of digital computer that
store and process information.
Computer hardware:
Computer Architecture:
Functional Units
RAM:
Memory in which any location can be reached in short and fixed amount of time
after specifying its address is called RAM.
Time required to access 1 word is called Memory Access Time.
Cache Memory:
The small,fast,RAM units are called Cache. They are tightly coupled with
processor to achieve high performance.
Main Memory:
The largest and the slowest unit is called the main memory.
1.3. ALU:
Most computer operations are executed in ALU.
Consider a example,
Suppose 2 numbers located in memory are to be added. They are brought
into the processor and the actual addition is carried out by the ALU. The sum may then
be stored in the memory or retained in the processor for immediate use.
Access time to registers is faster than access time to the fastest cache unit in
memory.
1.4. Output Unit:
Its function is to send the processed results to the outside world. eg.Printer
Printers are capable of printing 10000 lines per minute but its speed is
comparatively slower than the processor.
Instructions are fetched from memory and the operand at LOC A is fetched. It is then
added to the contents of R0, the resulting sum is stored in Register R0.
Eg:2
Load LOC A, R1
Eg:3
Add R1 ,R0
Add the contents of Register R1 & R0 and places the sum into R0.
Fig:Connection between Processor and Main Memory
Memory Address Register(MAR)
Memory Data Register(MDR)
It contains the memory address of the next instruction to be fetched for execution.
It contains the data to written into or read out of the address location.
MAR and MDR facilitates the communication with memory.
Operation Steps:
The program resides in memory. The execution starts when PC is point to the first
instruction of the program.
MAR read the control signal.
The Memory loads the address word into MDR.The contents are transferred to
Instruction register. The instruction is ready to be decoded & executed.
Interrupt:
ISR save the internal state of the processor in memory before servicing the
interrupt because interrupt may alter the state of the processor.
When ISR is completed, the state of the processor is restored and the interrupted
program may continue its execution.
BUS STRUCTURES:
A group of lines that serves as the connection path to several devices is called a Bus.
A Bus may be lines or wires or one bit per line.
The lines carry data or address or control signal.
The Buffer Register when connected with the bus, carries the information during transfer.
The Buffer Register prevents the high speed processor from being locked to a slow I/O
device during a sequence of data transfer.
PERFORMANCE:
Elapsed Timethe total time required to execute the program is called the elapsed time.
It depends on all the units in computer system.
Processor TimeThe period in which the processor is active is called the processor time.
It depends on hardware involved in the execution of the instruction.
Processor clock:
T = (N*S)/R
N,S<R
Clock Rate:
The Complex instruction combined with pipelining would achieve the best
performance.
It is much easier to implement the efficient pipelining in processor with simple
instruction set.
Simple
Simple Instruction
Instruction set
Set
RISC
RISC CISC
CISC
COM Compiler
High level Machine
Translated into
Language instruction
Program
Functions of Compiler:
Performance Measurement:
n 1/n
SPEC rating= ( Π SPECi )
i=1
A computer must have instruction capable of performing the following operations. They
are,
Memory Location
Processor register
Registers in I/O sub-system.
Add R1,R2,R3 Add the contents of register R1 & R2 and places their sum
into register R3.
The Address of the memory locations containing the n numbers are symbolically
given as NUM1,NUM2…..NUMn.
Separate Add instruction is used to add each number to the contents of register
R0.
After all the numbers have been added,the result is placed in memory location
SUM.
Decrement R1
ADDRESSING MODES
Immediate mode
Register mode
Absolute mode
Indirect mode
Index mode
Base with index
Base with index and offset
Relative mode
Auto-increment mode
Auto-decrement mode
Variables:
Register Mode
Absolute Mode
Register Mode:
Constants:
Address and data constants can be represented in assembly language using Immediate
Mode.
Immediate Mode.
It places the value 200 in the register R0.The immediate mode used to specify the value
of source operand.
Move #200,R0
Instruction does not give the operand or its address explicitly.Instead it provides
information from which the new address of the operand can be determined.This address
is called effective Address(EA) of the operand.
Indirect Mode:
Add (R1),R0
B
…
Operand
Operand
Address of an operand(B) is stored into R1 register.If we want this operand,we can get it
through register R1(indirection).
The register or new location that contains the address of an operand is called the pointer.
Index Mode:
X(Ri)
EA=X + [Ri]
The index register R1 contains the address of a new location and the value of X defines
an offset(also called a displacement).
To find operand,
Here the constant X refers to the new address and the contents of index register
define the offset to the operand.
The sum of two values is given explicitly in the instruction and the other is stored
in register.
Relative Addressing:
It is same as index mode. The difference is, instead of general purpose register, here we
can use program counter(PC).
Relative Mode:
The Effective Address is determined by the Index mode using the PC in place of
the general purpose register (gpr).
This mode can be used to access the data operand. But its most common use is to
specify the target address in branch instruction.Eg. Branch>0 Loop
It causes the program execution to goto the branch target location. It is identified
by the name loop if the branch condition is satisfied.
Auto-increment mode: