Revert "For D$, use source 0 through N-1 for MMIO, not 1 through N"
This reverts commit 0538dc77ce
.
This commit is contained in:
parent
fa7ead6357
commit
4959771c97
@ -87,8 +87,9 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) {
|
|||||||
io.cpu.req.ready := (release_state === s_ready) && !cached_grant_wait && !s1_nack
|
io.cpu.req.ready := (release_state === s_ready) && !cached_grant_wait && !s1_nack
|
||||||
|
|
||||||
// I/O MSHRs
|
// I/O MSHRs
|
||||||
val uncachedInFlight = Seq.fill(cacheParams.nMMIOs) { RegInit(Bool(false)) }
|
val mmioOffset = if (outer.scratch().isDefined) 0 else 1
|
||||||
val uncachedReqs = Seq.fill(cacheParams.nMMIOs) { Reg(new HellaCacheReq) }
|
val uncachedInFlight = Seq.fill(maxUncachedInFlight) { RegInit(Bool(false)) }
|
||||||
|
val uncachedReqs = Seq.fill(maxUncachedInFlight) { Reg(new HellaCacheReq) }
|
||||||
|
|
||||||
// hit initiation path
|
// hit initiation path
|
||||||
dataArb.io.in(3).valid := io.cpu.req.valid && isRead(io.cpu.req.bits.cmd)
|
dataArb.io.in(3).valid := io.cpu.req.valid && isRead(io.cpu.req.bits.cmd)
|
||||||
@ -251,13 +252,13 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) {
|
|||||||
metaWriteArb.io.in(0).bits.data.tag := s2_req.addr(paddrBits-1, untagBits)
|
metaWriteArb.io.in(0).bits.data.tag := s2_req.addr(paddrBits-1, untagBits)
|
||||||
|
|
||||||
// Prepare a TileLink request message that initiates a transaction
|
// Prepare a TileLink request message that initiates a transaction
|
||||||
val a_source = PriorityEncoder(~uncachedInFlight.asUInt) // skip the MSHR
|
val a_source = PriorityEncoder(~uncachedInFlight.asUInt << mmioOffset) // skip the MSHR
|
||||||
val acquire_address = s2_req_block_addr
|
val acquire_address = s2_req_block_addr
|
||||||
val access_address = s2_req.addr
|
val access_address = s2_req.addr
|
||||||
val a_size = s2_req.typ(MT_SZ-2, 0)
|
val a_size = s2_req.typ(MT_SZ-2, 0)
|
||||||
val a_data = Fill(beatWords, pstore1_storegen.data)
|
val a_data = Fill(beatWords, pstore1_storegen.data)
|
||||||
val acquire = if (edge.manager.anySupportAcquireB) {
|
val acquire = if (edge.manager.anySupportAcquireB) {
|
||||||
edge.Acquire(UInt(cacheParams.nMMIOs), acquire_address, lgCacheBlockBytes, s2_grow_param)._2 // Cacheability checked by tlb
|
edge.Acquire(UInt(0), acquire_address, lgCacheBlockBytes, s2_grow_param)._2 // Cacheability checked by tlb
|
||||||
} else {
|
} else {
|
||||||
Wire(new TLBundleA(edge.bundle))
|
Wire(new TLBundleA(edge.bundle))
|
||||||
}
|
}
|
||||||
@ -285,7 +286,7 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) {
|
|||||||
tl_out.a.bits := Mux(!s2_uncached, acquire, Mux(!s2_write, get, Mux(!pstore1_amo, put, atomics)))
|
tl_out.a.bits := Mux(!s2_uncached, acquire, Mux(!s2_write, get, Mux(!pstore1_amo, put, atomics)))
|
||||||
|
|
||||||
// Set pending bits for outstanding TileLink transaction
|
// Set pending bits for outstanding TileLink transaction
|
||||||
val a_sel = UIntToOH(a_source, cacheParams.nMMIOs)
|
val a_sel = UIntToOH(a_source, maxUncachedInFlight+mmioOffset) >> mmioOffset
|
||||||
when (tl_out.a.fire()) {
|
when (tl_out.a.fire()) {
|
||||||
when (s2_uncached) {
|
when (s2_uncached) {
|
||||||
(a_sel.toBools zip (uncachedInFlight zip uncachedReqs)) foreach { case (s, (f, r)) =>
|
(a_sel.toBools zip (uncachedInFlight zip uncachedReqs)) foreach { case (s, (f, r)) =>
|
||||||
@ -312,7 +313,7 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) {
|
|||||||
assert(cached_grant_wait, "A GrantData was unexpected by the dcache.")
|
assert(cached_grant_wait, "A GrantData was unexpected by the dcache.")
|
||||||
when(d_last) { cached_grant_wait := false }
|
when(d_last) { cached_grant_wait := false }
|
||||||
} .elsewhen (grantIsUncached) {
|
} .elsewhen (grantIsUncached) {
|
||||||
val d_sel = UIntToOH(tl_out.d.bits.source, cacheParams.nMMIOs)
|
val d_sel = UIntToOH(tl_out.d.bits.source, maxUncachedInFlight+mmioOffset) >> mmioOffset
|
||||||
val req = Mux1H(d_sel, uncachedReqs)
|
val req = Mux1H(d_sel, uncachedReqs)
|
||||||
(d_sel.toBools zip uncachedInFlight) foreach { case (s, f) =>
|
(d_sel.toBools zip uncachedInFlight) foreach { case (s, f) =>
|
||||||
when (s && d_last) {
|
when (s && d_last) {
|
||||||
@ -390,7 +391,7 @@ class DCacheModule(outer: DCache) extends HellaCacheModule(outer) {
|
|||||||
|
|
||||||
val voluntaryReleaseMessage = if (edge.manager.anySupportAcquireB) {
|
val voluntaryReleaseMessage = if (edge.manager.anySupportAcquireB) {
|
||||||
edge.Release(
|
edge.Release(
|
||||||
fromSource = UInt(cacheParams.nMMIOs - 1),
|
fromSource = UInt(maxUncachedInFlight - 1),
|
||||||
toAddress = probe_bits.address,
|
toAddress = probe_bits.address,
|
||||||
lgSize = lgCacheBlockBytes,
|
lgSize = lgCacheBlockBytes,
|
||||||
shrinkPermissions = s2_shrink_param,
|
shrinkPermissions = s2_shrink_param,
|
||||||
|
@ -60,6 +60,7 @@ trait HasL1HellaCacheParameters extends HasL1CacheParameters with HasCoreParamet
|
|||||||
def encRowBits = encDataBits*rowWords
|
def encRowBits = encDataBits*rowWords
|
||||||
def lrscCycles = 32 // ISA requires 16-insn LRSC sequences to succeed
|
def lrscCycles = 32 // ISA requires 16-insn LRSC sequences to succeed
|
||||||
def nIOMSHRs = cacheParams.nMMIOs
|
def nIOMSHRs = cacheParams.nMMIOs
|
||||||
|
def maxUncachedInFlight = cacheParams.nMMIOs
|
||||||
def dataScratchpadSize = cacheParams.dataScratchpadBytes
|
def dataScratchpadSize = cacheParams.dataScratchpadBytes
|
||||||
|
|
||||||
require(rowBits >= coreDataBits, s"rowBits($rowBits) < coreDataBits($coreDataBits)")
|
require(rowBits >= coreDataBits, s"rowBits($rowBits) < coreDataBits($coreDataBits)")
|
||||||
|
Loading…
Reference in New Issue
Block a user