tile: remove global Field ResetVectorBits
Reset vector width is determined by systemBus.busView. Also move some defs from HasCoreParameters to HasTileParameters.
This commit is contained in:
@ -64,13 +64,12 @@ class Frontend(val icacheParams: ICacheParams, hartid: Int)(implicit p: Paramete
|
||||
DisableMonitors { implicit p => icache.slaveNode.map { _ := slaveNode } }
|
||||
}
|
||||
|
||||
class FrontendBundle(outer: Frontend) extends CoreBundle()(outer.p) {
|
||||
class FrontendBundle(outer: Frontend) extends CoreBundle()(outer.p)
|
||||
with HasExternallyDrivenTileConstants {
|
||||
val cpu = new FrontendIO().flip
|
||||
val ptw = new TLBPTWIO()
|
||||
val tl_out = outer.masterNode.bundleOut
|
||||
val tl_in = outer.slaveNode.bundleIn
|
||||
val resetVector = UInt(INPUT, vaddrBitsExtended)
|
||||
val hartid = UInt(INPUT, hartIdLen)
|
||||
}
|
||||
|
||||
class FrontendModule(outer: Frontend) extends LazyModuleImp(outer)
|
||||
@ -90,7 +89,7 @@ class FrontendModule(outer: Frontend) extends LazyModuleImp(outer)
|
||||
val s1_pc = Reg(UInt(width=vaddrBitsExtended))
|
||||
val s1_speculative = Reg(Bool())
|
||||
val s2_valid = RegInit(false.B)
|
||||
val s2_pc = RegInit(alignPC(io.resetVector))
|
||||
val s2_pc = RegInit(t = UInt(width = vaddrBitsExtended), alignPC(io.reset_vector))
|
||||
val s2_btb_resp_valid = if (usingBTB) Reg(Bool()) else false.B
|
||||
val s2_btb_resp_bits = Reg(new BTBResp)
|
||||
val s2_tlb_resp = Reg(tlb.io.resp)
|
||||
|
@ -98,24 +98,23 @@ class ScratchpadSlavePort(address: AddressSet, coreDataBytes: Int, usingAtomics:
|
||||
/** Mix-ins for constructing tiles that have optional scratchpads */
|
||||
trait CanHaveScratchpad extends HasHellaCache with HasICacheFrontend {
|
||||
val module: CanHaveScratchpadModule
|
||||
val xLenBytes = p(XLen)/8
|
||||
val cacheBlockBytes = p(CacheBlockBytes)
|
||||
val fetchBytes = tileParams.core.fetchBytes
|
||||
|
||||
val slaveNode = TLInputNode() // Up to two uses for this input node:
|
||||
|
||||
// 1) Frontend always exists, but may or may not have a scratchpad node
|
||||
// 2) ScratchpadSlavePort always has a node, but only exists when the HellaCache has a scratchpad
|
||||
val fg = LazyModule(new TLFragmenter(fetchBytes, cacheBlockBytes, earlyAck=true))
|
||||
val ww = LazyModule(new TLWidthWidget(xLenBytes))
|
||||
val scratch = tileParams.dcache.flatMap(d => d.scratch.map(s =>
|
||||
LazyModule(new ScratchpadSlavePort(AddressSet(s, d.dataScratchpadBytes-1), xLenBytes, tileParams.core.useAtomics))))
|
||||
val fg = LazyModule(new TLFragmenter(tileParams.core.fetchBytes, cacheBlockBytes, earlyAck=true))
|
||||
val ww = LazyModule(new TLWidthWidget(xBytes))
|
||||
val scratch = tileParams.dcache.flatMap { d => d.scratch.map(s =>
|
||||
LazyModule(new ScratchpadSlavePort(AddressSet(s, d.dataScratchpadBytes-1), xBytes, tileParams.core.useAtomics)))
|
||||
}
|
||||
|
||||
DisableMonitors { implicit p =>
|
||||
frontend.slaveNode :*= fg.node
|
||||
fg.node :*= ww.node
|
||||
ww.node :*= slaveNode
|
||||
scratch foreach { lm => lm.node := TLFragmenter(xLenBytes, cacheBlockBytes, earlyAck=true)(slaveNode) }
|
||||
scratch foreach { lm => lm.node := TLFragmenter(xBytes, cacheBlockBytes, earlyAck=true)(slaveNode) }
|
||||
}
|
||||
|
||||
def findScratchpadFromICache: Option[AddressSet] = scratch.map { s =>
|
||||
|
Reference in New Issue
Block a user