Coherency Manager (CM) Behavior
The Coherency Manager is the single serialization point of the protocol: the order in which it processes A-channel messages for a given cache line is the global coherence order of that line.
Directory state
The CM maintains a directory entry per cache line that may be cached. Each entry tracks:
Field |
Contents |
|---|---|
State |
The line’s state from the CM’s perspective: |
Sharers |
Bitmask of cores holding the line (meaningful in |
Owner |
Core ID of the exclusive owner (meaningful in |
Rule |
Requirement |
|---|---|
|
Because the |
|
Because clean evictions are silent
( |
Serialization and concurrency
Rule |
Requirement |
|---|---|
|
The CM shall process messages for the same cache line
one transaction at a time: while a transaction for a line is in progress
(e.g. awaiting invalidation acknowledgments or memory), subsequent
requests for that line shall be queued or stalled, not interleaved. The
single exception is the |
|
Transactions for different cache lines may be processed concurrently and may complete in any order. There is no cross-line ordering guarantee. |
|
Queued requests for a line shall be served in arrival order. When two requests for the same line arrive in the same cycle from different cores, the CM shall arbitrate deterministically; the reference implementation selects the lower core index first. |
Response behavior
The table gives the required CM behavior for each A-channel message against
each directory state. “Invalidate holders” always means: send Invalidate
to every recorded holder except the requester, collect one InvAck or
WriteBack per holder (PL-CM-01), and commit any received
WriteBack payload to memory before proceeding.
Request |
Directory state |
Required CM behavior |
|---|---|---|
|
|
Fetch from memory; respond |
|
|
Fetch from memory; respond |
|
|
Invalidate the owner; await |
|
|
Invalidate the owner; await the forced |
|
|
Fetch from memory; respond |
|
|
Invalidate all sharers; await all |
|
|
Invalidate the owner; await |
|
|
Invalidate the owner; await the forced |
|
|
Respond |
|
|
Invalidate all other sharers; await all |
|
Requester not a recorded holder (stale |
Respond |
|
Voluntary (no |
Commit payload to memory; respond |
|
Forced ( |
Commit payload to memory; respond |
|
— |
Bookkeeping only: retire the matching |
Grant ordering rules
Rule |
Requirement |
|---|---|
|
The CM shall not issue |
|
When resolving an |
Memory interaction
Rule |
Requirement |
|---|---|
|
Memory shall contain only clean data. Every |
The commit-then-refetch sequence shown in Message Sequence Diagrams is the reference behavior. An implementation may satisfy the refetch from an internal buffer holding the just-committed data, provided the data returned equals what memory now holds.
Permitted optimizations
The following are explicitly permitted, provided all rules above hold:
Overlapping the memory fetch with the invalidation phase of the same transaction (the fetch may start early; the grant must still wait for all acknowledgments per
PL-CM-06).Responding
GrantSwhereGrantEis recommended (PL-CHAN-06); the exclusive-grant optimization is a performance feature, not a correctness requirement.Concurrent processing of any number of transactions to distinct lines (
PL-CM-04).
Forward progress
Rule |
Requirement |
|---|---|
|
Every request other than |
|
The CM shall not depend on a core spontaneously issuing
|