uncached -> builtin_type
This commit is contained in:
parent
e6491d351f
commit
6141b3efc5
@ -747,7 +747,7 @@ class L2AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: St
|
|||||||
val state = Reg(init=s_idle)
|
val state = Reg(init=s_idle)
|
||||||
|
|
||||||
val xact_src = Reg(io.inner.acquire.bits.header.src.clone)
|
val xact_src = Reg(io.inner.acquire.bits.header.src.clone)
|
||||||
val xact_uncached = Reg(io.inner.acquire.bits.payload.uncached.clone)
|
val xact_builtin_type = Reg(io.inner.acquire.bits.payload.builtin_type.clone)
|
||||||
val xact_a_type = Reg(io.inner.acquire.bits.payload.a_type.clone)
|
val xact_a_type = Reg(io.inner.acquire.bits.payload.a_type.clone)
|
||||||
val xact_addr_block = Reg(io.inner.acquire.bits.payload.addr_block.clone)
|
val xact_addr_block = Reg(io.inner.acquire.bits.payload.addr_block.clone)
|
||||||
val xact_addr_beat = Reg(io.inner.acquire.bits.payload.addr_beat.clone)
|
val xact_addr_beat = Reg(io.inner.acquire.bits.payload.addr_beat.clone)
|
||||||
@ -760,7 +760,7 @@ class L2AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: St
|
|||||||
val xact_meta = Reg{ new L2Metadata }
|
val xact_meta = Reg{ new L2Metadata }
|
||||||
val xact_way_en = Reg{ Bits(width = nWays) }
|
val xact_way_en = Reg{ Bits(width = nWays) }
|
||||||
val xact = Acquire(
|
val xact = Acquire(
|
||||||
uncached = xact_uncached,
|
builtin_type = xact_builtin_type,
|
||||||
a_type = xact_a_type,
|
a_type = xact_a_type,
|
||||||
client_xact_id = xact_client_xact_id,
|
client_xact_id = xact_client_xact_id,
|
||||||
addr_block = xact_addr_block,
|
addr_block = xact_addr_block,
|
||||||
@ -796,7 +796,7 @@ class L2AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: St
|
|||||||
val needs_writeback = !xact_tag_match && co.isValid(xact_meta.coh) // TODO: dirty bit
|
val needs_writeback = !xact_tag_match && co.isValid(xact_meta.coh) // TODO: dirty bit
|
||||||
val is_hit = xact_tag_match && co.isHit(xact, xact_meta.coh)
|
val is_hit = xact_tag_match && co.isHit(xact, xact_meta.coh)
|
||||||
val needs_probes = co.requiresProbes(xact, xact_meta.coh)
|
val needs_probes = co.requiresProbes(xact, xact_meta.coh)
|
||||||
//val do_allocate = !xact_uncached || xact.allocate()
|
//val do_allocate = !xact_builtin_type || xact.allocate()
|
||||||
|
|
||||||
val amoalu = Module(new AMOALU)
|
val amoalu = Module(new AMOALU)
|
||||||
amoalu.io.addr := xact.addr()
|
amoalu.io.addr := xact.addr()
|
||||||
@ -921,7 +921,7 @@ class L2AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: St
|
|||||||
is(s_idle) {
|
is(s_idle) {
|
||||||
io.inner.acquire.ready := Bool(true)
|
io.inner.acquire.ready := Bool(true)
|
||||||
when( io.inner.acquire.valid ) {
|
when( io.inner.acquire.valid ) {
|
||||||
xact_uncached := cacq.payload.uncached
|
xact_builtin_type := cacq.payload.builtin_type
|
||||||
xact_a_type := cacq.payload.a_type
|
xact_a_type := cacq.payload.a_type
|
||||||
xact_addr_block := cacq.payload.addr_block
|
xact_addr_block := cacq.payload.addr_block
|
||||||
xact_addr_beat := cacq.payload.addr_beat
|
xact_addr_beat := cacq.payload.addr_beat
|
||||||
@ -947,9 +947,9 @@ class L2AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: St
|
|||||||
val _needs_writeback = !_tag_match && co.isValid(coh) //TODO: dirty bit
|
val _needs_writeback = !_tag_match && co.isValid(coh) //TODO: dirty bit
|
||||||
val _needs_probes = _tag_match && co.requiresProbes(xact, coh)
|
val _needs_probes = _tag_match && co.requiresProbes(xact, coh)
|
||||||
val _is_hit = _tag_match && co.isHit(xact, coh)
|
val _is_hit = _tag_match && co.isHit(xact, coh)
|
||||||
val full_block = !xact.uncached ||
|
val full_block = !xact.builtin_type ||
|
||||||
xact.is(Acquire.uncachedReadBlock) ||
|
xact.hasMultibeatData() ||
|
||||||
xact.is(Acquire.uncachedWriteBlock)
|
cgnt.payload.hasMultibeatData()
|
||||||
read_data_cnt := Mux(full_block, UInt(0), xact_addr_beat)
|
read_data_cnt := Mux(full_block, UInt(0), xact_addr_beat)
|
||||||
read_data_max := Mux(full_block, UInt(refillCycles-1), xact_addr_beat)
|
read_data_max := Mux(full_block, UInt(refillCycles-1), xact_addr_beat)
|
||||||
write_data_cnt := Mux(full_block || !_is_hit, UInt(0), xact_addr_beat)
|
write_data_cnt := Mux(full_block || !_is_hit, UInt(0), xact_addr_beat)
|
||||||
|
@ -174,7 +174,7 @@ class MICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
ClientMetadata(Mux(cmd === M_FLUSH, clientInvalid, meta.state))
|
ClientMetadata(Mux(cmd === M_FLUSH, clientInvalid, meta.state))
|
||||||
|
|
||||||
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
||||||
ClientMetadata(Mux(incoming.uncached, clientInvalid, clientValid))
|
ClientMetadata(Mux(incoming.builtin_type, clientInvalid, clientValid))
|
||||||
|
|
||||||
def clientMetadataOnProbe(incoming: Probe, meta: ClientMetadata) =
|
def clientMetadataOnProbe(incoming: Probe, meta: ClientMetadata) =
|
||||||
ClientMetadata(Mux(incoming.p_type === probeInvalidate,
|
ClientMetadata(Mux(incoming.p_type === probeInvalidate,
|
||||||
@ -189,7 +189,7 @@ class MICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
||||||
Mux(g.uncached,
|
Mux(g.builtin_type,
|
||||||
ManagerMetadata(managerValid, meta.sharers),
|
ManagerMetadata(managerValid, meta.sharers),
|
||||||
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
||||||
|
|
||||||
@ -218,27 +218,27 @@ class MICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
||||||
|
|
||||||
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached, Grant.getGrantTypeForUncached(a), grantExclusive)
|
Mux(a.builtin_type, Grant.getGrantTypeForUncached(a), grantExclusive)
|
||||||
|
|
||||||
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached,
|
Mux(a.builtin_type,
|
||||||
MuxLookup(a.a_type, probeCopy, Array(
|
MuxLookup(a.a_type, probeCopy, Array(
|
||||||
Acquire.uncachedReadBlock -> probeCopy,
|
Acquire.uncachedReadBlock -> probeCopy,
|
||||||
Acquire.uncachedWriteBlock -> probeInvalidate,
|
Acquire.uncachedWriteBlock -> probeInvalidate,
|
||||||
Acquire.uncachedRead -> probeCopy,
|
Acquire.uncachedRead -> probeCopy,
|
||||||
Acquire.uncachedWrite -> probeInvalidate,
|
Acquire.uncachedWrite -> probeInvalidate,
|
||||||
Acquire.uncachedAtomic -> probeInvalidate
|
Acquire.uncachedAtomic -> probeInvalidate)),
|
||||||
)), probeInvalidate)
|
probeInvalidate)
|
||||||
|
|
||||||
def getProbeType(cmd: UInt, meta: ManagerMetadata): UInt =
|
def getProbeType(cmd: UInt, meta: ManagerMetadata): UInt =
|
||||||
MuxLookup(cmd, probeCopy, Array(
|
MuxLookup(cmd, probeCopy, Array(
|
||||||
M_FLUSH -> probeInvalidate))
|
M_FLUSH -> probeInvalidate))
|
||||||
|
|
||||||
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterRead(acq.a_type), Bool(true))
|
Mux(acq.builtin_type, Acquire.requiresOuterRead(acq.a_type), Bool(true))
|
||||||
|
|
||||||
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
Mux(acq.builtin_type, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
||||||
|
|
||||||
def requiresProbes(a: Acquire, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
def requiresProbes(a: Acquire, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
||||||
|
|
||||||
@ -271,7 +271,7 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
def isValid (meta: ManagerMetadata) = meta.state != managerInvalid
|
def isValid (meta: ManagerMetadata) = meta.state != managerInvalid
|
||||||
|
|
||||||
def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool =
|
def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool =
|
||||||
(isRead(cmd) && outstanding.uncached) ||
|
(isRead(cmd) && outstanding.builtin_type) ||
|
||||||
(isWriteIntent(cmd) && (outstanding.a_type != acquireExclusiveDirty))
|
(isWriteIntent(cmd) && (outstanding.a_type != acquireExclusiveDirty))
|
||||||
|
|
||||||
def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) =
|
def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) =
|
||||||
@ -286,7 +286,7 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
|
|
||||||
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
||||||
ClientMetadata(
|
ClientMetadata(
|
||||||
Mux(incoming.uncached, clientInvalid,
|
Mux(incoming.builtin_type, clientInvalid,
|
||||||
Mux(outstanding.a_type === acquireExclusiveDirty, clientExclusiveDirty,
|
Mux(outstanding.a_type === acquireExclusiveDirty, clientExclusiveDirty,
|
||||||
clientExclusiveClean)))
|
clientExclusiveClean)))
|
||||||
|
|
||||||
@ -306,7 +306,7 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
||||||
Mux(g.uncached,
|
Mux(g.builtin_type,
|
||||||
ManagerMetadata(managerValid, meta.sharers),
|
ManagerMetadata(managerValid, meta.sharers),
|
||||||
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
||||||
|
|
||||||
@ -338,10 +338,10 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
||||||
|
|
||||||
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached, Grant.getGrantTypeForUncached(a), grantExclusive)
|
Mux(a.builtin_type, Grant.getGrantTypeForUncached(a), grantExclusive)
|
||||||
|
|
||||||
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached,
|
Mux(a.builtin_type,
|
||||||
MuxLookup(a.a_type, probeCopy, Array(
|
MuxLookup(a.a_type, probeCopy, Array(
|
||||||
Acquire.uncachedReadBlock -> probeCopy,
|
Acquire.uncachedReadBlock -> probeCopy,
|
||||||
Acquire.uncachedWriteBlock -> probeInvalidate,
|
Acquire.uncachedWriteBlock -> probeInvalidate,
|
||||||
@ -356,15 +356,15 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
M_PRODUCE -> probeDowngrade))
|
M_PRODUCE -> probeDowngrade))
|
||||||
|
|
||||||
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterRead(acq.a_type), Bool(true))
|
Mux(acq.builtin_type, Acquire.requiresOuterRead(acq.a_type), Bool(true))
|
||||||
|
|
||||||
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
Mux(acq.builtin_type, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
||||||
|
|
||||||
def requiresProbes(a: Acquire, meta: ManagerMetadata) =
|
def requiresProbes(a: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(dir.none(meta.sharers), Bool(false),
|
Mux(dir.none(meta.sharers), Bool(false),
|
||||||
Mux(dir.one(meta.sharers), Bool(true), //TODO: for now we assume it's Exclusive
|
Mux(dir.one(meta.sharers), Bool(true), //TODO: for now we assume it's Exclusive
|
||||||
Mux(a.uncached, a.hasData(), Bool(true))))
|
Mux(a.builtin_type, a.hasData(), Bool(true))))
|
||||||
|
|
||||||
def requiresProbes(cmd: UInt, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
def requiresProbes(cmd: UInt, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
||||||
}
|
}
|
||||||
@ -396,7 +396,7 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
def isValid(meta: ManagerMetadata) = meta.state != managerInvalid
|
def isValid(meta: ManagerMetadata) = meta.state != managerInvalid
|
||||||
|
|
||||||
def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool =
|
def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool =
|
||||||
(isRead(cmd) && outstanding.uncached) ||
|
(isRead(cmd) && outstanding.builtin_type) ||
|
||||||
(isWriteIntent(cmd) && (outstanding.a_type != acquireExclusive))
|
(isWriteIntent(cmd) && (outstanding.a_type != acquireExclusive))
|
||||||
|
|
||||||
def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) =
|
def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) =
|
||||||
@ -413,7 +413,7 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
|
|
||||||
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
||||||
ClientMetadata(
|
ClientMetadata(
|
||||||
Mux(incoming.uncached, clientInvalid,
|
Mux(incoming.builtin_type, clientInvalid,
|
||||||
MuxLookup(incoming.g_type, clientInvalid, Array(
|
MuxLookup(incoming.g_type, clientInvalid, Array(
|
||||||
grantShared -> clientShared,
|
grantShared -> clientShared,
|
||||||
grantExclusive -> clientExclusiveDirty,
|
grantExclusive -> clientExclusiveDirty,
|
||||||
@ -435,7 +435,7 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
||||||
Mux(g.uncached,
|
Mux(g.builtin_type,
|
||||||
ManagerMetadata(managerValid, meta.sharers),
|
ManagerMetadata(managerValid, meta.sharers),
|
||||||
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
||||||
|
|
||||||
@ -467,13 +467,13 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
||||||
|
|
||||||
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached, Grant.getGrantTypeForUncached(a),
|
Mux(a.builtin_type, Grant.getGrantTypeForUncached(a),
|
||||||
Mux(a.a_type === acquireShared,
|
Mux(a.a_type === acquireShared,
|
||||||
Mux(!dir.none(meta.sharers), grantShared, grantExclusive),
|
Mux(!dir.none(meta.sharers), grantShared, grantExclusive),
|
||||||
grantExclusive))
|
grantExclusive))
|
||||||
|
|
||||||
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached,
|
Mux(a.builtin_type,
|
||||||
MuxLookup(a.a_type, probeCopy, Array(
|
MuxLookup(a.a_type, probeCopy, Array(
|
||||||
Acquire.uncachedReadBlock -> probeCopy,
|
Acquire.uncachedReadBlock -> probeCopy,
|
||||||
Acquire.uncachedWriteBlock -> probeInvalidate,
|
Acquire.uncachedWriteBlock -> probeInvalidate,
|
||||||
@ -490,15 +490,15 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
M_PRODUCE -> probeDowngrade))
|
M_PRODUCE -> probeDowngrade))
|
||||||
|
|
||||||
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterRead(acq.a_type), Bool(true))
|
Mux(acq.builtin_type, Acquire.requiresOuterRead(acq.a_type), Bool(true))
|
||||||
|
|
||||||
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
Mux(acq.builtin_type, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
||||||
|
|
||||||
def requiresProbes(a: Acquire, meta: ManagerMetadata) =
|
def requiresProbes(a: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(dir.none(meta.sharers), Bool(false),
|
Mux(dir.none(meta.sharers), Bool(false),
|
||||||
Mux(dir.one(meta.sharers), Bool(true), //TODO: for now we assume it's Exclusive
|
Mux(dir.one(meta.sharers), Bool(true), //TODO: for now we assume it's Exclusive
|
||||||
Mux(a.uncached, a.hasData(), a.a_type != acquireShared)))
|
Mux(a.builtin_type, a.hasData(), a.a_type != acquireShared)))
|
||||||
|
|
||||||
def requiresProbes(cmd: UInt, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
def requiresProbes(cmd: UInt, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
||||||
}
|
}
|
||||||
@ -530,7 +530,7 @@ class MESICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
def isValid (meta: ManagerMetadata) = meta.state != managerInvalid
|
def isValid (meta: ManagerMetadata) = meta.state != managerInvalid
|
||||||
|
|
||||||
def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool =
|
def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool =
|
||||||
(isRead(cmd) && outstanding.uncached) ||
|
(isRead(cmd) && outstanding.builtin_type) ||
|
||||||
(isWriteIntent(cmd) && (outstanding.a_type != acquireExclusive))
|
(isWriteIntent(cmd) && (outstanding.a_type != acquireExclusive))
|
||||||
|
|
||||||
def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) =
|
def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) =
|
||||||
@ -548,7 +548,7 @@ class MESICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
|
|
||||||
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
||||||
ClientMetadata(
|
ClientMetadata(
|
||||||
Mux(incoming.uncached, clientInvalid,
|
Mux(incoming.builtin_type, clientInvalid,
|
||||||
MuxLookup(incoming.g_type, clientInvalid, Array(
|
MuxLookup(incoming.g_type, clientInvalid, Array(
|
||||||
grantShared -> clientShared,
|
grantShared -> clientShared,
|
||||||
grantExclusive -> Mux(outstanding.a_type === acquireExclusive,
|
grantExclusive -> Mux(outstanding.a_type === acquireExclusive,
|
||||||
@ -571,7 +571,7 @@ class MESICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
||||||
Mux(g.uncached,
|
Mux(g.builtin_type,
|
||||||
ManagerMetadata(managerValid, meta.sharers),
|
ManagerMetadata(managerValid, meta.sharers),
|
||||||
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
||||||
|
|
||||||
@ -603,13 +603,13 @@ class MESICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
||||||
|
|
||||||
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached, Grant.getGrantTypeForUncached(a),
|
Mux(a.builtin_type, Grant.getGrantTypeForUncached(a),
|
||||||
Mux(a.a_type === acquireShared,
|
Mux(a.a_type === acquireShared,
|
||||||
Mux(!dir.none(meta.sharers), grantShared, grantExclusive),
|
Mux(!dir.none(meta.sharers), grantShared, grantExclusive),
|
||||||
grantExclusive))
|
grantExclusive))
|
||||||
|
|
||||||
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached,
|
Mux(a.builtin_type,
|
||||||
MuxLookup(a.a_type, probeCopy, Array(
|
MuxLookup(a.a_type, probeCopy, Array(
|
||||||
Acquire.uncachedReadBlock -> probeCopy,
|
Acquire.uncachedReadBlock -> probeCopy,
|
||||||
Acquire.uncachedWriteBlock -> probeInvalidate,
|
Acquire.uncachedWriteBlock -> probeInvalidate,
|
||||||
@ -626,15 +626,15 @@ class MESICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) {
|
|||||||
M_PRODUCE -> probeDowngrade))
|
M_PRODUCE -> probeDowngrade))
|
||||||
|
|
||||||
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterRead(acq.a_type), Bool(true))
|
Mux(acq.builtin_type, Acquire.requiresOuterRead(acq.a_type), Bool(true))
|
||||||
|
|
||||||
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
Mux(acq.builtin_type, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
||||||
|
|
||||||
def requiresProbes(a: Acquire, meta: ManagerMetadata) =
|
def requiresProbes(a: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(dir.none(meta.sharers), Bool(false),
|
Mux(dir.none(meta.sharers), Bool(false),
|
||||||
Mux(dir.one(meta.sharers), Bool(true), //TODO: for now we assume it's Exclusive
|
Mux(dir.one(meta.sharers), Bool(true), //TODO: for now we assume it's Exclusive
|
||||||
Mux(a.uncached, a.hasData(), a.a_type != acquireShared)))
|
Mux(a.builtin_type, a.hasData(), a.a_type != acquireShared)))
|
||||||
|
|
||||||
def requiresProbes(cmd: UInt, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
def requiresProbes(cmd: UInt, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
||||||
}
|
}
|
||||||
@ -666,7 +666,7 @@ class MigratoryCoherence(dir: DirectoryRepresentation) extends CoherencePolicy(d
|
|||||||
def isValid (meta: ManagerMetadata) = meta.state != managerInvalid
|
def isValid (meta: ManagerMetadata) = meta.state != managerInvalid
|
||||||
|
|
||||||
def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool =
|
def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool =
|
||||||
(isRead(cmd) && outstanding.uncached) ||
|
(isRead(cmd) && outstanding.builtin_type) ||
|
||||||
(isWriteIntent(cmd) && !Vec(acquireExclusive, acquireInvalidateOthers).contains(outstanding.a_type))
|
(isWriteIntent(cmd) && !Vec(acquireExclusive, acquireInvalidateOthers).contains(outstanding.a_type))
|
||||||
|
|
||||||
def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) =
|
def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) =
|
||||||
@ -690,7 +690,7 @@ class MigratoryCoherence(dir: DirectoryRepresentation) extends CoherencePolicy(d
|
|||||||
|
|
||||||
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) =
|
||||||
ClientMetadata(
|
ClientMetadata(
|
||||||
Mux(incoming.uncached, clientInvalid,
|
Mux(incoming.builtin_type, clientInvalid,
|
||||||
MuxLookup(incoming.g_type, clientInvalid, Array(
|
MuxLookup(incoming.g_type, clientInvalid, Array(
|
||||||
grantShared -> clientShared,
|
grantShared -> clientShared,
|
||||||
grantExclusive -> MuxLookup(outstanding.a_type, clientExclusiveDirty, Array(
|
grantExclusive -> MuxLookup(outstanding.a_type, clientExclusiveDirty, Array(
|
||||||
@ -725,7 +725,7 @@ class MigratoryCoherence(dir: DirectoryRepresentation) extends CoherencePolicy(d
|
|||||||
}
|
}
|
||||||
|
|
||||||
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) =
|
||||||
Mux(g.uncached,
|
Mux(g.builtin_type,
|
||||||
ManagerMetadata(managerValid, meta.sharers),
|
ManagerMetadata(managerValid, meta.sharers),
|
||||||
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
ManagerMetadata(managerValid, dir.push(meta.sharers, dst)))
|
||||||
|
|
||||||
@ -774,14 +774,14 @@ class MigratoryCoherence(dir: DirectoryRepresentation) extends CoherencePolicy(d
|
|||||||
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
def isCoherenceConflict(addr1: UInt, addr2: UInt): Bool = (addr1 === addr2)
|
||||||
|
|
||||||
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getGrantType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached, Grant.getGrantTypeForUncached(a),
|
Mux(a.builtin_type, Grant.getGrantTypeForUncached(a),
|
||||||
MuxLookup(a.a_type, grantShared, Array(
|
MuxLookup(a.a_type, grantShared, Array(
|
||||||
acquireShared -> Mux(!dir.none(meta.sharers), grantShared, grantExclusive),
|
acquireShared -> Mux(!dir.none(meta.sharers), grantShared, grantExclusive),
|
||||||
acquireExclusive -> grantExclusive,
|
acquireExclusive -> grantExclusive,
|
||||||
acquireInvalidateOthers -> grantExclusiveAck))) //TODO: add this to MESI for broadcast?
|
acquireInvalidateOthers -> grantExclusiveAck))) //TODO: add this to MESI for broadcast?
|
||||||
|
|
||||||
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
def getProbeType(a: Acquire, meta: ManagerMetadata): UInt =
|
||||||
Mux(a.uncached,
|
Mux(a.builtin_type,
|
||||||
MuxLookup(a.a_type, probeCopy, Array(
|
MuxLookup(a.a_type, probeCopy, Array(
|
||||||
Acquire.uncachedReadBlock -> probeCopy,
|
Acquire.uncachedReadBlock -> probeCopy,
|
||||||
Acquire.uncachedWriteBlock -> probeInvalidate,
|
Acquire.uncachedWriteBlock -> probeInvalidate,
|
||||||
@ -799,15 +799,15 @@ class MigratoryCoherence(dir: DirectoryRepresentation) extends CoherencePolicy(d
|
|||||||
M_PRODUCE -> probeDowngrade))
|
M_PRODUCE -> probeDowngrade))
|
||||||
|
|
||||||
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterRead(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterRead(acq.a_type), acq.a_type != acquireInvalidateOthers)
|
Mux(acq.builtin_type, Acquire.requiresOuterRead(acq.a_type), acq.a_type != acquireInvalidateOthers)
|
||||||
|
|
||||||
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
def requiresOuterWrite(acq: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(acq.uncached, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
Mux(acq.builtin_type, Acquire.requiresOuterWrite(acq.a_type), Bool(false))
|
||||||
|
|
||||||
def requiresProbes(a: Acquire, meta: ManagerMetadata) =
|
def requiresProbes(a: Acquire, meta: ManagerMetadata) =
|
||||||
Mux(dir.none(meta.sharers), Bool(false),
|
Mux(dir.none(meta.sharers), Bool(false),
|
||||||
Mux(dir.one(meta.sharers), Bool(true), //TODO: for now we assume it's Exclusive
|
Mux(dir.one(meta.sharers), Bool(true), //TODO: for now we assume it's Exclusive
|
||||||
Mux(a.uncached, a.hasData(), a.a_type != acquireShared)))
|
Mux(a.builtin_type, a.hasData(), a.a_type != acquireShared)))
|
||||||
|
|
||||||
def requiresProbes(cmd: UInt, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
def requiresProbes(cmd: UInt, meta: ManagerMetadata) = !dir.none(meta.sharers)
|
||||||
}
|
}
|
||||||
|
@ -325,7 +325,7 @@ class MemIOUncachedTileLinkIOConverter(qDepth: Int) extends Module {
|
|||||||
when(tl_wrap_in) { active_in := Bool(false) }
|
when(tl_wrap_in) { active_in := Bool(false) }
|
||||||
}
|
}
|
||||||
|
|
||||||
io.uncached.grant.bits.payload := Grant(uncached = Bool(true),
|
io.uncached.grant.bits.payload := Grant(builtin_type = Bool(true),
|
||||||
g_type = Grant.uncachedReadBlock,
|
g_type = Grant.uncachedReadBlock,
|
||||||
client_xact_id = tag_in,
|
client_xact_id = tag_in,
|
||||||
manager_xact_id = UInt(0),
|
manager_xact_id = UInt(0),
|
||||||
|
@ -76,11 +76,11 @@ class Acquire extends ClientToManagerChannel
|
|||||||
with HasClientTransactionId
|
with HasClientTransactionId
|
||||||
with HasTileLinkData {
|
with HasTileLinkData {
|
||||||
// Actual bundle fields
|
// Actual bundle fields
|
||||||
val uncached = Bool()
|
val builtin_type = Bool()
|
||||||
val a_type = UInt(width = max(log2Up(Acquire.nBuiltinAcquireTypes), co.acquireTypeWidth))
|
val a_type = UInt(width = max(log2Up(Acquire.nBuiltinAcquireTypes), co.acquireTypeWidth))
|
||||||
val subblock = Bits(width = tlSubblockUnionBits)
|
val subblock = Bits(width = tlSubblockUnionBits)
|
||||||
|
|
||||||
// Utility funcs for accessing uncached/subblock union
|
// Utility funcs for accessing subblock union
|
||||||
val opSizeOff = tlByteAddrBits + 1
|
val opSizeOff = tlByteAddrBits + 1
|
||||||
val opCodeOff = tlUncachedOperandSizeBits + opSizeOff
|
val opCodeOff = tlUncachedOperandSizeBits + opSizeOff
|
||||||
val opMSB = tlAtomicOpcodeBits + opCodeOff
|
val opMSB = tlAtomicOpcodeBits + opCodeOff
|
||||||
@ -94,13 +94,13 @@ class Acquire extends ClientToManagerChannel
|
|||||||
// Other helper funcs
|
// Other helper funcs
|
||||||
def is(t: UInt) = a_type === t
|
def is(t: UInt) = a_type === t
|
||||||
|
|
||||||
def hasData(dummy: Int = 0): Bool = uncached && Acquire.typesWithData.contains(a_type)
|
def hasData(dummy: Int = 0): Bool = builtin_type && Acquire.typesWithData.contains(a_type)
|
||||||
|
|
||||||
def hasMultibeatData(dummy: Int = 0): Bool = Bool(tlDataBeats > 1) && uncached &&
|
def hasMultibeatData(dummy: Int = 0): Bool = Bool(tlDataBeats > 1) && builtin_type &&
|
||||||
Acquire.typesWithMultibeatData.contains(a_type)
|
Acquire.typesWithMultibeatData.contains(a_type)
|
||||||
|
|
||||||
//TODO: This function is a hack to support Rocket icache snooping Rocket nbdcache:
|
//TODO: This function is a hack to support Rocket icache snooping Rocket nbdcache:
|
||||||
def requiresSelfProbe(dummy: Int = 0) = uncached && Acquire.requiresSelfProbe(a_type)
|
def requiresSelfProbe(dummy: Int = 0) = builtin_type && Acquire.requiresSelfProbe(a_type)
|
||||||
|
|
||||||
def makeProbe(meta: ManagerMetadata = co.managerMetadataOnFlush): Probe =
|
def makeProbe(meta: ManagerMetadata = co.managerMetadataOnFlush): Probe =
|
||||||
Probe(co.getProbeType(this, meta), this.addr_block)
|
Probe(co.getProbeType(this, meta), this.addr_block)
|
||||||
@ -111,7 +111,7 @@ class Acquire extends ClientToManagerChannel
|
|||||||
addr_beat: UInt = UInt(0),
|
addr_beat: UInt = UInt(0),
|
||||||
data: UInt = UInt(0)): Grant = {
|
data: UInt = UInt(0)): Grant = {
|
||||||
Grant(
|
Grant(
|
||||||
uncached = this.uncached,
|
builtin_type = this.builtin_type,
|
||||||
g_type = co.getGrantType(this, meta),
|
g_type = co.getGrantType(this, meta),
|
||||||
client_xact_id = this.client_xact_id,
|
client_xact_id = this.client_xact_id,
|
||||||
manager_xact_id = manager_xact_id,
|
manager_xact_id = manager_xact_id,
|
||||||
@ -140,7 +140,7 @@ object Acquire {
|
|||||||
|
|
||||||
// Most generic constructor
|
// Most generic constructor
|
||||||
def apply(
|
def apply(
|
||||||
uncached: Bool,
|
builtin_type: Bool,
|
||||||
a_type: Bits,
|
a_type: Bits,
|
||||||
client_xact_id: UInt,
|
client_xact_id: UInt,
|
||||||
addr_block: UInt,
|
addr_block: UInt,
|
||||||
@ -148,7 +148,7 @@ object Acquire {
|
|||||||
data: UInt = UInt(0),
|
data: UInt = UInt(0),
|
||||||
subblock: UInt = UInt(0)): Acquire = {
|
subblock: UInt = UInt(0)): Acquire = {
|
||||||
val acq = new Acquire
|
val acq = new Acquire
|
||||||
acq.uncached := uncached
|
acq.builtin_type := builtin_type
|
||||||
acq.a_type := a_type
|
acq.a_type := a_type
|
||||||
acq.client_xact_id := client_xact_id
|
acq.client_xact_id := client_xact_id
|
||||||
acq.addr_block := addr_block
|
acq.addr_block := addr_block
|
||||||
@ -160,7 +160,7 @@ object Acquire {
|
|||||||
// For cached types
|
// For cached types
|
||||||
def apply(a_type: Bits, client_xact_id: UInt, addr_block: UInt): Acquire = {
|
def apply(a_type: Bits, client_xact_id: UInt, addr_block: UInt): Acquire = {
|
||||||
apply(
|
apply(
|
||||||
uncached = Bool(false),
|
builtin_type = Bool(false),
|
||||||
a_type = a_type,
|
a_type = a_type,
|
||||||
client_xact_id = client_xact_id,
|
client_xact_id = client_xact_id,
|
||||||
addr_block = addr_block)
|
addr_block = addr_block)
|
||||||
@ -181,7 +181,7 @@ object UncachedRead {
|
|||||||
addr_beat: UInt,
|
addr_beat: UInt,
|
||||||
alloc: Bool = Bool(true)): Acquire = {
|
alloc: Bool = Bool(true)): Acquire = {
|
||||||
Acquire(
|
Acquire(
|
||||||
uncached = Bool(true),
|
builtin_type = Bool(true),
|
||||||
a_type = Acquire.uncachedRead,
|
a_type = Acquire.uncachedRead,
|
||||||
client_xact_id = client_xact_id,
|
client_xact_id = client_xact_id,
|
||||||
addr_block = addr_block,
|
addr_block = addr_block,
|
||||||
@ -197,7 +197,7 @@ object UncachedReadBlock {
|
|||||||
addr_block: UInt,
|
addr_block: UInt,
|
||||||
alloc: Bool = Bool(true)): Acquire = {
|
alloc: Bool = Bool(true)): Acquire = {
|
||||||
Acquire(
|
Acquire(
|
||||||
uncached = Bool(true),
|
builtin_type = Bool(true),
|
||||||
a_type = Acquire.uncachedReadBlock,
|
a_type = Acquire.uncachedReadBlock,
|
||||||
client_xact_id = client_xact_id,
|
client_xact_id = client_xact_id,
|
||||||
addr_block = addr_block,
|
addr_block = addr_block,
|
||||||
@ -214,7 +214,7 @@ object UncachedWrite {
|
|||||||
write_mask: UInt = Acquire.fullWriteMask,
|
write_mask: UInt = Acquire.fullWriteMask,
|
||||||
alloc: Bool = Bool(true)): Acquire = {
|
alloc: Bool = Bool(true)): Acquire = {
|
||||||
Acquire(
|
Acquire(
|
||||||
uncached = Bool(true),
|
builtin_type = Bool(true),
|
||||||
a_type = Acquire.uncachedWrite,
|
a_type = Acquire.uncachedWrite,
|
||||||
addr_block = addr_block,
|
addr_block = addr_block,
|
||||||
addr_beat = addr_beat,
|
addr_beat = addr_beat,
|
||||||
@ -233,7 +233,7 @@ object UncachedWriteBlock {
|
|||||||
data: UInt,
|
data: UInt,
|
||||||
alloc: Bool = Bool(true)): Acquire = {
|
alloc: Bool = Bool(true)): Acquire = {
|
||||||
Acquire(
|
Acquire(
|
||||||
uncached = Bool(true),
|
builtin_type = Bool(true),
|
||||||
a_type = Acquire.uncachedWriteBlock,
|
a_type = Acquire.uncachedWriteBlock,
|
||||||
client_xact_id = client_xact_id,
|
client_xact_id = client_xact_id,
|
||||||
addr_block = addr_block,
|
addr_block = addr_block,
|
||||||
@ -253,7 +253,7 @@ object UncachedAtomic {
|
|||||||
operand_size: UInt,
|
operand_size: UInt,
|
||||||
data: UInt): Acquire = {
|
data: UInt): Acquire = {
|
||||||
Acquire(
|
Acquire(
|
||||||
uncached = Bool(true),
|
builtin_type = Bool(true),
|
||||||
a_type = Acquire.uncachedAtomic,
|
a_type = Acquire.uncachedAtomic,
|
||||||
client_xact_id = client_xact_id,
|
client_xact_id = client_xact_id,
|
||||||
addr_block = addr_block,
|
addr_block = addr_block,
|
||||||
@ -308,6 +308,7 @@ class Release extends ClientToManagerChannel
|
|||||||
// Helper funcs
|
// Helper funcs
|
||||||
def is(t: UInt) = r_type === t
|
def is(t: UInt) = r_type === t
|
||||||
def hasData(dummy: Int = 0) = co.releaseTypesWithData.contains(r_type)
|
def hasData(dummy: Int = 0) = co.releaseTypesWithData.contains(r_type)
|
||||||
|
//TODO: Assumes all releases write back full cache blocks:
|
||||||
def hasMultibeatData(dummy: Int = 0) = Bool(tlDataBeats > 1) && co.releaseTypesWithData.contains(r_type)
|
def hasMultibeatData(dummy: Int = 0) = Bool(tlDataBeats > 1) && co.releaseTypesWithData.contains(r_type)
|
||||||
def isVoluntary(dummy: Int = 0) = voluntary
|
def isVoluntary(dummy: Int = 0) = voluntary
|
||||||
def requiresAck(dummy: Int = 0) = !Bool(networkPreservesPointToPointOrdering)
|
def requiresAck(dummy: Int = 0) = !Bool(networkPreservesPointToPointOrdering)
|
||||||
@ -317,7 +318,7 @@ class Release extends ClientToManagerChannel
|
|||||||
meta: ManagerMetadata = co.managerMetadataOnFlush): Grant = {
|
meta: ManagerMetadata = co.managerMetadataOnFlush): Grant = {
|
||||||
Grant(
|
Grant(
|
||||||
g_type = Grant.voluntaryAck,
|
g_type = Grant.voluntaryAck,
|
||||||
uncached = Bool(true), // Grant.voluntaryAck is built-in type
|
builtin_type = Bool(true), // Grant.voluntaryAck is built-in type
|
||||||
client_xact_id = this.client_xact_id,
|
client_xact_id = this.client_xact_id,
|
||||||
manager_xact_id = manager_xact_id
|
manager_xact_id = manager_xact_id
|
||||||
)
|
)
|
||||||
@ -363,19 +364,19 @@ class Grant extends ManagerToClientChannel
|
|||||||
with HasTileLinkData
|
with HasTileLinkData
|
||||||
with HasClientTransactionId
|
with HasClientTransactionId
|
||||||
with HasManagerTransactionId {
|
with HasManagerTransactionId {
|
||||||
val uncached = Bool()
|
val builtin_type = Bool()
|
||||||
val g_type = UInt(width = max(log2Up(Grant.nBuiltinGrantTypes), co.grantTypeWidth))
|
val g_type = UInt(width = max(log2Up(Grant.nBuiltinGrantTypes), co.grantTypeWidth))
|
||||||
|
|
||||||
// Helper funcs
|
// Helper funcs
|
||||||
def is(t: UInt) = g_type === t
|
def is(t: UInt) = g_type === t
|
||||||
def hasData(dummy: Int = 0): Bool = Mux(uncached,
|
def hasData(dummy: Int = 0): Bool = Mux(builtin_type,
|
||||||
Grant.typesWithData.contains(g_type),
|
Grant.typesWithData.contains(g_type),
|
||||||
co.grantTypesWithData.contains(g_type))
|
co.grantTypesWithData.contains(g_type))
|
||||||
def hasMultibeatData(dummy: Int = 0): Bool =
|
def hasMultibeatData(dummy: Int = 0): Bool =
|
||||||
Bool(tlDataBeats > 1) && Mux(uncached,
|
Bool(tlDataBeats > 1) && Mux(builtin_type,
|
||||||
Grant.typesWithMultibeatData.contains(g_type),
|
Grant.typesWithMultibeatData.contains(g_type),
|
||||||
co.grantTypesWithData.contains(g_type))
|
co.grantTypesWithData.contains(g_type))
|
||||||
def isVoluntary(dummy: Int = 0): Bool = uncached && (g_type === Grant.voluntaryAck)
|
def isVoluntary(dummy: Int = 0): Bool = builtin_type && (g_type === Grant.voluntaryAck)
|
||||||
def requiresAck(dummy: Int = 0): Bool = !Bool(networkPreservesPointToPointOrdering) && !isVoluntary()
|
def requiresAck(dummy: Int = 0): Bool = !Bool(networkPreservesPointToPointOrdering) && !isVoluntary()
|
||||||
def makeFinish(dummy: Int = 0): Finish = {
|
def makeFinish(dummy: Int = 0): Finish = {
|
||||||
val f = new Finish
|
val f = new Finish
|
||||||
@ -396,14 +397,14 @@ object Grant {
|
|||||||
def typesWithMultibeatData= Vec(uncachedReadBlock)
|
def typesWithMultibeatData= Vec(uncachedReadBlock)
|
||||||
|
|
||||||
def apply(
|
def apply(
|
||||||
uncached: Bool,
|
builtin_type: Bool,
|
||||||
g_type: UInt,
|
g_type: UInt,
|
||||||
client_xact_id: UInt,
|
client_xact_id: UInt,
|
||||||
manager_xact_id: UInt,
|
manager_xact_id: UInt,
|
||||||
addr_beat: UInt = UInt(0),
|
addr_beat: UInt = UInt(0),
|
||||||
data: UInt = UInt(0)): Grant = {
|
data: UInt = UInt(0)): Grant = {
|
||||||
val gnt = new Grant
|
val gnt = new Grant
|
||||||
gnt.uncached := uncached
|
gnt.builtin_type := builtin_type
|
||||||
gnt.g_type := g_type
|
gnt.g_type := g_type
|
||||||
gnt.client_xact_id := client_xact_id
|
gnt.client_xact_id := client_xact_id
|
||||||
gnt.manager_xact_id := manager_xact_id
|
gnt.manager_xact_id := manager_xact_id
|
||||||
@ -452,9 +453,9 @@ class TileLinkIOWrapper extends TLModule {
|
|||||||
io.out.release.valid := Bool(false)
|
io.out.release.valid := Bool(false)
|
||||||
}
|
}
|
||||||
object TileLinkIOWrapper {
|
object TileLinkIOWrapper {
|
||||||
def apply[T <: Data](uncached: UncachedTileLinkIO) = {
|
def apply[T <: Data](utl: UncachedTileLinkIO) = {
|
||||||
val conv = Module(new TileLinkIOWrapper)
|
val conv = Module(new TileLinkIOWrapper)
|
||||||
conv.io.in <> uncached
|
conv.io.in <> utl
|
||||||
conv.io.out
|
conv.io.out
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -260,7 +260,7 @@ class AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: Stri
|
|||||||
val state = Reg(init=s_idle)
|
val state = Reg(init=s_idle)
|
||||||
|
|
||||||
val xact_src = Reg(io.inner.acquire.bits.header.src.clone)
|
val xact_src = Reg(io.inner.acquire.bits.header.src.clone)
|
||||||
val xact_uncached = Reg(io.inner.acquire.bits.payload.uncached.clone)
|
val xact_builtin_type = Reg(io.inner.acquire.bits.payload.builtin_type.clone)
|
||||||
val xact_a_type = Reg(io.inner.acquire.bits.payload.a_type.clone)
|
val xact_a_type = Reg(io.inner.acquire.bits.payload.a_type.clone)
|
||||||
val xact_client_xact_id = Reg(io.inner.acquire.bits.payload.client_xact_id.clone)
|
val xact_client_xact_id = Reg(io.inner.acquire.bits.payload.client_xact_id.clone)
|
||||||
val xact_addr_block = Reg(io.inner.acquire.bits.payload.addr_block.clone)
|
val xact_addr_block = Reg(io.inner.acquire.bits.payload.addr_block.clone)
|
||||||
@ -268,7 +268,7 @@ class AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: Stri
|
|||||||
val xact_subblock = Reg(io.inner.acquire.bits.payload.subblock.clone)
|
val xact_subblock = Reg(io.inner.acquire.bits.payload.subblock.clone)
|
||||||
val xact_data = Vec.fill(tlDataBeats){ Reg(io.inner.acquire.bits.payload.data.clone) }
|
val xact_data = Vec.fill(tlDataBeats){ Reg(io.inner.acquire.bits.payload.data.clone) }
|
||||||
val xact = Acquire(
|
val xact = Acquire(
|
||||||
uncached = xact_uncached,
|
builtin_type = xact_builtin_type,
|
||||||
a_type = xact_a_type,
|
a_type = xact_a_type,
|
||||||
client_xact_id = xact_client_xact_id,
|
client_xact_id = xact_client_xact_id,
|
||||||
addr_block = xact_addr_block,
|
addr_block = xact_addr_block,
|
||||||
@ -355,7 +355,7 @@ class AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: Stri
|
|||||||
val needs_outer_write = cacq.payload.hasData()
|
val needs_outer_write = cacq.payload.hasData()
|
||||||
val needs_outer_read = co.requiresOuterRead(cacq.payload, co.managerMetadataOnFlush)
|
val needs_outer_read = co.requiresOuterRead(cacq.payload, co.managerMetadataOnFlush)
|
||||||
when(io.inner.acquire.valid) {
|
when(io.inner.acquire.valid) {
|
||||||
xact_uncached := cacq.payload.uncached
|
xact_builtin_type := cacq.payload.builtin_type
|
||||||
xact_a_type := cacq.payload.a_type
|
xact_a_type := cacq.payload.a_type
|
||||||
xact_addr_block := cacq.payload.addr_block
|
xact_addr_block := cacq.payload.addr_block
|
||||||
xact_addr_beat := cacq.payload.addr_beat
|
xact_addr_beat := cacq.payload.addr_beat
|
||||||
|
Loading…
Reference in New Issue
Block a user