Merge pull request #985 from freechipsproject/flop-interrupts
Add Parameters to diplomatic edges
This commit is contained in:
@ -8,7 +8,7 @@ import Chisel.ImplicitConversions._
|
||||
import chisel3.core.withReset
|
||||
import freechips.rocketchip.config._
|
||||
import freechips.rocketchip.coreplex._
|
||||
import freechips.rocketchip.diplomacy.{LazyModule, LazyModuleImp}
|
||||
import freechips.rocketchip.diplomacy._
|
||||
import freechips.rocketchip.tilelink._
|
||||
import freechips.rocketchip.tile._
|
||||
import freechips.rocketchip.util._
|
||||
@ -61,7 +61,7 @@ class Frontend(val icacheParams: ICacheParams, hartid: Int)(implicit p: Paramete
|
||||
|
||||
masterNode := icache.masterNode
|
||||
// Avoid breaking tile dedup due to address constants in the monitor
|
||||
icache.slaveNode.map { _ connectButDontMonitor slaveNode }
|
||||
DisableMonitors { implicit p => icache.slaveNode.map { _ := slaveNode } }
|
||||
}
|
||||
|
||||
class FrontendBundle(outer: Frontend) extends CoreBundle()(outer.p) {
|
||||
|
@ -103,16 +103,18 @@ trait CanHaveScratchpad extends HasHellaCache with HasICacheFrontend with HasCor
|
||||
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(fetchWidth*coreInstBytes, p(CacheBlockBytes), earlyAck=true))
|
||||
val ww = LazyModule(new TLWidthWidget(xLen/8))
|
||||
frontend.slaveNode connectButDontMonitorSlaves fg.node
|
||||
fg.node connectButDontMonitorSlaves ww.node
|
||||
ww.node connectButDontMonitorSlaves slaveNode
|
||||
|
||||
// 2) ScratchpadSlavePort always has a node, but only exists when the HellaCache has a scratchpad
|
||||
val scratch = tileParams.dcache.flatMap(d => d.scratch.map(s =>
|
||||
LazyModule(new ScratchpadSlavePort(AddressSet(s, d.dataScratchpadBytes-1)))))
|
||||
scratch foreach { lm => lm.node connectButDontMonitor TLFragmenter(xLen/8, p(CacheBlockBytes), earlyAck=true)(slaveNode) }
|
||||
|
||||
DisableMonitors { implicit p =>
|
||||
frontend.slaveNode :*= fg.node
|
||||
fg.node :*= ww.node
|
||||
ww.node :*= slaveNode
|
||||
scratch foreach { lm => lm.node := TLFragmenter(xLen/8, p(CacheBlockBytes), earlyAck=true)(slaveNode) }
|
||||
}
|
||||
|
||||
def findScratchpadFromICache: Option[AddressSet] = scratch.map { s =>
|
||||
val finalNode = frontend.masterNode.edgesOut.head.manager.managers.find(_.nodePath.last == s.node)
|
||||
|
Reference in New Issue
Block a user