diff --git a/src/main/scala/groundtest/Tile.scala b/src/main/scala/groundtest/Tile.scala index f5ae3c3a..78a4aa63 100644 --- a/src/main/scala/groundtest/Tile.scala +++ b/src/main/scala/groundtest/Tile.scala @@ -5,6 +5,7 @@ package freechips.rocketchip.groundtest import Chisel._ import freechips.rocketchip.config._ +import freechips.rocketchip.diplomacy._ import freechips.rocketchip.coreplex._ import freechips.rocketchip.rocket.{HellaCache, RocketCoreParams} import freechips.rocketchip.tile._ @@ -29,7 +30,7 @@ case object GroundTestTilesKey extends Field[Seq[GroundTestTileParams]] abstract class GroundTestTile(params: GroundTestTileParams)(implicit p: Parameters) extends BaseTile(params)(p) { val slave = None - val dcacheOpt = params.dcache.map { dc => HellaCache(0, dc.nMSHRs == 0) } + val dcacheOpt = params.dcache.map { dc => LazyModule(HellaCache(0, dc.nMSHRs == 0)) } dcacheOpt.foreach { tileBus.node := _.node } override lazy val module = new GroundTestTileModule(this, () => new GroundTestTileBundle(this)) diff --git a/src/main/scala/rocket/HellaCache.scala b/src/main/scala/rocket/HellaCache.scala index a4253671..718c1287 100644 --- a/src/main/scala/rocket/HellaCache.scala +++ b/src/main/scala/rocket/HellaCache.scala @@ -195,8 +195,7 @@ class HellaCacheModule(outer: HellaCache) extends LazyModuleImp(outer) object HellaCache { def apply(hartid: Int, blocking: Boolean, scratch: () => Option[AddressSet] = () => None)(implicit p: Parameters) = { - if (blocking) LazyModule(new DCache(hartid, scratch)) - else LazyModule(new NonBlockingDCache(hartid)) + if (blocking) new DCache(hartid, scratch) else new NonBlockingDCache(hartid) } } @@ -208,7 +207,7 @@ trait HasHellaCache extends HasTileLinkMasterPort with HasTileParameters { def findScratchpadFromICache: Option[AddressSet] val hartid: Int var nDCachePorts = 0 - val dcache = HellaCache(hartid, tileParams.dcache.get.nMSHRs == 0, findScratchpadFromICache _) + val dcache = LazyModule(HellaCache(hartid, tileParams.dcache.get.nMSHRs == 0, findScratchpadFromICache _)) tileBus.node := dcache.node }