Don't instantiate PTW when UseVM=false
This commit is contained in:
parent
27b3cca046
commit
a4685a073f
@ -125,10 +125,12 @@ class RocketTile(resetSignal: Bool = null)(implicit p: Parameters) extends Tile(
|
|||||||
require(uncachedPorts.size == nUncachedTileLinkPorts)
|
require(uncachedPorts.size == nUncachedTileLinkPorts)
|
||||||
require(cachedPorts.size == nCachedTileLinkPorts)
|
require(cachedPorts.size == nCachedTileLinkPorts)
|
||||||
|
|
||||||
|
if (p(UseVM)) {
|
||||||
val ptw = Module(new PTW(ptwPorts.size)(dcacheParams))
|
val ptw = Module(new PTW(ptwPorts.size)(dcacheParams))
|
||||||
ptw.io.requestor <> ptwPorts
|
ptw.io.requestor <> ptwPorts
|
||||||
ptw.io.mem +=: dcPorts
|
ptw.io.mem +=: dcPorts
|
||||||
core.io.ptw <> ptw.io.dpath
|
core.io.ptw <> ptw.io.dpath
|
||||||
|
}
|
||||||
|
|
||||||
val dcArb = Module(new HellaCacheArbiter(dcPorts.size)(dcacheParams))
|
val dcArb = Module(new HellaCacheArbiter(dcPorts.size)(dcacheParams))
|
||||||
dcArb.io.requestor <> dcPorts
|
dcArb.io.requestor <> dcPorts
|
||||||
|
@ -137,7 +137,7 @@ class TLB(implicit p: Parameters) extends TLBModule()(p) {
|
|||||||
val w_array = Mux(priv_s, sw_array.toBits & pum_ok, uw_array.toBits)
|
val w_array = Mux(priv_s, sw_array.toBits & pum_ok, uw_array.toBits)
|
||||||
val x_array = Mux(priv_s, sx_array.toBits, ux_array.toBits)
|
val x_array = Mux(priv_s, sx_array.toBits, ux_array.toBits)
|
||||||
|
|
||||||
val vm_enabled = io.ptw.status.vm(3) && priv_uses_vm && !io.req.bits.passthrough
|
val vm_enabled = Bool(usingVM) && io.ptw.status.vm(3) && priv_uses_vm && !io.req.bits.passthrough
|
||||||
val bad_va =
|
val bad_va =
|
||||||
if (vpnBits == vpnBitsExtended) Bool(false)
|
if (vpnBits == vpnBitsExtended) Bool(false)
|
||||||
else io.req.bits.vpn(vpnBits) =/= io.req.bits.vpn(vpnBits-1)
|
else io.req.bits.vpn(vpnBits) =/= io.req.bits.vpn(vpnBits-1)
|
||||||
@ -174,6 +174,7 @@ class TLB(implicit p: Parameters) extends TLBModule()(p) {
|
|||||||
io.ptw.req.bits.store := r_req.store
|
io.ptw.req.bits.store := r_req.store
|
||||||
io.ptw.req.bits.fetch := r_req.instruction
|
io.ptw.req.bits.fetch := r_req.instruction
|
||||||
|
|
||||||
|
if (usingVM) {
|
||||||
when (io.req.fire() && tlb_miss) {
|
when (io.req.fire() && tlb_miss) {
|
||||||
state := s_request
|
state := s_request
|
||||||
r_refill_tag := lookup_tag
|
r_refill_tag := lookup_tag
|
||||||
@ -196,6 +197,7 @@ class TLB(implicit p: Parameters) extends TLBModule()(p) {
|
|||||||
state := s_ready
|
state := s_ready
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
class DecoupledTLB(implicit p: Parameters) extends Module {
|
class DecoupledTLB(implicit p: Parameters) extends Module {
|
||||||
val io = new Bundle {
|
val io = new Bundle {
|
||||||
|
Loading…
Reference in New Issue
Block a user