Professional Documents
Culture Documents
Web: http://www.cs.columbia.edu/~martha/courses/3827/sp11/
Microarchitecture
Microarchitecture: an implementation of a particular architecture Multiple implementations for a single architecture Single-cycle: Each instruction executes in a single cycle Multi-cycle: Each instruction is broken up into a series of shorter steps Pipelined: Each instruction is broken up into a series of steps; Multiple instructions execute at once
Instruction Execution
PC instruction memory, fetch instruction Register numbers register le, read registers Depending on instruction class: Use ALU to calculate: Arithmetic or logical result Memory address for load/store Branch target address Access data for load/store PC target address or PC + 4
10
11
12
Single-Cycle Datapath: sw
Write data in rt to memory
13
14
15
16
Control Unit
17
Function
A&B A|B A+B
not used
18
ALUOp1:0 0 0 x 1 1 x 1 x 1 x 1 x 1 x
Copyright 2007 Elsevier
Funct x x 100000 (add) 100010 (sub) 100100 (and) 100101 (or) 101010 (slt)
ALUControl2:0 010 (Add) 110 (Subtract) 010 (Add) 110 (Subtract) 000 (And) 001 (Or) 111 (SLT)
19
lw sw beq
20
21
Instruction R-type
Op5:0
lw sw beq addi
1 1 0 0 1
1 0 x x 0
0 1 1 0 1
0 0 0 1 0
0 0 1 0 0
0 1 x x 0
1 0 0 0 0
0 0 0 1 0
22
Extended Functionality: j
23
RegWrite
RegDst
AluSrc
Branch
MemWrite
MemToReg
ALUOp
1:0
Jump
R-type
1 1 0 0 1 0
1 0 x x 0 x
0 1 1 0 1 x
0 0 0 1 0 x
0 0 1 0 0 0
0 1 x x 0 x
1 0 0 0 0 0 0 1 0 0 x x
0 0 0 0 0 1
lw sw beq addi j
24
Seconds Instructions Clock cycles Seconds = x x Program Program Instruction Clock cycle
25
Single-Cycle Performance
Seconds/cycle (or TC) is limited by the critical path (lw)
26
Single-Cycle Performance
Single-cycle critical path:
27
Parameter
Tc = tpcq_PC + 2tmem + tRFread + tmux + tALU + tRFsetup = [30 + 2(250) + 150 + 25 + 200 + 20] ps = 925 ps
Copyright 2007 Elsevier
28
29