Skip to content

Commit

Permalink
Only connect vector dcache port if requested by VU
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryz123 committed Mar 20, 2024
1 parent 28bf141 commit ea3d882
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/scala/tile/RocketTile.scala
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class RocketTile private(
masterNode :=* tlOtherMastersNode
DisableMonitors { implicit p => tlSlaveXbar.node :*= slaveNode }

nDCachePorts += 1 /*core */ + (dtim_adapter.isDefined).toInt + rocketParams.core.useVector.toInt
nDCachePorts += 1 /*core */ + (dtim_adapter.isDefined).toInt + rocketParams.core.vector.map(_.useDCache.toInt).getOrElse(0)

val dtimProperty = dtim_adapter.map(d => Map(
"sifive,dtim" -> d.device.asProperty)).getOrElse(Nil)
Expand Down Expand Up @@ -178,7 +178,11 @@ class RocketTileModuleImp(outer: RocketTile) extends BaseTileModuleImp(outer)
if (fpuOpt.isEmpty) {
core.io.fpu := DontCare
}
outer.vector_unit foreach { v => dcachePorts += v.module.io.dmem }
outer.vector_unit foreach { v => if (outer.rocketParams.core.vector.get.useDCache) {
dcachePorts += v.module.io.dmem
} else {
v.module.io.dmem := DontCare
} }
core.io.ptw <> ptw.io.dpath

// Connect the coprocessor interfaces
Expand Down

0 comments on commit ea3d882

Please sign in to comment.