From 6141b3efc53a2c27a50ce28ce3200a79bcc1eb63 Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Mon, 2 Feb 2015 01:02:06 -0800 Subject: [PATCH] uncached -> builtin_type --- uncore/src/main/scala/cache.scala | 14 ++--- uncore/src/main/scala/coherence.scala | 80 +++++++++++++-------------- uncore/src/main/scala/memserdes.scala | 2 +- uncore/src/main/scala/tilelink.scala | 47 ++++++++-------- uncore/src/main/scala/uncore.scala | 6 +- 5 files changed, 75 insertions(+), 74 deletions(-) diff --git a/uncore/src/main/scala/cache.scala b/uncore/src/main/scala/cache.scala index 609c3b33..794e3447 100644 --- a/uncore/src/main/scala/cache.scala +++ b/uncore/src/main/scala/cache.scala @@ -747,7 +747,7 @@ class L2AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: St val state = Reg(init=s_idle) 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_addr_block = Reg(io.inner.acquire.bits.payload.addr_block.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_way_en = Reg{ Bits(width = nWays) } val xact = Acquire( - uncached = xact_uncached, + builtin_type = xact_builtin_type, a_type = xact_a_type, client_xact_id = xact_client_xact_id, 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 is_hit = xact_tag_match && co.isHit(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) amoalu.io.addr := xact.addr() @@ -921,7 +921,7 @@ class L2AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: St is(s_idle) { io.inner.acquire.ready := Bool(true) 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_addr_block := cacq.payload.addr_block 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_probes = _tag_match && co.requiresProbes(xact, coh) val _is_hit = _tag_match && co.isHit(xact, coh) - val full_block = !xact.uncached || - xact.is(Acquire.uncachedReadBlock) || - xact.is(Acquire.uncachedWriteBlock) + val full_block = !xact.builtin_type || + xact.hasMultibeatData() || + cgnt.payload.hasMultibeatData() read_data_cnt := Mux(full_block, UInt(0), 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) diff --git a/uncore/src/main/scala/coherence.scala b/uncore/src/main/scala/coherence.scala index 6367b44d..201e67ab 100644 --- a/uncore/src/main/scala/coherence.scala +++ b/uncore/src/main/scala/coherence.scala @@ -174,7 +174,7 @@ class MICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { ClientMetadata(Mux(cmd === M_FLUSH, clientInvalid, meta.state)) 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) = 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) = - Mux(g.uncached, + Mux(g.builtin_type, ManagerMetadata(managerValid, meta.sharers), 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 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 = - Mux(a.uncached, + Mux(a.builtin_type, MuxLookup(a.a_type, probeCopy, Array( Acquire.uncachedReadBlock -> probeCopy, Acquire.uncachedWriteBlock -> probeInvalidate, Acquire.uncachedRead -> probeCopy, Acquire.uncachedWrite -> probeInvalidate, - Acquire.uncachedAtomic -> probeInvalidate - )), probeInvalidate) + Acquire.uncachedAtomic -> probeInvalidate)), + probeInvalidate) def getProbeType(cmd: UInt, meta: ManagerMetadata): UInt = MuxLookup(cmd, probeCopy, Array( M_FLUSH -> probeInvalidate)) 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) = - 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) @@ -271,7 +271,7 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { def isValid (meta: ManagerMetadata) = meta.state != managerInvalid def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool = - (isRead(cmd) && outstanding.uncached) || + (isRead(cmd) && outstanding.builtin_type) || (isWriteIntent(cmd) && (outstanding.a_type != acquireExclusiveDirty)) def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) = @@ -286,7 +286,7 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) = ClientMetadata( - Mux(incoming.uncached, clientInvalid, + Mux(incoming.builtin_type, clientInvalid, Mux(outstanding.a_type === acquireExclusiveDirty, clientExclusiveDirty, clientExclusiveClean))) @@ -306,7 +306,7 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { } def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) = - Mux(g.uncached, + Mux(g.builtin_type, ManagerMetadata(managerValid, meta.sharers), 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 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 = - Mux(a.uncached, + Mux(a.builtin_type, MuxLookup(a.a_type, probeCopy, Array( Acquire.uncachedReadBlock -> probeCopy, Acquire.uncachedWriteBlock -> probeInvalidate, @@ -356,15 +356,15 @@ class MEICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { M_PRODUCE -> probeDowngrade)) 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) = - 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) = Mux(dir.none(meta.sharers), Bool(false), 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) } @@ -396,7 +396,7 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { def isValid(meta: ManagerMetadata) = meta.state != managerInvalid def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool = - (isRead(cmd) && outstanding.uncached) || + (isRead(cmd) && outstanding.builtin_type) || (isWriteIntent(cmd) && (outstanding.a_type != acquireExclusive)) def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) = @@ -413,7 +413,7 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) = ClientMetadata( - Mux(incoming.uncached, clientInvalid, + Mux(incoming.builtin_type, clientInvalid, MuxLookup(incoming.g_type, clientInvalid, Array( grantShared -> clientShared, grantExclusive -> clientExclusiveDirty, @@ -435,7 +435,7 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { } def managerMetadataOnGrant(g: Grant, meta: ManagerMetadata, dst: UInt) = - Mux(g.uncached, + Mux(g.builtin_type, ManagerMetadata(managerValid, meta.sharers), 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 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(!dir.none(meta.sharers), grantShared, grantExclusive), grantExclusive)) def getProbeType(a: Acquire, meta: ManagerMetadata): UInt = - Mux(a.uncached, + Mux(a.builtin_type, MuxLookup(a.a_type, probeCopy, Array( Acquire.uncachedReadBlock -> probeCopy, Acquire.uncachedWriteBlock -> probeInvalidate, @@ -490,15 +490,15 @@ class MSICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { M_PRODUCE -> probeDowngrade)) 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) = - 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) = Mux(dir.none(meta.sharers), Bool(false), 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) } @@ -530,7 +530,7 @@ class MESICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { def isValid (meta: ManagerMetadata) = meta.state != managerInvalid def needsTransactionOnSecondaryMiss(cmd: UInt, outstanding: Acquire): Bool = - (isRead(cmd) && outstanding.uncached) || + (isRead(cmd) && outstanding.builtin_type) || (isWriteIntent(cmd) && (outstanding.a_type != acquireExclusive)) def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) = @@ -548,7 +548,7 @@ class MESICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) = ClientMetadata( - Mux(incoming.uncached, clientInvalid, + Mux(incoming.builtin_type, clientInvalid, MuxLookup(incoming.g_type, clientInvalid, Array( grantShared -> clientShared, 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) = - Mux(g.uncached, + Mux(g.builtin_type, ManagerMetadata(managerValid, meta.sharers), 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 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(!dir.none(meta.sharers), grantShared, grantExclusive), grantExclusive)) def getProbeType(a: Acquire, meta: ManagerMetadata): UInt = - Mux(a.uncached, + Mux(a.builtin_type, MuxLookup(a.a_type, probeCopy, Array( Acquire.uncachedReadBlock -> probeCopy, Acquire.uncachedWriteBlock -> probeInvalidate, @@ -626,15 +626,15 @@ class MESICoherence(dir: DirectoryRepresentation) extends CoherencePolicy(dir) { M_PRODUCE -> probeDowngrade)) 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) = - 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) = Mux(dir.none(meta.sharers), Bool(false), 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) } @@ -666,7 +666,7 @@ class MigratoryCoherence(dir: DirectoryRepresentation) extends CoherencePolicy(d def isValid (meta: ManagerMetadata) = meta.state != managerInvalid 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)) def clientMetadataOnHit(cmd: UInt, meta: ClientMetadata) = @@ -690,7 +690,7 @@ class MigratoryCoherence(dir: DirectoryRepresentation) extends CoherencePolicy(d def clientMetadataOnGrant(incoming: Grant, outstanding: Acquire) = ClientMetadata( - Mux(incoming.uncached, clientInvalid, + Mux(incoming.builtin_type, clientInvalid, MuxLookup(incoming.g_type, clientInvalid, Array( grantShared -> clientShared, 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) = - Mux(g.uncached, + Mux(g.builtin_type, ManagerMetadata(managerValid, meta.sharers), 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 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( acquireShared -> Mux(!dir.none(meta.sharers), grantShared, grantExclusive), acquireExclusive -> grantExclusive, acquireInvalidateOthers -> grantExclusiveAck))) //TODO: add this to MESI for broadcast? def getProbeType(a: Acquire, meta: ManagerMetadata): UInt = - Mux(a.uncached, + Mux(a.builtin_type, MuxLookup(a.a_type, probeCopy, Array( Acquire.uncachedReadBlock -> probeCopy, Acquire.uncachedWriteBlock -> probeInvalidate, @@ -799,15 +799,15 @@ class MigratoryCoherence(dir: DirectoryRepresentation) extends CoherencePolicy(d M_PRODUCE -> probeDowngrade)) 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) = - 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) = Mux(dir.none(meta.sharers), Bool(false), 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) } diff --git a/uncore/src/main/scala/memserdes.scala b/uncore/src/main/scala/memserdes.scala index e7291222..e58dd08d 100644 --- a/uncore/src/main/scala/memserdes.scala +++ b/uncore/src/main/scala/memserdes.scala @@ -325,7 +325,7 @@ class MemIOUncachedTileLinkIOConverter(qDepth: Int) extends Module { 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, client_xact_id = tag_in, manager_xact_id = UInt(0), diff --git a/uncore/src/main/scala/tilelink.scala b/uncore/src/main/scala/tilelink.scala index 32ccac87..3fc0e4e7 100644 --- a/uncore/src/main/scala/tilelink.scala +++ b/uncore/src/main/scala/tilelink.scala @@ -76,11 +76,11 @@ class Acquire extends ClientToManagerChannel with HasClientTransactionId with HasTileLinkData { // Actual bundle fields - val uncached = Bool() + val builtin_type = Bool() val a_type = UInt(width = max(log2Up(Acquire.nBuiltinAcquireTypes), co.acquireTypeWidth)) val subblock = Bits(width = tlSubblockUnionBits) - // Utility funcs for accessing uncached/subblock union + // Utility funcs for accessing subblock union val opSizeOff = tlByteAddrBits + 1 val opCodeOff = tlUncachedOperandSizeBits + opSizeOff val opMSB = tlAtomicOpcodeBits + opCodeOff @@ -94,13 +94,13 @@ class Acquire extends ClientToManagerChannel // Other helper funcs 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) //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 = Probe(co.getProbeType(this, meta), this.addr_block) @@ -111,7 +111,7 @@ class Acquire extends ClientToManagerChannel addr_beat: UInt = UInt(0), data: UInt = UInt(0)): Grant = { Grant( - uncached = this.uncached, + builtin_type = this.builtin_type, g_type = co.getGrantType(this, meta), client_xact_id = this.client_xact_id, manager_xact_id = manager_xact_id, @@ -140,7 +140,7 @@ object Acquire { // Most generic constructor def apply( - uncached: Bool, + builtin_type: Bool, a_type: Bits, client_xact_id: UInt, addr_block: UInt, @@ -148,7 +148,7 @@ object Acquire { data: UInt = UInt(0), subblock: UInt = UInt(0)): Acquire = { val acq = new Acquire - acq.uncached := uncached + acq.builtin_type := builtin_type acq.a_type := a_type acq.client_xact_id := client_xact_id acq.addr_block := addr_block @@ -160,7 +160,7 @@ object Acquire { // For cached types def apply(a_type: Bits, client_xact_id: UInt, addr_block: UInt): Acquire = { apply( - uncached = Bool(false), + builtin_type = Bool(false), a_type = a_type, client_xact_id = client_xact_id, addr_block = addr_block) @@ -181,7 +181,7 @@ object UncachedRead { addr_beat: UInt, alloc: Bool = Bool(true)): Acquire = { Acquire( - uncached = Bool(true), + builtin_type = Bool(true), a_type = Acquire.uncachedRead, client_xact_id = client_xact_id, addr_block = addr_block, @@ -197,7 +197,7 @@ object UncachedReadBlock { addr_block: UInt, alloc: Bool = Bool(true)): Acquire = { Acquire( - uncached = Bool(true), + builtin_type = Bool(true), a_type = Acquire.uncachedReadBlock, client_xact_id = client_xact_id, addr_block = addr_block, @@ -214,7 +214,7 @@ object UncachedWrite { write_mask: UInt = Acquire.fullWriteMask, alloc: Bool = Bool(true)): Acquire = { Acquire( - uncached = Bool(true), + builtin_type = Bool(true), a_type = Acquire.uncachedWrite, addr_block = addr_block, addr_beat = addr_beat, @@ -233,7 +233,7 @@ object UncachedWriteBlock { data: UInt, alloc: Bool = Bool(true)): Acquire = { Acquire( - uncached = Bool(true), + builtin_type = Bool(true), a_type = Acquire.uncachedWriteBlock, client_xact_id = client_xact_id, addr_block = addr_block, @@ -253,7 +253,7 @@ object UncachedAtomic { operand_size: UInt, data: UInt): Acquire = { Acquire( - uncached = Bool(true), + builtin_type = Bool(true), a_type = Acquire.uncachedAtomic, client_xact_id = client_xact_id, addr_block = addr_block, @@ -308,6 +308,7 @@ class Release extends ClientToManagerChannel // Helper funcs def is(t: UInt) = r_type === t 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 isVoluntary(dummy: Int = 0) = voluntary def requiresAck(dummy: Int = 0) = !Bool(networkPreservesPointToPointOrdering) @@ -317,7 +318,7 @@ class Release extends ClientToManagerChannel meta: ManagerMetadata = co.managerMetadataOnFlush): Grant = { Grant( 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, manager_xact_id = manager_xact_id ) @@ -363,19 +364,19 @@ class Grant extends ManagerToClientChannel with HasTileLinkData with HasClientTransactionId with HasManagerTransactionId { - val uncached = Bool() + val builtin_type = Bool() val g_type = UInt(width = max(log2Up(Grant.nBuiltinGrantTypes), co.grantTypeWidth)) // Helper funcs 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), co.grantTypesWithData.contains(g_type)) def hasMultibeatData(dummy: Int = 0): Bool = - Bool(tlDataBeats > 1) && Mux(uncached, + Bool(tlDataBeats > 1) && Mux(builtin_type, Grant.typesWithMultibeatData.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 makeFinish(dummy: Int = 0): Finish = { val f = new Finish @@ -396,14 +397,14 @@ object Grant { def typesWithMultibeatData= Vec(uncachedReadBlock) def apply( - uncached: Bool, + builtin_type: Bool, g_type: UInt, client_xact_id: UInt, manager_xact_id: UInt, addr_beat: UInt = UInt(0), data: UInt = UInt(0)): Grant = { val gnt = new Grant - gnt.uncached := uncached + gnt.builtin_type := builtin_type gnt.g_type := g_type gnt.client_xact_id := client_xact_id gnt.manager_xact_id := manager_xact_id @@ -452,9 +453,9 @@ class TileLinkIOWrapper extends TLModule { io.out.release.valid := Bool(false) } object TileLinkIOWrapper { - def apply[T <: Data](uncached: UncachedTileLinkIO) = { + def apply[T <: Data](utl: UncachedTileLinkIO) = { val conv = Module(new TileLinkIOWrapper) - conv.io.in <> uncached + conv.io.in <> utl conv.io.out } } diff --git a/uncore/src/main/scala/uncore.scala b/uncore/src/main/scala/uncore.scala index c05aafee..cc4755f0 100644 --- a/uncore/src/main/scala/uncore.scala +++ b/uncore/src/main/scala/uncore.scala @@ -260,7 +260,7 @@ class AcquireTracker(trackerId: Int, bankId: Int, innerId: String, outerId: Stri val state = Reg(init=s_idle) 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_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) @@ -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_data = Vec.fill(tlDataBeats){ Reg(io.inner.acquire.bits.payload.data.clone) } val xact = Acquire( - uncached = xact_uncached, + builtin_type = xact_builtin_type, a_type = xact_a_type, client_xact_id = xact_client_xact_id, 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_read = co.requiresOuterRead(cacq.payload, co.managerMetadataOnFlush) 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_addr_block := cacq.payload.addr_block xact_addr_beat := cacq.payload.addr_beat