일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |
- github
- system
- data structure
- architecture
- react
- DATAPATH
- javascript
- Pipelining
- function
- while
- computer
- DoM
- Linux
- Class
- DB
- for
- DS
- CSS
- php
- python
- XML
- Java
- MacOS
- instruction
- web
- Algorithm
- mysql
- html
- MIPS
- control
- Today
- Total
YYYEJI
[MIPS] Pipelining 본문
MIPS는 CPU의 Pipelining을 통해 성능을 높이고자 했습니다.
Instruction이 한 Clock 당 하나씩 실행되는 것이 아니라 동시에 실행된다면
execution 시간이 줄 수 있지 않을까해서 나온게 Pipelining입니다.
Pipelining은 instruction이 동시에 실행됩니다.
Instruction 실행되는 시간이 얼마나 빨라지는지 확인해 봅시다.
용어 (Terminalogy)
① Latency - 일을 할 때 걸리는 시간
② Throughput - 어떤 단위 시간 동안에 얼마나 일을 했는지
③ SpeedUp - 속도 증가(능률 증가)
Single Clock Cycle
• Time taken: 8
• Latency: 2
• Throughput: 1 (2 hours), 1.5 (3 hours)
Pipelining
• Time taken: 2 hours 30
• Latency: 2
• Throughput: 1.75 (2 hours), 2 (3 hours)
✓ Speed up: (Single Clock Cycle TT/ Piplelining TT) = 8/2.5 = 3.2
✓ 3.2 배가 빨라졌음을 알 수 있습니다.
Speed up 계산 방법
n - job, T - time, k = stage
① Ts(Serial Excution) = n * T
② Tp(Pipeline Execution) = (n + k -1) * T/k
③ Sp(Speedup) = Ts/Tp = (n*k) / (n+k-1)
Ex) n = 100, T = 10
(a) Ts = 100 * 10 = 1,000sec
(b) k = 5, Tp = (100+5-1) * 10/5 = 208sec
(c) k = 10, Tp = (100+10-1) * 10/10 = 109sec
Pipelining을 사용하지 않은 a보다 사용한 b의 속도가 5배 빨라졌고,
Stage를 더 많이 사용한 c의 속도가 10배는 빨라진 걸 확인할 수 있습니다.
Pipelining을 디자인하기 위해서는
① 같은 길이의 instruction
→ 32bits
② 별로 많지 않은 종류의 Instruction formats
→ R type, I type
을 이용해야 합니다.
◡̈
'Computer architectures' 카테고리의 다른 글
[MIPS] 5 Step of Pipelining (0) | 2022.11.27 |
---|---|
[MIPS] Sequential Execution과 Parallel Execution (0) | 2022.11.12 |
[MIPS] Multi Clock Cycle (0) | 2022.11.07 |
[MIPS] beq Control unit (Single-Clock) (0) | 2022.11.07 |
[MIPS] sw Control unit (Single-Clock) (0) | 2022.11.07 |