2015-12-06 12:01:05 +01:00
|
|
|
package rocketchip
|
|
|
|
|
|
|
|
import Chisel._
|
|
|
|
import groundtest._
|
|
|
|
import rocket._
|
2016-06-28 22:16:48 +02:00
|
|
|
import uncore.tilelink._
|
|
|
|
import uncore.coherence._
|
|
|
|
import uncore.agents._
|
|
|
|
import uncore.devices.NTiles
|
2016-08-02 01:05:24 +02:00
|
|
|
import uncore.unittests._
|
2016-01-07 06:38:35 +01:00
|
|
|
import junctions._
|
2016-08-02 01:05:24 +02:00
|
|
|
import junctions.unittests._
|
2016-02-22 18:07:26 +01:00
|
|
|
import scala.collection.mutable.LinkedHashSet
|
2016-04-22 04:37:08 +02:00
|
|
|
import cde.{Parameters, Config, Dump, Knob, CDEMatchError}
|
2015-12-06 12:01:05 +01:00
|
|
|
import scala.math.max
|
2016-08-11 02:20:00 +02:00
|
|
|
import coreplex._
|
2016-03-16 22:21:47 +01:00
|
|
|
import ConfigUtils._
|
2015-12-06 12:01:05 +01:00
|
|
|
|
2016-02-19 22:30:20 +01:00
|
|
|
class WithUnitTest extends Config(
|
|
|
|
(pname, site, here) => pname match {
|
2016-08-10 20:26:14 +02:00
|
|
|
case BuildCoreplex => {
|
2016-08-02 01:05:24 +02:00
|
|
|
val groundtest = if (site(XLen) == 64)
|
|
|
|
DefaultTestSuites.groundtest64
|
|
|
|
else
|
|
|
|
DefaultTestSuites.groundtest32
|
|
|
|
TestGeneration.addSuite(groundtest("p"))
|
|
|
|
TestGeneration.addSuite(DefaultTestSuites.emptyBmarks)
|
2016-08-10 20:26:14 +02:00
|
|
|
(p: Parameters) => Module(new UnitTestCoreplex(p))
|
2016-07-14 21:19:10 +02:00
|
|
|
}
|
2016-08-02 01:05:24 +02:00
|
|
|
case UnitTests => (testParams: Parameters) =>
|
|
|
|
JunctionsUnitTests(testParams) ++ UncoreUnitTests(testParams)
|
|
|
|
case NMemoryChannels => Dump("N_MEM_CHANNELS", 0)
|
|
|
|
case UseFPU => false
|
|
|
|
case UseAtomics => false
|
|
|
|
case UseCompressed => false
|
2016-08-02 04:07:03 +02:00
|
|
|
case RegressionTestNames => LinkedHashSet("rv64ui-p-simple")
|
2016-06-08 01:13:01 +02:00
|
|
|
case _ => throw new CDEMatchError
|
2016-02-19 22:30:20 +01:00
|
|
|
})
|
|
|
|
|
2016-07-06 02:42:57 +02:00
|
|
|
class GroundTestConfig extends Config(new WithGroundTest ++ new BaseConfig)
|
|
|
|
|
2016-08-04 01:33:30 +02:00
|
|
|
class ComparatorConfig extends Config(
|
|
|
|
new WithTestRAM ++ new WithComparator ++ new GroundTestConfig)
|
2016-06-14 01:24:01 +02:00
|
|
|
class ComparatorL2Config extends Config(
|
|
|
|
new WithAtomics ++ new WithPrefetches ++
|
|
|
|
new WithL2Cache ++ new ComparatorConfig)
|
2016-07-05 02:07:58 +02:00
|
|
|
class ComparatorBufferlessConfig extends Config(
|
|
|
|
new WithBufferlessBroadcastHub ++ new ComparatorConfig)
|
2016-07-22 03:33:46 +02:00
|
|
|
class ComparatorStatelessConfig extends Config(
|
|
|
|
new WithStatelessBridge ++ new ComparatorConfig)
|
2016-07-06 02:42:57 +02:00
|
|
|
|
2015-12-06 12:01:05 +01:00
|
|
|
class MemtestConfig extends Config(new WithMemtest ++ new GroundTestConfig)
|
|
|
|
class MemtestL2Config extends Config(
|
2016-07-22 03:33:46 +02:00
|
|
|
new WithL2Cache ++ new MemtestConfig)
|
2016-07-05 02:07:58 +02:00
|
|
|
class MemtestBufferlessConfig extends Config(
|
2016-07-22 03:33:46 +02:00
|
|
|
new WithBufferlessBroadcastHub ++ new MemtestConfig)
|
|
|
|
class MemtestStatelessConfig extends Config(
|
|
|
|
new WithNGenerators(0, 1) ++ new WithStatelessBridge ++ new MemtestConfig)
|
2016-07-06 02:42:57 +02:00
|
|
|
// Test ALL the things
|
|
|
|
class FancyMemtestConfig extends Config(
|
2016-07-08 20:40:16 +02:00
|
|
|
new WithNGenerators(1, 2) ++ new WithNCores(2) ++ new WithMemtest ++
|
2016-07-06 02:42:57 +02:00
|
|
|
new WithNMemoryChannels(2) ++ new WithNBanksPerMemChannel(4) ++
|
|
|
|
new WithSplitL2Metadata ++ new WithL2Cache ++ new GroundTestConfig)
|
|
|
|
|
2015-12-06 12:01:05 +01:00
|
|
|
class CacheFillTestConfig extends Config(
|
2016-05-03 22:39:04 +02:00
|
|
|
new WithCacheFillTest ++ new WithPLRU ++ new WithL2Cache ++ new GroundTestConfig)
|
2016-07-06 02:42:57 +02:00
|
|
|
|
2015-12-15 05:01:22 +01:00
|
|
|
class BroadcastRegressionTestConfig extends Config(
|
|
|
|
new WithBroadcastRegressionTest ++ new GroundTestConfig)
|
2016-07-05 02:07:58 +02:00
|
|
|
class BufferlessRegressionTestConfig extends Config(
|
|
|
|
new WithBufferlessBroadcastHub ++ new BroadcastRegressionTestConfig)
|
2015-12-15 05:01:22 +01:00
|
|
|
class CacheRegressionTestConfig extends Config(
|
|
|
|
new WithCacheRegressionTest ++ new WithL2Cache ++ new GroundTestConfig)
|
2016-07-06 02:42:57 +02:00
|
|
|
|
2016-02-10 20:12:39 +01:00
|
|
|
class NastiConverterTestConfig extends Config(new WithNastiConverterTest ++ new GroundTestConfig)
|
2016-07-08 22:40:52 +02:00
|
|
|
class FancyNastiConverterTestConfig extends Config(
|
|
|
|
new WithNCores(2) ++ new WithNastiConverterTest ++
|
|
|
|
new WithNMemoryChannels(2) ++ new WithNBanksPerMemChannel(4) ++
|
|
|
|
new WithL2Cache ++ new GroundTestConfig)
|
|
|
|
|
2016-08-02 01:05:24 +02:00
|
|
|
class UnitTestConfig extends Config(new WithUnitTest ++ new BaseConfig)
|
2015-12-06 12:01:05 +01:00
|
|
|
|
2016-07-06 02:42:57 +02:00
|
|
|
class TraceGenConfig extends Config(
|
|
|
|
new WithNCores(2) ++ new WithTraceGen ++ new GroundTestConfig)
|
|
|
|
class TraceGenBufferlessConfig extends Config(
|
|
|
|
new WithBufferlessBroadcastHub ++ new TraceGenConfig)
|
|
|
|
class TraceGenL2Config extends Config(
|
2016-07-26 21:43:08 +02:00
|
|
|
new WithNL2Ways(1) ++ new WithL2Capacity(32 * 64 / 1024) ++
|
2016-07-06 02:42:57 +02:00
|
|
|
new WithL2Cache ++ new TraceGenConfig)
|
2016-07-01 03:20:43 +02:00
|
|
|
|
|
|
|
class MIF128BitComparatorConfig extends Config(
|
|
|
|
new WithMIFDataBits(128) ++ new ComparatorConfig)
|
2016-07-02 03:13:33 +02:00
|
|
|
class MIF128BitMemtestConfig extends Config(
|
|
|
|
new WithMIFDataBits(128) ++ new MemtestConfig)
|
|
|
|
|
|
|
|
class MIF32BitComparatorConfig extends Config(
|
|
|
|
new WithMIFDataBits(32) ++ new ComparatorConfig)
|
|
|
|
class MIF32BitMemtestConfig extends Config(
|
|
|
|
new WithMIFDataBits(32) ++ new MemtestConfig)
|
2016-07-08 22:40:52 +02:00
|
|
|
|
|
|
|
class PCIeMockupTestConfig extends Config(
|
|
|
|
new WithPCIeMockupTest ++ new GroundTestConfig)
|
2016-07-09 02:56:28 +02:00
|
|
|
|
2016-07-12 02:50:56 +02:00
|
|
|
class WithDirectGroundTest extends Config(
|
|
|
|
(pname, site, here) => pname match {
|
2016-08-11 02:20:00 +02:00
|
|
|
case ExportGroundTestStatus => true
|
|
|
|
case BuildCoreplex => (p: Parameters) => Module(new DirectGroundTestCoreplex(p))
|
|
|
|
case ExtraCoreplexPorts => (p: Parameters) =>
|
|
|
|
if (p(ExportGroundTestStatus)) new GroundTestStatus else new Bundle
|
|
|
|
case ExtraTopPorts => (p: Parameters) =>
|
|
|
|
if (p(ExportGroundTestStatus)) new GroundTestStatus else new Bundle
|
2016-07-12 02:50:56 +02:00
|
|
|
case TLKey("Outermost") => site(TLKey("L2toMC")).copy(
|
|
|
|
maxClientXacts = site(GroundTestKey)(0).maxXacts,
|
|
|
|
maxClientsPerPort = site(NBanksPerMemoryChannel),
|
|
|
|
dataBeats = site(MIFDataBeats))
|
|
|
|
case NBanksPerMemoryChannel => site(GroundTestKey)(0).uncached
|
|
|
|
case _ => throw new CDEMatchError
|
|
|
|
})
|
|
|
|
|
|
|
|
class DirectGroundTestConfig extends Config(
|
|
|
|
new WithDirectGroundTest ++ new GroundTestConfig)
|
2016-07-09 02:56:28 +02:00
|
|
|
class DirectMemtestConfig extends Config(
|
2016-07-12 02:50:56 +02:00
|
|
|
new WithDirectMemtest ++ new DirectGroundTestConfig)
|
2016-07-11 21:10:27 +02:00
|
|
|
class DirectComparatorConfig extends Config(
|
2016-07-12 02:50:56 +02:00
|
|
|
new WithDirectComparator ++ new DirectGroundTestConfig)
|
2016-07-11 21:17:29 +02:00
|
|
|
|
|
|
|
class DirectMemtestFPGAConfig extends Config(
|
|
|
|
new FPGAConfig ++ new DirectMemtestConfig)
|
|
|
|
class DirectComparatorFPGAConfig extends Config(
|
|
|
|
new FPGAConfig ++ new DirectComparatorConfig)
|