1
0

make list of unit tests a a parameter

This commit is contained in:
Howard Mao 2016-07-14 12:28:20 -07:00
parent 69eebaf362
commit 1c2bf6e938

View File

@ -8,7 +8,7 @@ import uncore.converters._
import uncore.constants._ import uncore.constants._
import uncore.devices._ import uncore.devices._
import groundtest.common._ import groundtest.common._
import cde.Parameters import cde.{Field, Parameters}
abstract class UnitTest extends Module { abstract class UnitTest extends Module {
val io = new Bundle { val io = new Bundle {
@ -95,13 +95,10 @@ class MemoryTestDriver(name: String, dataWidth: Int, burstLen: Int, nBursts: Int
s"MemoryTestDriver for $name timed out") s"MemoryTestDriver for $name timed out")
} }
case object UnitTests extends Field[Parameters => Seq[UnitTest]]
class UnitTestSuite(implicit p: Parameters) extends GroundTest()(p) { class UnitTestSuite(implicit p: Parameters) extends GroundTest()(p) {
val tests = Seq( val tests = p(UnitTests)(p)
Module(new MultiWidthFifoTest),
Module(new TileLinkToSmiConverterTest),
Module(new AtosConverterTest),
Module(new NastiMemoryDemuxTest),
Module(new HastiTest))
val s_idle :: s_start :: s_wait :: Nil = Enum(Bits(), 3) val s_idle :: s_start :: s_wait :: Nil = Enum(Bits(), 3)
val state = Reg(init = s_idle) val state = Reg(init = s_idle)