Merge pull request #1118 from freechipsproject/basic-bus-blocker-3
tile: bus blocker needs to know width
This commit is contained in:
commit
9e0c26f855
@ -6,7 +6,7 @@ import Chisel._
|
|||||||
import Chisel.ImplicitConversions._
|
import Chisel.ImplicitConversions._
|
||||||
|
|
||||||
import freechips.rocketchip.config.Parameters
|
import freechips.rocketchip.config.Parameters
|
||||||
import freechips.rocketchip.coreplex.CacheBlockBytes
|
import freechips.rocketchip.coreplex.{CacheBlockBytes, SystemBusKey}
|
||||||
import freechips.rocketchip.devices.tilelink._
|
import freechips.rocketchip.devices.tilelink._
|
||||||
import freechips.rocketchip.diplomacy._
|
import freechips.rocketchip.diplomacy._
|
||||||
import freechips.rocketchip.tile._
|
import freechips.rocketchip.tile._
|
||||||
@ -99,6 +99,7 @@ class ScratchpadSlavePort(address: AddressSet, coreDataBytes: Int, usingAtomics:
|
|||||||
trait CanHaveScratchpad extends HasHellaCache with HasICacheFrontend {
|
trait CanHaveScratchpad extends HasHellaCache with HasICacheFrontend {
|
||||||
val module: CanHaveScratchpadModule
|
val module: CanHaveScratchpadModule
|
||||||
val cacheBlockBytes = p(CacheBlockBytes)
|
val cacheBlockBytes = p(CacheBlockBytes)
|
||||||
|
val masterPortBeatBytes = p(SystemBusKey).beatBytes
|
||||||
|
|
||||||
val scratch = tileParams.dcache.flatMap { d => d.scratch.map(s =>
|
val scratch = tileParams.dcache.flatMap { d => d.scratch.map(s =>
|
||||||
LazyModule(new ScratchpadSlavePort(AddressSet(s, d.dataScratchpadBytes-1), xBytes, tileParams.core.useAtomics && !tileParams.core.useAtomicsOnlyForIO)))
|
LazyModule(new ScratchpadSlavePort(AddressSet(s, d.dataScratchpadBytes-1), xBytes, tileParams.core.useAtomics && !tileParams.core.useAtomicsOnlyForIO)))
|
||||||
@ -113,7 +114,7 @@ trait CanHaveScratchpad extends HasHellaCache with HasICacheFrontend {
|
|||||||
|
|
||||||
val tile_master_blocker =
|
val tile_master_blocker =
|
||||||
tileParams.blockerCtrlAddr
|
tileParams.blockerCtrlAddr
|
||||||
.map(BasicBusBlockerParams(_, xBytes, deadlock = true))
|
.map(BasicBusBlockerParams(_, xBytes, masterPortBeatBytes, deadlock = true))
|
||||||
.map(bp => LazyModule(new BasicBusBlocker(bp)))
|
.map(bp => LazyModule(new BasicBusBlocker(bp)))
|
||||||
|
|
||||||
masterNode := tile_master_blocker.map { _.node := tileBus.node } getOrElse { tileBus.node }
|
masterNode := tile_master_blocker.map { _.node := tileBus.node } getOrElse { tileBus.node }
|
||||||
|
Loading…
Reference in New Issue
Block a user