Skip to content
DenseChip
Learn
PracticeCode labInterview

DenseChip

Navigate

Menu

LearnPracticeCode labInterview

Tools

All toolsSV editorCode repoResume
DenseChip

Practice, courses, and chip-design tools in one focused workspace.

LearnPracticeCode labInterviewToolsLearning paths

© 2026 DenseChip

AboutContactPrivacyTerms
Skip to lesson

Course contents

  • How to Use This Course
  • Reading Paths
  • Concept Map
  • How to Read the Diagrams
  • Part 0: What Is a Protocol?10
  • Part 1: Timing and Clocking11
  • Part 2: Encoding and Framing12
  • Part 3: Handshakes13
  • Part 4: Flow Control17
    • Why Flow Control
    • On/Off Flow Control
    • Credit-Based Flow Control
    • Credit Initialisation
    • The Credit Loop and Buffer Sizing
    • Credit Classes and Pools
    • Credit Return Latency and Batching
    • Credit Bugs
    • Window Flow Control
    • Rate-Based Shaping
    • Hop-by-Hop or End-to-End
    • Lossless or Lossy
    • Switching Modes
    • Head-of-Line Blocking
    • Choosing Flow Control
    • Protocols Compared: Flow Control
    • Drills: Flow Control
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
  • Part 7: Ordering13
  • Part 8: Sharing and Arbitration12
  • Part 9: Deadlock and Liveness13
  • Part 10: Reliability and Recovery20
  • Part 11: Bring-Up and Link Management10
  • Part 12: Power8
  • Part 13: Shared State and Coherence9
  • Part 14: Security and Isolation7
  • Part 15: Specifying and Verifying11
  • Part 16: Protocols Dissected17
  • Part 17: Capstones5
  • Part 18: Interview Preparation6
Loading lesson

‹Part 4: Flow Control
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 4: Flow Control
  4. Hop-by-Hop or End-to-End

Part 4 · Flow Control · Senior (S)

Hop-by-Hop or End-to-End

Flow control can protect each link or the whole path. What hop-by-hop control guarantees, what it cannot, and why multi-hop systems often need both.

