Add WithSystemBusWidth fragment (#1071)

This commit is contained in:
Jerry Zhao
2022-01-10 09:09:21 -08:00
committed by GitHub
parent d335e728b6
commit 1ce67a0997

View File

@@ -1,10 +1,13 @@
package chipyard.config
import freechips.rocketchip.config.{Config}
import freechips.rocketchip.subsystem.{BankedL2Key, CoherenceManagerWrapper}
import freechips.rocketchip.subsystem.{SystemBusKey, BankedL2Key, CoherenceManagerWrapper}
// Replaces the L2 with a broadcast manager for maintaining coherence
class WithBroadcastManager extends Config((site, here, up) => {
case BankedL2Key => up(BankedL2Key, site).copy(coherenceManager = CoherenceManagerWrapper.broadcastManager)
})
class WithSystemBusWidth(bitWidth: Int) extends Config((site, here, up) => {
case SystemBusKey => up(SystemBusKey, site).copy(beatBytes=bitWidth/8)
})