basicfunctionalunit-190124043726
basicfunctionalunit-190124043726
Arithmetic
Input and
logic
Memory
Output Control
I/O Processor
NS
• Program
– A sequence of (machine) instructions
• (Machine) Instruction
– A group of bits that tell the computer to perform a specific operation (a sequence of
micro-operation)
INSTRUCTION FORMAT
Instruction Format
15 14 12 11 0
I Op-code Address
Addressing
mode
The processor : Data Path and
Control
Data
PC Address Register #
Register A
Instructions Bank L Address
U
Register #
Instruction Data Memory
Memory
Register #
Data
PROCESSOR Instruction codes
REGISTERS
• A processor has many registers to hold instructions, addresses, data, etc….
• The processor has a register, the Program Counter (PC) that holds the
memory address of the next instruction to get
• Control unit stores instruction after reading it from memory is called as
Instruction Register (IR) .
• In a direct or indirect addressing, the processor needs to keep track of what
locations in memory it is addressing: The Address Register (AR) [Same as
MAR] is used for this
• When an operand is found, using either direct or indirect addressing, it is
placed in the Data Register (DR) [same as MDR]. The processor then uses this
value as data for its operation
• The Basic Computer has a Accumulator (AC) for manipulation of data .
PROCESSOR Instruction codes
REGISTERS
• The significance of a general purpose register (GPR) is that it can be referred
to, in instructions
– e.g. load AC with the contents of a specific memory location; store the contents of AC into a
specified memory location
Von-neuman Architecture
Basic Operational Concepts
A Typical Instruction
ADD LOCA, R0
Add the operand at memory location LOCA to the operand
in a register R0 in the processor.
Place the sum into register R0.
The original contents of LOCA are preserved.
The original contents of R0 is overwritten.
Instruction is fetched from the memory into the processor –
the operand at LOCA is fetched and added to the contents
of R0 – the resulting sum is stored in register R0.
Memory Access & ALU Operation
Example:-
Load LOCA, R1
Add R1, R0
Main Cache
memory memory Processor
Bus
Processor Clock
• Clock :- Processor circuits are controlled by timing signal
• Clock cycle:- A regular time interval (Ex. Cycle length p)
• Clock rate (R):- Inverse of clock cycle { R = ⅟p } which is
measured in cycles per second.
• The execution of each instruction is divided into several
steps, each of which completes in one clock cycle.
• Hertz (Hz) – cycles per second
Basic Performance
•
Equation
T – processor time required to execute a program that has
been prepared in high-level language
• N – number of actual machine language instructions needed
to complete the execution (note: loop)
• S – average number of basic steps needed to execute one
machine instruction. Each step completes in one clock cycle
• R – clock rate
Note:- These are not independent to each other
N S
T
How to improve T ? R
Reduce N & S
Increase R
Pipeline & Superscalar Operation
• If source program complied in fewer machine instruction
Reduced Instruction Set Computers (RISC)
Complex Instruction Set Computers (CISC)
• Goal – reduce N
• Instructions are not necessarily executed one after another.
• The value of S doesn’t have to be the number of clock cycles to execute one
instruction.
• Pipelining – overlapping the execution of successive instructions.
• Superscalar operation – multiple instruction pipelines are implemented in
the processor.
• Goal – reduce S
• Increase clock rate
Improve the integrated-circuit (IC) technology to make the circuits faster
Reduce the amount of processing done in one basic step
• Increases in R that are entirely caused by improvements in IC technology
affect all aspects of the processor’s operation equally except the time to
access the main memory.
CISC vs. RISC Organizations
Microprogrammed
Control Unit Hardwared
Cache Control Unit
Microprogrammed
Control Memory Instruction Data
Cache Cache
P1 P2 Pn P1 P2 Pn
Network
Memory words.
Memory Location, Addresses
& Operation
• 32-bit word length example
32 bits
b 31 b 30 b1 b0
•
•
•
Sign bit: b 31= 0 for positive numbers
b 31= 1 for negative numbers
Word
address Byte address Byte address
0 0 1 2 3 0 3 2 1 0
4 4 5 6 7 4 7 6 5 4
• •
• •
• •
k k k k k k k k k k
2 -4 2 -4 2 -3 2- 2 2 - 1 2 - 4 2- 1 2 - 2 2 -3 2 -4
Memory.
Classic OOO: Reservation Stations,
Issue ports, Schedulers…etc
Large, shared set associative,
prefetch, etc.
Core 2 Duo Microarchitecture
Why Sharing On-Die
L2?
Dual-
Dual-
Core
PCI-E Core
PCI-E
Memory Bridge
Bridge
I/O Memory PCI-E
PCI-E
I/OHub
Hub Controller
Controller Bridge
Bridge
PCI-E
Hub
Hub PCI-E
Bridge
Bridge
PCI-E
PCI-E PCI-E
PCI-E
Bridge
Bridge Bridge
Bridge
XMB
XMB XMB
XMB XMB
XMB XMB
XMB
I/O
I/OHub
Hub
38