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
  • Part 5: Transactions19
  • Part 6: Concurrency and Performance17
    • Latency, Throughput and Bandwidth
    • Little's Law
    • Outstanding Transactions
    • Tags and IDs
    • In-Order or Out-of-Order
    • Reorder Buffers
    • Interleaving
    • Split Completions
    • Protocol Efficiency
    • Peak and Sustained Bandwidth
    • Queueing Intuition
    • Tail Latency
    • Buffers That Hide Latency
    • Virtual Output Queues
    • Performance Modelling
    • Protocols Compared: Concurrency and Performance
    • Drills: Concurrency and Performance
  • 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 6: Concurrency and Performance
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 6: Concurrency and Performance
  4. In-Order or Out-of-Order

Part 6 · Concurrency and Performance · Senior (S)

In-Order or Out-of-Order

Should responses come back in the order requests were sent? Who pays for keeping order, how much it costs when targets differ in speed, and how protocols keep order only where it matters: per ID.

On this page

    Note

    Level: Senior (S) · Answers: How many requests can be in flight?

    Before this: Tags and IDs

    A processor reads a word from slow flash, then a word from fast SRAM. The SRAM answers in 5 ns; the flash in 500 ns. If responses must come back in request order, the SRAM's answer sits in a buffer for 495 ns waiting for the flash. The SRAM is fast, and every read that follows a flash read in the same order is slow anyway.

    Must responses return in request order, and who pays for it either way?

    The obvious answer, and why it breaks

    The obvious rule is in-order completion: responses come back in the order requests were sent. Requesters love it, because the next response always belongs to the oldest request and no tags are needed. But someone must enforce it: either every response waits for all earlier ones, or the fabric holds early responses back. With targets of different speeds, in-order completion makes every request as slow as the slowest one ahead of it.

    The idea: order is a cost, so pay it only where needed

    Policy

    Who pays

    Cost

    In order, everything

    The fabric or the target holds early responses

    Fast responses wait for slow ones (head-of-line blocking, lesson 4.14); buffers in the fabric

    Out of order, everything

    The requester

    Tags, and a reorder buffer if the requester needs order (lesson 6.6)

    In order per ID

    Shared: the fabric orders within an ID; the requester chooses IDs

    Requests that must stay ordered share an ID; independent ones use different IDs

    Ordering per ID gives requesters a dial. Use one ID for everything and you get full ordering. Use a different ID for each independent stream (each target, each thread, each buffer) and those streams no longer wait for each other.

    Requests on different IDs return as soon as their target answers; requests on the same ID keep their order.

    Worked numbers

    Illustrative numbers: alternate reads to flash (500 ns) and SRAM (5 ns), 10 reads outstanding.

    Diagram
    In order:         each SRAM read waits for the flash read ahead of it   -> ~500 ns each
    Out of order (different IDs): SRAM reads complete in ~5 ns; flash reads in ~500 ns
    Average latency:  in order ~500 ns;  out of order (500 + 5) / 2 = 252.5 ns
    SRAM throughput:  in order limited by the flash;  out of order limited only by the SRAM and its tags

    What the requester must handle

    • Tags or IDs to match every response (lesson 6.4).

    • Order where the program needs it: a processor that must retire loads in program order puts responses in order itself, in a reorder buffer.

    • Same-address hazards: a read and a write to the same address on different IDs have no order between them; the requester must wait for the write's response before the read if it needs to see the new value (Part 7).

    How real protocols chose

    Protocol

    Completion order

    AXI

    Same ID: in order. Different IDs: any order. Read data of different IDs may even be interleaved beat by beat (lesson 6.7).

    PCI Express

    Completions for different requests may return in any order; each carries its tag. The pieces of one split read return in address order (lesson 6.8).

    APB

    Only one transfer at a time, so the question never arises.

    What breaks

    An accelerator (illustrative) used a single AXI ID for all its reads, because the first version only read from one memory. When a second, slower memory was added, every read to the fast memory queued behind reads to the slow one: same ID, so the interconnect kept them in order. Giving each memory its own ID halved the accelerator's average read latency without changing any hardware outside it.

    Why this matters

    Senior lens. Ask which ordering each requester actually needs, and match its ID choice to that. A single ID is the safe default and the slowest choice; one ID per independent stream is fast but moves responsibility for order to the requester. Check the interconnect's limits too: how many IDs it tracks, and whether it reorders across IDs at all.

    Interview

    Asked: "Why let responses return out of order?"

    Weak answer: It's faster.

    Strong answer: Because forcing order makes every response wait for the slowest one ahead of it: a fast SRAM read behind a slow flash read takes as long as the flash. Out-of-order completion lets each response return when its target is done, at the cost of tags and, if the requester needs order, a reorder buffer on its side. Protocols like AXI compromise with order per ID: same ID in order, different IDs free, so requesters keep order only where it matters.

    Follow-ups: (1) Who pays for ordering in each scheme? (2) What hazard appears between a read and a write on different IDs?

    Check yourself With AXI, two reads with the same ID go to a slow and a fast target. In what order do their data return?

    In request order: same ID means in order, so the fast target's data waits for the slow one's.

    Check yourself What does a requester need if it lets responses return out of order but its consumer needs them in order?

    Tags to identify responses and a reorder buffer to hold early ones until all earlier responses have arrived.

    Key takeaways

    • In-order completion makes fast responses wait for slow ones; somebody must buffer them.

    • Out-of-order completion moves the cost to the requester: tags and, if needed, a reorder buffer.

    • Ordering per ID lets requesters keep order only where it matters.

    Keep going

    Next: Lesson 6.6, Reorder Buffers. Restoring order at the receiver, sizing the buffer, and the deadlock it can cause.

    Related topics

    • Part 6 overview: Concurrency and Performance

    Previous

    91 / 234

    Next: Reorder Buffers

    Up next

    Up nextReorder Buffers

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Latency, Throughput and Bandwidth
    • Little's Law
    • Outstanding Transactions