1
0

make rocc build independent from parameter structure

This commit is contained in:
Howard Mao 2015-12-01 18:47:52 -08:00
parent e76dfa55f7
commit 3f8f726296

View File

@ -71,21 +71,20 @@ class RocketTile(resetSignal: Bool = null)(implicit p: Parameters) extends Tile(
val cmdRouter = Module(new RoccCommandRouter(roccOpcodes)) val cmdRouter = Module(new RoccCommandRouter(roccOpcodes))
cmdRouter.io.in <> core.io.rocc.cmd cmdRouter.io.in <> core.io.rocc.cmd
val roccs = buildRocc.zipWithIndex.map { val roccs = buildRocc.zipWithIndex.map { case (accelParams, i) =>
case (RoccParameters(_, generator, nchannels), i) => val rocc = accelParams.generator(
val accelParams = p.alterPartial({ case RoccNMemChannels => nchannels }) p.alterPartial({ case RoccNMemChannels => accelParams.nMemChannels }))
val rocc = generator(accelParams) val dcIF = Module(new SimpleHellaCacheIF()(dcacheParams))
val dcIF = Module(new SimpleHellaCacheIF()(dcacheParams)) rocc.io.cmd <> cmdRouter.io.out(i)
rocc.io.cmd <> cmdRouter.io.out(i) rocc.io.s := core.io.rocc.s
rocc.io.s := core.io.rocc.s rocc.io.exception := core.io.rocc.exception
rocc.io.exception := core.io.rocc.exception dcIF.io.requestor <> rocc.io.mem
dcIF.io.requestor <> rocc.io.mem dcArb.io.requestor(2 + i) <> dcIF.io.cache
dcArb.io.requestor(2 + i) <> dcIF.io.cache iMemArb.io.in(1 + i) <> rocc.io.imem
iMemArb.io.in(1 + i) <> rocc.io.imem ptw.io.requestor(2 + 3 * i) <> rocc.io.iptw
ptw.io.requestor(2 + 3 * i) <> rocc.io.iptw ptw.io.requestor(3 + 3 * i) <> rocc.io.dptw
ptw.io.requestor(3 + 3 * i) <> rocc.io.dptw ptw.io.requestor(4 + 3 * i) <> rocc.io.pptw
ptw.io.requestor(4 + 3 * i) <> rocc.io.pptw rocc
rocc
} }
core.io.rocc.busy := cmdRouter.io.busy || roccs.map(_.io.busy).reduce(_ || _) core.io.rocc.busy := cmdRouter.io.busy || roccs.map(_.io.busy).reduce(_ || _)