cleaner test for hwacha param

This commit is contained in:
abejgonzalez
2019-10-13 08:37:38 -07:00
parent a3b2d40d08
commit d6bcf2870f

View File

@@ -1,6 +1,6 @@
package example package example
import scala.util.control.Exception import scala.util.Try
import chisel3._ import chisel3._
@@ -19,26 +19,24 @@ object Generator extends GeneratorApp {
TestSuiteHelper.addBoomTestSuites TestSuiteHelper.addBoomTestSuites
// if hwacha parameter exists then generate its tests // if hwacha parameter exists then generate its tests
// TODO: find a more elegant way to do this // TODO: find a more elegant way to do this. either through
Exception.ignoring(classOf[java.lang.IllegalArgumentException]){ // trying to disambiguate BuildRoCC, having a AccelParamsKey,
if (p(hwacha.HwachaIcacheKey) != null) { // or having the Accelerator/Tile add its own tests
// add hwacha bmarks + asm tests
import hwacha.HwachaTestSuites._ import hwacha.HwachaTestSuites._
if (Try(p(hwacha.HwachaNLanes)).getOrElse(0) > 0) {
TestGeneration.addSuites(rv64uv.map(_("p"))) TestGeneration.addSuites(rv64uv.map(_("p")))
TestGeneration.addSuites(rv64uv.map(_("vp"))) TestGeneration.addSuites(rv64uv.map(_("vp")))
TestGeneration.addSuite(rv64sv("p")) TestGeneration.addSuite(rv64sv("p"))
TestGeneration.addSuite(hwachaBmarks) TestGeneration.addSuite(hwachaBmarks)
} }
} }
}
// specify the name that the generator outputs files as // specify the name that the generator outputs files as
val longName = names.topModuleProject + "." + names.topModuleClass + "." + names.configs val longName = names.topModuleProject + "." + names.topModuleClass + "." + names.configs
// generate files // generate files
generateTestSuiteMakefrags
generateFirrtl generateFirrtl
generateAnno generateAnno
//generateTestSuiteMakefrags generateTestSuiteMakefrags
generateArtefacts generateArtefacts
} }