CohereSim: A Bus-based Cache Simulator  v3.3
A tool for education in computing - learn about coherence protocols, replacement policies, and SMP vs DSM
Public Member Functions
MOSI Class Reference

The MOSI coherence protocol. More...

#include <mosi.h>

Inheritance diagram for MOSI:
Inheritance graph
[legend]
Collaboration diagram for MOSI:
Collaboration graph
[legend]

Public Member Functions

 MOSI (CacheABC &cache)
 Construct a new MOSI coherence protocol. More...
 
void PrRd (cache_line *line)
 Receive a PrRd message. More...
 
void PrWr (cache_line *line)
 Receive a PrWr message. More...
 
bool BusRd (cache_line *line)
 Receive a BusRd message. More...
 
bool BusRdX (cache_line *line)
 Receive a BusRdX message. More...
 
bool BusUpgr (cache_line *line)
 Receive a BusUpgr message. More...
 
bool doesDirtySharing ()
 Determine whether the coherence protocol does dirty sharing. More...
 
bool isWriteBackNeeded (state_e state)
 Determine whether a line needs to be written back to main memory. More...
 
- Public Member Functions inherited from CoherenceProtocol
 CoherenceProtocol (CacheABC &cache)
 Construct a new coherence protocol. More...
 
virtual bool BusUpdt (cache_line *line)
 Receive a BusUpdt message. More...
 
virtual bool BusWr (cache_line *line)
 Receive a BusWr message. More...
 
virtual bool doesWriteNoAllocate ()
 Determine whether the coherence protocol uses write no-allocate. More...
 

Additional Inherited Members

- Protected Attributes inherited from CoherenceProtocol
CacheABCcache
 The parent cache.
 

Detailed Description

The MOSI coherence protocol.

Constructor & Destructor Documentation

◆ MOSI()

MOSI::MOSI ( CacheABC cache)
inline

Construct a new MOSI coherence protocol.

Parameters
cacheThe parent cache

Member Function Documentation

◆ BusRd()

bool MOSI::BusRd ( cache_line line)
virtual

Receive a BusRd message.

Parameters
lineThe cache line accessed
Returns
True if the line data can be or could have been shared

Implements CoherenceProtocol.

◆ BusRdX()

bool MOSI::BusRdX ( cache_line line)
virtual

Receive a BusRdX message.

Parameters
lineThe cache line accessed
Returns
True if the line data can be or could have been shared

Reimplemented from CoherenceProtocol.

◆ BusUpgr()

bool MOSI::BusUpgr ( cache_line line)
virtual

Receive a BusUpgr message.

Parameters
lineThe cache line accessed
Returns
True if the line data can be or could have been shared

Reimplemented from CoherenceProtocol.

◆ doesDirtySharing()

bool MOSI::doesDirtySharing ( )
virtual

Determine whether the coherence protocol does dirty sharing.

Returns
True if the coherence protocol does dirty sharing

Reimplemented from CoherenceProtocol.

◆ isWriteBackNeeded()

bool MOSI::isWriteBackNeeded ( state_e  state)
virtual

Determine whether a line needs to be written back to main memory.

Parameters
stateThe state of the line
Returns
Whether the line needs to be written back to main memory

Implements CoherenceProtocol.

◆ PrRd()

void MOSI::PrRd ( cache_line line)
virtual

Receive a PrRd message.

Parameters
lineThe cache line accessed (non-null)

Implements CoherenceProtocol.

◆ PrWr()

void MOSI::PrWr ( cache_line line)
virtual

Receive a PrWr message.

Parameters
lineThe cache line accessed (non-null)

Implements CoherenceProtocol.


The documentation for this class was generated from the following files: