1
0

Add TileId parameter, generalizing GroundTestId

This usually shouldn't be used in Tiles that are meant to be P&R'd once
and multiply instantiated, as their RTL would no longer be homogeneous.
However, it is useful for conditionalizing RTL generation for
heterogeneous tiles.
This commit is contained in:
Andrew Waterman
2016-09-02 00:05:40 -07:00
parent 4a7972be31
commit c05ba1e864
10 changed files with 15 additions and 13 deletions

View File

@ -13,7 +13,6 @@ case object BuildGroundTest extends Field[Parameters => GroundTest]
case class GroundTestTileSettings(
uncached: Int = 0, cached: Int = 0, ptw: Int = 0, maxXacts: Int = 1)
case object GroundTestKey extends Field[Seq[GroundTestTileSettings]]
case object GroundTestId extends Field[Int]
trait HasGroundTestConstants {
val timeoutCodeBits = 4
@ -22,8 +21,7 @@ trait HasGroundTestConstants {
trait HasGroundTestParameters extends HasAddrMapParameters {
implicit val p: Parameters
val tileId = p(GroundTestId)
val tileSettings = p(GroundTestKey)(tileId)
val tileSettings = p(GroundTestKey)(p(TileId))
val nUncached = tileSettings.uncached
val nCached = tileSettings.cached
val nPTW = tileSettings.ptw