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
Dragon Class Reference

The Dragon coherence protocol. More...

#include <dragon.h>

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

Public Member Functions

 Dragon (CacheABC &cache)
 Construct a new Dragon 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 BusUpdt (cache_line *line)
 Receive a BusUpdt 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 BusRdX (cache_line *line)
 Receive a BusRdX message. More...
 
virtual bool BusUpgr (cache_line *line)
 Receive a BusUpgr 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 Dragon coherence protocol.

Constructor & Destructor Documentation

◆ Dragon()

Dragon::Dragon ( CacheABC cache)
inline

Construct a new Dragon coherence protocol.

Parameters
cacheThe parent cache

Member Function Documentation

◆ BusRd()

bool Dragon::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.

◆ BusUpdt()

bool Dragon::BusUpdt ( cache_line line)
virtual

Receive a BusUpdt message.

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

Reimplemented from CoherenceProtocol.

◆ doesDirtySharing()

bool Dragon::doesDirtySharing ( )
virtual

Determine whether the coherence protocol does dirty sharing.

Returns
True if the coherence protocol does dirty sharing

Reimplemented from CoherenceProtocol.

◆ isWriteBackNeeded()

bool Dragon::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 Dragon::PrRd ( cache_line line)
virtual

Receive a PrRd message.

Parameters
lineThe cache line accessed (non-null)

Implements CoherenceProtocol.

◆ PrWr()

void Dragon::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: