1
0

rocket: clarify intent of boundaryBuffers and move to RocketTile

This commit is contained in:
Wesley W. Terpstra 2017-10-26 13:52:34 -07:00
parent e76e0f6dce
commit 9e33ccdb05
2 changed files with 30 additions and 15 deletions

View File

@ -57,8 +57,7 @@ case class TileSlavePortParams(
case class RocketCrossingParams( case class RocketCrossingParams(
crossingType: CoreplexClockCrossing = SynchronousCrossing(), crossingType: CoreplexClockCrossing = SynchronousCrossing(),
master: TileMasterPortParams = TileMasterPortParams(), master: TileMasterPortParams = TileMasterPortParams(),
slave: TileSlavePortParams = TileSlavePortParams(), slave: TileSlavePortParams = TileSlavePortParams()) {
boundaryBuffers: Boolean = false) {
def knownRatio: Option[Int] = crossingType match { def knownRatio: Option[Int] = crossingType match {
case RationalCrossing(_) => Some(2) case RationalCrossing(_) => Some(2)
case _ => None case _ => None
@ -92,8 +91,7 @@ trait HasRocketTiles extends HasTiles
// in the global Parameters about the specific tile being built now // in the global Parameters about the specific tile being built now
val wrapper = LazyModule(new RocketTileWrapper( val wrapper = LazyModule(new RocketTileWrapper(
params = tp, params = tp,
crossing = crossing.crossingType, crossing = crossing.crossingType
boundaryBuffers = crossing.boundaryBuffers
)(p.alterPartial { )(p.alterPartial {
case TileKey => tp case TileKey => tp
case BuildRoCC => tp.rocc case BuildRoCC => tp.rocc

View File

@ -22,7 +22,9 @@ case class RocketTileParams(
trace: Boolean = false, trace: Boolean = false,
hcfOnUncorrectable: Boolean = false, hcfOnUncorrectable: Boolean = false,
name: Option[String] = Some("tile"), name: Option[String] = Some("tile"),
hartid: Int = 0) extends TileParams { hartid: Int = 0,
boundaryBuffers: Boolean = false // if synthesized with hierarchical PnR, cut feed-throughs?
) extends TileParams {
require(icache.isDefined) require(icache.isDefined)
require(dcache.isDefined) require(dcache.isDefined)
} }
@ -189,23 +191,38 @@ class RocketTileWrapperBundle[+L <: RocketTileWrapper](_outer: L) extends BaseTi
class RocketTileWrapper( class RocketTileWrapper(
params: RocketTileParams, params: RocketTileParams,
val crossing: CoreplexClockCrossing, val crossing: CoreplexClockCrossing)
val boundaryBuffers: Boolean = false)
(implicit p: Parameters) extends BaseTile(params) with HasCrossing { (implicit p: Parameters) extends BaseTile(params) with HasCrossing {
val rocket = LazyModule(new RocketTile(params)) val rocket = LazyModule(new RocketTile(params))
// The buffers needed to cut feed-through paths are microarchitecture specific, so belong here
val masterBuffer = LazyModule(new TLBuffer(BufferParams.none, BufferParams.flow, BufferParams.none, BufferParams.flow, BufferParams(1))) val masterBuffer = LazyModule(new TLBuffer(BufferParams.none, BufferParams.flow, BufferParams.none, BufferParams.flow, BufferParams(1)))
val masterNode: TLOutwardNode = if (boundaryBuffers) { val masterNode: TLOutwardNode = crossing match {
masterBuffer.node :=* rocket.masterNode case _: AsynchronousCrossing => rocket.masterNode
masterBuffer.node case SynchronousCrossing(b) =>
} else { rocket.masterNode } require (!params.boundaryBuffers || (b.depth >= 1 && !b.flow && !b.pipe), "Buffer misconfiguration creates feed-through paths")
rocket.masterNode
case RationalCrossing(dir) =>
require (dir != SlowToFast, "Misconfiguration? Core slower than fabric")
if (params.boundaryBuffers) {
masterBuffer.node :=* rocket.masterNode
} else {
rocket.masterNode
}
}
val slaveBuffer = LazyModule(new TLBuffer(BufferParams.flow, BufferParams.none, BufferParams.none, BufferParams.none, BufferParams.none)) val slaveBuffer = LazyModule(new TLBuffer(BufferParams.flow, BufferParams.none, BufferParams.none, BufferParams.none, BufferParams.none))
val slaveNode: TLInwardNode = DisableMonitors { implicit p => if (boundaryBuffers) { val slaveNode: TLInwardNode = crossing match {
rocket.slaveNode :*= slaveBuffer.node case _: SynchronousCrossing => rocket.slaveNode // requirement already checked
slaveBuffer.node case _: AsynchronousCrossing => rocket.slaveNode
} else { rocket.slaveNode } } case _: RationalCrossing =>
if (params.boundaryBuffers) {
DisableMonitors { implicit p => rocket.slaveNode :*= slaveBuffer.node }
} else {
rocket.slaveNode
}
}
val intXbar = LazyModule(new IntXbar) val intXbar = LazyModule(new IntXbar)
rocket.intNode := intXbar.intnode rocket.intNode := intXbar.intnode