1
0
rocket-chip/src/main/scala/unittest/Configs.scala

41 lines
1.3 KiB
Scala
Raw Normal View History

// See LICENSE for license details.
package unittest
import Chisel._
import cde.{Parameters, Config, CDEMatchError}
2016-09-22 02:40:39 +02:00
import coreplex.{TestGeneration, DefaultTestSuites}
import rocketchip.BaseConfig
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 _ => throw new CDEMatchError
})
class WithUncoreUnitTests extends Config(
(pname, site, here) => pname match {
2016-09-22 02:40:39 +02:00
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)),
2016-09-22 02:11:57 +02:00
Module(new uncore.tilelink2.TLFuzzRAMTest)
)
}
case _ => throw new CDEMatchError
2016-09-22 02:11:57 +02:00
}
)
class UnitTestConfig extends Config(new WithUncoreUnitTests ++ new WithJunctionsUnitTests ++ new BaseConfig)