diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh index 855ca4a586..eff2941ddb 100755 --- a/.circleci/defaults.sh +++ b/.circleci/defaults.sh @@ -46,7 +46,7 @@ mapping["boomrocketexample"]="SUB_PROJECT=example CONFIG=LargeBoomAndRocketConfi mapping["boom"]="SUB_PROJECT=example CONFIG=SmallBoomConfig" mapping["rocketchip"]="SUB_PROJECT=rocketchip" mapping["blockdevrocketchip"]="SUB_PROJECT=example CONFIG=SimBlockDeviceRocketConfig TOP=TopWithBlockDevice" -mapping["hwacha"]="SUB_PROJECT=example CONFIG=HwachaRocketConfig GENERATOR_PACKAGE=hwacha" +mapping["hwacha"]="SUB_PROJECT=example CONFIG=HwachaRocketConfig" mapping["firesim"]="DESIGN=FireSim TARGET_CONFIG=DDR3FRFCFSLLC4MB_FireSimRocketChipConfig PLATFORM_CONFIG=BaseF1Config" mapping["fireboom"]="DESIGN=FireSim TARGET_CONFIG=DDR3FRFCFSLLC4MB_FireSimBoomConfig PLATFORM_CONFIG=BaseF1Config" mapping["firesim-clockdiv"]="DESIGN=FireSim TARGET_CONFIG=DDR3FRFCFSLLC4MB3Div_FireSimRocketChipConfig PLATFORM_CONFIG=BaseF1Config" diff --git a/generators/example/src/main/scala/Generator.scala b/generators/example/src/main/scala/Generator.scala index f164b481e7..7c6b5168b1 100644 --- a/generators/example/src/main/scala/Generator.scala +++ b/generators/example/src/main/scala/Generator.scala @@ -1,10 +1,14 @@ package example +import scala.util.Try + import chisel3._ import freechips.rocketchip.config.{Parameters} import freechips.rocketchip.util.{GeneratorApp} -import utilities.TestSuiteHelper +import freechips.rocketchip.system.{TestGeneration} + +import utilities.{TestSuiteHelper} object Generator extends GeneratorApp { // add unique test suites @@ -12,6 +16,18 @@ object Generator extends GeneratorApp { implicit val p: Parameters = params TestSuiteHelper.addRocketTestSuites TestSuiteHelper.addBoomTestSuites + + // if hwacha parameter exists then generate its tests + // TODO: find a more elegant way to do this. either through + // trying to disambiguate BuildRoCC, having a AccelParamsKey, + // or having the Accelerator/Tile add its own tests + import hwacha.HwachaTestSuites._ + if (Try(p(hwacha.HwachaNLanes)).getOrElse(0) > 0) { + 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