1
0

Add builtin prefetch types to TileLink

This commit is contained in:
Henry Cook 2015-03-11 14:28:17 -07:00
parent 3ab1aca7de
commit b4ed1d9121

View File

@ -109,6 +109,8 @@ class Acquire extends ClientToManagerChannel
def isSubBlockType(dummy: Int = 0): Bool = isBuiltInType() && Acquire.typesOnSubBlocks.contains(a_type) def isSubBlockType(dummy: Int = 0): Bool = isBuiltInType() && Acquire.typesOnSubBlocks.contains(a_type)
def isPrefetch(dummy: Int = 0): Bool = isBuiltInType() && is(Acquire.prefetchType)
// Assumes no custom types have data // Assumes no custom types have data
def hasData(dummy: Int = 0): Bool = isBuiltInType() && Acquire.typesWithData.contains(a_type) def hasData(dummy: Int = 0): Bool = isBuiltInType() && Acquire.typesWithData.contains(a_type)
@ -124,7 +126,8 @@ class Acquire extends ClientToManagerChannel
Acquire.getBlockType -> Grant.dataBlockType, Acquire.getBlockType -> Grant.dataBlockType,
Acquire.putType -> Grant.ackType, Acquire.putType -> Grant.ackType,
Acquire.putBlockType -> Grant.ackType, Acquire.putBlockType -> Grant.ackType,
Acquire.putAtomicType -> Grant.dataBeatType)) Acquire.putAtomicType -> Grant.dataBeatType,
Acquire.prefetchType -> Grant.ackType))
} }
} }
@ -136,6 +139,7 @@ object Acquire {
def putType = UInt("b010") def putType = UInt("b010")
def putBlockType = UInt("b011") def putBlockType = UInt("b011")
def putAtomicType = UInt("b100") def putAtomicType = UInt("b100")
def prefetchType = UInt("b101")
def typesWithData = Vec(putType, putBlockType, putAtomicType) def typesWithData = Vec(putType, putBlockType, putAtomicType)
def typesWithMultibeatData = Vec(putBlockType) def typesWithMultibeatData = Vec(putBlockType)
def typesOnSubBlocks = Vec(putType, getType, putAtomicType) def typesOnSubBlocks = Vec(putType, getType, putAtomicType)
@ -201,6 +205,22 @@ object GetBlock {
} }
} }
// Prefetch a cache block into the next level of the memory hierarchy
// with read permissions
object GetPrefetch {
def apply(
client_xact_id: UInt,
addr_block: UInt): Acquire = {
Acquire(
is_builtin_type = Bool(true),
a_type = Acquire.prefetchType,
client_xact_id = client_xact_id,
addr_block = addr_block,
addr_beat = UInt(0),
union = Cat(M_XRD, Bool(true)))
}
}
// Writes up to a single TileLink beat of data, using mask // Writes up to a single TileLink beat of data, using mask
object Put { object Put {
def apply( def apply(
@ -275,6 +295,22 @@ object PutAtomic {
} }
} }
// Prefetch a cache block into the next level of the memory hierarchy
// with write permissions
object PutPrefetch {
def apply(
client_xact_id: UInt,
addr_block: UInt): Acquire = {
Acquire(
is_builtin_type = Bool(true),
a_type = Acquire.prefetchType,
client_xact_id = client_xact_id,
addr_block = addr_block,
addr_beat = UInt(0),
union = Cat(M_XWR, Bool(true)))
}
}
class Probe extends ManagerToClientChannel class Probe extends ManagerToClientChannel
with HasCacheBlockAddress { with HasCacheBlockAddress {
val p_type = UInt(width = tlCoh.probeTypeWidth) val p_type = UInt(width = tlCoh.probeTypeWidth)