1
0

Memtest configs should not have a hex file loaded

This commit is contained in:
Colin Schmidt 2016-02-22 12:49:26 -08:00
parent 43c2237ef7
commit 4ce603e548
2 changed files with 33 additions and 2 deletions

View File

@ -25,8 +25,8 @@ class WithGroundTest extends Config(
maxManagerXacts = site(NAcquireTransactors) + 2,
dataBits = site(CacheBlockBytes)*8)
case BuildTiles => {
TestGeneration.addSuite(new AssemblyTestSuite("rv64ui", "rv64ui", LinkedHashSet("add"))("p"))
TestGeneration.addSuite(new BenchmarkTestSuite("basic", "$(base_dir)/riscv-tools/riscv-tests/benchmarks", LinkedHashSet("vvadd")))
TestGeneration.addSuite(new AssemblyUnitTestSuite)
TestGeneration.addSuite(new BenchmarkUnitTestSuite)
(0 until site(NTiles)).map { i =>
(r: Bool, p: Parameters) =>
Module(new GroundTestTile(i, r)

View File

@ -29,6 +29,25 @@ run-$makeTargetName-debug: $$(addprefix $$(output_dir)/, $$(addsuffix .vpd, $$($
"""
}
trait UnitTest extends RocketTestSuite {
override def postScript = s"""
$$(addprefix $$(output_dir)/, $$(addsuffix .hex, $$($makeTargetName))):
\tmkdir -p $$(output_dir)
\ttouch $$@
$$(addprefix $$(output_dir)/, $$($makeTargetName)):
\tmkdir -p $$(output_dir)
\ttouch $$@
run-$makeTargetName: $$(addprefix $$(output_dir)/, $$(addsuffix .out, $$($makeTargetName)))
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if /\\*{3}(.{8})\\*{3}(.*)/' $$^; echo;
run-$makeTargetName-debug: $$(addprefix $$(output_dir)/, $$(addsuffix .vpd, $$($makeTargetName)))
\t@echo; perl -ne 'print " [$$$$1] $$$$ARGV \\t$$$$2\\n" if /\\*{3}(.{8})\\*{3}(.*)/' $$(patsubst %.vpd,%.out,$$^); echo;
"""
}
class AssemblyTestSuite(makePrefix: String, toolsPrefix: String, val names: LinkedHashSet[String])(envName: String) extends RocketTestSuite {
val dir = "$(base_dir)/riscv-tools/riscv-tests/isa"
val makeTargetName = makePrefix + "-" + envName + "-asm-tests"
@ -40,6 +59,18 @@ class BenchmarkTestSuite(makePrefix: String, val dir: String, val names: LinkedH
override def toString = s"$makeTargetName = \\\n" + names.map(n => s"\t$n.riscv").mkString(" \\\n") + postScript
}
class AssemblyUnitTestSuite extends AssemblyTestSuite("","",LinkedHashSet())("") with UnitTest {
override val dir = ""
override val names = LinkedHashSet[String]()
override val makeTargetName = "unit-test"
override def toString = s"$makeTargetName = unit-test\\\n" + postScript
}
class BenchmarkUnitTestSuite extends BenchmarkTestSuite("", "", LinkedHashSet()) with UnitTest {
override val makeTargetName = "unit-bmark-tests"
override def toString = s"$makeTargetName = unit-test\\\n" + postScript
}
object TestGeneration extends FileSystemUtilities{
import scala.collection.mutable.HashMap
val asmSuites = new HashMap[String,AssemblyTestSuite]()