자막
음성

Lec 21 part 2 & Lec 22 · credit flow control, routing, router microarchitecture

정밀 정리 · 검증 2026-09-24

1개요

1.1Lec 21 의 buffer backpressure 를 이어 credit-based flow control 과 credit round-trip delay 로 buffer 크기를 정한다.
1.2Lec 22: routing algorithm 분류, routing deadlock 과 DOR, Valiant·minimal oblivious, adaptive, turn model.
1.3VC 를 이용한 deadlock avoidance(VC ordering, escape VC)와 protocol-level deadlock.
1.4VC router microarchitecture, pipeline 최적화(lookahead, speculation, bypass), arbiter·allocator. 과목 마지막 강의.

2섹션별 정리 상황·문제 → 원인 → 해결

2.10:14–2:07도입: 마지막 강의, flow control 복습
상황·문제마지막 강의. 지난 시간의 flow control(circuit, packet, flit, VC)을 정리하고 이후 VC 또는 wormhole flow control 을 쓴다고 가정한다.
원인flit 단위 flow control 은 downstream buffer 가 있을 때만 flit 을 보낼 수 있다.
해결buffer 가용성을 알리는 backpressure mechanism 을 먼저 다루고 routing·router microarchitecture 로 넘어간다.
  • 여유 buffer 없이 flit 을 보내면 flit 이 사라짐 → lossless 가정 위반
p.48
2.1.1 · p.48 · 1:21
p.49
2.1.2 · p.49 · 2:07
2.22:07–5:00buffer backpressure 와 credit-based flow control
상황·문제upstream router 는 downstream buffer 에 자리가 있는지 알아야 한다(overflow 방지).
원인이 알림 mechanism 이 부실하면 throughput 이 떨어진다.
해결credit-based(가장 널리 쓰임)와 on/off 중 credit-based 를 사용: VC 별 credit count 를 두고 전송 시 감소, buffer 해제 시 credit 반환.
  • 1 credit = downstream 이 flit 1개 수용 가능
  • count 0 이면 실제 자리가 있어도 확신할 수 없으니 전송 중단
p.50
2.2.1 · p.50 · 3:03
2.2.r.1Dally & Towles, Principles and Practices of Interconnection Networks (Elsevier) ↗ · credit 예시 그림 출처, 강의 권장 교과서
2.35:00–15:46credit flow control 예시와 credit 전달 구현
상황·문제node 1 이 3-flit packet 을 credit 2 로 node 2 에 보내는 예를 cycle 별로 따라간다.
원인head·body 전송 후 credit 0 이라 tail 은 stall, node 2 의 RC·VA 가 끝나 flit 이 떠나야 credit 이 돌아온다.
해결credit 은 downstream VC 하나당 하나. on-chip 은 별도 wire(valid 1-bit + VC ID), off-chip 은 packet 에 piggyback 또는 별도 credit packet. on/off 는 전용 wire 1/0.
  • tail 전송(credit -1)과 credit 수신(+1)이 겹쳐 count 가 1 유지
  • off-chip 은 pin 이 비싸 credit 전용 wire 를 두기 어려움
p.51
2.3.1 · p.51 · 5:00
p.49
2.3.2 · p.49 · 15:17
2.3.r.1Dally & Towles, Principles and Practices of Interconnection Networks (Elsevier) ↗ · credit 예시 그림 출처, 강의 권장 교과서
2.415:46–20:29credit round-trip delay 와 buffer 크기
상황·문제buffer 가 1 entry 면 flit 하나 보낸 뒤 credit 이 돌아올 때까지 기다려야 한다.
원인flit 전송, router 처리, credit 전송, credit 처리를 합친 credit round-trip delay(t_crt) 동안 전송이 막힌다.
해결buffer ≥ t_crt flit 으로 설계. 예: propagation 1(×2) + credit 처리 1 + pipeline 3 → 최소 6 flit buffer.
  • 6 미만이면 throughput 저하
