datorteknik pipelining bild 1 acceleration how to improve speed? at what costs?
TRANSCRIPT
![Page 1: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/1.jpg)
Datorteknik Pipelining bild 1
Acceleration
How to improve speed? At what costs?
![Page 2: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/2.jpg)
Datorteknik Pipelining bild 2
T=Nq * CPI * Cycletime
Nq, Number of instructions CPI, Cycles Per Instruction Cycletime
![Page 3: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/3.jpg)
Datorteknik Pipelining bild 3
Single Cycle Design
CPI = 1 Cycletime = Long (Longest path)
![Page 4: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/4.jpg)
Datorteknik Pipelining bild 4
Multiple Cycle
1 < CPI < S Cycletime = Factor 1/S
![Page 5: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/5.jpg)
Datorteknik Pipelining bild 5
Pipelined design
CPI = 1, (Constant) Cycletime = Factor 1/S
![Page 6: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/6.jpg)
Datorteknik Pipelining bild 6
“THROUGHPUT”
The total amount of work done in a given time
![Page 7: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/7.jpg)
Datorteknik Pipelining bild 7
Branch
logic
Sgn/Ze
extend
Zero ext.
ALU
A
B
31
0
4+
+
INSTRUCTIONMEMORY
INSTRUCTION MEMORY STAGE (IM)
![Page 8: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/8.jpg)
Datorteknik Pipelining bild 8
Branch
logic
Sgn/Ze
extend
Zero ext.
ALU
A
B
31
0
4+
+
INSTRUCTION DECODE STAGE (DE)
![Page 9: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/9.jpg)
Datorteknik Pipelining bild 9
Branch
logic
Sgn/Ze
extend
Zero ext.
ALU
A
B
31
0
4+
+
INSTRUCTION EXECUTE STAGE (EX)
![Page 10: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/10.jpg)
Datorteknik Pipelining bild 10
Branch
logic
Sgn/Ze
extend
Zero ext.
ALU
A
B
31
0
4+
+
DATA MEMORY STAGE (DM)
DATA MEMORY
![Page 11: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/11.jpg)
Datorteknik Pipelining bild 11
Branch
logic
Sgn/Ze
extend
Zero ext.
ALU
A
B
31
0
4+
+
WRITEBACK STAGE (WB)
![Page 12: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/12.jpg)
Datorteknik Pipelining bild 12
Pipeline
5 stages, (IM, DE, EX, DM, WB) Writeback NOT in critical path Cut critical path by 4
![Page 13: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/13.jpg)
Datorteknik Pipelining bild 13
Branch
logic
Sgn/Ze
extend
Zero ext.
ALU
A
B
31
0
4+
+
CAN READ/WRITETHE SAME REG!
WRITEBACK STAGE (WB)
![Page 14: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/14.jpg)
Datorteknik Pipelining bild 14
Single Cycle
IM
Reg DM Reg
IM
Reg DM Reg
![Page 15: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/15.jpg)
Datorteknik Pipelining bild 15
IM
Reg DM Reg
4 Stage Pipe
IM
Reg DM Reg
IM
Reg DM Reg
IM
Reg DM Reg
![Page 16: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/16.jpg)
Datorteknik Pipelining bild 16
A Program
0x30 sub $6 $0 $1
0x34 add $7 $0 $1
0x38 ori $2 $0 0xABCD
0x3C sw $5 4($0)
$1 holds value 0x05
![Page 17: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/17.jpg)
Datorteknik Pipelining bild 17
IM
Reg DM Reg
4 Stage Pipe
IM
Reg DM Reg
IM
Reg DM Reg
IM
Reg DM Reg
0x30 sub $6 $0 $1
0x34 add $7 $0 $1
0x38 ori $2 $0 0xABCD
0x3C sw $5 4($0)
![Page 18: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/18.jpg)
Datorteknik Pipelining bild 18
IM
Reg DM Reg
Step 1
IM
Reg DM Reg
IM
Reg DM Reg
IM
Reg DM Reg
0x30 sub $6 $0 $1
0x34 add $7 $0 $1
0x38 ori $2 $0 0xABCD
0x3C sw $5 4($0)
![Page 19: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/19.jpg)
Datorteknik Pipelining bild 19
IM
Reg DM Reg
Step 2
IM
Reg DM Reg
IM
Reg DM Reg
IM
Reg DM Reg
0x30 sub $6 $0 $1
0x34 add $7 $0 $1
0x38 ori $2 $0 0xABCD
0x3C sw $5 4($0)
![Page 20: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/20.jpg)
Datorteknik Pipelining bild 20
IM
Reg DM Reg
Step 3
IM
Reg DM Reg
IM
Reg DM Reg
IM
Reg DM Reg
0x30 sub $6 $0 $1
0x34 add $7 $0 $1
0x38 ori $2 $0 0xABCD
0x3C sw $5 4($0)
![Page 21: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/21.jpg)
Datorteknik Pipelining bild 21
IM
Reg DM Reg
Step 4
IM
Reg DM Reg
IM
Reg DM Reg
IM
Reg DM Reg0x3C sw $5 4($0)
0x30 sub $6 $0 $1
0x34 add $7 $0 $1
0x38 ori $2 $0 0xABCD
![Page 22: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/22.jpg)
Datorteknik Pipelining bild 22
IM
Reg DM Reg
Step 5
IM
Reg DM Reg
IM
Reg DM Reg
IM
Reg DM Reg0x3C sw $5 4($0)
0x30 sub $6 $0 $1
0x34 add $7 $0 $1
0x38 ori $2 $0 0xABCD
![Page 23: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/23.jpg)
Datorteknik Pipelining bild 23
Branch
logic
Sgn/Ze
extend
Zero ext.
> 0x30 sub $6 $0 $1 0x34 add $7 $0 $1 0x38 ori $2 $0 0xABCD 0x3C sw $5 4($0)
ALU
A
B
31
0
4+
+
![Page 24: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/24.jpg)
Datorteknik Pipelining bild 24
Branch
logic
Sgn/Ze
extend
Zero ext.
0x30 sub $6 $0 $1> 0x34 add $7 $0 $1 0x38 ori $2 $0 0xABCD 0x3C sw $5 4($0)
ALU
A
B
31
0
4+
+
![Page 25: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/25.jpg)
Datorteknik Pipelining bild 25
Branch
logic
Sgn/Ze
extend
Zero ext.
ALU
A
B
31
0
4+
+
0x30 sub $6 $0 $1 0x34 add $7 $0 $1> 0x38 ori $2 $0 0xABCD 0x3C sw $5 4($0)
![Page 26: Datorteknik Pipelining bild 1 Acceleration How to improve speed? At what costs?](https://reader030.vdocuments.us/reader030/viewer/2022032701/56649c805503460f94938288/html5/thumbnails/26.jpg)
Datorteknik Pipelining bild 26
Branch
logic
Sgn/Ze
extend
Zero ext.
ALU
A
B
31
0
4+
+
0x30 sub $6 $0 $1 0x34 add $7 $0 $1 0x38 ori $2 $0 0xABCD> 0x3C sw $5 4($0)