Merge pull request #528 from ucb-bar/firesim-scalatest
Make CI use ScalaTest for FireSim
This commit is contained in:
@@ -247,18 +247,6 @@ jobs:
|
||||
steps:
|
||||
- prepare-rtl:
|
||||
project-key: "tracegen-boom"
|
||||
prepare-firesim:
|
||||
executor: main-env
|
||||
steps:
|
||||
- prepare-rtl:
|
||||
project-key: "firesim"
|
||||
build-script: "do-firesim-build.sh"
|
||||
prepare-fireboom:
|
||||
executor: main-env
|
||||
steps:
|
||||
- prepare-rtl:
|
||||
project-key: "fireboom"
|
||||
build-script: "do-firesim-build.sh"
|
||||
prepare-chipyard-ariane:
|
||||
executor: main-env
|
||||
steps:
|
||||
@@ -279,6 +267,7 @@ jobs:
|
||||
steps:
|
||||
- run-tests:
|
||||
project-key: "chipyard-hetero"
|
||||
timeout: "15m"
|
||||
chipyard-boom-run-tests:
|
||||
executor: main-env
|
||||
steps:
|
||||
@@ -317,15 +306,24 @@ jobs:
|
||||
- run-tests:
|
||||
extra-cache-restore: "extra-tests"
|
||||
project-key: "firesim"
|
||||
run-script: "run-firesim-tests.sh"
|
||||
run-script: "run-firesim-scala-tests.sh"
|
||||
timeout: "20m"
|
||||
fireboom-run-tests:
|
||||
executor: main-env
|
||||
steps:
|
||||
- run-tests:
|
||||
extra-cache-restore: "extra-tests"
|
||||
project-key: "fireboom"
|
||||
run-script: "run-firesim-tests.sh"
|
||||
timeout: "30m"
|
||||
run-script: "run-firesim-scala-tests.sh"
|
||||
timeout: "45m"
|
||||
firesim-multiclock-run-tests:
|
||||
executor: main-env
|
||||
steps:
|
||||
- run-tests:
|
||||
extra-cache-restore: "extra-tests"
|
||||
project-key: "firesim-multiclock"
|
||||
run-script: "run-firesim-scala-tests.sh"
|
||||
timeout: "20m"
|
||||
midasexamples-run-tests:
|
||||
executor: main-env
|
||||
steps:
|
||||
@@ -428,16 +426,6 @@ workflows:
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
|
||||
- prepare-firesim:
|
||||
requires:
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
|
||||
- prepare-fireboom:
|
||||
requires:
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
|
||||
- prepare-chipyard-ariane:
|
||||
requires:
|
||||
- install-riscv-toolchain
|
||||
@@ -490,12 +478,18 @@ workflows:
|
||||
# Run the firesim tests
|
||||
- firesim-run-tests:
|
||||
requires:
|
||||
- prepare-firesim
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
- build-extra-tests
|
||||
- firesim-multiclock-run-tests:
|
||||
requires:
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
- build-extra-tests
|
||||
|
||||
- fireboom-run-tests:
|
||||
requires:
|
||||
- prepare-fireboom
|
||||
- install-riscv-toolchain
|
||||
- install-verilator
|
||||
- build-extra-tests
|
||||
|
||||
- chipyard-ariane-run-tests:
|
||||
|
||||
@@ -30,7 +30,8 @@ REMOTE_ESP_DIR=$REMOTE_WORK_DIR/esp-tools-install
|
||||
REMOTE_CHIPYARD_DIR=$REMOTE_WORK_DIR/chipyard
|
||||
REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verilator
|
||||
REMOTE_FIRESIM_DIR=$REMOTE_CHIPYARD_DIR/sims/firesim/sim
|
||||
REMOTE_JAVA_ARGS="-Xmx8G -Xss8M -Dsbt.ivy.home=$REMOTE_WORK_DIR/.ivy2 -Dsbt.global.base=$REMOTE_WORK_DIR/.sbt -Dsbt.boot.directory=$REMOTE_WORK_DIR/.sbt/boot"
|
||||
# Disable the supershell to greatly improve the readability of SBT output when captured by Circle CI
|
||||
REMOTE_JAVA_ARGS="-Xmx9G -Xss8M -Dsbt.ivy.home=$REMOTE_WORK_DIR/.ivy2 -Dsbt.supershell=false -Dsbt.global.base=$REMOTE_WORK_DIR/.sbt -Dsbt.boot.directory=$REMOTE_WORK_DIR/.sbt/boot"
|
||||
REMOTE_VERILATOR_DIR=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH-$CIRCLE_SHA1-verilator-install
|
||||
|
||||
# local variables (aka within the docker container)
|
||||
@@ -50,9 +51,9 @@ mapping["chipyard-boom"]="SUB_PROJECT=chipyard CONFIG=SmallBoomConfig"
|
||||
mapping["chipyard-blkdev"]="SUB_PROJECT=chipyard CONFIG=SimBlockDeviceRocketConfig"
|
||||
mapping["chipyard-hwacha"]="SUB_PROJECT=chipyard CONFIG=HwachaRocketConfig"
|
||||
mapping["chipyard-gemmini"]="SUB_PROJECT=chipyard CONFIG=GemminiRocketConfig"
|
||||
mapping["chipyard-ariane"]="SUB_PROJECT=chipyard CONFIG=ArianeConfig"
|
||||
mapping["tracegen"]="SUB_PROJECT=chipyard CONFIG=NonBlockingTraceGenL2Config TOP=TraceGenSystem"
|
||||
mapping["tracegen-boom"]="SUB_PROJECT=chipyard CONFIG=BoomTraceGenConfig TOP=TraceGenSystem"
|
||||
mapping["firesim"]="DESIGN=FireSim TARGET_CONFIG=WithNIC_DDR3FRFCFSLLC4MB_FireSimRocketConfig PLATFORM_CONFIG=BaseF1Config"
|
||||
mapping["fireboom"]="DESIGN=FireSim TARGET_CONFIG=WithNIC_DDR3FRFCFSLLC4MB_FireSimLargeBoomConfig PLATFORM_CONFIG=BaseF1Config"
|
||||
mapping["chipyard-ariane"]="SUB_PROJECT=chipyard CONFIG=ArianeConfig"
|
||||
mapping["fireariane"]="DESIGN=FireSim TARGET_CONFIG=WithNIC_DDR3FRFCFSLLC4MB_FireSimArianeConfig PLATFORM_CONFIG=BaseF1Config"
|
||||
mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests"
|
||||
mapping["firesim-multiclock"]="SCALA_TEST=firesim.firesim.RocketMulticlockF1Tests"
|
||||
mapping["fireboom"]="SCALA_TEST=firesim.firesim.BoomF1Tests"
|
||||
|
||||
@@ -22,7 +22,6 @@ cd $LOCAL_CHIPYARD_DIR/sims/firesim
|
||||
./scripts/build-libdwarf.sh
|
||||
cd $LOCAL_CHIPYARD_DIR
|
||||
|
||||
|
||||
# set stricthostkeychecking to no (must happen before rsync)
|
||||
run "echo \"Ping $SERVER\""
|
||||
|
||||
@@ -30,7 +29,9 @@ clean
|
||||
|
||||
# copy over riscv/esp-tools, and chipyard to remote
|
||||
run "mkdir -p $REMOTE_CHIPYARD_DIR"
|
||||
run "mkdir -p $REMOTE_RISCV_DIR"
|
||||
copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR
|
||||
copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR
|
||||
|
||||
run "cp -r ~/.ivy2 $REMOTE_WORK_DIR"
|
||||
run "cp -r ~/.sbt $REMOTE_WORK_DIR"
|
||||
@@ -38,31 +39,11 @@ run "cp -r ~/.sbt $REMOTE_WORK_DIR"
|
||||
TOOLS_DIR=$REMOTE_RISCV_DIR
|
||||
LD_LIB_DIR=$REMOTE_RISCV_DIR/lib
|
||||
|
||||
if [ $1 = "hwacha" ] || [ $1 = "gemmini" ]; then
|
||||
TOOLS_DIR=$REMOTE_ESP_DIR
|
||||
LD_LIB_DIR=$REMOTE_ESP_DIR/lib
|
||||
run "mkdir -p $REMOTE_ESP_DIR"
|
||||
copy $LOCAL_ESP_DIR/ $SERVER:$REMOTE_ESP_DIR
|
||||
else
|
||||
run "mkdir -p $REMOTE_RISCV_DIR"
|
||||
copy $LOCAL_RISCV_DIR/ $SERVER:$REMOTE_RISCV_DIR
|
||||
fi
|
||||
|
||||
# Build MIDAS-level verilator sim
|
||||
FIRESIM_VARS="${mapping[$1]}"
|
||||
run "export FIRESIM_ENV_SOURCED=1; make -C $REMOTE_FIRESIM_DIR clean"
|
||||
# Run Firesim Scala Tests
|
||||
run "export RISCV=\"$TOOLS_DIR\"; \
|
||||
export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; \
|
||||
export FIRESIM_ENV_SOURCED=1; \
|
||||
export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \
|
||||
export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \
|
||||
export FIRESIM_ENV_SOURCED=1; \
|
||||
make -C $REMOTE_FIRESIM_DIR JAVA_ARGS=\"$REMOTE_JAVA_ARGS\" $FIRESIM_VARS verilator"
|
||||
run "rm -rf $REMOTE_CHIPYARD_DIR/project"
|
||||
|
||||
# copy back the final build
|
||||
mkdir -p $LOCAL_CHIPYARD_DIR
|
||||
copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR
|
||||
|
||||
# Fix dramsim2_ini symlink
|
||||
export $FIRESIM_VARS
|
||||
ln -sf $LOCAL_FIRESIM_DIR/midas/src/main/resources/dramsim2_ini $LOCAL_FIRESIM_DIR/generated-src/f1/${DESIGN}-${TARGET_CONFIG}-${PLATFORM_CONFIG}/dramsim2_ini
|
||||
make -C $REMOTE_FIRESIM_DIR JAVA_ARGS=\"$REMOTE_JAVA_ARGS\" testOnly ${mapping[$1]}"
|
||||
@@ -1,29 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# turn echo on and error on earliest command
|
||||
set -ex
|
||||
|
||||
# get remote exec variables
|
||||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
|
||||
source $SCRIPT_DIR/defaults.sh
|
||||
|
||||
export FIRESIM_ENV_SOURCED=1
|
||||
|
||||
SIMULATION_ARGS="${mapping[$1]}"
|
||||
|
||||
cd $LOCAL_CHIPYARD_DIR/sims/firesim
|
||||
./scripts/build-libelf.sh
|
||||
./scripts/build-libdwarf.sh
|
||||
cd $LOCAL_CHIPYARD_DIR
|
||||
|
||||
|
||||
run_test_suite () {
|
||||
export RISCV=$LOCAL_RISCV_DIR
|
||||
export LD_LIBRARY_PATH=$LOCAL_RISCV_DIR/lib
|
||||
make -C $LOCAL_FIRESIM_DIR $SIMULATION_ARGS run-${1}-tests-fast
|
||||
}
|
||||
|
||||
|
||||
run_test_suite bmark
|
||||
run_test_suite nic
|
||||
run_test_suite blockdev
|
||||
Submodule generators/ariane updated: 621201b1d5...f4ba64a624
@@ -141,6 +141,9 @@ class BoomF1Tests extends FireSimTestSuite("FireSim", "DDR3FRFCFSLLC4MB_FireSimL
|
||||
class RocketNICF1Tests extends FireSimTestSuite("FireSim", "WithNIC_DDR3FRFCFSLLC4MB_FireSimRocketConfig", "BaseF1Config") {
|
||||
runSuite("verilator")(NICLoopbackTests)
|
||||
}
|
||||
class ArianeF1Tests extends FireSimTestSuite("FireSim", "WithNIC_DDR3FRFCFSLLC4MB_FireSimArianeConfig", "BaseF1Config") {
|
||||
runSuite("verilator")(NICLoopbackTests)
|
||||
}
|
||||
// Disabled until RAM optimizations re-enabled in multiclock
|
||||
//class RamModelRocketF1Tests extends FireSimTestSuite("FireSim", "FireSimDualRocketConfig", "BaseF1Config_MCRams")
|
||||
//class RamModelBoomF1Tests extends FireSimTestSuite("FireSim", "FireSimBoomConfig", "BaseF1Config_MCRams")
|
||||
|
||||
Submodule sims/firesim updated: f82e115c66...d5d4f4d6f8
Reference in New Issue
Block a user