p.52
2.4.1 · p.52 · 17:36
p.53
2.4.2 · p.53 · 19:57
2.520:29–24:37routing algorithm 개요와 분류
상황·문제packet 이 hop 마다 어느 output port 로 갈지 정해야 한다. topology 비교는 ideal routing 을 가정했다.
원인실제 routing 은 먼 곳 정보가 부족하고, 복잡하면 router delay 가 커진다.
해결traffic 을 고르게 분산해 hotspot·contention 을 피한다. 분류: oblivious/adaptive, minimal/non-minimal, source/per-hop, table/circuit/randomized.
  • oblivious ≠ deterministic: random 이어도 network 상태를 안 보면 oblivious
  • non-minimal 경로가 congestion 회피로 더 빠를 수 있음
p.3
2.5.1 · p.3 · 20:56
p.4
2.5.2 · p.4 · 22:11
2.5.r.1Adaptive routing (Wikipedia) ↗ · network 상태에 따라 경로를 바꾸는 routing 개념
2.624:37–29:35routing deadlock 과 dimension-order routing
상황·문제flow 들이 buffer 자원에 cyclic dependency 를 만들면 어떤 packet 도 전진 못 한다.
원인routing 제한이 없으면 link 를 잡고 다른 link 를 기다리는 resource cycle 이 생긴다.
해결turn 을 제한하는 deadlock-free routing 또는 VC 를 쓰는 deadlock-free flow control. 대표: DOR(X-Y) 는 Y→X turn 4개를 금지.
  • DOR 은 deterministic·minimal, 3D·4D 도 dimension 순서만 정하면 됨
  • 한계: congestion 에 적응 못 해 load balancing 약함
p.5
2.6.1 · p.5 · 24:37
p.6
2.6.2 · p.6 · 26:43
2.6.r.1Deadlock (computer science) (Wikipedia) ↗ · circular wait 조건과 livelock 정의
2.729:35–35:23oblivious routing: Valiant, minimal oblivious
상황·문제DOR 은 load balancing 이 약하다(예: mesh 중앙 contention).
원인deterministic 경로는 traffic pattern 에 따라 특정 channel 에 몰린다.
해결Valiant: random 중간 node 경유로 uniform random 화(대신 locality 파괴·경로 증가). minimal oblivious: 중간 node 를 minimal quadrant 로 제한.
  • X-Y 와 함께 쓰면 deadlock-free
  • X-Y/Y-X random 선택은 deadlock-free 아님 → VC 2개 이상 필요
p.7
2.7.1 · p.7 · 29:35
p.8
2.7.2 · p.8 · 31:55
p.9
2.7.3 · p.9 · 33:50
2.835:23–41:26adaptive routing: minimal·non-minimal
상황·문제oblivious 는 network 상태를 보지 않아 path diversity 를 충분히 못 쓴다.
원인adaptive 는 credit count 같은 local 정보에 의존하고, global 정보는 전파 비용이 크며 금방 stale 해진다.
해결minimal adaptive 는 최단 경로 안에서, non-minimal 은 misrouting 도 허용(productive 우선, misroute 횟수 제한으로 livelock 방지).
  • local 정보만 쓰면 suboptimal 선택 가능(슬라이드 11)
  • non-minimal 은 자원을 더 써 전체 성능을 떨어뜨릴 수 있음
p.10
2.8.1 · p.10 · 35:12
p.11
2.8.2 · p.11 · 37:43
p.13
2.8.3 · p.13 · 40:47
2.8.r.1Adaptive routing (Wikipedia) ↗ · network 상태에 따라 경로를 바꾸는 routing 개념
2.8.r.2Deadlock (computer science) (Wikipedia) ↗ · circular wait 조건과 livelock 정의
2.941:26–43:27turn model
상황·문제adaptive routing 은 path diversity 가 필요한데 DOR 은 turn 4개를 없앤다.
원인deadlock 을 막으려면 cycle 을 만드는 turn 은 금지해야 한다.
해결8개 turn 중 2개만 제거: west first, north last, negative first. NW·WN 제거처럼 cycle 이 남는 조합은 invalid.
  • 2개 제거 조합이 모두 valid 는 아님
