1
0

BankedL2Config: use the same LazyModule for all L2 banks

This makes it much easier for banked coherence managers to support
cross-bank functionality, like a common control port, for example.
This commit is contained in:
Wesley W. Terpstra
2017-01-30 14:02:59 -08:00
parent b567a2a356
commit 280af9684b
3 changed files with 11 additions and 8 deletions

View File

@ -22,15 +22,16 @@ case class BroadcastConfig(
case object BroadcastConfig extends Field[BroadcastConfig]
/** L2 memory subsystem configuration */
case class BankedL2Geometry(bank: Int, banks: Int, channel: Int, channels: Int)
case class BankedL2Config(
nMemoryChannels: Int = 1,
nBanksPerChannel: Int = 1,
coherenceManager: (Parameters, CoreplexNetwork, BankedL2Geometry) => (TLInwardNode, TLOutwardNode) = { case (q, _, _) =>
coherenceManager: (Parameters, CoreplexNetwork) => (TLInwardNode, TLOutwardNode) = { case (q, _) =>
implicit val p = q
val BroadcastConfig(nTrackers, bufferless) = p(BroadcastConfig)
val bh = LazyModule(new TLBroadcast(p(CacheBlockBytes), nTrackers, bufferless))
(bh.node, TLWidthWidget(p(L1toL2Config).beatBytes)(bh.node))
val ww = LazyModule(new TLWidthWidget(p(L1toL2Config).beatBytes))
ww.node :*= bh.node
(bh.node, ww.node)
}) {
val nBanks = nMemoryChannels*nBanksPerChannel
}