3. Datapath Functional Units
3์ฅ Datapath Functional Units ๊ฐ์
ํ๋ก์ธ์์ Datapath๋ฅผ ๊ตฌ์ฑํ๋ ์ฃผ์ ๊ธฐ๋ฅ ์ ๋(Functional Unit)๋ค์ ํ์ตํ๋ค. Shifter, Comparator, Multiplier, Divider, Counter ๋ฑ ALU ๋ด๋ถ์ ํต์ฌ ๊ตฌ์ฑ ์์์ ๊ทธ ์ค๊ณ ๊ธฐ๋ฒ์ ๋ค๋ฃฌ๋ค.
Shifter (์ํํฐ)
Shift ์ฐ์ฐ์ ๊ณฑ์ ยท๋๋์ ์ ๋น ๋ฅธ ๊ทผ์ฌ์ ๋นํธ ์กฐ์์ ํ์. ์ฃผ์ ์ข ๋ฅ:
- Logical shift (LSL, LSR): 0์ผ๋ก ์ฑ์
- Arithmetic shift (ASL, ASR): sign bit ์ ์ง (signed division)
- Rotate (ROL, ROR): ์ํ
- Rotate through carry: carry bit ํฌํจ ์ํ
Barrel Shifter
n-bit ์ํํฐ๋ฅผ 1 cycle ๋ด์ ์์ shift ํ์๋ก ์ฒ๋ฆฌ. ARM์ ํน์ง์ ์ ๋.
- MUX tree ๊ตฌ์กฐ: log n ๋จ๊ณ
- 8-bit, 16-bit, 32-bit โฆ ๊ฐ ๋จ๊ณ์์ shift ๋๋ ํต๊ณผ
- Area: O(n log n), Delay: O(log n)

Comparator (๋น๊ต๊ธฐ)
๋ ์ A, B๋ฅผ ๋น๊ตํด A=B, A>B, A<B๋ฅผ ํ์ .
Equality Comparator
$A = B \iff \text{XNOR}(a_i, b_i) = 1 \text{ for all } i$
์ฆ ๊ฐ bit XNOR โ AND๋ก ๊ฒฐํฉ.
Magnitude Comparator
- Cascaded: ์์ bit๋ถํฐ ๋น๊ต, ๊ฐ์ผ๋ฉด ๋ค์ bit๋ก
- Parallel: ๊ฐ bit ์ ๋น๊ต ํ priority encoder

Multiplier (๊ณฑ์ ๊ธฐ)
Array Multiplier
๊ฐ partial product๋ฅผ ๋ณ๋ ฌ๋ก ์์ฑ ํ adder tree๋ก ํฉ์ฐ:
A3 A2 A1 A0
ร B3 B2 B1 B0
โโโโโโโโโโโโโโโ
partial products 4๊ฐ
โ shift + add
์ง์ฐ O(n), ๋ฉด์ O(nยฒ).
Booth Encoding
Signed ๊ณฑ์ ์์ ์ฐ์๋ 1 bit๋ฅผ ๋ฌถ์ด partial product ์๋ฅผ ์ค์.
- Booth-2 (radix-4): 3-bit์ฉ ๋ฌถ์ด partial product๊ฐ ์ ๋ฐ
- Booth-4 (radix-8): 4-bit์ฉ ๋ฌถ์ด partial product๊ฐ 1/3

Wallace Tree Multiplier
Partial product๋ค์ CSA (Carry Save Adder)๋ก ์ค์ด๋ reduction tree:
- Depth = $O(\log n)$
- ์ต์ข 2๊ฐ์ ์๋ฅผ CPA๋ก ํฉ์ฐ
- ํ๋ CPU์ ์ ์ multiplier ํ์ค

Dadda Tree
Wallace์ ์ ์ฌํ์ง๋ง adder ๊ฐ์๊ฐ ์ฝ๊ฐ ์ ์. ๋ฉด์ ๋ ํจ์จ์ .

Divider (๋๋์ ๊ธฐ)
๋๋์ ์ ๊ณฑ์ ๋ณด๋ค ํจ์ฌ ๋ณต์ก.
Restoring Division
- ๋บ์ ํ ๊ฒฐ๊ณผ๊ฐ ์์๋ฉด ์์ ๋ณต๊ตฌ(restore)
- n-bit division: n cycle
Non-Restoring Division
- ์์ ๋ณต๊ตฌ ์์ด ๋ถํธ์ ๋ฐ๋ผ ๋ค์ ์ฐ์ฐ ๊ฒฐ์
- ๋ ๋น ๋ฆ, ํ๋ ์ผ๋ฐ์ ๊ตฌํ
SRT Division
- Redundant digit set (โ2, โ1, 0, +1, +2)
- Radix-4, Radix-8 SRT divider โ cycle ์ ๊ฐ์
- Intel Pentium์ ์ ๋ช ํ FDIV bug๊ฐ SRT lookup table ์ค๋ฅ

Counter
- Binary counter: n-bit ripple counter
- Synchronous counter: ๋ชจ๋ flip-flop์ ๊ฐ์ clock โ skew ์ ์, high freq ๊ฐ๋ฅ
- Johnson counter, Ring counter: ์ํํธ ๋ ์ง์คํฐ ๊ธฐ๋ฐ

Multiplexer / Demultiplexer
- 2:1 MUX
y </u></strong></mark> sยทb + sฬยทa(AOI gate) - n:1 MUX๋ log n ์ ํ ์ ํธ
- ๋๊ท๋ชจ MUX๋ tree ๊ตฌ์กฐ๋ก ๋ถํด

Register File
- ์ฌ๋ฌ ํฌํธ(multi-port)๋ฅผ ๊ฐ์ง SRAM ๊ธฐ๋ฐ ์ ์ฅ์
- ์ผ๋ฐ์ ์ธ RISC: 2 read port + 1 write port
- Out-of-order ํ๋ก์ธ์: 8+ read, 4+ write port ๋ฑ
- Area๊ฐ port ์์ ์ ๊ณฑ์ ๋น๋ก

Memory Arrays (SRAM/DRAM)
- SRAM: 6T cell, ๋น ๋ฆ (0.5~1 ns), ๋น์, ํ๋ฐ์ฑ
- DRAM: 1T1C cell, ๋๋ฆผ (์์ญ ns), ์ธ๊ณ ์กฐ๋ฐ
- Cache์๋ SRAM, Main memory์๋ DRAM

์ ๋ฆฌ
| Unit | ์ฉ๋ | ์ฃผ์ ๊ธฐ๋ฒ |
|---|---|---|
| Shifter | Shift/Rotate | Barrel shifter (log n) |
| Comparator | ๋น๊ต | Parallel prefix |
| Multiplier | ๊ณฑ์ | Booth + Wallace tree |
| Divider | ๋๋์ | SRT (Radix-4/8) |
| Counter | ๊ณ์ | Synchronous |
| MUX | ์ ํ | Tree of 2:1 |
| RegFile | ์ ์ฅ | Multi-port SRAM |
ALU๋ ์ด functional unit๋ค์ด ๊ฒฐํฉ๋ ๋ณตํฉ ํ๋ก. Datapath ์ฑ๋ฅ์ ์ด๋ค์ latency์ throughput์ ์กฐํฉ์ผ๋ก ๊ฒฐ์ ๋๋ค.
Comments (0)
No comments yet. Be the first to comment!
Please to write a comment.