p.14
2.9.1 · p.14 · 41:23
p.15
2.9.2 · p.15 · 43:03
2.1043:27–48:31VC 를 이용한 deadlock avoidance
상황·문제routing 을 제한하지 않고도 deadlock freedom 을 얻고 싶다.
원인VC 는 physical link 를 time-multiplex 하므로 VC 점유는 buffer queue 점유일 뿐이다.
해결VC ordering(dateline 넘으면 VC 1, 되돌아가기 금지) 또는 escape VC(VC 0 은 DOR, 나머지 임의 routing).
  • VC ordering 은 VC 1 이 underutilized
  • escape VC 는 공정한 중재로 항상 진입 기회 보장
p.16
2.10.1 · p.16 · 43:26
p.17
2.10.2 · p.17 · 44:35
p.18
2.10.3 · p.18 · 46:59
2.10.r.1Wormhole switching (Wikipedia) ↗ · flit 단위 wormhole, virtual channel
2.1148:31–54:13protocol-level deadlock
상황·문제routing deadlock 을 없애도 문제의 절반만 해결된다.
원인request 와 reply 같은 message class 가 end node 의 두 queue 사이 dependency 를 만든다.
해결request/reply 용 physical network 분리 또는 VC 로 logical network 분리(VC0 request, VC1 reply). directory coherence 처럼 3종이면 VC 최소 3개.
  • 이 VC 는 routing 용 VC 에 추가로 필요: VC ordering 2 × message class 2 → 최소 4
p.19
2.11.1 · p.19 · 48:37
2.1254:13–1:01:54router microarchitecture 와 baseline pipeline
상황·문제router 를 실제로 어떻게 설계하는가(VC router 중심).
원인bandwidth 요구가 커질수록 VC·adaptive routing 등으로 복잡도가 증가한다.
해결구성: input buffer(VC), RC, VC allocator, switch allocator, crossbar. pipeline BW→RC→VA→SA→ST→LT, allocation 실패 시 stall.
  • body·tail 은 RC·VA 생략하지만 head 뒤에서 대기, tail 이 떠나면 VC 해제
  • speculative VC router 는 VA 와 SA 병렬
p.22
2.12.1 · p.22 · 55:55
p.23
2.12.2 · p.23 · 57:07
p.25
2.12.3 · p.25 · 59:57
2.12.r.1Crossbar switch (Wikipedia) ↗ · router 내부 crossbar 구조
2.12.r.2Enright Jerger·Krishna·Peh, On-Chip Networks 2nd ed. (Springer) ↗ · routing·router pipeline 을 다루는 강의 권장 교과서
2.131:01:54–1:09:44router pipeline 최적화
상황·문제zero-load delay = (5 cycles + link delay) × hops + t_serialization.
원인router delay 는 latency 를 늘리고 credit round-trip 을 늘려 buffer 가 더 필요하다.
해결lookahead routing(4 stage) → speculative VA·SA 병렬(3 stage) → bypassing(setup, ST 의 2 stage). setup 을 미리 보내면 1 stage 도 가능.
  • speculation 은 low~moderate load 에서 유효, non-speculative(body/tail) 우선
  • bypass 는 speculation 실패 전엔 buffer write 생략
p.26
2.13.1 · p.26 · 1:01:54
p.27
2.13.2 · p.27 · 1:03:20
p.28
2.13.3 · p.28 · 1:04:52
p.29
2.13.4 · p.29 · 1:06:56
2.141:09:44–1:21:12arbiter 와 allocator
상황·문제VA 와 SA 는 여러 요청과 자원을 matching 해야 한다.
원인matching 이 좋아야 bandwidth 가 높고, 동시에 clock cycle 안에 끝나거나 pipeline 되어야 한다.
해결round-robin arbiter(마지막 서비스 최저 priority), arbiter 조합의 separable allocator(input 단계 → output 단계). speculative router 는 non-spec 요청 우선.
  • 예: requester 1 이 A, requester 4 가 C 획득
  • VC allocator 는 후보 VC 여럿이면 더 복잡, adaptive 는 후보 port 도 여럿
