Computer Architecture
Faculty of Computer Science & Engineering - HCMUT
Chapter 4: The Processor
Binh Tran-Thanh
thanhbinh@hcmut.edu.vn
This chapter contents
The basic units in the CPU
Functions of the major components in the CPU
Instruction execution at hardware level
Performance and trace off among CPUs
This chapter outcomes
Students who complete this course will be
able to:
Explain the structure of a computer system
and deeply understand how it works at the
hardware level.
10/29/2021 Faculty of Computer Science and Engineering 3
Introduction
CPU performance factors
Instruction count
Determined by ISA and compiler
CPI and Cycle time
Determined by CPU hardware
We will examine two MIPS implementations
A simplified version (single clock cycle)
A more realistic pipelined version
Simple subset, shows most aspects
Memory reference: lw, sw
Arithmetic/logical: add, sub, and, or, slt
Control transfer: beq, j
10/29/2021 Faculty of Computer Science and Engineering 4
The simplified processor.
10/29/2021 Faculty of Computer Science and Engineering 5
Sign
extend
Shift
left 2
Address
Write
data
pc Read
address
Instruction
[310]
Instruction
memory
Instruction [2521]
Instruction [2016]
Instruction [1511]
Instruction [150]
Instruction [3126]
Register
s
ALU
control
ALU
Data
memor
y
0
M
u
x
1
Control
Add
0
M
u
x
1
1
M
u
x
0
RegDst
Branch
MemRead
MemtoReg
ALUOp
MemWrite
ALUSrc
RegWrite
ALU
result
0
M
u
x
1
Zero
ALU
result
Read
register 1
Read
register 2
Write
Register
Write
data
Read
data 1
Read
data 2
4
16 32
Read
data
Instruction [50]
Add