layout: documentation title: “MOESI CMP directory” doc: gem5 documentation parent: ruby permalink: /documentation/general_docs/ruby/MOESI_CMP_directory/ author: Jason Lowe-Power

MOESI CMP Directory

Protocol Overview

  • TODO: cache hierarchy
  • In contrast with the MESI protocol, the MOESI protocol introduces an additional Owned state.
  • The MOESI protocol also includes many coalescing optimizations not available in the MESI protocol.

Related Files

  • src/mem/protocols
    • MOESI_CMP_directory-L1cache.sm: L1 cache controller specification
    • MOESI_CMP_directory-L2cache.sm: L2 cache controller specification
    • MOESI_CMP_directory-dir.sm: directory controller specification
    • MOESI_CMP_directory-dma.sm: dma controller specification
    • MOESI_CMP_directory-msg.sm: message type specification
    • MOESI_CMP_directory.slicc: container file

L1 Cache Controller

Stable States and Invariants

StatesInvariants
MMThe cache block is held exclusively by this node and is potentially modified (similar to conventional “M” state).
MM_WThe cache block is held exclusively by this node and is potentially modified (similar to conventional “M” state). Replacements and DMA accesses are not allowed in this state. The block automatically transitions to MM state after a timeout.
OThe cache block is owned by this node. It has not been modified by this node. No other node holds this block in exclusive mode, but sharers potentially exist.
MThe cache block is held in exclusive mode, but not written to (similar to conventional “E” state). No other node holds a copy of this block. Stores are not allowed in this state.
M_WThe cache block is held in exclusive mode, but not written to (similar to conventional “E” state). No other node holds a copy of this block. Only loads and stores are allowed. Silent upgrade happens to MM_W state on store. Replacements and DMA accesses are not allowed in this state. The block automatically transitions to M state after a timeout.
SThe cache block is held in shared state by 1 or more nodes. Stores are not allowed in this state.
IThe cache block is invalid.

FSM Abstraction

The notation used in the controller FSM diagrams is described here.

MOESI_CMP_directory_L1cache_FSM.jpg

Optimizations

StatesDescription
SMA GETX has been issued to get exclusive permissions for an impending store to the cache block, but an old copy of the block is still present. Stores and Replacements are not allowed in this state.
OMA GETX has been issued to get exclusive permissions for an impending store to the cache block, the data has been received, but all expected acknowledgments have not yet arrived. Stores and Replacements are not allowed in this state.

The notation used in the controller FSM diagrams is described here.

MOESI_CMP_directory_L1cache_optim_FSM.jpg

L2 Cache Controller

Stable States and Invariants

FSM Abstraction

The controller is described in 2 parts. The first picture shows transitions between all “intra-chip inclusion” categories and within categories 1, 3, 4. Transitions within category 2 (Not in L2, but in 1 or more L1s at this chip) are shown in the second picture.

The notation used in the controller FSM diagrams is described here. Transitions involving other chips are annotated in brown.

MOESI_CMP_directory_L2cache_FSM_part_1.jpg

The second picture below expands the central hexagonal portion of the above picture to show transitions within category 2 (Not in L2, but in 1 or more L1s at this chip).

The notation used in the controller FSM diagrams is described here. Transitions involving other chips are annotated in brown.

MOESI_CMP_directory_L2cache_FSM_part_2.jpg

Directory Controller

**Stable States and

Invariants**

StatesInvariants
MThe cache block is held in exclusive state by only 1 node (which is also the owner). There are no sharers of this block. The data is potentially different from that in memory.
OThe cache block is owned by exactly 1 node. There may be sharers of this block. The data is potentially different from that in memory.
SThe cache block is held in shared state by 1 or more nodes. No node has ownership of the block. The data is consistent with that in memory (Check).
IThe cache block is invalid.

FSM Abstraction

The notation used in the controller FSM diagrams is described here.

MOESI_CMP_directory_dir_FSM.jpg

Other features

Timeouts: