From e1292fdfa86f2164bd68327e1d0e80fd0e616988 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Sun, 12 May 2019 13:11:06 -0700 Subject: [PATCH] revert to smaller boom config and support in ci --- .circleci/config.yml | 2 +- .circleci/do-rtl-build.sh | 18 ++++++++++++++++-- .../example/src/main/scala/Configs.scala | 8 ++++++++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4a1d063b..c9d75d98 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -153,7 +153,7 @@ jobs: - run: name: Building the boomexample subproject using Verilator - command: .circleci/do-rtl-build.sh boomexample + command: .circleci/do-rtl-build.sh boomexample SmallDefaultBoomConfig no_output_timeout: 120m - save_cache: diff --git a/.circleci/do-rtl-build.sh b/.circleci/do-rtl-build.sh index 02d02984..e7056e53 100755 --- a/.circleci/do-rtl-build.sh +++ b/.circleci/do-rtl-build.sh @@ -1,6 +1,8 @@ #!/bin/bash -# create the different verilator builds arg (subproject) +# create the different verilator builds +# 1st argument is the subproject +# 2nd argument is the config (can be unspecified) # turn echo on and error on earliest command set -ex @@ -12,6 +14,18 @@ cd $HOME/project # enter the verisim directory and build the specific config cd sims/verisim make clean -make SUB_PROJECT=$1 JAVA_ARGS="-Xmx2G -Xss8M" + +# run the particular build command +if [ $# -ne 0 ]; then + if [ $# -eq 1 ]; then + make SUB_PROJECT=$1 JAVA_ARGS="-Xmx2G -Xss8M" + elif [ $# -eq 2 ]; then + make SUB_PROJECT=$1 CONFIG=$2 JAVA_ARGS="-Xmx2G -Xss8M" + else + exit 1 # wrong amount of args + fi +else + exit 1 # need to provide at least the arg +fi rm -rf ../../project diff --git a/generators/example/src/main/scala/Configs.scala b/generators/example/src/main/scala/Configs.scala index 4b6f1dcb..dc0a07ba 100644 --- a/generators/example/src/main/scala/Configs.scala +++ b/generators/example/src/main/scala/Configs.scala @@ -68,10 +68,18 @@ class BaseBoomConfig extends Config( new WithBootROM ++ new boom.system.BoomConfig) +class SmallBaseBoomConfig extends Config( + new WithBootROM ++ + new boom.system.SmallBoomConfig) + class DefaultBoomConfig extends Config( new WithNormalBoomTop ++ new BaseBoomConfig) +class SmallDefaultBoomConfig extends Config( + new WithNormalBoomTop ++ + new SmallBaseBoomConfig) + class HwachaBoomConfig extends Config( new hwacha.DefaultHwachaConfig ++ new DefaultBoomConfig)