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 Across Bridges

Part 7 · Ordering · Principal (P)

Ordering Across Bridges

When a bridge joins protocols with different ordering rules, it must give each side the guarantees its own rules promise. Where bridges break ordering, and how to map ID-based ordering onto posted/non-posted rules and back.

On this page

    Note

    Level: Principal (P) · Answers: In what order do results become visible?

    Before this: Ordering Tables, Bridges and Protocol Conversion

    A PCIe device writes DMA data into SoC memory and then sends an MSI. On the PCIe side, the MSI cannot pass the data (lesson 7.9). Inside the SoC, a bridge turns each PCIe write into an AXI write, and, for throughput, spreads them across several AXI IDs. The MSI write gets its own ID. On AXI, different IDs carry no ordering, and the MSI reaches the interrupt controller before the last data write reaches memory. Each protocol's rules were followed. The bridge dropped the guarantee in between.

    How does a bridge keep the ordering guarantees of both protocols it joins?

    The obvious answer, and why it breaks

    The obvious bridge translates each transaction and forwards it as soon as it can. That preserves meaning (a write is a write) but not ordering: each protocol describes ordering differently (posted/non-posted rules, per-ID order, fences), and a guarantee expressed in one vocabulary has no automatic equivalent in the other. A bridge must actively re-create, on the far side, every ordering promise the near side made.

    The idea: preserve every promise the source side made

    The bridge must translate an ordering rule from one vocabulary to another: posted-write order on PCIe becomes same-ID order, or waiting, on AXI.

    Source-side promise

    Ways to keep it on an ID-ordered side (AXI)

    Cost

    Posted writes stay in order

    Issue them on one ID; or issue a later write only after earlier writes' responses (from the destination) have returned

    Less parallelism, or a round trip at each ordering point

    A read may not pass earlier writes

    Hold the read until the earlier writes' responses have returned

    Read latency after writes

    Completions may not pass earlier posted writes

    Return read data to the PCIe side only after earlier writes in that direction are complete

    Completion latency

    Relaxed-ordering writes may pass

    Spread them across IDs freely

    None: this is where the bridge regains throughput

    Going the other way, from an ID-ordered protocol onto a posted/non-posted one, the risk is the opposite: the far side may impose more order than the near side needs (harmless but slow), or a write response that the near side expects to mean "arrived" may be generated by the bridge before the posted write has gone anywhere (lesson 7.4).

    A checklist for any bridge

    • List every ordering rule of each side (passing table, per-ID order, fences, read-write ordering).

    • For each rule of the source side, name the mechanism that enforces it on the far side: one ID, one queue, waiting for responses, a fence.

    • Check write responses: what does a response from the bridge promise, and does that match what the source side's response means?

    • Check that the bridge never adds relaxation (marks traffic relaxed, spreads strictly ordered writes across IDs) that the source did not ask for.

    • Test with producer/consumer traffic (data then flag, data then MSI) crossing the bridge under heavy load.

    How real systems chose

    Bridge

    Typical ordering approach

    PCIe to AXI (inbound to SoC memory)

    Strictly ordered posted writes on a single AXI ID or ordered queue; relaxed-ordering writes may be spread across IDs; MSIs ordered behind earlier writes.

    AXI to PCIe (outbound)

    AXI writes become posted PCIe writes; the bridge must decide when to send the AXI write response, and keeps per-ID AXI order within PCIe's stricter posted order.

    What breaks

    The opening bridge (illustrative) spread every inbound posted write across four AXI IDs to use four memory paths, ignoring whether the write was marked relaxed. Bulk data got faster; MSIs and completion-queue entries occasionally overtook the data they announced. Respecting the Relaxed Ordering bit, spreading only relaxed writes and keeping strict ones on one ID, kept most of the speed and all of the correctness.

    Why this matters

    Principal lens. A bridge is where two ordering contracts meet, and it must honour the stronger of them for every transaction. Demand an explicit mapping, rule by rule, in the bridge's specification, and verify it with producer/consumer traffic across the bridge. Most ordering bugs that reach silicon live in bridges, because each side's verification assumes the other side's rules.

    Interview

    Asked: "Your AXI-to-PCIe bridge reorders. Which rule did it break?"

    Weak answer: AXI ordering.

    Strong answer: Probably one of the producer/consumer rules: posted writes must stay in order, reads and completions must not pass earlier posted writes. If the bridge spread strictly ordered PCIe writes across different AXI IDs, or forwarded a read before earlier writes completed, a flag or MSI could overtake its data. The fix is to map each rule explicitly: same AXI ID or an ordered queue for strict writes, waiting for responses before ordered reads, and spreading across IDs only traffic marked relaxed.

    Follow-ups: (1) How would you test a bridge for ordering bugs? (2) What must a bridge never do with the relaxed bit?

    Check yourself A bridge maps every PCIe posted write to a single AXI ID. Is ordering preserved, and what does it cost?

    Yes, same-ID writes stay in order on AXI, but all inbound writes are serialised on one ID, losing parallelism across memory paths.

    Check yourself Why may relaxed-ordering writes be spread across AXI IDs?

    The requester declared they need no ordering among themselves, so different IDs (no ordering) honour that; strict writes behind them must still not pass them.

    Key takeaways

    • A bridge must re-create on the far side every ordering promise the source side made.

    • Posted-write order maps to one ID, one queue, or waiting for responses; relaxed traffic may be spread.

    • Specify the mapping rule by rule and test producer/consumer traffic across the bridge under load.

    Keep going

    Next: Protocols Compared: Ordering. How a dozen protocols answer "in what order do results become visible?"

    Related topics

    • Part 7 overview: Ordering

    Previous

    114 / 234

    Next: Protocols Compared: Ordering

    Up next

    Up nextProtocols Compared: Ordering

    Sign in to save progress

    Practice this lessonReport an error

    See also

    • Why Ordering Matters
    • Ordering Scopes
    • The Point of Serialisation