p.31
2.14.1 · p.31 · 1:11:52
p.34
2.14.2 · p.34 · 1:15:00
p.37
2.14.3 · p.37 · 1:19:41
2.14.r.1Round-robin scheduling (Wikipedia) ↗ · 순환 순서로 공정하게 차례를 주는 방식
2.151:21:12–1:22:04마무리와 일정 안내
상황·문제참고 도서 안내(빌려줄 수 있음). 기말고사 월요일, 최종 발표 수요일, project report 금요일 마감.
p.38
2.15.1 · p.38 · 1:21:12
2.15.r.1Enright Jerger·Krishna·Peh, On-Chip Networks 2nd ed. (Springer) ↗ · routing·router pipeline 을 다루는 강의 권장 교과서
2.15.r.2Dally & Towles, Principles and Practices of Interconnection Networks (Elsevier) ↗ · credit 예시 그림 출처, 강의 권장 교과서

3핵심 개념

3.1credit-based flow control(크레딧 기반 흐름 제어)
upstream 이 downstream VC 별 빈 buffer 수를 credit 으로 추적, 0 이면 전송 중단.
3.1.r.1Dally & Towles, Principles and Practices of Interconnection Networks (Elsevier) ↗ · credit 예시 그림 출처, 강의 권장 교과서
3.2credit round-trip delay(t_crt)
flit 전송부터 credit 이 돌아와 처리될 때까지. buffer ≥ t_crt flit 이어야 throughput 유지.
3.3oblivious routing(비적응 라우팅)
network 상태를 보지 않는 routing. random 이어도 됨(deterministic 과 구분).
3.4dimension-order routing(DOR)
dimension 순서대로 이동(X-Y). turn 4개 금지로 deadlock-free, deterministic·minimal.
3.5Valiant's routing
random 중간 node 경유로 load balance, 대신 locality 파괴·경로 증가.
3.6turn model(턴 모델)
cycle 을 만드는 turn 만 최소로 금지(west first, north last, negative first).
3.7escape VC(탈출 가상 채널)
한 VC 는 deadlock-free routing(예: DOR), 나머지는 임의 routing.
3.8protocol-level deadlock
request/reply 등 message class 간 dependency 로 생기는 deadlock. logical network(VC) 분리로 해결.
3.9speculative VC router
VA 가 성공한다고 보고 SA 를 병렬 수행. 실패 시 재시도, non-speculative 요청 우선.
3.10separable allocator(분리형 할당기)
input 단계 arbiter 와 output 단계 arbiter 를 이어 만든 allocator, pipelining 쉬움.

4스스로 확인

4.1propagation 1, credit 처리 1, router pipeline 3 cycle 일 때 필요한 최소 buffer 는?
답
t_crt = 1×2 + 1 + 3 = 6 flit.
4.2X-Y 와 Y-X 를 random 으로 고르는 routing 은 deadlock-free 인가?
답
아니다. oblivious 지만 금지 turn 이 사라져 cycle 가능, VC 2개 이상 필요.
4.3VC ordering 과 escape VC 의 차이는?
답
ordering 은 dateline 이후 VC 1 고정(VC 1 저활용), escape 는 한 VC 만 DOR 을 쓰고 나머지는 자유.
4.4lookahead routing 이 줄이는 stage 는?
답
다음 router 의 RC 를 미리 계산해 RC 를 BW 와 겹침 → 5 → 4 stage.
4.5speculative SA 에서 non-speculative 요청을 우선하는 이유는?
답
speculative 요청은 VA 실패로 switch reservation 을 낭비할 수 있기 때문. body/tail 은 non-speculative.

5참고 자료

5.1Enright Jerger·Krishna·Peh, On-Chip Networks 2nd ed. (Springer) ↗ · routing·router pipeline 을 다루는 강의 권장 교과서
5.2Dally & Towles, Principles and Practices of Interconnection Networks (Elsevier) ↗ · credit 예시 그림 출처, 강의 권장 교과서
5.3Deadlock (computer science) (Wikipedia) ↗ · circular wait 조건과 livelock 정의
5.4Adaptive routing (Wikipedia) ↗ · network 상태에 따라 경로를 바꾸는 routing 개념

7한국어판 강의자료

단축키
Ctrl K · s자료 검색
[ ]이전·다음 강의
Space영상 재생·정지
j k다음·이전 section
n p다음·이전 slide
b강의 목록 접기·펴기
t맨 위
/강의 검색
Esc닫기