On this page

    Note

    Level: Senior (S) · Answers: How much may I send before I hear back?

    Before this: Credit-Based Flow Control, Layering and the End-to-End Argument

    An on-chip network uses credits on every link, so no router buffer can ever overflow. Yet when one destination slows down, traffic for completely different destinations also slows across a large part of the network. Every link's flow control is working perfectly. The problem is what perfect per-link flow control does when one end of a path is slow.

    Is flow control on every link enough, and if not, what is missing?

    The obvious answer, and why it breaks

    The obvious answer is that if no link ever overflows, the system is safe. That is true for overflow, and it is a real guarantee. But hop-by-hop control spreads a slow destination backwards: the last router's buffer fills, so it stops granting credits to the router before it, whose buffer fills, and so on. This back-pressure tree grows back towards every source sending to the slow destination, and on the way it fills buffers that other traffic needed to pass through.

    The idea: two scopes, two guarantees

    Scope

    Who exchanges flow-control information

    Guarantees

    Cannot guarantee

    Hop-by-hop

    The two ends of each link

    No buffer anywhere overflows; nothing is dropped

    That a slow destination does not hold up traffic for other destinations

    End-to-end

    The source and the final destination

    The destination is never sent more than it can take

    That intermediate buffers do not overflow (unless the network is lossy or also controlled per hop)

    The two answer different questions. Hop-by-hop control makes each link lossless. End-to-end control limits how much traffic for one destination enters the network at all, so it never piles up inside. Large lossless fabrics often use both: credits per hop to stay lossless, and an end-to-end limit (a window, or per-destination credits granted by the destination) so one slow endpoint cannot fill the fabric.

    A tree of back-pressure: the slow destination D fills router buffers that traffic for E must also pass through.

    Worked example: what each scope does

    • Hop-by-hop only: D slows down. Router 2's buffer for the link to D fills; Router 2 stops granting credits to Router 1 for D's traffic, and if Router 1 has one shared buffer, also for E's. Traffic to idle E stalls. Nothing is lost.

    • Add separate buffers per output (or virtual channels): E's traffic no longer waits behind D's in shared buffers (lessons 4.14 and 8.8). D's back-pressure still reaches Source 1, which is correct.

    • Add end-to-end limits: Source 1 may have only so much traffic for D in the network at once. D's slowness now holds back Source 1 at the edge, and the fabric's buffers stay mostly free for everyone else.

    The design space

    Approach

    What it costs

    When it wins

    Hop-by-hop only, shared buffers

    Back-pressure spreads to unrelated traffic

    Small fabrics, uniform traffic

    Hop-by-hop with per-class or per-output buffers

    More buffers per router

    Fabrics where some destinations are much slower than others

    End-to-end only (lossy network)

    Intermediate drops and retransmission

    Large networks where per-hop control is impractical

    Both

    Two mechanisms to design and verify

    Large lossless fabrics with uneven endpoints

    How real protocols chose

    Protocol

    Scope

    PCI Express

    Hop-by-hop: credits are exchanged on each link, between the two ends of that link, so a switch has its own credits towards each neighbour.

    Ethernet with TCP

    Lossy links with optional per-link PAUSE; end-to-end flow control by TCP's window between the two hosts.

    On-chip networks

    Usually hop-by-hop credits per virtual channel; some add end-to-end limits for endpoints that can be slow.

    What breaks

    The opening slowdown (illustrative): one memory controller in a mesh network was throttled for thermal reasons. Its back-pressure filled shared router buffers along several paths, and processors talking to other, idle controllers saw their latency rise several times. Every link's credits were correct. The fix was separate virtual channels for traffic to different memory controllers, plus a cap on outstanding requests per destination at each source, an end-to-end limit.

    Why this matters

    Principal lens. Per-link flow control answers "will anything be dropped?", not "will one slow endpoint hurt everyone?". In a fabric review, find the slowest possible endpoint (a throttled memory, a stalled device), follow its back-pressure tree, and list every other flow that shares a buffer with it. Each shared buffer is a place where isolation fails; fix it with separate buffers or channels per class, or with end-to-end admission limits at the sources. The end-to-end argument applies here too: only the endpoints know how much they can take.

    Interview

    Asked: "Why is hop-by-hop flow control not enough to keep one endpoint from hurting others?"

    Weak answer: Because it is too slow.

    Strong answer: Hop-by-hop control guarantees no buffer overflows, but a slow endpoint's back-pressure spreads backwards hop by hop, filling every buffer on the way, and traffic for other destinations that shares those buffers stalls too. The fixes are separate buffers or virtual channels per class or destination, so unrelated traffic isn't stuck behind it, and end-to-end limits at the sources so traffic for a slow endpoint can't fill the fabric in the first place.

    Follow-ups: (1) What does end-to-end control alone not guarantee? (2) Which does PCIe use?

    Check yourself Does hop-by-hop credit flow control ever drop packets?

    No: every link's receiver has room for everything its sender is allowed to send. It is lossless, which is exactly why back-pressure spreads instead of packets being dropped.

    Check yourself What does an end-to-end limit add to a hop-by-hop network?

    It bounds how much traffic for one destination can be inside the network, so a slow destination holds back its own senders at the edge instead of filling shared buffers.

    Check yourself Which simple router change stops traffic for an idle destination from waiting behind traffic for a slow one?

    Separate buffers (or virtual channels) per output or per class, so the idle destination's traffic does not queue behind the slow one's.

    Key takeaways

    • Hop-by-hop flow control guarantees no buffer overflows, but a slow endpoint's back-pressure spreads through shared buffers to unrelated traffic.

    • End-to-end control limits how much traffic for one destination enters the network, but does not protect intermediate buffers on its own.

    • Large lossless fabrics often combine hop-by-hop credits, separate buffers per class, and end-to-end limits.

    Keep going

    Next: Lesson 4.12, Lossless or Lossy. Never drop, or drop and resend? Why on-chip networks are lossless and Ethernet is not.

    Related topics

    • Part 4 overview: Flow Control

    • Architecture course: NoC and Interconnect

    Previous

    61 / 234

    Next: Lossless or Lossy

    Up next

    Up nextLossless or Lossy

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Why Flow Control
    • On/Off Flow Control
    • Credit-Based Flow Control