1
0

add clock override to tile constructor (#42)

useful to have upstream so that tape-outs can construct
rocket-chip to have cores on different clocks without
forking rocket
This commit is contained in:
Colin Schmidt 2016-07-21 20:56:52 -04:00 committed by Andrew Waterman
parent c069e66056
commit a43ad522dc

View File

@ -22,8 +22,8 @@ case class RoccParameters(
csrs: Seq[Int] = Nil, csrs: Seq[Int] = Nil,
useFPU: Boolean = false) useFPU: Boolean = false)
abstract class Tile(resetSignal: Bool = null) abstract class Tile(clockSignal: Clock = null, resetSignal: Bool = null)
(implicit p: Parameters) extends Module(_reset = resetSignal) { (implicit p: Parameters) extends Module(Option(clockSignal), Option(resetSignal)) {
val nCachedTileLinkPorts = p(NCachedTileLinkPorts) val nCachedTileLinkPorts = p(NCachedTileLinkPorts)
val nUncachedTileLinkPorts = p(NUncachedTileLinkPorts) val nUncachedTileLinkPorts = p(NUncachedTileLinkPorts)
val dcacheParams = p.alterPartial({ case CacheName => "L1D" }) val dcacheParams = p.alterPartial({ case CacheName => "L1D" })
@ -35,7 +35,8 @@ abstract class Tile(resetSignal: Bool = null)
} }
} }
class RocketTile(resetSignal: Bool = null)(implicit p: Parameters) extends Tile(resetSignal)(p) { class RocketTile(clockSignal: Clock = null, resetSignal: Bool = null)
(implicit p: Parameters) extends Tile(clockSignal, resetSignal)(p) {
val buildRocc = p(BuildRoCC) val buildRocc = p(BuildRoCC)
val usingRocc = !buildRocc.isEmpty val usingRocc = !buildRocc.isEmpty
val nRocc = buildRocc.size val nRocc = buildRocc.size