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 Path
  • Cache Coherency Glossary
  • The Shared Course Model
  • Cache Coherency Revision Sheet
  • Why Coherence Exists8
  • States and Protocols12
  • Transactions12
  • Races and Controller Design8
  • Progress and the Fabric16
  • Ordering and Synchronization12
    • Memory Models and Protocols
    • Barriers, Fences and Completions
    • Speculation, Replay and Recovery
      • Speculative Loads and Invalidations
      • Load Replay on Snoop
      • LR/SC and Reservations
      • Ordering Bugs in Out-of-Order Cores
  • Performance and Scalability12
  • Real Protocols12
  • SoC Integration12
  • Power, Clocking and Reliability12
  • Verification12
  • Debug and Bring-up12
  • Interview and Design Review17
  • Capstone: A Coherent Model Lab5
Loading lesson

‹Ordering and Synchronization
  1. Topics
  2. Cache Coherency
  3. Ordering and Synchronization
  4. Speculation, Replay and Recovery

Part 6 · Ordering and Synchronization · All levels

Speculation, Replay and Recovery

Separate tentative execution from committed results and recover without losing coherence obligations.

  • 4topics
  • 4lessons

An out-of-order core can obtain a load's value long before it knows whether that value may become architectural. Coherence messages keep arriving while the load waits, and squashing the load does not cancel the coherence transaction that fetched its line. These lessons show how a core uses Inv and Fwd-GetM to keep its memory model, and what it must still finish after a squash.

Lesson

After it you can...

Speculative Loads and Invalidations

Explain how a TSO core keeps load-load order by checking its load queue against Inv, Fwd-GetM and its own evictions.

Load Replay on Snoop

Trace the replay decision on MP and say which events are compared against the load queue.

LR/SC and Reservations

Follow a reservation through Inv, eviction and SC, and state the RISC-V constrained-loop rules.

Ordering Bugs in Out-of-Order Cores

Classify a bad committed result and collect the first evidence for each bug class.

Read in order, after the barriers and atomics lessons. The examples use MSI on the course model and the MP test from the litmus lesson.

Check yourself If the load that caused C0's GetS is squashed, may C0 drop the Data that returns?

No. H has C0 pending or recorded as a sharer. C0 must complete the transaction: install S, or install and then evict with PutS and wait for Put-Ack. Only the register result is discarded.

Related topics

  • Shared course model

  • Prerequisite: ordering and atomicity

PreviousNext: Speculative Loads and Invalidations

Up next

Up nextSpeculative Loads and Invalidations

Sign in to save progress

Practice this lessonReport an error

See also

  • Memory Models and Protocols
  • Barriers, Fences and Completions