lec1
lec1
Course breakdown
• The processor
• Memory Hierarchy
• Instruction-level parallelism
• Data-level parallelism
• Thread-level parallelism
References
• Computer Organization and design
The hardware/software interface
David A. Patterson and John L. Hennessy
5th edition
• Computer Architecture
A quantitative approach
John L. Hennessy and David A. Patterson
5th edition
Chapter 4
The Processor
Achnowledgement
Jeremy R. Johnson
Anatole D. Ruslanov
William M. Mongan
Implementation of a subset of MIPS
It includes
– memory-reference instructions: lw, sw
– arithmetic-logical instructions: add, sub, and, or, slt
set if less than
– control flow instructions: beq, j
lw $t0, 8($t3)
sw $t0, 12($s4)
add $t0, $t0, $t1
slt $t0,$t1,$t2 # $t0=1 if $t1<$t2, $t0=0 otherwise
beq $s3, $s4, loop
j Exit
CPU Overview (single-cycle)
• Datapath : Elements that process data and addresses
Instruction memory, PC, Adder, Register File, ALU, Data Memory
• Longest delay determines clock period
Increment by
4 for next
32-bit instruction
register
Sign-bit wire
replicated
Chapter 4 — The Processor
— 15
Composing the Elements
• First-cut data path does an instruction in one
clock cycle
– Each datapath element can only do one function
at a time
– Hence, we need separate instruction and data
memories
• Use multiplexers where alternate data sources
are used for different instructions
6 ALUOp 4
Main ALU To
ALU ALU
Control Control
Op-code control
Instruction
funct field
Load/
35 or 43 rs rt address
Store
31:26 25:21 20:16 15:0
Branch 4 rs rt address
31:26 25:21 20:16 15:0