diff --git a/src/main/scala/unittest/Configs.scala b/src/main/scala/unittest/Configs.scala index 5a891c6a..4d5c628e 100644 --- a/src/main/scala/unittest/Configs.scala +++ b/src/main/scala/unittest/Configs.scala @@ -5,42 +5,19 @@ package unittest import scala.collection.mutable.LinkedHashSet import Chisel._ -import cde.{Parameters, Config, Knob, CDEMatchError} -import util.{ParameterizedBundle} -import rocket._ -import uncore.tilelink._ -import uncore.tilelink2.{LazyModule, LazyModuleImp} +import cde.{Parameters, Config, CDEMatchError} import coreplex._ import rocketchip._ -import unittest._ class WithUnitTest extends Config( (pname, site, here) => pname match { case UnitTests => (testParams: Parameters) => { - val groundtest = if (site(XLen) == 64) - DefaultTestSuites.groundtest64 - else - DefaultTestSuites.groundtest32 - TestGeneration.addSuite(groundtest("p")) + TestGeneration.addSuite(DefaultTestSuites.groundtest64("p")) // TODO why TestGeneration.addSuite(DefaultTestSuites.emptyBmarks) - JunctionsUnitTests(testParams) ++ UncoreUnitTests(testParams) + JunctionsUnitTests(testParams) ++ UncoreUnitTests(testParams) // TODO refactor } case RegressionTestNames => LinkedHashSet("rv64ui-p-simple") case _ => throw new CDEMatchError }) class UnitTestConfig extends Config(new WithUnitTest ++ new BaseConfig) - -class TestHarness(implicit val p: Parameters) extends Module { - val io = new Bundle { - val success = Bool(OUTPUT) - } - - p(NCoreplexExtClients).assign(0) - p(ConfigString).assign("") - - val l1params = p.alterPartial({ case TLId => "L1toL2" }) - val tests = Module(new UnitTestSuite()(l1params)) - - io.success := tests.io.finished -} diff --git a/src/main/scala/unittest/TestHarness.scala b/src/main/scala/unittest/TestHarness.scala new file mode 100644 index 00000000..a394e431 --- /dev/null +++ b/src/main/scala/unittest/TestHarness.scala @@ -0,0 +1,21 @@ +// See LICENSE for license details. + +package unittest + +import Chisel._ +import cde.Parameters +import rocketchip._ + +class TestHarness(implicit val p: Parameters) extends Module { + val io = new Bundle { + val success = Bool(OUTPUT) + } + + p(NCoreplexExtClients).assign(0) + p(ConfigString).assign("") + + val l1params = p.alterPartial({ case uncore.tilelink.TLId => "L1toL2" }) + val tests = Module(new UnitTestSuite()(l1params)) + + io.success := tests.io.finished +}