Heterogeneous Tiles (#550)
Fundamental new features: * Added tile package: This package is intended to hold components re-usable across different types of tile. Will be the future location of TL2-RoCC accelerators and new diplomatic versions of intra-tile interfaces. * Adopted [ModuleName]Params convention: Code base was very inconsistent about what to name case classes that provide parameters to modules. Settled on calling them [ModuleName]Params to distinguish them from config.Parameters and config.Config. So far applied mostly only to case classes defined within rocket and tile. * Defined RocketTileParams: A nested case class containing case classes for all the components of a tile (L1 caches and core). Allows all such parameters to vary per-tile. * Defined RocketCoreParams: All the parameters that can be varied per-core. * Defined L1CacheParams: A trait defining the parameters common to L1 caches, made concrete in different derived case classes. * Defined RocketTilesKey: A sequence of RocketTileParams, one for every tile to be created. * Provided HeterogeneousDualCoreConfig: An example of making a heterogeneous chip with two cores, one big and one little. * Changes to legacy code: ReplacementPolicy moved to package util. L1Metadata moved to package tile. Legacy L2 cache agent removed because it can no longer share the metadata array implementation with the L1. Legacy GroundTests on life support. Additional changes that got rolled in along the way: * rocket: Fix critical path through BTB for I$ index bits > pgIdxBits * coreplex: tiles connected via :=* * groundtest: updated to use TileParams * tilelink: cache cork requirements are relaxed to allow more cacheless masters
This commit is contained in:
@ -11,6 +11,7 @@ import uncore.coherence._
|
||||
import uncore.agents._
|
||||
import uncore.util._
|
||||
import uncore.devices.NTiles
|
||||
import tile.TileKey
|
||||
import junctions._
|
||||
import config._
|
||||
import coreplex._
|
||||
@ -18,10 +19,10 @@ import rocketchip._
|
||||
|
||||
/** Actual testing target Configs */
|
||||
|
||||
class GroundTestConfig extends Config(new WithGroundTest ++ new BaseConfig)
|
||||
class GroundTestConfig extends Config(new WithGroundTestTiles ++ new BaseConfig)
|
||||
|
||||
class ComparatorConfig extends Config(
|
||||
new WithComparator ++ new GroundTestConfig)
|
||||
new WithComparator(1) ++ new GroundTestConfig)
|
||||
class ComparatorL2Config extends Config(
|
||||
new WithAtomics ++ new WithPrefetches ++
|
||||
new WithL2Cache ++ new ComparatorConfig)
|
||||
@ -30,31 +31,32 @@ class ComparatorBufferlessConfig extends Config(
|
||||
class ComparatorStatelessConfig extends Config(
|
||||
new WithStatelessBridge ++ new ComparatorConfig)
|
||||
|
||||
class MemtestConfig extends Config(new WithMemtest ++ new GroundTestConfig)
|
||||
class MemtestConfig extends Config(new WithMemtest(1) ++ new GroundTestConfig)
|
||||
class MemtestL2Config extends Config(
|
||||
new WithL2Cache ++ new MemtestConfig)
|
||||
class MemtestBufferlessConfig extends Config(
|
||||
new WithBufferlessBroadcastHub ++ new MemtestConfig)
|
||||
class MemtestStatelessConfig extends Config(
|
||||
new WithNGenerators(0, 1) ++ new WithStatelessBridge ++ new MemtestConfig)
|
||||
new WithStatelessBridge ++ new MemtestConfig)
|
||||
// Test ALL the things
|
||||
class FancyMemtestConfig extends Config(
|
||||
new WithNGenerators(1, 2) ++ new WithNCores(2) ++ new WithMemtest ++
|
||||
new WithMemtest(2) ++
|
||||
new WithNMemoryChannels(2) ++ new WithNBanksPerMemChannel(4) ++
|
||||
new WithL2Cache ++ new GroundTestConfig)
|
||||
|
||||
class CacheFillTestConfig extends Config(
|
||||
new WithNL2Ways(4) ++ new WithL2Capacity(4) ++ new WithCacheFillTest ++ new WithL2Cache ++ new GroundTestConfig)
|
||||
new WithNL2Ways(4) ++ new WithL2Capacity(4) ++
|
||||
new WithCacheFillTest(1) ++ new WithL2Cache ++ new GroundTestConfig)
|
||||
|
||||
class BroadcastRegressionTestConfig extends Config(
|
||||
new WithBroadcastRegressionTest ++ new GroundTestConfig)
|
||||
new WithBroadcastRegressionTest(1) ++ new GroundTestConfig)
|
||||
class BufferlessRegressionTestConfig extends Config(
|
||||
new WithBufferlessBroadcastHub ++ new BroadcastRegressionTestConfig)
|
||||
class CacheRegressionTestConfig extends Config(
|
||||
new WithCacheRegressionTest ++ new WithL2Cache ++ new GroundTestConfig)
|
||||
new WithCacheRegressionTest(1) ++ new WithL2Cache ++ new GroundTestConfig)
|
||||
|
||||
class TraceGenConfig extends Config(
|
||||
new WithNCores(2) ++ new WithTraceGen ++ new GroundTestConfig)
|
||||
new WithTraceGen(2) ++ new GroundTestConfig)
|
||||
class TraceGenBufferlessConfig extends Config(
|
||||
new WithBufferlessBroadcastHub ++ new TraceGenConfig)
|
||||
class TraceGenL2Config extends Config(
|
||||
@ -72,15 +74,15 @@ class Edge32BitMemtestConfig extends Config(
|
||||
new WithEdgeDataBits(32) ++ new MemtestConfig)
|
||||
|
||||
/* Composable Configs to set individual parameters */
|
||||
class WithGroundTest extends Config((site, here, up) => {
|
||||
case FPUKey => None
|
||||
case UseAtomics => false
|
||||
case UseCompressed => false
|
||||
|
||||
class WithGroundTestTiles extends Config((site, here, up) => {
|
||||
case TileKey => site(GroundTestKey).head
|
||||
case NTiles => site(GroundTestKey).size
|
||||
})
|
||||
|
||||
class WithComparator extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(site(NTiles)) {
|
||||
GroundTestTileSettings(uncached = 2)
|
||||
class WithComparator(n: Int) extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(n) {
|
||||
GroundTestTileParams(uncached = 2, dcache = None)
|
||||
}
|
||||
case BuildGroundTest =>
|
||||
(p: Parameters) => Module(new ComparatorCore()(p))
|
||||
@ -88,23 +90,21 @@ class WithComparator extends Config((site, here, up) => {
|
||||
targets = Seq(site(ExtMem).base, testRamAddr),
|
||||
width = 8,
|
||||
operations = 1000,
|
||||
atomics = site(UseAtomics),
|
||||
atomics = false,
|
||||
prefetches = false)
|
||||
case FPUConfig => None
|
||||
case UseAtomics => false
|
||||
})
|
||||
|
||||
class WithAtomics extends Config((site, here, up) => {
|
||||
case UseAtomics => true
|
||||
case ComparatorKey => up(ComparatorKey, site).copy(atomics = true)
|
||||
})
|
||||
|
||||
class WithPrefetches extends Config((site, here, up) => {
|
||||
case ComparatorKey => up(ComparatorKey, site).copy(prefetches = true)
|
||||
})
|
||||
|
||||
class WithMemtest extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(site(NTiles)) {
|
||||
GroundTestTileSettings(1, 1)
|
||||
class WithMemtest(n: Int) extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(n) {
|
||||
GroundTestTileParams(uncached = 1)
|
||||
}
|
||||
case GeneratorKey => TrafficGeneratorParameters(
|
||||
maxRequests = 128,
|
||||
@ -113,23 +113,17 @@ class WithMemtest extends Config((site, here, up) => {
|
||||
(p: Parameters) => Module(new GeneratorTest()(p))
|
||||
})
|
||||
|
||||
class WithNGenerators(nUncached: Int, nCached: Int) extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(site(NTiles)) {
|
||||
GroundTestTileSettings(nUncached, nCached)
|
||||
}
|
||||
})
|
||||
|
||||
class WithCacheFillTest extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(site(NTiles)) {
|
||||
GroundTestTileSettings(uncached = 1)
|
||||
class WithCacheFillTest(n: Int) extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(n) {
|
||||
GroundTestTileParams(uncached = 1, dcache = None)
|
||||
}
|
||||
case BuildGroundTest =>
|
||||
(p: Parameters) => Module(new CacheFillTest()(p))
|
||||
})
|
||||
|
||||
class WithBroadcastRegressionTest extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(site(NTiles)) {
|
||||
GroundTestTileSettings(1, 1, maxXacts = 3)
|
||||
class WithBroadcastRegressionTest(n: Int) extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(n) {
|
||||
GroundTestTileParams(uncached = 1, maxXacts = 3)
|
||||
}
|
||||
case BuildGroundTest =>
|
||||
(p: Parameters) => Module(new RegressionTest()(p))
|
||||
@ -137,9 +131,9 @@ class WithBroadcastRegressionTest extends Config((site, here, up) => {
|
||||
(p: Parameters) => RegressionTests.broadcastRegressions(p)
|
||||
})
|
||||
|
||||
class WithCacheRegressionTest extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(site(NTiles)) {
|
||||
GroundTestTileSettings(1, 1, maxXacts = 5)
|
||||
class WithCacheRegressionTest(n: Int) extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(n) {
|
||||
GroundTestTileParams(uncached = 1, maxXacts = 5)
|
||||
}
|
||||
case BuildGroundTest =>
|
||||
(p: Parameters) => Module(new RegressionTest()(p))
|
||||
@ -147,9 +141,9 @@ class WithCacheRegressionTest extends Config((site, here, up) => {
|
||||
(p: Parameters) => RegressionTests.cacheRegressions(p)
|
||||
})
|
||||
|
||||
class WithTraceGen extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(site(NTiles)) {
|
||||
GroundTestTileSettings(uncached = 0, cached = 1)
|
||||
class WithTraceGen(n: Int) extends Config((site, here, up) => {
|
||||
case GroundTestKey => Seq.fill(n) {
|
||||
GroundTestTileParams(dcache = Some(DCacheParams(nSets = 16, nWays = 1)))
|
||||
}
|
||||
case BuildGroundTest =>
|
||||
(p: Parameters) => Module(new GroundTestTraceGenerator()(p))
|
||||
@ -160,11 +154,9 @@ class WithTraceGen extends Config((site, here, up) => {
|
||||
val nSets = 2
|
||||
val nWays = 1
|
||||
val blockOffset = site(CacheBlockOffsetBits)
|
||||
val nBeats = site(TLKey("L1toL2")).dataBeats
|
||||
val nBeats = site(CacheBlockBytes)/site(L1toL2Config).beatBytes
|
||||
List.tabulate(4 * nWays) { i =>
|
||||
Seq.tabulate(nBeats) { j => BigInt((j * 8) + ((i * nSets) << blockOffset)) }
|
||||
}.flatten
|
||||
}
|
||||
case UseAtomics => true
|
||||
case CacheName("L1D") => up(CacheName("L1D"), site).copy(nSets = 16, nWays = 1)
|
||||
})
|
||||
|
Reference in New Issue
Block a user