1
0

minor metadata API update (0.3.3)

This commit is contained in:
Henry Cook 2015-07-09 14:35:39 -07:00
parent 80ad1eac70
commit fb91e3e1ab

View File

@ -45,9 +45,9 @@ class ClientMetadata extends CoherenceMetadata {
* @param op_code a memory operation from [[uncore.constants.MemoryOpConstants]] * @param op_code a memory operation from [[uncore.constants.MemoryOpConstants]]
*/ */
def makeAcquire( def makeAcquire(
op_code: UInt,
client_xact_id: UInt, client_xact_id: UInt,
addr_block: UInt, addr_block: UInt): Acquire = {
op_code: UInt): Acquire = {
Bundle(Acquire( Bundle(Acquire(
is_builtin_type = Bool(false), is_builtin_type = Bool(false),
a_type = co.getAcquireType(op_code, this), a_type = co.getAcquireType(op_code, this),
@ -57,6 +57,28 @@ class ClientMetadata extends CoherenceMetadata {
{ case TLId => id }) { case TLId => id })
} }
/** Constructs a Release message based on this metadata on cache control op
*
* @param client_xact_id client's transaction id
* @param addr_block address of the cache block
* @param addr_beat sub-block address (which beat)
* @param data data being written back
*/
def makeVoluntaryRelease(
op_code: UInt,
client_xact_id: UInt,
addr_block: UInt,
addr_beat: UInt = UInt(0),
data: UInt = UInt(0)): Release = {
Bundle(Release(
voluntary = Bool(true),
r_type = co.getReleaseType(op_code, this),
client_xact_id = client_xact_id,
addr_block = addr_block,
addr_beat = addr_beat,
data = data), { case TLId => id })
}
/** Constructs a Release message based on this metadata on an eviction /** Constructs a Release message based on this metadata on an eviction
* *
* @param client_xact_id client's transaction id * @param client_xact_id client's transaction id
@ -68,15 +90,13 @@ class ClientMetadata extends CoherenceMetadata {
client_xact_id: UInt, client_xact_id: UInt,
addr_block: UInt, addr_block: UInt,
addr_beat: UInt = UInt(0), addr_beat: UInt = UInt(0),
data: UInt = UInt(0)): Release = { data: UInt = UInt(0)): Release =
Bundle(Release( makeVoluntaryRelease(
voluntary = Bool(true), op_code = M_FLUSH,
r_type = co.getReleaseType(M_FLUSH, this),
client_xact_id = client_xact_id, client_xact_id = client_xact_id,
addr_block = addr_block, addr_block = addr_block,
addr_beat = addr_beat, addr_beat = addr_beat,
data = data), { case TLId => id }) data = data)
}
/** Constructs a Release message based on this metadata and a [[uncore.Probe]] /** Constructs a Release message based on this metadata and a [[uncore.Probe]]
* *
@ -119,7 +139,7 @@ class ClientMetadata extends CoherenceMetadata {
def onHit(op_code: UInt): ClientMetadata = def onHit(op_code: UInt): ClientMetadata =
Bundle(co.clientMetadataOnHit(op_code, this), { case TLId => id }) Bundle(co.clientMetadataOnHit(op_code, this), { case TLId => id })
/** New metadata after receiving a [[uncore.Probe]] /** New metadata after op_code releases permissions on this block
* *
* @param op_code a memory operation from [[uncore.constants.MemoryOpConstants]] * @param op_code a memory operation from [[uncore.constants.MemoryOpConstants]]
*/ */