From 3133c321b7b771150168b687834fac5edd4a292a Mon Sep 17 00:00:00 2001 From: Henry Cook Date: Thu, 31 Aug 2017 19:07:08 -0700 Subject: [PATCH] scratchpad: remove dependency on HasCoreParameters --- src/main/scala/rocket/ScratchpadSlavePort.scala | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/scala/rocket/ScratchpadSlavePort.scala b/src/main/scala/rocket/ScratchpadSlavePort.scala index 00dfea40..9e00facd 100644 --- a/src/main/scala/rocket/ScratchpadSlavePort.scala +++ b/src/main/scala/rocket/ScratchpadSlavePort.scala @@ -12,8 +12,7 @@ import freechips.rocketchip.tile._ import freechips.rocketchip.tilelink._ import freechips.rocketchip.util._ -class ScratchpadSlavePort(address: AddressSet)(implicit p: Parameters) extends LazyModule - with HasCoreParameters { +class ScratchpadSlavePort(address: AddressSet, coreDataBytes: Int, usingAtomics: Boolean)(implicit p: Parameters) extends LazyModule { val device = new SimpleDevice("dtim", Seq("sifive,dtim0")) val node = TLManagerNode(Seq(TLManagerPortParameters( Seq(TLManagerParameters( @@ -110,7 +109,7 @@ trait CanHaveScratchpad extends HasHellaCache with HasICacheFrontend { val fg = LazyModule(new TLFragmenter(fetchBytes, cacheBlockBytes, earlyAck=true)) val ww = LazyModule(new TLWidthWidget(xLenBytes)) val scratch = tileParams.dcache.flatMap(d => d.scratch.map(s => - LazyModule(new ScratchpadSlavePort(AddressSet(s, d.dataScratchpadBytes-1))))) + LazyModule(new ScratchpadSlavePort(AddressSet(s, d.dataScratchpadBytes-1), xLenBytes, tileParams.core.useAtomics)))) DisableMonitors { implicit p => frontend.slaveNode :*= fg.node