[WIP] Move RocketTestSuite generation into RocketchipGenerator
This commit is contained in:
@ -4,37 +4,32 @@ package unittest
|
||||
|
||||
import Chisel._
|
||||
import cde.{Parameters, Config, CDEMatchError}
|
||||
import coreplex.{TestGeneration, DefaultTestSuites}
|
||||
import rocketchip.BaseConfig
|
||||
import rocketchip.{BaseConfig, BasePlatformConfig}
|
||||
|
||||
class WithJunctionsUnitTests extends Config(
|
||||
(pname, site, here) => pname match {
|
||||
case UnitTests => (p: Parameters) => {
|
||||
TestGeneration.addSuite(DefaultTestSuites.groundtest64("p")) // TODO why
|
||||
TestGeneration.addSuite(DefaultTestSuites.emptyBmarks)
|
||||
Seq(
|
||||
Module(new junctions.MultiWidthFifoTest),
|
||||
Module(new junctions.NastiMemoryDemuxTest()(p)),
|
||||
Module(new junctions.HastiTest()(p)))
|
||||
}
|
||||
case junctions.PAddrBits => 32
|
||||
case rocket.XLen => 64
|
||||
case UnitTests => (p: Parameters) => Seq(
|
||||
Module(new junctions.MultiWidthFifoTest),
|
||||
Module(new junctions.NastiMemoryDemuxTest()(p)),
|
||||
Module(new junctions.HastiTest()(p)))
|
||||
case _ => throw new CDEMatchError
|
||||
})
|
||||
|
||||
class JunctionsUnitTestConfig extends Config(new WithJunctionsUnitTests ++ new BasePlatformConfig)
|
||||
|
||||
class WithUncoreUnitTests extends Config(
|
||||
(pname, site, here) => pname match {
|
||||
case rocketchip.NCoreplexExtClients => 0
|
||||
case uncore.tilelink.TLId => "L1toL2"
|
||||
case UnitTests => (p: Parameters) => {
|
||||
TestGeneration.addSuite(DefaultTestSuites.groundtest64("p")) // TODO why
|
||||
TestGeneration.addSuite(DefaultTestSuites.emptyBmarks)
|
||||
Seq(
|
||||
Module(new uncore.devices.ROMSlaveTest()(p)),
|
||||
Module(new uncore.devices.TileLinkRAMTest()(p)),
|
||||
Module(new uncore.tilelink2.TLFuzzRAMTest)
|
||||
)
|
||||
}
|
||||
case UnitTests => (p: Parameters) => Seq(
|
||||
Module(new uncore.devices.ROMSlaveTest()(p)),
|
||||
Module(new uncore.devices.TileLinkRAMTest()(p)),
|
||||
Module(new uncore.tilelink2.TLFuzzRAMTest))
|
||||
case _ => throw new CDEMatchError
|
||||
}
|
||||
)
|
||||
|
||||
class UnitTestConfig extends Config(new WithUncoreUnitTests ++ new WithJunctionsUnitTests ++ new BaseConfig)
|
||||
class UncoreUnitTestConfig extends Config(new WithUncoreUnitTests ++ new BaseConfig)
|
||||
|
||||
|
Reference in New Issue
Block a user