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
  • Part 7: Ordering13
    • Why Ordering Matters
    • Ordering Scopes
    • The Point of Serialisation
    • Early and Final Acknowledgement
    • Fences and Barriers
    • Ordering Tables
    • Relaxed and ID-Based Ordering
    • Same-Address Hazards
    • Interrupt and Data Ordering
    • Memory Consistency Models
    • Ordering Across Bridges
    • Protocols Compared: Ordering
    • Drills: Ordering
  • 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 7: Ordering
  1. Topics
  2. First Principles of Hardware Protocols
  3. Part 7: Ordering
  4. Ordering Scopes

Part 7 · Ordering · Working (W)

Ordering Scopes

Ordering always has a scope: within one ID, to one address, from one source to one destination, or across the whole system. What each scope guarantees, what it costs, and how protocols choose.

On this page

    Note

    Level: Working (W) · Answers: In what order do results become visible?

    Before this: Why Ordering Matters

    A design review asks: "Does this interconnect keep transactions in order?" One engineer says yes, another says no. Both are right, because the question is incomplete. The interconnect keeps writes with the same ID in order, keeps accesses to the same address in order, and keeps nothing else in order. "In order" always means "in order within some scope".

    Which transactions does a protocol keep in order, and why not all of them?

    The obvious answer, and why it breaks

    The obvious wish is total order: every transaction becomes visible to everyone in the order it was issued. It is easy to reason about and very expensive: every transaction must wait for every earlier one, across all paths and all targets, which removes the concurrency Part 6 worked to create. So protocols promise order only within a scope, as narrow as correctness allows, and leave everything outside it free.

    The idea: ordering scopes

    Scope

    Kept in order

    Free

    Cost

    None

    Nothing

    Everything

    None; requesters must enforce any order themselves

    Same ID (or class)

    Transactions sharing an ID, on one channel

    Different IDs

    Same-ID traffic cannot use parallel paths or overtake

    Same address

    Accesses to one location (or one cache line)

    Different addresses

    A check per access; usually free at the target

    Same source to same destination

    Traffic from one requester to one target, along one path

    Different targets, different sources

    In-order queues along that path

    Global

    Everything, as seen by every observer

    Nothing

    Serialises the system

    Requesters choose the scope they need by how they issue traffic: put transactions that must stay ordered in the same scope (one ID, one path), and give independent traffic different ones. Anything that needs ordering across scopes, such as a write and a later read on different IDs, must wait for a response or use a fence.

    Same address is nearly always kept

    Almost every system keeps accesses to the same address from one requester in order: a read after a write to the same location returns the written value. Without that, even single-threaded code would break. It is also cheap, because the accesses meet at the same target, which can process them in arrival order. Lesson 7.8 shows where even this can fail: when the two accesses take different paths and meet only at the target.

    How real protocols chose

    Protocol

    Scope

    AXI

    Same ID: in order, per channel. Different IDs: no order. No order between the read and write channels, even for the same ID: a requester that needs a read to follow a write waits for the write response.

    PCI Express

    Ordering rules between posted, non-posted and completion traffic along a path from one source to one destination (lesson 7.6); no ordering between different traffic classes; Relaxed Ordering and ID-Based Ordering narrow it further (lesson 7.7).

    DCLink

    None between different tags (step 5); a FENCE orders everything before it against everything after (step 6).

    What breaks

    A requester (illustrative) wrote a value with one AXI ID and immediately read it back with another, expecting the new value. Most of the time the read returned it; under load, the read overtook the write and returned the old value. The write and read were on different channels and different IDs: no scope covered both. The fix was to wait for the write response before issuing the read.

    Why this matters

    Senior lens. Whenever someone says a component "keeps order", ask: within what scope, observed by whom? Then map every producer/consumer hand-off in the design onto a scope that actually covers both accesses, or onto an explicit wait or fence. Bugs live in the gaps between scopes.

    Interview

    Asked: "What ordering does AXI guarantee between different IDs?"

    Weak answer: In order, because the master issued them in order.

    Strong answer: None. AXI orders transactions with the same ID on a channel, and nothing between different IDs; there's also no ordering between the read and write channels. That's deliberate: different IDs can take different paths and complete out of order for performance. If a requester needs order across IDs, or a read to see an earlier write, it has to wait for the earlier transaction's response, or use the same ID if every component honours same-ID order.

    Follow-ups: (1) Why is same-address ordering almost always kept? (2) What is the cost of global ordering?

    Check yourself Two writes to different addresses use the same AXI ID. Are they ordered?

    Yes: transactions with the same ID on the same channel complete in order.

    Check yourself Why doesn't a protocol order everything?

    Global order makes every transaction wait for every earlier one across all paths and targets, which removes the concurrency that out-of-order completion provides.

    Key takeaways

    • "In order" is always within a scope: same ID, same address, same path, or global.

    • Protocols keep the narrowest scope correctness allows and leave the rest free for performance.

    • Anything that needs order across scopes must wait for a response or use a fence.

    Keep going

    Next: Lesson 7.3, The Point of Serialisation. Where in a fabric the order of transactions actually becomes fixed.

    Related topics

    • Part 7 overview: Ordering

    Previous

    105 / 234

    Next: The Point of Serialisation

    Up next

    Up nextThe Point of Serialisation

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Early and Final Acknowledgement
    • Fences and Barriers
    • Ordering Tables