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:
@ -94,8 +94,9 @@ class BaseCoreplexConfig extends Config (
|
||||
TestGeneration.addSuites(rvi.map(_("p")))
|
||||
TestGeneration.addSuites((if(site(UseVM)) List("v") else List()).flatMap(env => rvu.map(_(env))))
|
||||
TestGeneration.addSuite(benchmarks)
|
||||
List.fill(site(NTiles)){ (r: Bool, p: Parameters) =>
|
||||
List.tabulate(site(NTiles)){ i => (r: Bool, p: Parameters) =>
|
||||
Module(new RocketTile(resetSignal = r)(p.alterPartial({
|
||||
case TileId => i
|
||||
case TLId => "L1toL2"
|
||||
case NUncachedTileLinkPorts => 1 + site(RoccNMemChannels)
|
||||
})))
|
||||
|
@ -2,6 +2,7 @@ package coreplex
|
||||
|
||||
import Chisel._
|
||||
import cde.{Parameters, Field}
|
||||
import rocket.TileId
|
||||
import groundtest._
|
||||
import uncore.tilelink._
|
||||
import uncore.agents._
|
||||
@ -19,7 +20,7 @@ class DirectGroundTestCoreplex(topParams: Parameters) extends Coreplex()(topPara
|
||||
require(nTiles == 1)
|
||||
|
||||
val test = p(BuildGroundTest)(outermostParams.alterPartial({
|
||||
case GroundTestId => 0
|
||||
case TileId => 0
|
||||
case CacheName => "L1D"
|
||||
}))
|
||||
require(test.io.cache.size == 0)
|
||||
|
@ -158,10 +158,9 @@ class WithPCIeMockupTest extends Config(
|
||||
maxRequests = 128,
|
||||
startAddress = site(GlobalAddrMap)("mem").start)
|
||||
case BuildGroundTest =>
|
||||
(p: Parameters) => {
|
||||
val id = p(GroundTestId)
|
||||
if (id == 0) Module(new GeneratorTest()(p))
|
||||
else Module(new NastiConverterTest()(p))
|
||||
(p: Parameters) => p(TileId) match {
|
||||
case 0 => Module(new GeneratorTest()(p))
|
||||
case 1 => Module(new NastiConverterTest()(p))
|
||||
}
|
||||
case _ => throw new CDEMatchError
|
||||
})
|
||||
|
Reference in New Issue
Block a user