basic working example of checking for hwacha
This commit is contained in:
@@ -1,10 +1,15 @@
|
|||||||
package example
|
package example
|
||||||
|
|
||||||
|
import scala.util.control.Exception
|
||||||
|
|
||||||
import chisel3._
|
import chisel3._
|
||||||
|
|
||||||
import freechips.rocketchip.config.{Parameters}
|
import freechips.rocketchip.config.{Parameters}
|
||||||
import freechips.rocketchip.util.{GeneratorApp}
|
import freechips.rocketchip.util.{GeneratorApp}
|
||||||
import utilities.TestSuiteHelper
|
import freechips.rocketchip.tile.{BuildRoCC}
|
||||||
|
import freechips.rocketchip.system.{TestGeneration}
|
||||||
|
|
||||||
|
import utilities.{TestSuiteHelper}
|
||||||
|
|
||||||
object Generator extends GeneratorApp {
|
object Generator extends GeneratorApp {
|
||||||
// add unique test suites
|
// add unique test suites
|
||||||
@@ -12,14 +17,28 @@ object Generator extends GeneratorApp {
|
|||||||
implicit val p: Parameters = params
|
implicit val p: Parameters = params
|
||||||
TestSuiteHelper.addRocketTestSuites
|
TestSuiteHelper.addRocketTestSuites
|
||||||
TestSuiteHelper.addBoomTestSuites
|
TestSuiteHelper.addBoomTestSuites
|
||||||
|
|
||||||
|
// if hwacha parameter exists then generate its tests
|
||||||
|
// TODO: find a more elegant way to do this
|
||||||
|
Exception.ignoring(classOf[java.lang.IllegalArgumentException]){
|
||||||
|
if (p(hwacha.HwachaIcacheKey) != null) {
|
||||||
|
// add hwacha bmarks + asm tests
|
||||||
|
import hwacha.HwachaTestSuites._
|
||||||
|
TestGeneration.addSuites(rv64uv.map(_("p")))
|
||||||
|
TestGeneration.addSuites(rv64uv.map(_("vp")))
|
||||||
|
TestGeneration.addSuite(rv64sv("p"))
|
||||||
|
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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user