From 60ba6357a0e6ba9aacc4369395d1fbcf66a88639 Mon Sep 17 00:00:00 2001 From: chick Date: Fri, 1 Oct 2021 14:31:02 -0700 Subject: [PATCH 01/24] Move Chipyard CI to Github Actions - As similar as possible to the circle ci code. - The `.github/README.md` file has a fair amount of documentation for this. - Creates a worfklow file - re-uses most of the circleci/scipts unchanged - defines a number of *Composite Actions* which are like YML subroutines - Removes the circle-ci code - Points the CI badge in the top level README to use the GA test result --- .circleci/README.md | 75 - .circleci/build-extra-tests.sh | 11 - .circleci/build-toolchains.sh | 18 - .circleci/check-commit.sh | 152 -- .circleci/clean-old-files.sh | 29 - .circleci/create-hash.sh | 23 - .circleci/defaults.sh | 90 -- .circleci/run-tests.sh | 117 -- .github/README.md | 137 ++ .github/actions/build-extra-tests/action.yml | 28 + .github/actions/prepare-rtl/action.yml | 25 + .github/actions/run-tests/action.yml | 18 + .github/actions/toolchain-build/action.yml | 31 + .github/scripts/build-extra-tests.sh | 4 - .github/scripts/build-toolchains.sh | 3 - .github/scripts/check-commit.sh | 1 + .github/scripts/create-hash.sh | 2 +- .github/scripts/defaults.sh | 32 +- .../scripts}/do-rtl-build.sh | 1 + .../scripts}/install-verilator.sh | 2 +- .../scripts}/run-firesim-scala-tests.sh | 0 .github/scripts/run-tests.sh | 40 +- .../workflows/chipyard-rocket-run-tests.yml | 1285 +++++++++++++++++ 23 files changed, 1571 insertions(+), 553 deletions(-) delete mode 100644 .circleci/README.md delete mode 100755 .circleci/build-extra-tests.sh delete mode 100755 .circleci/build-toolchains.sh delete mode 100755 .circleci/check-commit.sh delete mode 100755 .circleci/clean-old-files.sh delete mode 100755 .circleci/create-hash.sh delete mode 100755 .circleci/defaults.sh delete mode 100755 .circleci/run-tests.sh create mode 100644 .github/README.md create mode 100644 .github/actions/build-extra-tests/action.yml rename {.circleci => .github/scripts}/do-rtl-build.sh (99%) rename {.circleci => .github/scripts}/install-verilator.sh (90%) rename {.circleci => .github/scripts}/run-firesim-scala-tests.sh (100%) create mode 100644 .github/workflows/chipyard-rocket-run-tests.yml diff --git a/.circleci/README.md b/.circleci/README.md deleted file mode 100644 index 0c53405d..00000000 --- a/.circleci/README.md +++ /dev/null @@ -1,75 +0,0 @@ -Chipyard CI -=========== - -Website: https://circleci.com/gh/ucb-bar/chipyard - -CircleCI Brief Explanation ---------------------------- - -CircleCI is controlled by the `config.yml` script. -It consists of a *workflow* which has a series of *jobs* within it that do particular tasks. -All jobs in the workflow must pass for the CI run to be successful. - -At the bottom of the `config.yml` there is a `workflows:` section that specifies the order in which the jobs of the workflow should run. -For example: - - - prepare-rocketchip: - requires: - - install-riscv-toolchain - -This specifies that the `prepare-rocketchip` job needs the `install-riscv-toolchain` steps to run before it can run. - -All jobs in the CI workflow are specified at the top of `config.yml` -They specify a docker image to use (in this case a riscv-boom image since that is already available and works nicely) and an environment. -Finally, in the `steps:` section, the steps are run sequentially and state persists throughout a job. -So when you run something like `checkout` the next step has the checked out code. -Caching in the job is done by giving a file to cache on. -`restore_cache:` loads the cache into the environment if the key matches while `save_cache:` writes to the cache with the key IF IT IS NOT PRESENT. -Note, if the cache is already present for that key, the write to it is ignored. -Here the key is built from a string where the `checksum` portion converts the file given into a hash. - -.circleci directory -------------------- - -This directory contains all the collateral for the Chipyard CI to work. -The following is included: - - `build-toolchains.sh` # build either riscv-tools or esp-tools - `create-hash.sh` # create hashes of riscv-tools/esp-tools so circleci caching can work - `do-rtl-build.sh` # use verilator to build a sim executable (remotely) - `config.yml` # main circleci config script to enumerate jobs/workflows - `defaults.sh` # default variables used - `check-commit.sh` # check that submodule commits are valid - `build-extra-tests.sh` # build default chipyard tests located in tests/ - `clean-old-files.sh` # clean up build server files - `do-fpga-rtl-build.sh` # similar to `do-rtl-build` but using fpga/ - `install-verilator.sh` # install verilator on build server - `run-firesim-scala-tests.sh` # run firesim scala tests - `run-tests.sh # run tests for a specific set of designs - `images/` # docker image used in CI - -How things are setup for Chipyard ---------------------------------- - -The steps for CI to run are as follows. -1st, build the toolchains in parallel (note: `esp-tools` is currently not used in the run). -The docker image sets up the `PATH` and `RISCV` variable so that `riscv-tools` is the default (currently the `env.sh` script that is created at tool build is unused). -2nd, create the simulator binary. -This requires the `riscv-tools` for `fesvr` and `verilator` to be able to build the binary. -This stores all collateral for the tests (srcs, generated-srcs, sim binary, etc) to run "out of the gate" in the next job (make needs everything or else it will run again). -3rd, finally run the desired tests. - -Other CI Setup --------------- - -To get the CI to work correctly you need to setup CircleCI environment variables to point to the remote directory to build files and the server user/ip. -In the project settings, you can find this under "Build Settings" "Environment Variables". -You need to add two variables like the following: - -CI\_DIR = /path/to/where/you/want/to/store/remote/files -SERVER = username@myserver.coolmachine.berkeley.edu - -Additionally, you need to add under the "PERMISSIONS" "SSH Permissions" section a private key that is on the build server that you are using. -After adding a private key, it will show a fingerprint that should be added under the jobs that need to be run. - -Note: On the remote server you need to have the `*.pub` key file added to the `authorized_keys` file. diff --git a/.circleci/build-extra-tests.sh b/.circleci/build-extra-tests.sh deleted file mode 100755 index e38b50fe..00000000 --- a/.circleci/build-extra-tests.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -make -C $LOCAL_CHIPYARD_DIR/tests clean -make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.circleci/build-toolchains.sh b/.circleci/build-toolchains.sh deleted file mode 100755 index 160b6f5a..00000000 --- a/.circleci/build-toolchains.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -# create the riscv tools/esp tools binaries -# passed in as - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -if [ ! -d "$HOME/$1-install" ]; then - cd $HOME - - # init all submodules including the tools - CHIPYARD_DIR="$LOCAL_CHIPYARD_DIR" NPROC=$CI_MAKE_NPROC $LOCAL_CHIPYARD_DIR/scripts/build-toolchains.sh $1 -fi diff --git a/.circleci/check-commit.sh b/.circleci/check-commit.sh deleted file mode 100755 index 1b59191e..00000000 --- a/.circleci/check-commit.sh +++ /dev/null @@ -1,152 +0,0 @@ -#!/bin/bash - -# check to see that submodule commits are present on the master branch - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -# enter bhd repo -cd $LOCAL_CHIPYARD_DIR - -# ignore the private vlsi submodules -git config submodule.vlsi/hammer-cadence-plugins.update none -git config submodule.vlsi/hammer-mentor-plugins.update none -git config submodule.vlsi/hammer-synopsys-plugins.update none - -# initialize submodules and get the hashes -git submodule update --init -status=$(git submodule status) - -all_names=() - - -search_submodule() { - echo "Running check on submodule $submodule in $dir" - hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*") - for branch in "${branches[@]}" - do - echo "Searching for $hash in origin/$branch of $submodule" - (git -C $dir/$submodule branch -r --contains "$hash" | grep "origin/$branch") && true # needs init'ed submodules - if [ $? -eq 0 ] - then - all_names+=("$dir/$submodule $hash 0") - return - fi - done - all_names+=("$dir/$submodule $hash 1") - return -} - -search () { - for submodule in "${submodules[@]}" - do - search_submodule - done -} - -submodules=("cva6" "boom" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor") -dir="generators" -if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] -then - branches=("master") -else - branches=("master" "dev") -fi -search - -submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests") -dir="toolchains/esp-tools" -branches=("master") -search - - -submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests") -dir="toolchains/riscv-tools" -branches=("master") -search - -# riscv-openocd doesn't use its master branch -submodules=("riscv-openocd") -dir="toolchains/riscv-tools" -branches=("riscv") -search - -submodules=("qemu" "libgloss") -dir="toolchains" -branches=("master") -search - -submodules=("coremark" "firemarshal" "nvdla-workload" "spec2017") -dir="software" -if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] -then - branches=("master") -else - branches=("master" "dev") -fi -search - -submodules=("DRAMSim2" "axe" "barstools" "chisel-testers" "dsptools" "rocket-dsp-utils" "firrtl-interpreter" "torture" "treadle") -dir="tools" -if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] -then - branches=("master") -else - branches=("master" "dev") -fi -search - -submodules=("dromajo-src") -dir="tools/dromajo" -branches=("master") -search - -submodules=("firesim") -dir="sims" -if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] -then - branches=("master") -else - branches=("master" "dev") -fi -search - -submodules=("hammer") -dir="vlsi" -branches=("master") -search - -submodules=("fpga-shells") -dir="fpga" -branches=("master") -search - -# turn off verbose printing to make this easier to read -set +x - -# print 0's -for str in "${all_names[@]}"; -do - if [ 0 = $(echo "$str" | awk '{print$3}') ]; then - echo "$str" - fi -done - -echo "" - -# check if there was a non-zero return code and print 1's -EXIT=0 -for str in "${all_names[@]}"; -do - if [ ! 0 = $(echo "$str" | awk '{print$3}') ]; then - echo "$str" - EXIT=1 - fi -done - -echo "Done checking all submodules" -exit $EXIT diff --git a/.circleci/clean-old-files.sh b/.circleci/clean-old-files.sh deleted file mode 100755 index 5824c4b7..00000000 --- a/.circleci/clean-old-files.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash - -# clean directories that are older than 14 days -# argument is used as the directory to look in - -age () { - local AGE_SEC - local CUR_SEC - local DIFF_SEC - local SEC_PER_DAY - - SEC_PER_DAY=86400 - - CUR_SEC=$(date +%s) - AGE_SEC=$(stat -c %Y -- "$1") - DIFF_SEC=$(expr $CUR_SEC - $AGE_SEC) - - echo $(expr $DIFF_SEC / $SEC_PER_DAY) -} - -for d in $1/*/ ; do - DIR_AGE="$(age $d)" - if [ $DIR_AGE -ge 14 ]; then - echo "Deleting $d since is it $DIR_AGE old" - rm -rf $d - else - echo "Keep $d since it is $DIR_AGE old" - fi -done diff --git a/.circleci/create-hash.sh b/.circleci/create-hash.sh deleted file mode 100755 index 7a8915a5..00000000 --- a/.circleci/create-hash.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# get the hash of riscv-tools - -# turn echo on and error on earliest command -set -ex -set -o pipefail - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -# enter bhd repo -cd $LOCAL_CHIPYARD_DIR - -# Use normalized output of git-submodule status as hashfile -for tools in 'riscv-tools' 'esp-tools' ; do - git submodule status "toolchains/${tools}" 'toolchains/libgloss' 'toolchains/qemu' | - while read -r line ; do - echo "${line#[!0-9a-f]}" - done > "${HOME}/${tools}.hash" -done -echo "Hashfile for riscv-tools and esp-tools created in $HOME" diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh deleted file mode 100755 index a9a56b74..00000000 --- a/.circleci/defaults.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/bash - -copy () { - rsync -avzp -e 'ssh' --exclude '.git' $1 $2 -} - -run () { - ssh -o "StrictHostKeyChecking no" -t $SERVER $@ -} - -run_script () { - ssh -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" -} - -clean () { - # remove remote work dir - run "rm -rf $REMOTE_WORK_DIR" -} - -# make parallelism -CI_MAKE_NPROC=8 -# chosen based on a 24c system shared with 1 other project -REMOTE_MAKE_NPROC=4 - -# verilator version -VERILATOR_VERSION=v4.034 - -# remote variables -REMOTE_PREFIX=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH -REMOTE_WORK_DIR=$REMOTE_PREFIX-$CIRCLE_SHA1-$CIRCLE_JOB -REMOTE_RISCV_DIR=$REMOTE_WORK_DIR/riscv-tools-install -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_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga -REMOTE_JAVA_OPTS="-Xmx10G -Xss8M" -# Disable the supershell to greatly improve the readability of SBT output when captured by Circle CI -REMOTE_SBT_OPTS="-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=$REMOTE_PREFIX-$CIRCLE_SHA1-verilator-install - -# local variables (aka within the docker container) -LOCAL_CHECKOUT_DIR=$HOME/project -LOCAL_RISCV_DIR=$HOME/riscv-tools-install -LOCAL_ESP_DIR=$HOME/esp-tools-install -LOCAL_CHIPYARD_DIR=$LOCAL_CHECKOUT_DIR -LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator -LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim - -# key value store to get the build groups -declare -A grouping -grouping["group-cores"]="chipyard-cva6 chipyard-rocket chipyard-hetero chipyard-boom chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket" -grouping["group-peripherals"]="chipyard-dmirocket chipyard-blkdev chipyard-spiflashread chipyard-spiflashwrite chipyard-mmios chipyard-lbwif" -grouping["group-accels"]="chipyard-nvdla chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-streaming-fir chipyard-streaming-passthrough" -grouping["group-tracegen"]="tracegen tracegen-boom" -grouping["group-other"]="icenet testchipip" -grouping["group-fpga"]="arty vcu118" - -# key value store to get the build strings -declare -A mapping -mapping["chipyard-rocket"]="" -mapping["chipyard-dmirocket"]=" CONFIG=dmiRocketConfig" -mapping["chipyard-lbwif"]=" CONFIG=LBWIFRocketConfig" -mapping["chipyard-sha3"]=" CONFIG=Sha3RocketConfig" -mapping["chipyard-digitaltop"]=" TOP=DigitalTop" -mapping["chipyard-streaming-fir"]=" CONFIG=StreamingFIRRocketConfig" -mapping["chipyard-streaming-passthrough"]=" CONFIG=StreamingPassthroughRocketConfig" -mapping["chipyard-hetero"]=" CONFIG=LargeBoomAndRocketConfig" -mapping["chipyard-boom"]=" CONFIG=SmallBoomConfig" -mapping["chipyard-blkdev"]=" CONFIG=SimBlockDeviceRocketConfig" -mapping["chipyard-hwacha"]=" CONFIG=HwachaRocketConfig" -mapping["chipyard-gemmini"]=" CONFIG=GemminiRocketConfig" -mapping["chipyard-cva6"]=" CONFIG=CVA6Config" -mapping["chipyard-spiflashread"]=" CONFIG=LargeSPIFlashROMRocketConfig" -mapping["chipyard-spiflashwrite"]=" CONFIG=SmallSPIFlashRocketConfig" -mapping["chipyard-mmios"]=" CONFIG=MMIORocketConfig verilog" -mapping["tracegen"]=" CONFIG=NonBlockingTraceGenL2Config" -mapping["tracegen-boom"]=" CONFIG=BoomTraceGenConfig" -mapping["chipyard-nvdla"]=" CONFIG=SmallNVDLARocketConfig" -mapping["chipyard-sodor"]=" CONFIG=Sodor5StageConfig" -mapping["chipyard-multiclock-rocket"]=" CONFIG=MulticlockRocketConfig" - -mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests" -mapping["firesim-multiclock"]="SCALA_TEST=firesim.firesim.RocketMulticlockF1Tests" -mapping["fireboom"]="SCALA_TEST=firesim.firesim.BoomF1Tests" -mapping["icenet"]="SUB_PROJECT=icenet" -mapping["testchipip"]="SUB_PROJECT=testchipip" - -mapping["arty"]="SUB_PROJECT=arty verilog" -mapping["vcu118"]="SUB_PROJECT=vcu118 verilog" diff --git a/.circleci/run-tests.sh b/.circleci/run-tests.sh deleted file mode 100755 index ab3cf5cc..00000000 --- a/.circleci/run-tests.sh +++ /dev/null @@ -1,117 +0,0 @@ -#!/bin/bash - -# run the different tests - -# 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 - -run_bmark () { - make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ -} - -run_asm () { - make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ -} - -run_both () { - run_bmark $@ - run_asm $@ -} - -run_tracegen () { - make tracegen -C $LOCAL_SIM_DIR $@ -} - -# TODO BUG: the run-binary command forces a rebuild of the simulator in CI -# instead, directly run the simulator binary -case $1 in - chipyard-rocket) - run_bmark ${mapping[$1]} - ;; - chipyard-dmirocket) - run_bmark ${mapping[$1]} - ;; - chipyard-lbwif) - run_bmark ${mapping[$1]} - ;; - chipyard-boom) - run_bmark ${mapping[$1]} - ;; - chipyard-hetero) - run_bmark ${mapping[$1]} - ;; - rocketchip) - run_bmark ${mapping[$1]} - ;; - chipyard-hwacha) - export RISCV=$LOCAL_ESP_DIR - export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib - export PATH=$RISCV/bin:$PATH - make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR ${mapping[$1]} - ;; - chipyard-gemmini) - export RISCV=$LOCAL_ESP_DIR - export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib - export PATH=$RISCV/bin:$PATH - GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests - rm -rf $GEMMINI_SOFTWARE_DIR/riscv-tests - cd $LOCAL_SIM_DIR - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal - ;; - chipyard-sha3) - export RISCV=$LOCAL_ESP_DIR - export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib - export PATH=$RISCV/bin:$PATH - (cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh) - $LOCAL_SIM_DIR/simulator-chipyard-Sha3RocketConfig $LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv - ;; - chipyard-streaming-passthrough) - make -C $LOCAL_CHIPYARD_DIR/tests - $LOCAL_SIM_DIR/simulator-chipyard-StreamingPassthroughRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv - ;; - chipyard-streaming-fir) - make -C $LOCAL_CHIPYARD_DIR/tests - $LOCAL_SIM_DIR/simulator-chipyard-StreamingFIRRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv - ;; - chipyard-spiflashread) - make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary - ;; - chipyard-spiflashwrite) - make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary - [[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false - ;; - tracegen) - run_tracegen ${mapping[$1]} - ;; - tracegen-boom) - run_tracegen ${mapping[$1]} - ;; - chipyard-cva6) - make run-binary-fast -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv - ;; - chipyard-sodor) - run_asm ${mapping[$1]} - ;; - chipyard-nvdla) - make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary - ;; - icenet) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} - ;; - testchipip) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} - ;; - *) - echo "No set of tests for $1. Did you spell it right?" - exit 1 - ;; -esac diff --git a/.github/README.md b/.github/README.md new file mode 100644 index 00000000..89fcc3f6 --- /dev/null +++ b/.github/README.md @@ -0,0 +1,137 @@ +Chipyard Continuous Integration (CI) +=========== + +Website: https://gihub.com/gh/ucb-bar/chipyard/actions + +GitHub Actions Brief Explanation +--------------------------- + +CI is executed by Github Actions (GA). GA is controlled by `.yml` files in the `.github/workflows/` directory. +In our case we have just one workflow named `chipyard-rocket-run-tests.yml`. +It defines a number of `jobs` within it that do particular tasks. +All jobs in the workflow must pass for the CI run to be successful. +In general, a job is run in parallel with others unless it depends on some other job. +The dependency of one job on the completion of another is specified via the `needs` field. + +For example: +```yaml + prepare-chipyard-cores: + name: prepare-chipyard-cores + needs: [make-keys, setup-complete] +``` +This specifies that the `prepare-chipyard-cores` job needs the both the `make-keys` and the `setup-complete` steps to +be completed before it can run. + +Chipyard runs its CI using a docker image created from `dockerfiles/Dockerfile`. +See its [README](../dockerfiles/README.md) for more details. + +Finally, within each job's `steps:` section, the steps are run sequentially and state persists throughout a job. +So when you run something like `checkout` the next step has the checked out code. + +[Composite Actions](https://docs.github.com/en/actions/creating-actions) (CA) allow for limited subroutine like code re-use within GA. +We use both community created and our own Composite Actions in our CI process. CA capabilities are changing rapidly. +Nesting of composite actions was only recently unveiled. There is a lot of room for more code reuse, in particular +we specify things over and over like docker image tag and checkout commands. + +One use of CA: our process relies on caching to avoid running time-consuming and intensive tasks more often than necessary. + +The following is an example of using the cache@v2 composite action. A step `uses: actions/cache@v2` which take as parameters the +path that contains the data to be cached and a key. Paths can have multiple targets. +The following step can look at the result of the cache operation, if there was cache miss, then we run the command that +will generate the data to be cached. The caching of the generated data is implicit. +>Note: GA cache documentation suggests using the yml level `if: steps.cache-primes.outputs.cache-hit != 'true'` to +> determine whether to run the data generation command. +> At the time of this writing the if construct has a bug and will not run correctly within a composite action. The use +> of a bash based if is a hack found on stackoverflow +```yaml + - uses: actions/cache@v2 + id: rtl-build-id + with: + path: | + sims/verilator + sims/firesim/sim + generators/gemmini/software/gemmini-rocc-tests + key: ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }} + - name: run rtl build script if not cached + run: | + if [[ "${{ steps.rtl-build-id.outputs.cache-hit }}" != 'true' ]]; then + echo "Cache miss on ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }}" + ./.github/scripts/${{ inputs.build-script }} ${{ inputs.group-key }} ${{ inputs.build-type }} + else + echo "cache hit do not prepare rtl" + fi + shell: bash +``` + +Our own composite actions are defined in the `.github/actions//action.yml` + +.github/scripts directory +------------------- + +This directory contains most the collateral for the Chipyard CI to work. +The following is included in `.github/scripts/: directory + + `build-toolchains.sh` # build either riscv-tools or esp-tools + `create-hash.sh` # create hashes of riscv-tools/esp-tools to use as hash keys + `do-rtl-build.sh` # use verilator to build a sim executable (remotely) + `defaults.sh` # default variables used + `check-commit.sh` # check that submodule commits are valid + `build-extra-tests.sh` # build default chipyard tests located in tests/ + `clean-old-files.sh` # clean up build server files + `do-fpga-rtl-build.sh` # similar to `do-rtl-build` but using fpga/ + `install-verilator.sh` # install verilator on build server + `run-firesim-scala-tests.sh` # run firesim scala tests + `run-tests.sh # run tests for a specific set of designs + +How things are set up for Chipyard +--------------------------------- + +The steps for CI to run are as follows. +1. Build the toolchains in parallel (note: `esp-tools` is currently not used in the run). +The docker image sets up the `PATH` and `RISCV` variable so that `riscv-tools` is the default (currently the `env.sh` script that is created at tool build is unused). +2. Create the simulator binary. +This requires the `riscv-tools` for `fesvr` and `verilator` to be able to build the binary. +This stores all collateral for the tests (srcs, generated-srcs, sim binary, etc) to run "out of the gate" in the next job (make needs everything or else it will run again). +3. Finally, run the desired tests. + +Other CI Setup +-------------- + +To get the CI to work correctly you need to create the following GH Repository Secrets + +| Secret | Value | +| -------| ------------- | +| BUILDSERVER | the hostname of the remote build server (likely be a millennium machine) | +| BUILDUSER | the login to use on the build server | +| BUILDDIR | the directory to use on the build server | +| SERVERKEY | a private key to access the build server | + +The default.sh script defines the following, +```bash +CI_DIR = /path/to/where/you/want/to/store/remote/files +```` +but in the future this should likely be a GH Secret too. + +The scripts also construct (repeatedly) a SERVER env using the above secrets +```bash +SERVER = ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} +``` + +Additionally, you need to add under the "PERMISSIONS" "SSH Permissions" section a private key that is on the build server that you are using. +After adding a private key, it will show a fingerprint that should be added under the jobs that need to be run. + +Note: On the remote server you need to have the `*.pub` key file added to the `authorized_keys` file. + +Additional Work +--------------- +- It would be nice to add the ability to re-run just parts of the workflow. [See Workflows Hacks](https://github.com/jaredpalmer/razzle/blob/f8305c26997bae8ef0f5dfa52540d842451b4090/.github/workflows/examples.yml) + + +Notes on CIRCLE CI +------------------ +This code is heavily based on the origin [CircleCI]() work. There a quite a few differences +- CCI supports workflow level variables, in GA we must define thiing like `BUILDSERVER: ${{ secrets.BUILDSERVER }}` in every job +- CCI allows a much larger cache. The entire CY directory with toolchains and RTL could be cached, with GA there is a 5Gb total cache limit +- GA support more parallel jobs 20 vs 4 +- GA seems to allow much longer run times +- \ No newline at end of file diff --git a/.github/actions/build-extra-tests/action.yml b/.github/actions/build-extra-tests/action.yml new file mode 100644 index 00000000..80ae8fdf --- /dev/null +++ b/.github/actions/build-extra-tests/action.yml @@ -0,0 +1,28 @@ +name: build-extra-tests +description: 'Builds extra test required for some flows' + +inputs: + tools-version: + description: Which toolchain to build + required: false + default: 'riscv-tools' + cache-key: + description: Use this for caching + required: true +runs: + using: "composite" + steps: + - uses: actions/cache@v2 + id: build-extra-tools-cache + with: + path: extra-tests-install + key: ${{ needs.make-keys.outputs.extra-tests-cache-key }} + restore-keys: ${{ needs.make-keys.outputs.extra-tests-cache-key }} + - name: Build extra tests if not cached + run: | + export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + export LD_LIBRARY_PATH="$RISCV/lib" + export PATH="$RISCV/bin:$PATH" + .github/scripts/build-extra-tests.sh + shell: bash + diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index 25098bfc..ade87134 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -2,13 +2,24 @@ name: prepare-rtl description: 'Builds RTL based on parameters, caches the entire chipyard root dir when done' inputs: +<<<<<<< HEAD +======= + tools-version: + description: Which toolchain to build + required: false + default: 'riscv-tools' +>>>>>>> 52c752ba... Move Chipyard CI to Github Actions group-key: description: group key required: true build-script: description: rtl build script to use required: false +<<<<<<< HEAD default: "remote-do-rtl-build.sh" +======= + default: "do-rtl-build.sh" +>>>>>>> 52c752ba... Move Chipyard CI to Github Actions build-type: description: type of build required: false @@ -17,9 +28,12 @@ inputs: runs: using: "composite" steps: +<<<<<<< HEAD - name: Build RISC-V toolchains uses: ./.github/actions/toolchain-build +======= +>>>>>>> 52c752ba... Move Chipyard CI to Github Actions - uses: actions/cache@v2 id: rtl-build-id with: @@ -28,13 +42,24 @@ runs: sims/firesim/sim generators/gemmini/software/gemmini-rocc-tests key: ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }} +<<<<<<< HEAD - name: Run RTL build if not cached +======= + - name: run rtl build script if not cached +>>>>>>> 52c752ba... Move Chipyard CI to Github Actions run: | if [[ "${{ steps.rtl-build-id.outputs.cache-hit }}" != 'true' ]]; then echo "Cache miss on ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }}" ./.github/scripts/${{ inputs.build-script }} ${{ inputs.group-key }} ${{ inputs.build-type }} else +<<<<<<< HEAD echo "Cache hit do not rebuild RTL for ${{ inputs.group-key }}" fi shell: bash +======= + echo "cache hit do not prepare rtl" + fi + shell: bash + +>>>>>>> 52c752ba... Move Chipyard CI to Github Actions diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index d74b18af..7f1cb964 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -2,6 +2,13 @@ name: run-tests description: 'Runs tests according to input parameters' inputs: +<<<<<<< HEAD +======= + tools-version: + description: Which toolchain to build + required: false + default: 'riscv-tools' +>>>>>>> 52c752ba... Move Chipyard CI to Github Actions group-key: description: group key required: true @@ -16,6 +23,7 @@ inputs: runs: using: "composite" steps: +<<<<<<< HEAD - name: Init submodules (since only the RTL is cached) run: ./scripts/init-submodules-no-riscv-tools.sh shell: bash @@ -29,3 +37,13 @@ runs: - name: Run RTL tests run: ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} shell: bash +======= + - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl + run: | + export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + export LD_LIBRARY_PATH="$RISCV/lib" + export PATH="$RISCV/bin:$PATH" + ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} + shell: bash + +>>>>>>> 52c752ba... Move Chipyard CI to Github Actions diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index c3492054..95cb0a4d 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,4 +1,5 @@ name: toolchain-build +<<<<<<< HEAD description: 'Build/cache both toolchains' runs: @@ -49,3 +50,33 @@ runs: - name: Build ESP RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh esp-tools shell: bash +======= +description: 'Builds the selected toolchain' + +inputs: + tools-version: + description: Which toolchain to build + required: false + default: 'riscv-tools' + cache-key: + description: Use this for caching + required: true +runs: + using: "composite" + steps: + - uses: actions/cache@v2 + id: toolchain-build-id + with: + path: ${{ inputs.tools-version }}-install + key: ${{ inputs.cache-key }} + - name: run build toolchain if not cached + run: | + if [[ "${{ steps.toolchain-build-id.outputs.cache-hit }}" != 'true' ]]; then + echo "Cache miss on ${{ inputs.tools-version }}-install" + ./.github/scripts/build-toolchains.sh ${{ inputs.tools-version }} + else + echo "cache hit do not generate build ${{ inputs.tools-version }}" + fi + shell: bash + +>>>>>>> 52c752ba... Move Chipyard CI to Github Actions diff --git a/.github/scripts/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh index a77f5482..e38b50fe 100755 --- a/.github/scripts/build-extra-tests.sh +++ b/.github/scripts/build-extra-tests.sh @@ -7,9 +7,5 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" -export LD_LIBRARY_PATH="$RISCV/lib" -export PATH="$RISCV/bin:$PATH" - make -C $LOCAL_CHIPYARD_DIR/tests clean make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.github/scripts/build-toolchains.sh b/.github/scripts/build-toolchains.sh index 1f23c408..160b6f5a 100755 --- a/.github/scripts/build-toolchains.sh +++ b/.github/scripts/build-toolchains.sh @@ -15,7 +15,4 @@ if [ ! -d "$HOME/$1-install" ]; then # init all submodules including the tools CHIPYARD_DIR="$LOCAL_CHIPYARD_DIR" NPROC=$CI_MAKE_NPROC $LOCAL_CHIPYARD_DIR/scripts/build-toolchains.sh $1 - - # de-init the toolchain area to save on space (forced to ignore local changes) - git submodule deinit --force $LOCAL_CHIPYARD_DIR/toolchains/$1 fi diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index 004acc5a..1b59191e 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -9,6 +9,7 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh +# enter bhd repo cd $LOCAL_CHIPYARD_DIR # ignore the private vlsi submodules diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index f64c0696..dae9f25d 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -17,4 +17,4 @@ for tools in 'riscv-tools' 'esp-tools' ; do echo "${line#[!0-9a-f]}" done > "${tools}.hash" done -echo "Hashfile for riscv-tools and esp-tools created in $PWD" +echo "Hashfile for riscv-tools and esp-tools created in $HOME" diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 04ccd331..0123fa88 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,24 +1,42 @@ #!/bin/bash +copy () { + rsync -azp -e 'ssh' --exclude '.git' $1 $2 +} + +run () { + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER $@ +} + +run_script () { + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" +} + +clean () { + # remove remote work dir + run "rm -rf $REMOTE_WORK_DIR" +} + # make parallelism -CI_MAKE_NPROC=8 +CI_MAKE_NPROC=4 # chosen based on a 24c system shared with 1 other project REMOTE_MAKE_NPROC=4 # verilator version VERILATOR_VERSION=v4.034 -HOME=$GITHUB_WORKSPACE +# remote variables + CURRENT_BRANCH=$(git branch --show-current) -# remote variables # CI_DIR is defined externally based on the GH repository secret BUILDDIR +HOME=`pwd` REMOTE_PREFIX=$CI_DIR/${GITHUB_REPOSITORY#*/}-$CURRENT_BRANCH -REMOTE_WORK_DIR=$GITHUB_WORKSPACE -REMOTE_RISCV_DIR=$GITHUB_WORKSPACE/riscv-tools-install -REMOTE_ESP_DIR=$GITHUB_WORKSPACE/esp-tools-install -REMOTE_CHIPYARD_DIR=$GITHUB_WORKSPACE +REMOTE_WORK_DIR=$REMOTE_PREFIX-$GITHUB_SHA-$GITHUB_JOB +REMOTE_RISCV_DIR=$REMOTE_WORK_DIR/riscv-tools-install +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_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga diff --git a/.circleci/do-rtl-build.sh b/.github/scripts/do-rtl-build.sh similarity index 99% rename from .circleci/do-rtl-build.sh rename to .github/scripts/do-rtl-build.sh index 95f3c903..bd418824 100755 --- a/.circleci/do-rtl-build.sh +++ b/.github/scripts/do-rtl-build.sh @@ -59,6 +59,7 @@ else fi # choose what make dir to use + case $2 in "sim") REMOTE_MAKE_DIR=$REMOTE_SIM_DIR diff --git a/.circleci/install-verilator.sh b/.github/scripts/install-verilator.sh similarity index 90% rename from .circleci/install-verilator.sh rename to .github/scripts/install-verilator.sh index 2170768a..f667b365 100755 --- a/.circleci/install-verilator.sh +++ b/.github/scripts/install-verilator.sh @@ -10,7 +10,7 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh # clean older directories (delete prior directories related to this branch also) -run_script $LOCAL_CHIPYARD_DIR/.circleci/clean-old-files.sh $CI_DIR +run_script $LOCAL_CHIPYARD_DIR/.github/scripts/clean-old-files.sh $CI_DIR run "rm -rf $REMOTE_PREFIX*" # set stricthostkeychecking to no (must happen before rsync) diff --git a/.circleci/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh similarity index 100% rename from .circleci/run-firesim-scala-tests.sh rename to .github/scripts/run-firesim-scala-tests.sh diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index ffa61db5..ab3cf5cc 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -9,18 +9,12 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" -export LD_LIBRARY_PATH="$RISCV/lib" -export PATH="$RISCV/bin:$PATH" - -DISABLE_SIM_PREREQ="BREAK_SIM_PREREQ=1" - run_bmark () { - make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ + make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ } run_asm () { - make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ + make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ } run_both () { @@ -29,9 +23,11 @@ run_both () { } run_tracegen () { - make tracegen -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ + make tracegen -C $LOCAL_SIM_DIR $@ } +# TODO BUG: the run-binary command forces a rebuild of the simulator in CI +# instead, directly run the simulator binary case $1 in chipyard-rocket) run_bmark ${mapping[$1]} @@ -55,7 +51,7 @@ case $1 in export RISCV=$LOCAL_ESP_DIR export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib export PATH=$RISCV/bin:$PATH - make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} + make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR ${mapping[$1]} ;; chipyard-gemmini) export RISCV=$LOCAL_ESP_DIR @@ -64,32 +60,32 @@ case $1 in GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests rm -rf $GEMMINI_SOFTWARE_DIR/riscv-tests cd $LOCAL_SIM_DIR - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal + $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal + $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal + $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal ;; chipyard-sha3) export RISCV=$LOCAL_ESP_DIR export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib export PATH=$RISCV/bin:$PATH (cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh) - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv + $LOCAL_SIM_DIR/simulator-chipyard-Sha3RocketConfig $LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv ;; chipyard-streaming-passthrough) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv + $LOCAL_SIM_DIR/simulator-chipyard-StreamingPassthroughRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv ;; chipyard-streaming-fir) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv + $LOCAL_SIM_DIR/simulator-chipyard-StreamingFIRRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv ;; chipyard-spiflashread) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary-fast + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary ;; chipyard-spiflashwrite) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary-fast + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary [[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false ;; tracegen) @@ -99,20 +95,20 @@ case $1 in run_tracegen ${mapping[$1]} ;; chipyard-cva6) - make run-binary-fast -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv + make run-binary-fast -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv ;; chipyard-sodor) run_asm ${mapping[$1]} ;; chipyard-nvdla) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary-fast + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary ;; icenet) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} ;; testchipip) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} ;; *) echo "No set of tests for $1. Did you spell it right?" diff --git a/.github/workflows/chipyard-rocket-run-tests.yml b/.github/workflows/chipyard-rocket-run-tests.yml new file mode 100644 index 00000000..74dd262c --- /dev/null +++ b/.github/workflows/chipyard-rocket-run-tests.yml @@ -0,0 +1,1285 @@ +name: chipyard-ci-process + +on: [push] + +env: + tools-cache-version: v7 + CI_DIR: ${{ secrets.BUILDDIR }} + +jobs: + commit-on-master-check: + name: commit-on-master-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Check commits of each submodule + run: .github/scripts/check-commit.sh + + tutorial-setup-check: + name: tutorial-setup-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Check that the tutorial-setup patches apply + run: scripts/tutorial-setup.sh + + documentation-check: + name: documentation-check + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Check that documentation builds with no warnings/errors + run: | + sudo apt-get update -y + sudo apt-get install -y python3-pip + sudo pip3 install -r docs/requirements.txt + make -C docs html + - name: Show error log from sphinx if failed + if: ${{ failure() }} + run: cat /tmp/sphinx-err*.log + + make-keys: + name: make-keys + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + - name: Checkout + uses: actions/checkout@v2 + - name: Generate hashes + run: .github/scripts/create-hash.sh + - name: Generate keys + id: genkey + run: | + echo "::set-output name=riscvtools-cache-key::riscv-tools-installed-${{ env.tools-cache-version }}-$(shasum riscv-tools.hash | cut -d' ' -f1)" + echo "::set-output name=esptools-cache-key::esp-tools-installed-${{ env.tools-cache-version }}-$(shasum esp-tools.hash | cut -d' ' -f1)" + echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + - name: Show key + run: | + echo "riscvtools key is " ${{ steps.genkey.outputs.riscvtools-cache-key }} + echo "esptools key is " ${{ steps.genkey.outputs.esptools-cache-key }} + echo "extra-tests key is " ${{ steps.genkey.outputs.extra-tests-cache-key }} + outputs: + riscvtools-cache-key: ${{ steps.genkey.outputs.riscvtools-cache-key }} + esptools-cache-key: ${{ steps.genkey.outputs.esptools-cache-key }} + extra-tests-cache-key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + + install-riscv-toolchain: + needs: make-keys + name: install-riscv-toolchain + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + + install-esp-toolchain: + needs: make-keys + name: install-esp-toolchain + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Build ESP RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'esp-tools' + cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} + + build-extra-tests: + name: build-extra-tests + needs: [make-keys, install-riscv-toolchain] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - uses: actions/cache@v2 + id: build-extra-tools-cache + with: + path: extra-tests-install + key: ${{ needs.make-keys.outputs.extra-tests-cache-key }} + restore-keys: ${{ needs.make-keys.outputs.extra-tests-cache-key }} + - name: Build extra tests if not cached + run: | + export RISCV="/__w/chipyard/chipyard/riscv-tools-install" + export LD_LIBRARY_PATH="$RISCV/lib" + export PATH="$RISCV/bin:$PATH" + .github/scripts/build-extra-tests.sh + + install-verilator: + name: install-verilator + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Build verilator on remote + run: .github/scripts/install-verilator.sh + + # Sentinel job to simplify how we specify which that basic setup is complete + # + # When adding new prep jobs, please add them to `needs` below + setup-complete: + name: "setup complete" + needs: [commit-on-master-check, tutorial-setup-check, documentation-check, + install-riscv-toolchain, install-esp-toolchain, install-verilator, + build-extra-tests] + runs-on: ubuntu-latest + steps: + - name: Set up complete + run: echo Set up is complete! + + ########################################################################## + + prepare-chipyard-cores: + name: prepare-chipyard-cores + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + + prepare-chipyard-peripherals: + name: prepare-chipyard-peripherals + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + + prepare-chipyard-accels: + name: prepare-chipyard-accels + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build ESP RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'esp-tools' + cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + + prepare-chipyard-tracegen: + name: prepare-chipyard-tracegen + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-tracegen" + + prepare-chipyard-other: + name: prepare-chipyard-other + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-other" + + prepare-chipyard-fpga: + name: prepare-chipyard-fpga + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-fpga" + build-type: "fpga" + + ########################################################################## + + chipyard-rocket-run-tests: + name: chipyard-rocket-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-rocket" + + chipyard-hetero-run-tests: + name: chipyard-hetero-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-hetero" + + chipyard-boom-run-tests: + name: chipyard-boom-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-boom" + + chipyard-cva6-run-tests: + name: chipyard-cva6-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-cva6" + + chipyard-sodor-run-tests: + name: chipyard-sodor-run-tests + needs: [make-keys, prepare-chipyard-cores] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-sodor" + + chipyard-dmirocket-run-tests: + name: chipyard-dmirocket-run-tests + needs: [make-keys, prepare-chipyard-peripherals] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-dmirocket" + + chipyard-spiflashwrite-run-tests: + name: chipyard-spiflashwrite-run-tests + needs: [make-keys, prepare-chipyard-peripherals] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-spiflashwrite" + + chipyard-spiflashread-run-tests: + name: chipyard-spiflashread-run-tests + needs: [make-keys, prepare-chipyard-peripherals] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-spiflashread" + + chipyard-lbwif-run-tests: + name: chipyard-lbwif-run-tests + needs: [make-keys, prepare-chipyard-peripherals] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-peripherals" + project-key: "chipyard-lbwif" + + chipyard-sha3-run-tests: + name: chipyard-sha3-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build ESP RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'esp-tools' + cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-sha3" + + chipyard-streaming-fir-run-tests: + name: chipyard-streaming-fir-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-streaming-fir" + + chipyard-streaming-passthrough-run-tests: + name: chipyard-streaming-passthrough-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-streaming-passthrough" + + chipyard-hwacha-run-tests: + name: chipyard-hwacha-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build ESP RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'esp-tools' + cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-hwacha" + + chipyard-gemmini-run-tests: + name: chipyard-gemmini-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build ESP RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'esp-tools' + cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-gemmini" + + chipyard-nvdla-run-tests: + name: chipyard-nvdla-run-tests + needs: [make-keys, prepare-chipyard-accels] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-accels" + project-key: "chipyard-nvdla" + + tracegen-boom-run-tests: + name: tracegen-boom-run-tests + needs: [make-keys, prepare-chipyard-tracegen] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-tracegen" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-tracegen" + project-key: "tracegen-boom" + + tracegen-run-tests: + name: tracegen-run-tests + needs: [make-keys, prepare-chipyard-tracegen] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-tracegen" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-tracegen" + project-key: "tracegen" + + icenet-run-tests: + name: icenet-run-tests + needs: [make-keys, prepare-chipyard-other] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-other" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "icenet" + + testchipip-run-tests: + name: testchipip-run-tests + needs: [make-keys, prepare-chipyard-other] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-other" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "group-other" + project-key: "testchipip" + + firesim-run-tests: + name: firesim-run-tests + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "extra-tests" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim" + run-script: "run-firesim-scala-tests.sh" + + fireboom-run-tests: + name: fireboom-run-tests + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "extra-tests" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "fireboom" + run-script: "run-firesim-scala-tests.sh" + + firesim-multiclock-run-tests: + name: firesim-multiclock-run-tests + needs: [make-keys, setup-complete] + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + env: + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} + - name: Init submodules + run: ./scripts/init-submodules-no-riscv-tools.sh + - name: Check commits of each submodle + run: .github/scripts/check-commit.sh + - name: Build default RISC-V toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Build RTL + uses: ./.github/actions/prepare-rtl + with: + group-key: "extra-tests" + - name: Run tests + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim-multiclock" + run-script: "run-firesim-scala-tests.sh" + + # Sentinel job to simplify how we specify which checks need to pass in branch + # protection and in Mergify + # + # When adding new top level jobs, please add them to `needs` below + all_tests_passed: + name: "all tests passed" + needs: [chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, + chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, + chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, + chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, + chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, + tracegen-boom-run-tests, tracegen-run-tests, + icenet-run-tests, testchipip-run-tests, + firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + runs-on: ubuntu-latest + steps: + - run: echo Success! \ No newline at end of file From 797f85c8af288a4b97f343e945c003b4e1f5617c Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 13:43:27 -0700 Subject: [PATCH 02/24] Mockup self-hosted runners + Bugfix run-tests by init-submods --- .github/actions/run-tests/action.yml | 18 ------- .github/scripts/defaults.sh | 25 ++-------- .github/scripts/do-rtl-build.sh | 58 ++++++---------------- .github/scripts/install-verilator.sh | 20 ++++---- .github/scripts/run-firesim-scala-tests.sh | 52 +++++++------------ .github/workflows/chipyard-run-tests.yml | 2 + 6 files changed, 48 insertions(+), 127 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 7f1cb964..d74b18af 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -2,13 +2,6 @@ name: run-tests description: 'Runs tests according to input parameters' inputs: -<<<<<<< HEAD -======= - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' ->>>>>>> 52c752ba... Move Chipyard CI to Github Actions group-key: description: group key required: true @@ -23,7 +16,6 @@ inputs: runs: using: "composite" steps: -<<<<<<< HEAD - name: Init submodules (since only the RTL is cached) run: ./scripts/init-submodules-no-riscv-tools.sh shell: bash @@ -37,13 +29,3 @@ runs: - name: Run RTL tests run: ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} shell: bash -======= - - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl - run: | - export RISCV="/__w/chipyard/chipyard/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" - ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} - shell: bash - ->>>>>>> 52c752ba... Move Chipyard CI to Github Actions diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 0123fa88..cb48e932 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,22 +1,5 @@ #!/bin/bash -copy () { - rsync -azp -e 'ssh' --exclude '.git' $1 $2 -} - -run () { - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER $@ -} - -run_script () { - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" -} - -clean () { - # remove remote work dir - run "rm -rf $REMOTE_WORK_DIR" -} - # make parallelism CI_MAKE_NPROC=4 # chosen based on a 24c system shared with 1 other project @@ -33,10 +16,10 @@ CURRENT_BRANCH=$(git branch --show-current) HOME=`pwd` REMOTE_PREFIX=$CI_DIR/${GITHUB_REPOSITORY#*/}-$CURRENT_BRANCH -REMOTE_WORK_DIR=$REMOTE_PREFIX-$GITHUB_SHA-$GITHUB_JOB -REMOTE_RISCV_DIR=$REMOTE_WORK_DIR/riscv-tools-install -REMOTE_ESP_DIR=$REMOTE_WORK_DIR/esp-tools-install -REMOTE_CHIPYARD_DIR=$REMOTE_WORK_DIR/chipyard +REMOTE_WORK_DIR=$GITHUB_WORKSPACE +REMOTE_RISCV_DIR=$GITHUB_WORKSPACE/riscv-tools-install +REMOTE_ESP_DIR=$GITHUB_WORKSPACE/esp-tools-install +REMOTE_CHIPYARD_DIR=$GITHUB_WORKSPACE REMOTE_SIM_DIR=$REMOTE_CHIPYARD_DIR/sims/verilator REMOTE_FIRESIM_DIR=$REMOTE_CHIPYARD_DIR/sims/firesim/sim REMOTE_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga diff --git a/.github/scripts/do-rtl-build.sh b/.github/scripts/do-rtl-build.sh index bd418824..1cf06978 100755 --- a/.github/scripts/do-rtl-build.sh +++ b/.github/scripts/do-rtl-build.sh @@ -17,45 +17,22 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT -cd $LOCAL_CHIPYARD_DIR +cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh ./scripts/init-fpga.sh -# replace the workspace dir with a local dir so you can copy around -sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts - -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" - -clean - -# copy over riscv/esp-tools, and chipyard to remote -run "mkdir -p $REMOTE_CHIPYARD_DIR" -copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR - -run "cp -r ~/.ivy2 $REMOTE_WORK_DIR" -run "cp -r ~/.sbt $REMOTE_WORK_DIR" - TOOLS_DIR=$REMOTE_RISCV_DIR LD_LIB_DIR=$REMOTE_RISCV_DIR/lib if [ $1 = "group-accels" ]; then - export RISCV=$LOCAL_ESP_DIR - export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib + export RISCV=$REMOTE_ESP_DIR + export LD_LIBRARY_PATH=$REMOTE_ESP_DIR/lib export PATH=$RISCV/bin:$PATH - GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests - cd $LOCAL_SIM_DIR/../../generators/gemmini/software + GEMMINI_SOFTWARE_DIR=$REMOTE_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests + cd $GEMMINI_SOFTWARE_DIR git submodule update --init --recursive gemmini-rocc-tests cd gemmini-rocc-tests ./build.sh - - 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 # choose what make dir to use @@ -70,27 +47,20 @@ case $2 in esac # enter the verilator directory and build the specific config on remote server -run "export RISCV=\"$TOOLS_DIR\"; \ - make -C $REMOTE_MAKE_DIR clean;" +export RISCV=$TOOLS_DIR +make -C $REMOTE_MAKE_DIR clean read -a keys <<< ${grouping[$1]} # need to set the PATH to use the new verilator (with the new verilator root) for key in "${keys[@]}" do - run "export RISCV=\"$TOOLS_DIR\"; \ - export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; \ - export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \ - export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \ - export COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \ - make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_TOOL_OPTIONS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" ${mapping[$key]}" + export RISCV=$TOOLS_DIR + export LD_LIBRARY_PATH=$LD_LIB_DIR + export PATH=$REMOTE_VERILATOR_DIR/bin:$PATH + export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR + export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache + make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_OPTS=$REMOTE_JAVA_OPTS SBT_OPTS=$REMOTE_SBT_OPTS ${mapping[$key]} done -run "rm -rf $REMOTE_CHIPYARD_DIR/project" - -# choose to copy back results -if [ $2 = "sim" ]; then - # copy back the final build - mkdir -p $LOCAL_CHIPYARD_DIR - copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR -fi +rm -rf $REMOTE_CHIPYARD_DIR/project diff --git a/.github/scripts/install-verilator.sh b/.github/scripts/install-verilator.sh index f667b365..1159fc47 100755 --- a/.github/scripts/install-verilator.sh +++ b/.github/scripts/install-verilator.sh @@ -10,16 +10,14 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh # clean older directories (delete prior directories related to this branch also) -run_script $LOCAL_CHIPYARD_DIR/.github/scripts/clean-old-files.sh $CI_DIR -run "rm -rf $REMOTE_PREFIX*" -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" +$SCRIPT_DIR/clean-old-files.sh $CI_DIR +rm -rf $REMOTE_PREFIX* -run "git clone http://git.veripool.org/git/verilator $REMOTE_VERILATOR_DIR; \ - cd $REMOTE_VERILATOR_DIR; \ - git checkout $VERILATOR_VERSION; \ - autoconf; \ - export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR; \ - ./configure; \ - make -j$REMOTE_MAKE_NPROC;" +git clone http://git.veripool.org/git/verilator $REMOTE_VERILATOR_DIR +cd $REMOTE_VERILATOR_DIR +git checkout $VERILATOR_VERSION +autoconf +export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR +./configure +make -j$REMOTE_MAKE_NPROC diff --git a/.github/scripts/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh index 0a74adb8..9b329fa7 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/run-firesim-scala-tests.sh @@ -13,50 +13,36 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT +export RISCV="$REMOTE_RISCV_DIR" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + # Directory locations for handling firesim-local installations of libelf/libdwarf # This would generally be handled by build-setup.sh/firesim-setup.sh firesim_sysroot=lib-install -local_firesim_sysroot=$LOCAL_FIRESIM_DIR/$firesim_sysroot remote_firesim_sysroot=$REMOTE_FIRESIM_DIR/$firesim_sysroot -cd $LOCAL_CHIPYARD_DIR +cd $REMOTE_CHIPYARD_DIR ./scripts/init-submodules-no-riscv-tools.sh -cd $LOCAL_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib +cd $REMOTE_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib git submodule update --init elfutils libdwarf -cd $LOCAL_CHIPYARD_DIR/sims/firesim -mkdir -p $local_firesim_sysroot -./scripts/build-libelf.sh $local_firesim_sysroot -./scripts/build-libdwarf.sh $local_firesim_sysroot -cd $LOCAL_CHIPYARD_DIR +cd $REMOTE_CHIPYARD_DIR/sims/firesim +mkdir -p $remote_firesim_sysroot +./scripts/build-libelf.sh $remote_firesim_sysroot +./scripts/build-libdwarf.sh $remote_firesim_sysroot +cd $REMOTE_CHIPYARD_DIR -# replace the workspace dir with a local dir so you can copy around -sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts - -make -C $LOCAL_CHIPYARD_DIR/tools/dromajo/dromajo-src/src - -# set stricthostkeychecking to no (must happen before rsync) -run "echo \"Ping $SERVER\"" - -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" +make -C $REMOTE_CHIPYARD_DIR/tools/dromajo/dromajo-src/src TOOLS_DIR=$REMOTE_RISCV_DIR LD_LIB_DIR=$remote_firesim_sysroot/lib:$REMOTE_RISCV_DIR/lib # 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 COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \ - make -C $REMOTE_FIRESIM_DIR JAVA_TOOL_OPTIONS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" testOnly ${mapping[$1]}" +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 COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache +make -C $REMOTE_FIRESIM_DIR JAVA_OPTS=$REMOTE_JAVA_OPTS SBT_OPTS=$REMOTE_SBT_OPTS testOnly ${mapping[$1]} diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c932d3e6..fc74e3c0 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,6 +20,7 @@ jobs: with: access_token: ${{ github.token }} +<<<<<<< HEAD commit-on-master-check: name: commit-on-master-check runs-on: ubuntu-latest @@ -137,6 +138,7 @@ jobs: run: .github/scripts/remote-install-verilator.sh - uses: ./.github/actions/job-end +<<<<<<< HEAD # Sentinel job to simplify how we specify which that basic setup is complete # # When adding new prep jobs, please add them to `needs` below From f49a26fff885a2c94542d989a31ed9710fa63ccb Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Thu, 26 Aug 2021 21:17:17 -0700 Subject: [PATCH 03/24] Add Ibex --- build.sbt | 7 ++++++- .../src/main/scala/config/IbexConfigs.scala | 14 ++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 generators/chipyard/src/main/scala/config/IbexConfigs.scala diff --git a/build.sbt b/build.sbt index d3e99cc9..b1f7e004 100644 --- a/build.sbt +++ b/build.sbt @@ -186,7 +186,7 @@ lazy val chipyard = (project in file("generators/chipyard")) .dependsOn(rocketchip, boom, hwacha, sifive_blocks, sifive_cache, iocell, sha3, // On separate line to allow for cleaner tutorial-setup patches dsptools, `rocket-dsp-utils`, - gemmini, icenet, tracegen, cva6, nvdla, sodor) + gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) @@ -218,6 +218,11 @@ lazy val cva6 = (project in file("generators/cva6")) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) +lazy val ibex = (project in file("generators/ibex")) + .dependsOn(rocketchip) + .settings(libraryDependencies ++= rocketLibDeps.value) + .settings(commonSettings) + lazy val sodor = (project in file("generators/riscv-sodor")) .dependsOn(rocketchip) .settings(libraryDependencies ++= rocketLibDeps.value) diff --git a/generators/chipyard/src/main/scala/config/IbexConfigs.scala b/generators/chipyard/src/main/scala/config/IbexConfigs.scala new file mode 100644 index 00000000..ef4f52ac --- /dev/null +++ b/generators/chipyard/src/main/scala/config/IbexConfigs.scala @@ -0,0 +1,14 @@ +package chipyard + +import chisel3._ + +import freechips.rocketchip.config.{Config} + +// --------------------- +// Ibex Configs +// --------------------- + +class IbexConfig extends Config( + new chipyard.config.WithBootROM ++ // Ibex reset vector is at 0x80 + new ibex.WithNIbexCores(1) ++ // single Ibex core + new chipyard.config.AbstractConfig) \ No newline at end of file From fb59ab6aca7c69265f950ad3045dceabb96013e6 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sat, 11 Sep 2021 20:59:44 -0700 Subject: [PATCH 04/24] Add Ibex documentation --- docs/Chipyard-Basics/Chipyard-Components.rst | 4 ++++ docs/Generators/Ibex.rst | 14 ++++++++++++++ docs/Generators/index.rst | 1 + 3 files changed, 19 insertions(+) create mode 100644 docs/Generators/Ibex.rst diff --git a/docs/Chipyard-Basics/Chipyard-Components.rst b/docs/Chipyard-Basics/Chipyard-Components.rst index 126766c4..edae3ac9 100644 --- a/docs/Chipyard-Basics/Chipyard-Components.rst +++ b/docs/Chipyard-Basics/Chipyard-Components.rst @@ -24,6 +24,10 @@ Processor Cores An in-order RISC-V core written in System Verilog. Previously called Ariane. See :ref:`Generators/CVA6:CVA6 Core` for more information. +**Ibex Core** + An in-order RISC-V core writeen in System Verilog. + See :ref:`Generators/Ibex:Ibex Core` for more information. + Accelerators ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/docs/Generators/Ibex.rst b/docs/Generators/Ibex.rst new file mode 100644 index 00000000..2b958358 --- /dev/null +++ b/docs/Generators/Ibex.rst @@ -0,0 +1,14 @@ +Ibex Core +==================================== + +`Ibex `__ is a parameterizable RV32 embedded core written in SystemVerilog, currently maintained by lowRISC. +The `Ibex core` is wrapped in an `Ibex tile` so it can be used with the `Rocket Chip SoC generator`. +The core exposes a custom memory interface, interrupt ports, and other misc. ports that are connected from within the tile to TileLink buses and other parameterization signals. + +.. Warning:: The Ibex mtvec register is 256 byte aligned. When writing/running tests, ensure that the trap vector is also 256 byte aligned. + +.. Warning:: The Ibex reset vector is located at 0x80. + +While the core itself is not a generator, we expose the same parameterization that the Ibex core provides so that all supported Ibex configurations are available. + +For more information, see the `GitHub repository `__. \ No newline at end of file diff --git a/docs/Generators/index.rst b/docs/Generators/index.rst index 6f11c875..22d7ad40 100644 --- a/docs/Generators/index.rst +++ b/docs/Generators/index.rst @@ -28,6 +28,7 @@ so changes to the generators themselves will automatically be used when building SiFive-Generators SHA3 CVA6 + Ibex NVDLA Sodor From 3df8d4d641b33848155c0fbf630c8eda0df4153f Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sat, 11 Sep 2021 21:04:35 -0700 Subject: [PATCH 05/24] Add Ibex to CI --- .circleci/check-commit.sh | 152 ++++++++++++++++++++++++++++++++++++++ .circleci/config.yml | 10 +++ .circleci/defaults.sh | 91 +++++++++++++++++++++++ .circleci/run-tests.sh | 120 ++++++++++++++++++++++++++++++ 4 files changed, 373 insertions(+) create mode 100755 .circleci/check-commit.sh create mode 100755 .circleci/defaults.sh create mode 100755 .circleci/run-tests.sh diff --git a/.circleci/check-commit.sh b/.circleci/check-commit.sh new file mode 100755 index 00000000..0d39b4e9 --- /dev/null +++ b/.circleci/check-commit.sh @@ -0,0 +1,152 @@ +#!/bin/bash + +# check to see that submodule commits are present on the master branch + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +# enter bhd repo +cd $LOCAL_CHIPYARD_DIR + +# ignore the private vlsi submodules +git config submodule.vlsi/hammer-cadence-plugins.update none +git config submodule.vlsi/hammer-mentor-plugins.update none +git config submodule.vlsi/hammer-synopsys-plugins.update none + +# initialize submodules and get the hashes +git submodule update --init +status=$(git submodule status) + +all_names=() + + +search_submodule() { + echo "Running check on submodule $submodule in $dir" + hash=$(echo "$status" | grep "$dir.*$submodule " | awk '{print$1}' | grep -o "[[:alnum:]]*") + for branch in "${branches[@]}" + do + echo "Searching for $hash in origin/$branch of $submodule" + (git -C $dir/$submodule branch -r --contains "$hash" | grep "origin/$branch") && true # needs init'ed submodules + if [ $? -eq 0 ] + then + all_names+=("$dir/$submodule $hash 0") + return + fi + done + all_names+=("$dir/$submodule $hash 1") + return +} + +search () { + for submodule in "${submodules[@]}" + do + search_submodule + done +} + +submodules=("cva6" "boom" "ibex" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor") +dir="generators" +if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] +then + branches=("master") +else + branches=("master" "dev") +fi +search + +submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests") +dir="toolchains/esp-tools" +branches=("master") +search + + +submodules=("riscv-gnu-toolchain" "riscv-isa-sim" "riscv-pk" "riscv-tests") +dir="toolchains/riscv-tools" +branches=("master") +search + +# riscv-openocd doesn't use its master branch +submodules=("riscv-openocd") +dir="toolchains/riscv-tools" +branches=("riscv") +search + +submodules=("qemu" "libgloss") +dir="toolchains" +branches=("master") +search + +submodules=("coremark" "firemarshal" "nvdla-workload" "spec2017") +dir="software" +if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] +then + branches=("master") +else + branches=("master" "dev") +fi +search + +submodules=("DRAMSim2" "axe" "barstools" "chisel-testers" "dsptools" "rocket-dsp-utils" "firrtl-interpreter" "torture" "treadle") +dir="tools" +if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] +then + branches=("master") +else + branches=("master" "dev") +fi +search + +submodules=("dromajo-src") +dir="tools/dromajo" +branches=("master") +search + +submodules=("firesim") +dir="sims" +if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] +then + branches=("master") +else + branches=("master" "dev") +fi +search + +submodules=("hammer") +dir="vlsi" +branches=("master") +search + +submodules=("fpga-shells") +dir="fpga" +branches=("master") +search + +# turn off verbose printing to make this easier to read +set +x + +# print 0's +for str in "${all_names[@]}"; +do + if [ 0 = $(echo "$str" | awk '{print$3}') ]; then + echo "$str" + fi +done + +echo "" + +# check if there was a non-zero return code and print 1's +EXIT=0 +for str in "${all_names[@]}"; +do + if [ ! 0 = $(echo "$str" | awk '{print$3}') ]; then + echo "$str" + EXIT=1 + fi +done + +echo "Done checking all submodules" +exit $EXIT diff --git a/.circleci/config.yml b/.circleci/config.yml index e207db9d..d97b47ce 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -252,6 +252,13 @@ jobs: group-key: "group-cores" project-key: "chipyard-sodor" timeout: "30m" + chipyard-ibex-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-ibex" + timeout: "30m" chipyard-multiclock-rocket-run-tests: executor: main-env steps: @@ -455,6 +462,9 @@ workflows: - chipyard-sodor-run-tests: requires: - prepare-chipyard-cores + - chipyard-ibex-run-tests: + requires: + - prepare-chipyard-cores - chipyard-dmirocket-run-tests: requires: - prepare-chipyard-peripherals diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh new file mode 100755 index 00000000..2d49d92a --- /dev/null +++ b/.circleci/defaults.sh @@ -0,0 +1,91 @@ +#!/bin/bash + +copy () { + rsync -avzp -e 'ssh' --exclude '.git' $1 $2 +} + +run () { + ssh -o "StrictHostKeyChecking no" -t $SERVER $@ +} + +run_script () { + ssh -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" +} + +clean () { + # remove remote work dir + run "rm -rf $REMOTE_WORK_DIR" +} + +# make parallelism +CI_MAKE_NPROC=8 +# chosen based on a 24c system shared with 1 other project +REMOTE_MAKE_NPROC=4 + +# verilator version +VERILATOR_VERSION=v4.034 + +# remote variables +REMOTE_PREFIX=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH +REMOTE_WORK_DIR=$REMOTE_PREFIX-$CIRCLE_SHA1-$CIRCLE_JOB +REMOTE_RISCV_DIR=$REMOTE_WORK_DIR/riscv-tools-install +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_FPGA_DIR=$REMOTE_CHIPYARD_DIR/fpga +REMOTE_JAVA_OPTS="-Xmx10G -Xss8M" +# Disable the supershell to greatly improve the readability of SBT output when captured by Circle CI +REMOTE_SBT_OPTS="-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=$REMOTE_PREFIX-$CIRCLE_SHA1-verilator-install + +# local variables (aka within the docker container) +LOCAL_CHECKOUT_DIR=$HOME/project +LOCAL_RISCV_DIR=$HOME/riscv-tools-install +LOCAL_ESP_DIR=$HOME/esp-tools-install +LOCAL_CHIPYARD_DIR=$LOCAL_CHECKOUT_DIR +LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator +LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim + +# key value store to get the build groups +declare -A grouping +grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-hetero chipyard-boom chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket" +grouping["group-peripherals"]="chipyard-dmirocket chipyard-blkdev chipyard-spiflashread chipyard-spiflashwrite chipyard-mmios chipyard-lbwif" +grouping["group-accels"]="chipyard-nvdla chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-streaming-fir chipyard-streaming-passthrough" +grouping["group-tracegen"]="tracegen tracegen-boom" +grouping["group-other"]="icenet testchipip" +grouping["group-fpga"]="arty vcu118" + +# key value store to get the build strings +declare -A mapping +mapping["chipyard-rocket"]="" +mapping["chipyard-dmirocket"]=" CONFIG=dmiRocketConfig" +mapping["chipyard-lbwif"]=" CONFIG=LBWIFRocketConfig" +mapping["chipyard-sha3"]=" CONFIG=Sha3RocketConfig" +mapping["chipyard-digitaltop"]=" TOP=DigitalTop" +mapping["chipyard-streaming-fir"]=" CONFIG=StreamingFIRRocketConfig" +mapping["chipyard-streaming-passthrough"]=" CONFIG=StreamingPassthroughRocketConfig" +mapping["chipyard-hetero"]=" CONFIG=LargeBoomAndRocketConfig" +mapping["chipyard-boom"]=" CONFIG=SmallBoomConfig" +mapping["chipyard-blkdev"]=" CONFIG=SimBlockDeviceRocketConfig" +mapping["chipyard-hwacha"]=" CONFIG=HwachaRocketConfig" +mapping["chipyard-gemmini"]=" CONFIG=GemminiRocketConfig" +mapping["chipyard-cva6"]=" CONFIG=CVA6Config" +mapping["chipyard-ibex"]=" CONFIG=IbexConfig" +mapping["chipyard-spiflashread"]=" CONFIG=LargeSPIFlashROMRocketConfig" +mapping["chipyard-spiflashwrite"]=" CONFIG=SmallSPIFlashRocketConfig" +mapping["chipyard-mmios"]=" CONFIG=MMIORocketConfig verilog" +mapping["tracegen"]=" CONFIG=NonBlockingTraceGenL2Config" +mapping["tracegen-boom"]=" CONFIG=BoomTraceGenConfig" +mapping["chipyard-nvdla"]=" CONFIG=SmallNVDLARocketConfig" +mapping["chipyard-sodor"]=" CONFIG=Sodor5StageConfig" +mapping["chipyard-multiclock-rocket"]=" CONFIG=MulticlockRocketConfig" + +mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests" +mapping["firesim-multiclock"]="SCALA_TEST=firesim.firesim.RocketMulticlockF1Tests" +mapping["fireboom"]="SCALA_TEST=firesim.firesim.BoomF1Tests" +mapping["icenet"]="SUB_PROJECT=icenet" +mapping["testchipip"]="SUB_PROJECT=testchipip" + +mapping["arty"]="SUB_PROJECT=arty verilog" +mapping["vcu118"]="SUB_PROJECT=vcu118 verilog" diff --git a/.circleci/run-tests.sh b/.circleci/run-tests.sh new file mode 100755 index 00000000..24deca0d --- /dev/null +++ b/.circleci/run-tests.sh @@ -0,0 +1,120 @@ +#!/bin/bash + +# run the different tests + +# 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 + +run_bmark () { + make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ +} + +run_asm () { + make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ +} + +run_both () { + run_bmark $@ + run_asm $@ +} + +run_tracegen () { + make tracegen -C $LOCAL_SIM_DIR $@ +} + +# TODO BUG: the run-binary command forces a rebuild of the simulator in CI +# instead, directly run the simulator binary +case $1 in + chipyard-rocket) + run_bmark ${mapping[$1]} + ;; + chipyard-dmirocket) + run_bmark ${mapping[$1]} + ;; + chipyard-lbwif) + run_bmark ${mapping[$1]} + ;; + chipyard-boom) + run_bmark ${mapping[$1]} + ;; + chipyard-hetero) + run_bmark ${mapping[$1]} + ;; + rocketchip) + run_bmark ${mapping[$1]} + ;; + chipyard-hwacha) + export RISCV=$LOCAL_ESP_DIR + export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib + export PATH=$RISCV/bin:$PATH + make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR ${mapping[$1]} + ;; + chipyard-gemmini) + export RISCV=$LOCAL_ESP_DIR + export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib + export PATH=$RISCV/bin:$PATH + GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests + rm -rf $GEMMINI_SOFTWARE_DIR/riscv-tests + cd $LOCAL_SIM_DIR + $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal + $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal + $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal + ;; + chipyard-sha3) + export RISCV=$LOCAL_ESP_DIR + export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib + export PATH=$RISCV/bin:$PATH + (cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh) + $LOCAL_SIM_DIR/simulator-chipyard-Sha3RocketConfig $LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv + ;; + chipyard-streaming-passthrough) + make -C $LOCAL_CHIPYARD_DIR/tests + $LOCAL_SIM_DIR/simulator-chipyard-StreamingPassthroughRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv + ;; + chipyard-streaming-fir) + make -C $LOCAL_CHIPYARD_DIR/tests + $LOCAL_SIM_DIR/simulator-chipyard-StreamingFIRRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv + ;; + chipyard-spiflashread) + make -C $LOCAL_CHIPYARD_DIR/tests + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary + ;; + chipyard-spiflashwrite) + make -C $LOCAL_CHIPYARD_DIR/tests + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary + [[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false + ;; + tracegen) + run_tracegen ${mapping[$1]} + ;; + tracegen-boom) + run_tracegen ${mapping[$1]} + ;; + chipyard-cva6) + make run-binary-fast -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv + ;; + chipyard-sodor) + run_asm ${mapping[$1]} + ;; + chipyard-ibex) + make run-binary-fast -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv + ;; + chipyard-nvdla) + make -C $LOCAL_CHIPYARD_DIR/tests + make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary + ;; + icenet) + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} + ;; + testchipip) + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} + ;; + *) + echo "No set of tests for $1. Did you spell it right?" + exit 1 + ;; +esac From bb7d4eb5ec0e0e8e9239a2688455575662010de5 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sat, 11 Sep 2021 21:31:50 -0700 Subject: [PATCH 06/24] Add ibex-wrapper module --- .gitmodules | 3 +++ generators/ibex | 1 + 2 files changed, 4 insertions(+) create mode 160000 generators/ibex diff --git a/.gitmodules b/.gitmodules index 6e5288e6..d19a3eb1 100644 --- a/.gitmodules +++ b/.gitmodules @@ -140,3 +140,6 @@ [submodule "tools/rocket-dsp-utils"] path = tools/rocket-dsp-utils url = https://github.com/ucb-bar/rocket-dsp-utils +[submodule "generators/ibex"] + path = generators/ibex + url = https://github.com/schwarz-em/ibex-wrapper diff --git a/generators/ibex b/generators/ibex new file mode 160000 index 00000000..52b0f673 --- /dev/null +++ b/generators/ibex @@ -0,0 +1 @@ +Subproject commit 52b0f673cd7ff925152e0ce8f58759c49fac900a From 2a050f2be83f6f49ba71cc02de397deaa0dc47c4 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sun, 12 Sep 2021 18:14:06 -0700 Subject: [PATCH 07/24] Update testchipip submodule --- generators/testchipip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/testchipip b/generators/testchipip index 0743c5a9..6d1ae1c4 160000 --- a/generators/testchipip +++ b/generators/testchipip @@ -1 +1 @@ -Subproject commit 0743c5a9410af713fb7a1c0025d6331dfedec328 +Subproject commit 6d1ae1c4ec7bf4deeee647f66feb6f8f6967e3d8 From 5ffc100323313f99a599edc2b58c1f9fe63c8e51 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Fri, 17 Sep 2021 23:09:36 -0700 Subject: [PATCH 08/24] Address PR comments for Ibex [ci skip] --- docs/Chipyard-Basics/Chipyard-Components.rst | 2 +- docs/Generators/Ibex.rst | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Chipyard-Basics/Chipyard-Components.rst b/docs/Chipyard-Basics/Chipyard-Components.rst index edae3ac9..1b9a8512 100644 --- a/docs/Chipyard-Basics/Chipyard-Components.rst +++ b/docs/Chipyard-Basics/Chipyard-Components.rst @@ -25,7 +25,7 @@ Processor Cores See :ref:`Generators/CVA6:CVA6 Core` for more information. **Ibex Core** - An in-order RISC-V core writeen in System Verilog. + An in-order 32 bit RISC-V core written in System Verilog. See :ref:`Generators/Ibex:Ibex Core` for more information. Accelerators diff --git a/docs/Generators/Ibex.rst b/docs/Generators/Ibex.rst index 2b958358..f437c1e4 100644 --- a/docs/Generators/Ibex.rst +++ b/docs/Generators/Ibex.rst @@ -1,14 +1,14 @@ Ibex Core ==================================== -`Ibex `__ is a parameterizable RV32 embedded core written in SystemVerilog, currently maintained by lowRISC. +`Ibex `__ is a parameterizable RV32IMC embedded core written in SystemVerilog, currently maintained by `lowRISC `__. The `Ibex core` is wrapped in an `Ibex tile` so it can be used with the `Rocket Chip SoC generator`. The core exposes a custom memory interface, interrupt ports, and other misc. ports that are connected from within the tile to TileLink buses and other parameterization signals. .. Warning:: The Ibex mtvec register is 256 byte aligned. When writing/running tests, ensure that the trap vector is also 256 byte aligned. -.. Warning:: The Ibex reset vector is located at 0x80. +.. Warning:: The Ibex reset vector is located at BOOT_ADDR + 0x80. While the core itself is not a generator, we expose the same parameterization that the Ibex core provides so that all supported Ibex configurations are available. -For more information, see the `GitHub repository `__. \ No newline at end of file +For more information, see the `GitHub repository for Ibex `__. \ No newline at end of file From 665ff79bb27e2035f709a8d3ac783c8d98482b6f Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Wed, 29 Sep 2021 22:34:28 -0700 Subject: [PATCH 09/24] List supported configs Address PR comments --- .circleci/run-tests.sh | 2 +- .gitmodules | 2 +- generators/chipyard/src/main/scala/config/IbexConfigs.scala | 5 +++-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/run-tests.sh b/.circleci/run-tests.sh index 24deca0d..051deefd 100755 --- a/.circleci/run-tests.sh +++ b/.circleci/run-tests.sh @@ -101,7 +101,7 @@ case $1 in run_asm ${mapping[$1]} ;; chipyard-ibex) - make run-binary-fast -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv + run_bmark ${mapping[$1]} ;; chipyard-nvdla) make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.gitmodules b/.gitmodules index d19a3eb1..caac6751 100644 --- a/.gitmodules +++ b/.gitmodules @@ -142,4 +142,4 @@ url = https://github.com/ucb-bar/rocket-dsp-utils [submodule "generators/ibex"] path = generators/ibex - url = https://github.com/schwarz-em/ibex-wrapper + url = https://github.com/ucb-bar/ibex-wrapper diff --git a/generators/chipyard/src/main/scala/config/IbexConfigs.scala b/generators/chipyard/src/main/scala/config/IbexConfigs.scala index ef4f52ac..b38b22f1 100644 --- a/generators/chipyard/src/main/scala/config/IbexConfigs.scala +++ b/generators/chipyard/src/main/scala/config/IbexConfigs.scala @@ -8,7 +8,8 @@ import freechips.rocketchip.config.{Config} // Ibex Configs // --------------------- +// Multi-core and 32b heterogeneous configs are supported + class IbexConfig extends Config( - new chipyard.config.WithBootROM ++ // Ibex reset vector is at 0x80 - new ibex.WithNIbexCores(1) ++ // single Ibex core + new ibex.WithNIbexCores(1) ++ new chipyard.config.AbstractConfig) \ No newline at end of file From 0c3be2a7efcdcf83a7be008ba77b11e9f6e7b427 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Wed, 29 Sep 2021 22:45:38 -0700 Subject: [PATCH 10/24] Bump testchipip bootrom changes --- generators/testchipip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/testchipip b/generators/testchipip index 6d1ae1c4..47149471 160000 --- a/generators/testchipip +++ b/generators/testchipip @@ -1 +1 @@ -Subproject commit 6d1ae1c4ec7bf4deeee647f66feb6f8f6967e3d8 +Subproject commit 471494717206408606804c6b463a28806224e2ce From 79f43d08d67b471759f3b8d42435f0bb89423db4 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sat, 2 Oct 2021 23:06:28 -0700 Subject: [PATCH 11/24] Point to testchipip bootrom file changes --- generators/testchipip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/testchipip b/generators/testchipip index 47149471..5917176c 160000 --- a/generators/testchipip +++ b/generators/testchipip @@ -1 +1 @@ -Subproject commit 471494717206408606804c6b463a28806224e2ce +Subproject commit 5917176c911cec667655984c2adc566aa404f4fe From 23cdfde16949d77171cef458c0afbe7a390179f8 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Tue, 26 Oct 2021 20:30:32 -0700 Subject: [PATCH 12/24] Bump verilator to v4.212 --- .circleci/defaults.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh index 2d49d92a..ecceaf6b 100755 --- a/.circleci/defaults.sh +++ b/.circleci/defaults.sh @@ -23,7 +23,7 @@ CI_MAKE_NPROC=8 REMOTE_MAKE_NPROC=4 # verilator version -VERILATOR_VERSION=v4.034 +VERILATOR_VERSION=v4.212 # remote variables REMOTE_PREFIX=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH From fb6bb912909023de0afbdfb0b6e9be37bcabcca6 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Tue, 26 Oct 2021 21:54:32 -0700 Subject: [PATCH 13/24] Bump ibex --- generators/ibex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/ibex b/generators/ibex index 52b0f673..341c43c5 160000 --- a/generators/ibex +++ b/generators/ibex @@ -1 +1 @@ -Subproject commit 52b0f673cd7ff925152e0ce8f58759c49fac900a +Subproject commit 341c43c5a27f0e71f48e462a641f170751f295cd From 663af1c4f6fb5e1cb72a59aaac86b64aa87bc0b7 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Thu, 28 Oct 2021 17:24:57 -0700 Subject: [PATCH 14/24] Regenerate patch for Ibex --- scripts/tutorial-patches/build.sbt.patch | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/tutorial-patches/build.sbt.patch b/scripts/tutorial-patches/build.sbt.patch index 0e55dde4..dd26bcc9 100644 --- a/scripts/tutorial-patches/build.sbt.patch +++ b/scripts/tutorial-patches/build.sbt.patch @@ -1,5 +1,5 @@ diff --git a/build.sbt b/build.sbt -index 3123c4b8..487fc428 100644 +index b1f7e004..f39c3712 100644 --- a/build.sbt +++ b/build.sbt @@ -184,7 +184,7 @@ lazy val testchipipLib = "edu.berkeley.cs" %% "testchipip" % "1.0-020719-SNAPSHO @@ -7,11 +7,11 @@ index 3123c4b8..487fc428 100644 .sourceDependency(testchipip, testchipipLib) .dependsOn(rocketchip, boom, hwacha, sifive_blocks, sifive_cache, iocell, - sha3, // On separate line to allow for cleaner tutorial-setup patches -+// sha3, // On separate line to allow for cleaner tutorial-setup patches ++ //sha3, // On separate line to allow for cleaner tutorial-setup patches dsptools, `rocket-dsp-utils`, - gemmini, icenet, tracegen, cva6, nvdla, sodor) + gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex) .settings(libraryDependencies ++= rocketLibDeps.value) -@@ -223,11 +223,11 @@ lazy val sodor = (project in file("generators/riscv-sodor")) +@@ -228,11 +228,11 @@ lazy val sodor = (project in file("generators/riscv-sodor")) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) From 082f94c9371a90d55d01e8b4c3824ebbf169088b Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sat, 13 Nov 2021 22:53:49 -0800 Subject: [PATCH 15/24] Revert verilator back to v4.034 --- .circleci/defaults.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh index ecceaf6b..2d49d92a 100755 --- a/.circleci/defaults.sh +++ b/.circleci/defaults.sh @@ -23,7 +23,7 @@ CI_MAKE_NPROC=8 REMOTE_MAKE_NPROC=4 # verilator version -VERILATOR_VERSION=v4.212 +VERILATOR_VERSION=v4.034 # remote variables REMOTE_PREFIX=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH From 74082738b6a97fd41f915220f86e61ab9ee2f5d9 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sat, 13 Nov 2021 22:55:31 -0800 Subject: [PATCH 16/24] Increase Hwacha timeout --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d97b47ce..ec59d8ca 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -316,7 +316,7 @@ jobs: tools-version: "esp-tools" group-key: "group-accels" project-key: "chipyard-hwacha" - timeout: "30m" + timeout: "60m" chipyard-gemmini-run-tests: executor: main-env steps: From 6f8b95b4ccb3ea0885968526f26446eb784e3449 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sat, 13 Nov 2021 22:59:45 -0800 Subject: [PATCH 17/24] Bump makefile commits --- generators/ibex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/ibex b/generators/ibex index 341c43c5..a1997692 160000 --- a/generators/ibex +++ b/generators/ibex @@ -1 +1 @@ -Subproject commit 341c43c5a27f0e71f48e462a641f170751f295cd +Subproject commit a1997692d0573cdd6eb418a729bf5d63c17b3731 From f2e8266ed6b6bed6a8db416ba12c3be96691457f Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Wed, 17 Nov 2021 15:04:38 -0800 Subject: [PATCH 18/24] Point to ibex submodule changes --- generators/ibex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/ibex b/generators/ibex index a1997692..d08e847e 160000 --- a/generators/ibex +++ b/generators/ibex @@ -1 +1 @@ -Subproject commit a1997692d0573cdd6eb418a729bf5d63c17b3731 +Subproject commit d08e847ead100895c81c0ab3a3513a4c17823ef1 From b6741b052a3efa5fa2c567420edd113c0d04d5e3 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Wed, 17 Nov 2021 15:21:09 -0800 Subject: [PATCH 19/24] Revert everything to most recent dev commit --- .github/actions/build-extra-tests/action.yml | 28 - .github/actions/prepare-rtl/action.yml | 25 - .github/actions/toolchain-build/action.yml | 31 - .github/scripts/build-extra-tests.sh | 4 + .github/scripts/build-toolchains.sh | 3 + .github/scripts/check-commit.sh | 1 - .github/scripts/create-hash.sh | 2 +- .github/scripts/defaults.sh | 7 +- .github/scripts/do-rtl-build.sh | 66 - .github/scripts/install-verilator.sh | 23 - .github/scripts/run-firesim-scala-tests.sh | 48 - .github/scripts/run-tests.sh | 40 +- .../workflows/chipyard-rocket-run-tests.yml | 1285 ----------------- .github/workflows/chipyard-run-tests.yml | 2 - 14 files changed, 33 insertions(+), 1532 deletions(-) delete mode 100644 .github/actions/build-extra-tests/action.yml delete mode 100755 .github/scripts/do-rtl-build.sh delete mode 100755 .github/scripts/install-verilator.sh delete mode 100755 .github/scripts/run-firesim-scala-tests.sh delete mode 100644 .github/workflows/chipyard-rocket-run-tests.yml diff --git a/.github/actions/build-extra-tests/action.yml b/.github/actions/build-extra-tests/action.yml deleted file mode 100644 index 80ae8fdf..00000000 --- a/.github/actions/build-extra-tests/action.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: build-extra-tests -description: 'Builds extra test required for some flows' - -inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' - cache-key: - description: Use this for caching - required: true -runs: - using: "composite" - steps: - - uses: actions/cache@v2 - id: build-extra-tools-cache - with: - path: extra-tests-install - key: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - restore-keys: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - - name: Build extra tests if not cached - run: | - export RISCV="/__w/chipyard/chipyard/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" - .github/scripts/build-extra-tests.sh - shell: bash - diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index ade87134..25098bfc 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -2,24 +2,13 @@ name: prepare-rtl description: 'Builds RTL based on parameters, caches the entire chipyard root dir when done' inputs: -<<<<<<< HEAD -======= - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' ->>>>>>> 52c752ba... Move Chipyard CI to Github Actions group-key: description: group key required: true build-script: description: rtl build script to use required: false -<<<<<<< HEAD default: "remote-do-rtl-build.sh" -======= - default: "do-rtl-build.sh" ->>>>>>> 52c752ba... Move Chipyard CI to Github Actions build-type: description: type of build required: false @@ -28,12 +17,9 @@ inputs: runs: using: "composite" steps: -<<<<<<< HEAD - name: Build RISC-V toolchains uses: ./.github/actions/toolchain-build -======= ->>>>>>> 52c752ba... Move Chipyard CI to Github Actions - uses: actions/cache@v2 id: rtl-build-id with: @@ -42,24 +28,13 @@ runs: sims/firesim/sim generators/gemmini/software/gemmini-rocc-tests key: ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }} -<<<<<<< HEAD - name: Run RTL build if not cached -======= - - name: run rtl build script if not cached ->>>>>>> 52c752ba... Move Chipyard CI to Github Actions run: | if [[ "${{ steps.rtl-build-id.outputs.cache-hit }}" != 'true' ]]; then echo "Cache miss on ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }}" ./.github/scripts/${{ inputs.build-script }} ${{ inputs.group-key }} ${{ inputs.build-type }} else -<<<<<<< HEAD echo "Cache hit do not rebuild RTL for ${{ inputs.group-key }}" fi shell: bash -======= - echo "cache hit do not prepare rtl" - fi - shell: bash - ->>>>>>> 52c752ba... Move Chipyard CI to Github Actions diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 95cb0a4d..c3492054 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,5 +1,4 @@ name: toolchain-build -<<<<<<< HEAD description: 'Build/cache both toolchains' runs: @@ -50,33 +49,3 @@ runs: - name: Build ESP RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh esp-tools shell: bash -======= -description: 'Builds the selected toolchain' - -inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' - cache-key: - description: Use this for caching - required: true -runs: - using: "composite" - steps: - - uses: actions/cache@v2 - id: toolchain-build-id - with: - path: ${{ inputs.tools-version }}-install - key: ${{ inputs.cache-key }} - - name: run build toolchain if not cached - run: | - if [[ "${{ steps.toolchain-build-id.outputs.cache-hit }}" != 'true' ]]; then - echo "Cache miss on ${{ inputs.tools-version }}-install" - ./.github/scripts/build-toolchains.sh ${{ inputs.tools-version }} - else - echo "cache hit do not generate build ${{ inputs.tools-version }}" - fi - shell: bash - ->>>>>>> 52c752ba... Move Chipyard CI to Github Actions diff --git a/.github/scripts/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh index e38b50fe..a77f5482 100755 --- a/.github/scripts/build-extra-tests.sh +++ b/.github/scripts/build-extra-tests.sh @@ -7,5 +7,9 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + make -C $LOCAL_CHIPYARD_DIR/tests clean make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.github/scripts/build-toolchains.sh b/.github/scripts/build-toolchains.sh index 160b6f5a..1f23c408 100755 --- a/.github/scripts/build-toolchains.sh +++ b/.github/scripts/build-toolchains.sh @@ -15,4 +15,7 @@ if [ ! -d "$HOME/$1-install" ]; then # init all submodules including the tools CHIPYARD_DIR="$LOCAL_CHIPYARD_DIR" NPROC=$CI_MAKE_NPROC $LOCAL_CHIPYARD_DIR/scripts/build-toolchains.sh $1 + + # de-init the toolchain area to save on space (forced to ignore local changes) + git submodule deinit --force $LOCAL_CHIPYARD_DIR/toolchains/$1 fi diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index 1b59191e..004acc5a 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -9,7 +9,6 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh -# enter bhd repo cd $LOCAL_CHIPYARD_DIR # ignore the private vlsi submodules diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index dae9f25d..f64c0696 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -17,4 +17,4 @@ for tools in 'riscv-tools' 'esp-tools' ; do echo "${line#[!0-9a-f]}" done > "${tools}.hash" done -echo "Hashfile for riscv-tools and esp-tools created in $HOME" +echo "Hashfile for riscv-tools and esp-tools created in $PWD" diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index cb48e932..04ccd331 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,20 +1,19 @@ #!/bin/bash # make parallelism -CI_MAKE_NPROC=4 +CI_MAKE_NPROC=8 # chosen based on a 24c system shared with 1 other project REMOTE_MAKE_NPROC=4 # verilator version VERILATOR_VERSION=v4.034 -# remote variables - +HOME=$GITHUB_WORKSPACE CURRENT_BRANCH=$(git branch --show-current) +# remote variables # CI_DIR is defined externally based on the GH repository secret BUILDDIR -HOME=`pwd` REMOTE_PREFIX=$CI_DIR/${GITHUB_REPOSITORY#*/}-$CURRENT_BRANCH REMOTE_WORK_DIR=$GITHUB_WORKSPACE REMOTE_RISCV_DIR=$GITHUB_WORKSPACE/riscv-tools-install diff --git a/.github/scripts/do-rtl-build.sh b/.github/scripts/do-rtl-build.sh deleted file mode 100755 index 1cf06978..00000000 --- a/.github/scripts/do-rtl-build.sh +++ /dev/null @@ -1,66 +0,0 @@ -#!/bin/bash - -# create the different verilator builds -# usage: -# do-rtl-build.sh sim -# run rtl build for simulations and copy back results -# do-rtl-build.sh fpga -# run rtl build for fpga and don't copy back results - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -# call clean on exit -trap clean EXIT - -cd $REMOTE_CHIPYARD_DIR -./scripts/init-submodules-no-riscv-tools.sh -./scripts/init-fpga.sh - -TOOLS_DIR=$REMOTE_RISCV_DIR -LD_LIB_DIR=$REMOTE_RISCV_DIR/lib - -if [ $1 = "group-accels" ]; then - export RISCV=$REMOTE_ESP_DIR - export LD_LIBRARY_PATH=$REMOTE_ESP_DIR/lib - export PATH=$RISCV/bin:$PATH - GEMMINI_SOFTWARE_DIR=$REMOTE_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests - cd $GEMMINI_SOFTWARE_DIR - git submodule update --init --recursive gemmini-rocc-tests - cd gemmini-rocc-tests - ./build.sh -fi - -# choose what make dir to use - -case $2 in - "sim") - REMOTE_MAKE_DIR=$REMOTE_SIM_DIR - ;; - "fpga") - REMOTE_MAKE_DIR=$REMOTE_FPGA_DIR - ;; -esac - -# enter the verilator directory and build the specific config on remote server -export RISCV=$TOOLS_DIR -make -C $REMOTE_MAKE_DIR clean - -read -a keys <<< ${grouping[$1]} - -# need to set the PATH to use the new verilator (with the new verilator root) -for key in "${keys[@]}" -do - export RISCV=$TOOLS_DIR - export LD_LIBRARY_PATH=$LD_LIB_DIR - export PATH=$REMOTE_VERILATOR_DIR/bin:$PATH - export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR - export COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache - make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_OPTS=$REMOTE_JAVA_OPTS SBT_OPTS=$REMOTE_SBT_OPTS ${mapping[$key]} -done - -rm -rf $REMOTE_CHIPYARD_DIR/project diff --git a/.github/scripts/install-verilator.sh b/.github/scripts/install-verilator.sh deleted file mode 100755 index 1159fc47..00000000 --- a/.github/scripts/install-verilator.sh +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/bash - -# move verilator to the remote server - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -# clean older directories (delete prior directories related to this branch also) - -$SCRIPT_DIR/clean-old-files.sh $CI_DIR -rm -rf $REMOTE_PREFIX* - -git clone http://git.veripool.org/git/verilator $REMOTE_VERILATOR_DIR -cd $REMOTE_VERILATOR_DIR -git checkout $VERILATOR_VERSION -autoconf -export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR -./configure -make -j$REMOTE_MAKE_NPROC diff --git a/.github/scripts/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh deleted file mode 100755 index 9b329fa7..00000000 --- a/.github/scripts/run-firesim-scala-tests.sh +++ /dev/null @@ -1,48 +0,0 @@ -#!/bin/bash - -# create the different verilator builds -# argument is the make command string - -# turn echo on and error on earliest command -set -ex - -# get shared variables -SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" -source $SCRIPT_DIR/defaults.sh - -# call clean on exit -trap clean EXIT - -export RISCV="$REMOTE_RISCV_DIR" -export LD_LIBRARY_PATH="$RISCV/lib" -export PATH="$RISCV/bin:$PATH" - -# Directory locations for handling firesim-local installations of libelf/libdwarf -# This would generally be handled by build-setup.sh/firesim-setup.sh -firesim_sysroot=lib-install -remote_firesim_sysroot=$REMOTE_FIRESIM_DIR/$firesim_sysroot - -cd $REMOTE_CHIPYARD_DIR -./scripts/init-submodules-no-riscv-tools.sh -cd $REMOTE_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib -git submodule update --init elfutils libdwarf -cd $REMOTE_CHIPYARD_DIR/sims/firesim -mkdir -p $remote_firesim_sysroot -./scripts/build-libelf.sh $remote_firesim_sysroot -./scripts/build-libdwarf.sh $remote_firesim_sysroot -cd $REMOTE_CHIPYARD_DIR - -make -C $REMOTE_CHIPYARD_DIR/tools/dromajo/dromajo-src/src - -TOOLS_DIR=$REMOTE_RISCV_DIR - -LD_LIB_DIR=$remote_firesim_sysroot/lib:$REMOTE_RISCV_DIR/lib - -# Run Firesim Scala Tests -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 COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache -make -C $REMOTE_FIRESIM_DIR JAVA_OPTS=$REMOTE_JAVA_OPTS SBT_OPTS=$REMOTE_SBT_OPTS testOnly ${mapping[$1]} diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index ab3cf5cc..ffa61db5 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -9,12 +9,18 @@ set -ex SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + +DISABLE_SIM_PREREQ="BREAK_SIM_PREREQ=1" + run_bmark () { - make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ + make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ } run_asm () { - make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ + make run-asm-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ } run_both () { @@ -23,11 +29,9 @@ run_both () { } run_tracegen () { - make tracegen -C $LOCAL_SIM_DIR $@ + make tracegen -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ } -# TODO BUG: the run-binary command forces a rebuild of the simulator in CI -# instead, directly run the simulator binary case $1 in chipyard-rocket) run_bmark ${mapping[$1]} @@ -51,7 +55,7 @@ case $1 in export RISCV=$LOCAL_ESP_DIR export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib export PATH=$RISCV/bin:$PATH - make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR ${mapping[$1]} + make run-rv64uv-p-asm-tests -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} ;; chipyard-gemmini) export RISCV=$LOCAL_ESP_DIR @@ -60,32 +64,32 @@ case $1 in GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests rm -rf $GEMMINI_SOFTWARE_DIR/riscv-tests cd $LOCAL_SIM_DIR - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal - $LOCAL_SIM_DIR/simulator-chipyard-GemminiRocketConfig $GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/mvin_mvout-baremetal ;; chipyard-sha3) export RISCV=$LOCAL_ESP_DIR export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib export PATH=$RISCV/bin:$PATH (cd $LOCAL_CHIPYARD_DIR/generators/sha3/software && ./build.sh) - $LOCAL_SIM_DIR/simulator-chipyard-Sha3RocketConfig $LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/generators/sha3/software/tests/bare/sha3-rocc.riscv ;; chipyard-streaming-passthrough) make -C $LOCAL_CHIPYARD_DIR/tests - $LOCAL_SIM_DIR/simulator-chipyard-StreamingPassthroughRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-passthrough.riscv ;; chipyard-streaming-fir) make -C $LOCAL_CHIPYARD_DIR/tests - $LOCAL_SIM_DIR/simulator-chipyard-StreamingFIRRocketConfig $LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} run-binary-fast BINARY=$LOCAL_CHIPYARD_DIR/tests/streaming-fir.riscv ;; chipyard-spiflashread) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashread.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary-fast ;; chipyard-spiflashwrite) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/spiflashwrite.riscv SIM_FLAGS="+spiflash0=${LOCAL_CHIPYARD_DIR}/tests/spiflash.img" run-binary-fast [[ "`xxd $LOCAL_CHIPYARD_DIR/tests/spiflash.img | grep 1337\ 00ff\ aa55\ face | wc -l`" == "6" ]] || false ;; tracegen) @@ -95,20 +99,20 @@ case $1 in run_tracegen ${mapping[$1]} ;; chipyard-cva6) - make run-binary-fast -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv + make run-binary-fast -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv ;; chipyard-sodor) run_asm ${mapping[$1]} ;; chipyard-nvdla) make -C $LOCAL_CHIPYARD_DIR/tests - make -C $LOCAL_SIM_DIR ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary + make -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$LOCAL_CHIPYARD_DIR/tests/nvdla.riscv run-binary-fast ;; icenet) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} ;; testchipip) - make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR ${mapping[$1]} + make run-binary-fast BINARY=none -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} ;; *) echo "No set of tests for $1. Did you spell it right?" diff --git a/.github/workflows/chipyard-rocket-run-tests.yml b/.github/workflows/chipyard-rocket-run-tests.yml deleted file mode 100644 index 74dd262c..00000000 --- a/.github/workflows/chipyard-rocket-run-tests.yml +++ /dev/null @@ -1,1285 +0,0 @@ -name: chipyard-ci-process - -on: [push] - -env: - tools-cache-version: v7 - CI_DIR: ${{ secrets.BUILDDIR }} - -jobs: - commit-on-master-check: - name: commit-on-master-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Check commits of each submodule - run: .github/scripts/check-commit.sh - - tutorial-setup-check: - name: tutorial-setup-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Check that the tutorial-setup patches apply - run: scripts/tutorial-setup.sh - - documentation-check: - name: documentation-check - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Check that documentation builds with no warnings/errors - run: | - sudo apt-get update -y - sudo apt-get install -y python3-pip - sudo pip3 install -r docs/requirements.txt - make -C docs html - - name: Show error log from sphinx if failed - if: ${{ failure() }} - run: cat /tmp/sphinx-err*.log - - make-keys: - name: make-keys - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - name: Checkout - uses: actions/checkout@v2 - - name: Generate hashes - run: .github/scripts/create-hash.sh - - name: Generate keys - id: genkey - run: | - echo "::set-output name=riscvtools-cache-key::riscv-tools-installed-${{ env.tools-cache-version }}-$(shasum riscv-tools.hash | cut -d' ' -f1)" - echo "::set-output name=esptools-cache-key::esp-tools-installed-${{ env.tools-cache-version }}-$(shasum esp-tools.hash | cut -d' ' -f1)" - echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - - name: Show key - run: | - echo "riscvtools key is " ${{ steps.genkey.outputs.riscvtools-cache-key }} - echo "esptools key is " ${{ steps.genkey.outputs.esptools-cache-key }} - echo "extra-tests key is " ${{ steps.genkey.outputs.extra-tests-cache-key }} - outputs: - riscvtools-cache-key: ${{ steps.genkey.outputs.riscvtools-cache-key }} - esptools-cache-key: ${{ steps.genkey.outputs.esptools-cache-key }} - extra-tests-cache-key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - - install-riscv-toolchain: - needs: make-keys - name: install-riscv-toolchain - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - install-esp-toolchain: - needs: make-keys - name: install-esp-toolchain - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - build-extra-tests: - name: build-extra-tests - needs: [make-keys, install-riscv-toolchain] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - uses: actions/cache@v2 - id: build-extra-tools-cache - with: - path: extra-tests-install - key: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - restore-keys: ${{ needs.make-keys.outputs.extra-tests-cache-key }} - - name: Build extra tests if not cached - run: | - export RISCV="/__w/chipyard/chipyard/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" - .github/scripts/build-extra-tests.sh - - install-verilator: - name: install-verilator - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Build verilator on remote - run: .github/scripts/install-verilator.sh - - # Sentinel job to simplify how we specify which that basic setup is complete - # - # When adding new prep jobs, please add them to `needs` below - setup-complete: - name: "setup complete" - needs: [commit-on-master-check, tutorial-setup-check, documentation-check, - install-riscv-toolchain, install-esp-toolchain, install-verilator, - build-extra-tests] - runs-on: ubuntu-latest - steps: - - name: Set up complete - run: echo Set up is complete! - - ########################################################################## - - prepare-chipyard-cores: - name: prepare-chipyard-cores - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - prepare-chipyard-peripherals: - name: prepare-chipyard-peripherals - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - prepare-chipyard-accels: - name: prepare-chipyard-accels - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - prepare-chipyard-tracegen: - name: prepare-chipyard-tracegen - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - - prepare-chipyard-other: - name: prepare-chipyard-other - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - - prepare-chipyard-fpga: - name: prepare-chipyard-fpga - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-fpga" - build-type: "fpga" - - ########################################################################## - - chipyard-rocket-run-tests: - name: chipyard-rocket-run-tests - needs: [make-keys, prepare-chipyard-cores] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-rocket" - - chipyard-hetero-run-tests: - name: chipyard-hetero-run-tests - needs: [make-keys, prepare-chipyard-cores] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-hetero" - - chipyard-boom-run-tests: - name: chipyard-boom-run-tests - needs: [make-keys, prepare-chipyard-cores] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-boom" - - chipyard-cva6-run-tests: - name: chipyard-cva6-run-tests - needs: [make-keys, prepare-chipyard-cores] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-cva6" - - chipyard-sodor-run-tests: - name: chipyard-sodor-run-tests - needs: [make-keys, prepare-chipyard-cores] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-cores" - project-key: "chipyard-sodor" - - chipyard-dmirocket-run-tests: - name: chipyard-dmirocket-run-tests - needs: [make-keys, prepare-chipyard-peripherals] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-dmirocket" - - chipyard-spiflashwrite-run-tests: - name: chipyard-spiflashwrite-run-tests - needs: [make-keys, prepare-chipyard-peripherals] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-spiflashwrite" - - chipyard-spiflashread-run-tests: - name: chipyard-spiflashread-run-tests - needs: [make-keys, prepare-chipyard-peripherals] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-spiflashread" - - chipyard-lbwif-run-tests: - name: chipyard-lbwif-run-tests - needs: [make-keys, prepare-chipyard-peripherals] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-peripherals" - project-key: "chipyard-lbwif" - - chipyard-sha3-run-tests: - name: chipyard-sha3-run-tests - needs: [make-keys, prepare-chipyard-accels] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-sha3" - - chipyard-streaming-fir-run-tests: - name: chipyard-streaming-fir-run-tests - needs: [make-keys, prepare-chipyard-accels] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-streaming-fir" - - chipyard-streaming-passthrough-run-tests: - name: chipyard-streaming-passthrough-run-tests - needs: [make-keys, prepare-chipyard-accels] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-streaming-passthrough" - - chipyard-hwacha-run-tests: - name: chipyard-hwacha-run-tests - needs: [make-keys, prepare-chipyard-accels] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-hwacha" - - chipyard-gemmini-run-tests: - name: chipyard-gemmini-run-tests - needs: [make-keys, prepare-chipyard-accels] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-gemmini" - - chipyard-nvdla-run-tests: - name: chipyard-nvdla-run-tests - needs: [make-keys, prepare-chipyard-accels] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-accels" - project-key: "chipyard-nvdla" - - tracegen-boom-run-tests: - name: tracegen-boom-run-tests - needs: [make-keys, prepare-chipyard-tracegen] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-tracegen" - project-key: "tracegen-boom" - - tracegen-run-tests: - name: tracegen-run-tests - needs: [make-keys, prepare-chipyard-tracegen] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-tracegen" - project-key: "tracegen" - - icenet-run-tests: - name: icenet-run-tests - needs: [make-keys, prepare-chipyard-other] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "icenet" - - testchipip-run-tests: - name: testchipip-run-tests - needs: [make-keys, prepare-chipyard-other] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "group-other" - project-key: "testchipip" - - firesim-run-tests: - name: firesim-run-tests - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "firesim" - run-script: "run-firesim-scala-tests.sh" - - fireboom-run-tests: - name: fireboom-run-tests - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "fireboom" - run-script: "run-firesim-scala-tests.sh" - - firesim-multiclock-run-tests: - name: firesim-multiclock-run-tests - needs: [make-keys, setup-complete] - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - env: - BUILDSERVER: ${{ secrets.BUILDSERVER }} - BUILDUSER: ${{ secrets.BUILDUSER }} - SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - steps: - - name: Checkout - uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - - name: Run tests - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "firesim-multiclock" - run-script: "run-firesim-scala-tests.sh" - - # Sentinel job to simplify how we specify which checks need to pass in branch - # protection and in Mergify - # - # When adding new top level jobs, please add them to `needs` below - all_tests_passed: - name: "all tests passed" - needs: [chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, - chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, - chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, - chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, - chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, - tracegen-boom-run-tests, tracegen-run-tests, - icenet-run-tests, testchipip-run-tests, - firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - runs-on: ubuntu-latest - steps: - - run: echo Success! \ No newline at end of file diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index fc74e3c0..c932d3e6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,7 +20,6 @@ jobs: with: access_token: ${{ github.token }} -<<<<<<< HEAD commit-on-master-check: name: commit-on-master-check runs-on: ubuntu-latest @@ -138,7 +137,6 @@ jobs: run: .github/scripts/remote-install-verilator.sh - uses: ./.github/actions/job-end -<<<<<<< HEAD # Sentinel job to simplify how we specify which that basic setup is complete # # When adding new prep jobs, please add them to `needs` below From 94ae7af00743f56cc6f2c07ebb0e4a72371df86d Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Wed, 17 Nov 2021 15:26:59 -0800 Subject: [PATCH 20/24] Add Ibex to GHA --- .github/scripts/check-commit.sh | 2 +- .github/scripts/defaults.sh | 3 ++- .github/scripts/run-tests.sh | 3 +++ .github/workflows/chipyard-run-tests.yml | 22 +++++++++++++++++++++- 4 files changed, 27 insertions(+), 3 deletions(-) diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index 004acc5a..eb3278fd 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -47,7 +47,7 @@ search () { done } -submodules=("cva6" "boom" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor") +submodules=("cva6" "ibex" "boom" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chip" "sha3" "sifive-blocks" "sifive-cache" "testchipip" "riscv-sodor") dir="generators" if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] then diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 04ccd331..33805e77 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -37,7 +37,7 @@ LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim # key value store to get the build groups declare -A grouping -grouping["group-cores"]="chipyard-cva6 chipyard-rocket chipyard-hetero chipyard-boom chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket" +grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-hetero chipyard-boom chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket" grouping["group-peripherals"]="chipyard-dmirocket chipyard-blkdev chipyard-spiflashread chipyard-spiflashwrite chipyard-mmios chipyard-lbwif" grouping["group-accels"]="chipyard-nvdla chipyard-sha3 chipyard-hwacha chipyard-gemmini chipyard-streaming-fir chipyard-streaming-passthrough" grouping["group-tracegen"]="tracegen tracegen-boom" @@ -59,6 +59,7 @@ mapping["chipyard-blkdev"]=" CONFIG=SimBlockDeviceRocketConfig" mapping["chipyard-hwacha"]=" CONFIG=HwachaRocketConfig" mapping["chipyard-gemmini"]=" CONFIG=GemminiRocketConfig" mapping["chipyard-cva6"]=" CONFIG=CVA6Config" +mapping["chipyard-ibex"]=" CONFIG=IbexConfig" mapping["chipyard-spiflashread"]=" CONFIG=LargeSPIFlashROMRocketConfig" mapping["chipyard-spiflashwrite"]=" CONFIG=SmallSPIFlashRocketConfig" mapping["chipyard-mmios"]=" CONFIG=MMIORocketConfig verilog" diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index ffa61db5..58a0e143 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -101,6 +101,9 @@ case $1 in chipyard-cva6) make run-binary-fast -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv ;; + chipyard-ibex) + run_bmark ${mapping[$1]} + ;; chipyard-sodor) run_asm ${mapping[$1]} ;; diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c932d3e6..689892bf 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -329,6 +329,26 @@ jobs: project-key: "chipyard-cva6" - uses: ./.github/actions/job-end + chipyard-ibex-run-tests: + name: chipyard-ibex-run-tests + needs: prepare-chipyard-cores + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "group-cores" + project-key: "chipyard-ibex" + - uses: ./.github/actions/job-end + chipyard-sodor-run-tests: name: chipyard-sodor-run-tests needs: prepare-chipyard-cores @@ -690,7 +710,7 @@ jobs: all_tests_passed: name: "all tests passed" needs: [commit-on-master-check, tutorial-setup-check, documentation-check, - chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, + chipyard-rocket-run-tests, chipyard-hetero-run-tests, chipyard-boom-run-tests, chipyard-cva6-run-tests, chipyard-ibex-run-tests, chipyard-sodor-run-tests, chipyard-dmirocket-run-tests, chipyard-spiflashwrite-run-tests, chipyard-spiflashread-run-tests, chipyard-lbwif-run-tests, chipyard-sha3-run-tests, chipyard-streaming-fir-run-tests, chipyard-streaming-passthrough-run-tests, chipyard-hwacha-run-tests, From 086cc1f74f83110c7824365f584b7a796f620e0b Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sun, 21 Nov 2021 18:30:21 -0800 Subject: [PATCH 21/24] Address PR comments for Ibex --- .circleci/build-extra-tests.sh | 11 +++ .circleci/build-toolchains.sh | 18 ++++ .circleci/clean-old-files.sh | 29 ++++++ .circleci/create-hash.sh | 23 +++++ .circleci/do-rtl-build.sh | 95 +++++++++++++++++++ .circleci/install-verilator.sh | 25 +++++ .circleci/run-firesim-scala-tests.sh | 62 ++++++++++++ .circleci/run-tests.sh | 2 +- .github/README.md | 137 --------------------------- .github/scripts/run-tests.sh | 2 +- generators/ibex | 2 +- 11 files changed, 266 insertions(+), 140 deletions(-) create mode 100755 .circleci/build-extra-tests.sh create mode 100755 .circleci/build-toolchains.sh create mode 100755 .circleci/clean-old-files.sh create mode 100755 .circleci/create-hash.sh create mode 100755 .circleci/do-rtl-build.sh create mode 100755 .circleci/install-verilator.sh create mode 100755 .circleci/run-firesim-scala-tests.sh delete mode 100644 .github/README.md diff --git a/.circleci/build-extra-tests.sh b/.circleci/build-extra-tests.sh new file mode 100755 index 00000000..e38b50fe --- /dev/null +++ b/.circleci/build-extra-tests.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +make -C $LOCAL_CHIPYARD_DIR/tests clean +make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.circleci/build-toolchains.sh b/.circleci/build-toolchains.sh new file mode 100755 index 00000000..160b6f5a --- /dev/null +++ b/.circleci/build-toolchains.sh @@ -0,0 +1,18 @@ +#!/bin/bash + +# create the riscv tools/esp tools binaries +# passed in as + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +if [ ! -d "$HOME/$1-install" ]; then + cd $HOME + + # init all submodules including the tools + CHIPYARD_DIR="$LOCAL_CHIPYARD_DIR" NPROC=$CI_MAKE_NPROC $LOCAL_CHIPYARD_DIR/scripts/build-toolchains.sh $1 +fi diff --git a/.circleci/clean-old-files.sh b/.circleci/clean-old-files.sh new file mode 100755 index 00000000..5824c4b7 --- /dev/null +++ b/.circleci/clean-old-files.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +# clean directories that are older than 14 days +# argument is used as the directory to look in + +age () { + local AGE_SEC + local CUR_SEC + local DIFF_SEC + local SEC_PER_DAY + + SEC_PER_DAY=86400 + + CUR_SEC=$(date +%s) + AGE_SEC=$(stat -c %Y -- "$1") + DIFF_SEC=$(expr $CUR_SEC - $AGE_SEC) + + echo $(expr $DIFF_SEC / $SEC_PER_DAY) +} + +for d in $1/*/ ; do + DIR_AGE="$(age $d)" + if [ $DIR_AGE -ge 14 ]; then + echo "Deleting $d since is it $DIR_AGE old" + rm -rf $d + else + echo "Keep $d since it is $DIR_AGE old" + fi +done diff --git a/.circleci/create-hash.sh b/.circleci/create-hash.sh new file mode 100755 index 00000000..7a8915a5 --- /dev/null +++ b/.circleci/create-hash.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +# get the hash of riscv-tools + +# turn echo on and error on earliest command +set -ex +set -o pipefail + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +# enter bhd repo +cd $LOCAL_CHIPYARD_DIR + +# Use normalized output of git-submodule status as hashfile +for tools in 'riscv-tools' 'esp-tools' ; do + git submodule status "toolchains/${tools}" 'toolchains/libgloss' 'toolchains/qemu' | + while read -r line ; do + echo "${line#[!0-9a-f]}" + done > "${HOME}/${tools}.hash" +done +echo "Hashfile for riscv-tools and esp-tools created in $HOME" diff --git a/.circleci/do-rtl-build.sh b/.circleci/do-rtl-build.sh new file mode 100755 index 00000000..95f3c903 --- /dev/null +++ b/.circleci/do-rtl-build.sh @@ -0,0 +1,95 @@ +#!/bin/bash + +# create the different verilator builds +# usage: +# do-rtl-build.sh sim +# run rtl build for simulations and copy back results +# do-rtl-build.sh fpga +# run rtl build for fpga and don't copy back results + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +# call clean on exit +trap clean EXIT + +cd $LOCAL_CHIPYARD_DIR +./scripts/init-submodules-no-riscv-tools.sh +./scripts/init-fpga.sh + +# replace the workspace dir with a local dir so you can copy around +sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts + +# set stricthostkeychecking to no (must happen before rsync) +run "echo \"Ping $SERVER\"" + +clean + +# copy over riscv/esp-tools, and chipyard to remote +run "mkdir -p $REMOTE_CHIPYARD_DIR" +copy $LOCAL_CHIPYARD_DIR/ $SERVER:$REMOTE_CHIPYARD_DIR + +run "cp -r ~/.ivy2 $REMOTE_WORK_DIR" +run "cp -r ~/.sbt $REMOTE_WORK_DIR" + +TOOLS_DIR=$REMOTE_RISCV_DIR +LD_LIB_DIR=$REMOTE_RISCV_DIR/lib + +if [ $1 = "group-accels" ]; then + export RISCV=$LOCAL_ESP_DIR + export LD_LIBRARY_PATH=$LOCAL_ESP_DIR/lib + export PATH=$RISCV/bin:$PATH + GEMMINI_SOFTWARE_DIR=$LOCAL_SIM_DIR/../../generators/gemmini/software/gemmini-rocc-tests + cd $LOCAL_SIM_DIR/../../generators/gemmini/software + git submodule update --init --recursive gemmini-rocc-tests + cd gemmini-rocc-tests + ./build.sh + + 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 + +# choose what make dir to use +case $2 in + "sim") + REMOTE_MAKE_DIR=$REMOTE_SIM_DIR + ;; + "fpga") + REMOTE_MAKE_DIR=$REMOTE_FPGA_DIR + ;; +esac + +# enter the verilator directory and build the specific config on remote server +run "export RISCV=\"$TOOLS_DIR\"; \ + make -C $REMOTE_MAKE_DIR clean;" + +read -a keys <<< ${grouping[$1]} + +# need to set the PATH to use the new verilator (with the new verilator root) +for key in "${keys[@]}" +do + run "export RISCV=\"$TOOLS_DIR\"; \ + export LD_LIBRARY_PATH=\"$LD_LIB_DIR\"; \ + export PATH=\"$REMOTE_VERILATOR_DIR/bin:\$PATH\"; \ + export VERILATOR_ROOT=\"$REMOTE_VERILATOR_DIR\"; \ + export COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \ + make -j$REMOTE_MAKE_NPROC -C $REMOTE_MAKE_DIR FIRRTL_LOGLEVEL=info JAVA_TOOL_OPTIONS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" ${mapping[$key]}" +done + +run "rm -rf $REMOTE_CHIPYARD_DIR/project" + +# choose to copy back results +if [ $2 = "sim" ]; then + # copy back the final build + mkdir -p $LOCAL_CHIPYARD_DIR + copy $SERVER:$REMOTE_CHIPYARD_DIR/ $LOCAL_CHIPYARD_DIR +fi diff --git a/.circleci/install-verilator.sh b/.circleci/install-verilator.sh new file mode 100755 index 00000000..2170768a --- /dev/null +++ b/.circleci/install-verilator.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# move verilator to the remote server + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +# clean older directories (delete prior directories related to this branch also) +run_script $LOCAL_CHIPYARD_DIR/.circleci/clean-old-files.sh $CI_DIR +run "rm -rf $REMOTE_PREFIX*" + +# set stricthostkeychecking to no (must happen before rsync) +run "echo \"Ping $SERVER\"" + +run "git clone http://git.veripool.org/git/verilator $REMOTE_VERILATOR_DIR; \ + cd $REMOTE_VERILATOR_DIR; \ + git checkout $VERILATOR_VERSION; \ + autoconf; \ + export VERILATOR_ROOT=$REMOTE_VERILATOR_DIR; \ + ./configure; \ + make -j$REMOTE_MAKE_NPROC;" diff --git a/.circleci/run-firesim-scala-tests.sh b/.circleci/run-firesim-scala-tests.sh new file mode 100755 index 00000000..0a74adb8 --- /dev/null +++ b/.circleci/run-firesim-scala-tests.sh @@ -0,0 +1,62 @@ +#!/bin/bash + +# create the different verilator builds +# argument is the make command string + +# turn echo on and error on earliest command +set -ex + +# get shared variables +SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" +source $SCRIPT_DIR/defaults.sh + +# call clean on exit +trap clean EXIT + +# Directory locations for handling firesim-local installations of libelf/libdwarf +# This would generally be handled by build-setup.sh/firesim-setup.sh +firesim_sysroot=lib-install +local_firesim_sysroot=$LOCAL_FIRESIM_DIR/$firesim_sysroot +remote_firesim_sysroot=$REMOTE_FIRESIM_DIR/$firesim_sysroot + +cd $LOCAL_CHIPYARD_DIR +./scripts/init-submodules-no-riscv-tools.sh +cd $LOCAL_CHIPYARD_DIR/sims/firesim/sim/firesim-lib/src/main/cc/lib +git submodule update --init elfutils libdwarf +cd $LOCAL_CHIPYARD_DIR/sims/firesim +mkdir -p $local_firesim_sysroot +./scripts/build-libelf.sh $local_firesim_sysroot +./scripts/build-libdwarf.sh $local_firesim_sysroot +cd $LOCAL_CHIPYARD_DIR + +# replace the workspace dir with a local dir so you can copy around +sed -i -E 's/(workspace=).*(\/tools)/\1$PWD\2/g' .sbtopts + +make -C $LOCAL_CHIPYARD_DIR/tools/dromajo/dromajo-src/src + +# set stricthostkeychecking to no (must happen before rsync) +run "echo \"Ping $SERVER\"" + +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" + +TOOLS_DIR=$REMOTE_RISCV_DIR + +LD_LIB_DIR=$remote_firesim_sysroot/lib:$REMOTE_RISCV_DIR/lib + +# 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 COURSIER_CACHE=\"$REMOTE_WORK_DIR/.coursier-cache\"; \ + make -C $REMOTE_FIRESIM_DIR JAVA_TOOL_OPTIONS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" testOnly ${mapping[$1]}" diff --git a/.circleci/run-tests.sh b/.circleci/run-tests.sh index 051deefd..461843fd 100755 --- a/.circleci/run-tests.sh +++ b/.circleci/run-tests.sh @@ -101,7 +101,7 @@ case $1 in run_asm ${mapping[$1]} ;; chipyard-ibex) - run_bmark ${mapping[$1]} + run_bmark ${mapping[$1]} #TODO: Find 32-bit test ;; chipyard-nvdla) make -C $LOCAL_CHIPYARD_DIR/tests diff --git a/.github/README.md b/.github/README.md deleted file mode 100644 index 89fcc3f6..00000000 --- a/.github/README.md +++ /dev/null @@ -1,137 +0,0 @@ -Chipyard Continuous Integration (CI) -=========== - -Website: https://gihub.com/gh/ucb-bar/chipyard/actions - -GitHub Actions Brief Explanation ---------------------------- - -CI is executed by Github Actions (GA). GA is controlled by `.yml` files in the `.github/workflows/` directory. -In our case we have just one workflow named `chipyard-rocket-run-tests.yml`. -It defines a number of `jobs` within it that do particular tasks. -All jobs in the workflow must pass for the CI run to be successful. -In general, a job is run in parallel with others unless it depends on some other job. -The dependency of one job on the completion of another is specified via the `needs` field. - -For example: -```yaml - prepare-chipyard-cores: - name: prepare-chipyard-cores - needs: [make-keys, setup-complete] -``` -This specifies that the `prepare-chipyard-cores` job needs the both the `make-keys` and the `setup-complete` steps to -be completed before it can run. - -Chipyard runs its CI using a docker image created from `dockerfiles/Dockerfile`. -See its [README](../dockerfiles/README.md) for more details. - -Finally, within each job's `steps:` section, the steps are run sequentially and state persists throughout a job. -So when you run something like `checkout` the next step has the checked out code. - -[Composite Actions](https://docs.github.com/en/actions/creating-actions) (CA) allow for limited subroutine like code re-use within GA. -We use both community created and our own Composite Actions in our CI process. CA capabilities are changing rapidly. -Nesting of composite actions was only recently unveiled. There is a lot of room for more code reuse, in particular -we specify things over and over like docker image tag and checkout commands. - -One use of CA: our process relies on caching to avoid running time-consuming and intensive tasks more often than necessary. - -The following is an example of using the cache@v2 composite action. A step `uses: actions/cache@v2` which take as parameters the -path that contains the data to be cached and a key. Paths can have multiple targets. -The following step can look at the result of the cache operation, if there was cache miss, then we run the command that -will generate the data to be cached. The caching of the generated data is implicit. ->Note: GA cache documentation suggests using the yml level `if: steps.cache-primes.outputs.cache-hit != 'true'` to -> determine whether to run the data generation command. -> At the time of this writing the if construct has a bug and will not run correctly within a composite action. The use -> of a bash based if is a hack found on stackoverflow -```yaml - - uses: actions/cache@v2 - id: rtl-build-id - with: - path: | - sims/verilator - sims/firesim/sim - generators/gemmini/software/gemmini-rocc-tests - key: ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }} - - name: run rtl build script if not cached - run: | - if [[ "${{ steps.rtl-build-id.outputs.cache-hit }}" != 'true' ]]; then - echo "Cache miss on ${{ inputs.group-key }}-${{ github.ref }}-${{ github.sha }}" - ./.github/scripts/${{ inputs.build-script }} ${{ inputs.group-key }} ${{ inputs.build-type }} - else - echo "cache hit do not prepare rtl" - fi - shell: bash -``` - -Our own composite actions are defined in the `.github/actions//action.yml` - -.github/scripts directory -------------------- - -This directory contains most the collateral for the Chipyard CI to work. -The following is included in `.github/scripts/: directory - - `build-toolchains.sh` # build either riscv-tools or esp-tools - `create-hash.sh` # create hashes of riscv-tools/esp-tools to use as hash keys - `do-rtl-build.sh` # use verilator to build a sim executable (remotely) - `defaults.sh` # default variables used - `check-commit.sh` # check that submodule commits are valid - `build-extra-tests.sh` # build default chipyard tests located in tests/ - `clean-old-files.sh` # clean up build server files - `do-fpga-rtl-build.sh` # similar to `do-rtl-build` but using fpga/ - `install-verilator.sh` # install verilator on build server - `run-firesim-scala-tests.sh` # run firesim scala tests - `run-tests.sh # run tests for a specific set of designs - -How things are set up for Chipyard ---------------------------------- - -The steps for CI to run are as follows. -1. Build the toolchains in parallel (note: `esp-tools` is currently not used in the run). -The docker image sets up the `PATH` and `RISCV` variable so that `riscv-tools` is the default (currently the `env.sh` script that is created at tool build is unused). -2. Create the simulator binary. -This requires the `riscv-tools` for `fesvr` and `verilator` to be able to build the binary. -This stores all collateral for the tests (srcs, generated-srcs, sim binary, etc) to run "out of the gate" in the next job (make needs everything or else it will run again). -3. Finally, run the desired tests. - -Other CI Setup --------------- - -To get the CI to work correctly you need to create the following GH Repository Secrets - -| Secret | Value | -| -------| ------------- | -| BUILDSERVER | the hostname of the remote build server (likely be a millennium machine) | -| BUILDUSER | the login to use on the build server | -| BUILDDIR | the directory to use on the build server | -| SERVERKEY | a private key to access the build server | - -The default.sh script defines the following, -```bash -CI_DIR = /path/to/where/you/want/to/store/remote/files -```` -but in the future this should likely be a GH Secret too. - -The scripts also construct (repeatedly) a SERVER env using the above secrets -```bash -SERVER = ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} -``` - -Additionally, you need to add under the "PERMISSIONS" "SSH Permissions" section a private key that is on the build server that you are using. -After adding a private key, it will show a fingerprint that should be added under the jobs that need to be run. - -Note: On the remote server you need to have the `*.pub` key file added to the `authorized_keys` file. - -Additional Work ---------------- -- It would be nice to add the ability to re-run just parts of the workflow. [See Workflows Hacks](https://github.com/jaredpalmer/razzle/blob/f8305c26997bae8ef0f5dfa52540d842451b4090/.github/workflows/examples.yml) - - -Notes on CIRCLE CI ------------------- -This code is heavily based on the origin [CircleCI]() work. There a quite a few differences -- CCI supports workflow level variables, in GA we must define thiing like `BUILDSERVER: ${{ secrets.BUILDSERVER }}` in every job -- CCI allows a much larger cache. The entire CY directory with toolchains and RTL could be cached, with GA there is a 5Gb total cache limit -- GA support more parallel jobs 20 vs 4 -- GA seems to allow much longer run times -- \ No newline at end of file diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index 58a0e143..e5bdf99c 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -102,7 +102,7 @@ case $1 in make run-binary-fast -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ ${mapping[$1]} BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/multiply.riscv ;; chipyard-ibex) - run_bmark ${mapping[$1]} + run_bmark ${mapping[$1]} #TODO: Find 32-bit test ;; chipyard-sodor) run_asm ${mapping[$1]} diff --git a/generators/ibex b/generators/ibex index d08e847e..bdf41a05 160000 --- a/generators/ibex +++ b/generators/ibex @@ -1 +1 @@ -Subproject commit d08e847ead100895c81c0ab3a3513a4c17823ef1 +Subproject commit bdf41a05484e57afa4ed20b35beff80320cfdd02 From ab520e4c561eb1fe68fcb79d29dd5e86088e487f Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sun, 21 Nov 2021 19:16:33 -0800 Subject: [PATCH 22/24] Add main to list of checked generator branch names [ci skip] --- .github/scripts/check-commit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index eb3278fd..87b27ea7 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -51,9 +51,9 @@ submodules=("cva6" "ibex" "boom" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chi dir="generators" if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] then - branches=("master") + branches=("master" "main") else - branches=("master" "dev") + branches=("master" "main" "dev") fi search From daea92664de49a080d58f338d0a6e09e3913365f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 22 Nov 2021 16:31:35 -0800 Subject: [PATCH 23/24] Re-add missing .circleci README --- .circleci/README.md | 75 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .circleci/README.md diff --git a/.circleci/README.md b/.circleci/README.md new file mode 100644 index 00000000..0c53405d --- /dev/null +++ b/.circleci/README.md @@ -0,0 +1,75 @@ +Chipyard CI +=========== + +Website: https://circleci.com/gh/ucb-bar/chipyard + +CircleCI Brief Explanation +--------------------------- + +CircleCI is controlled by the `config.yml` script. +It consists of a *workflow* which has a series of *jobs* within it that do particular tasks. +All jobs in the workflow must pass for the CI run to be successful. + +At the bottom of the `config.yml` there is a `workflows:` section that specifies the order in which the jobs of the workflow should run. +For example: + + - prepare-rocketchip: + requires: + - install-riscv-toolchain + +This specifies that the `prepare-rocketchip` job needs the `install-riscv-toolchain` steps to run before it can run. + +All jobs in the CI workflow are specified at the top of `config.yml` +They specify a docker image to use (in this case a riscv-boom image since that is already available and works nicely) and an environment. +Finally, in the `steps:` section, the steps are run sequentially and state persists throughout a job. +So when you run something like `checkout` the next step has the checked out code. +Caching in the job is done by giving a file to cache on. +`restore_cache:` loads the cache into the environment if the key matches while `save_cache:` writes to the cache with the key IF IT IS NOT PRESENT. +Note, if the cache is already present for that key, the write to it is ignored. +Here the key is built from a string where the `checksum` portion converts the file given into a hash. + +.circleci directory +------------------- + +This directory contains all the collateral for the Chipyard CI to work. +The following is included: + + `build-toolchains.sh` # build either riscv-tools or esp-tools + `create-hash.sh` # create hashes of riscv-tools/esp-tools so circleci caching can work + `do-rtl-build.sh` # use verilator to build a sim executable (remotely) + `config.yml` # main circleci config script to enumerate jobs/workflows + `defaults.sh` # default variables used + `check-commit.sh` # check that submodule commits are valid + `build-extra-tests.sh` # build default chipyard tests located in tests/ + `clean-old-files.sh` # clean up build server files + `do-fpga-rtl-build.sh` # similar to `do-rtl-build` but using fpga/ + `install-verilator.sh` # install verilator on build server + `run-firesim-scala-tests.sh` # run firesim scala tests + `run-tests.sh # run tests for a specific set of designs + `images/` # docker image used in CI + +How things are setup for Chipyard +--------------------------------- + +The steps for CI to run are as follows. +1st, build the toolchains in parallel (note: `esp-tools` is currently not used in the run). +The docker image sets up the `PATH` and `RISCV` variable so that `riscv-tools` is the default (currently the `env.sh` script that is created at tool build is unused). +2nd, create the simulator binary. +This requires the `riscv-tools` for `fesvr` and `verilator` to be able to build the binary. +This stores all collateral for the tests (srcs, generated-srcs, sim binary, etc) to run "out of the gate" in the next job (make needs everything or else it will run again). +3rd, finally run the desired tests. + +Other CI Setup +-------------- + +To get the CI to work correctly you need to setup CircleCI environment variables to point to the remote directory to build files and the server user/ip. +In the project settings, you can find this under "Build Settings" "Environment Variables". +You need to add two variables like the following: + +CI\_DIR = /path/to/where/you/want/to/store/remote/files +SERVER = username@myserver.coolmachine.berkeley.edu + +Additionally, you need to add under the "PERMISSIONS" "SSH Permissions" section a private key that is on the build server that you are using. +After adding a private key, it will show a fingerprint that should be added under the jobs that need to be run. + +Note: On the remote server you need to have the `*.pub` key file added to the `authorized_keys` file. From cf1df5fd7be403515686861b3b428e4559ff69ea Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 22 Nov 2021 16:38:06 -0800 Subject: [PATCH 24/24] Match .circleci commit check with GH-A --- .circleci/check-commit.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/check-commit.sh b/.circleci/check-commit.sh index 0d39b4e9..b52ff337 100755 --- a/.circleci/check-commit.sh +++ b/.circleci/check-commit.sh @@ -52,9 +52,9 @@ submodules=("cva6" "boom" "ibex" "gemmini" "hwacha" "icenet" "nvdla" "rocket-chi dir="generators" if [ "$CIRCLE_BRANCH" == "master" ] || [ "$CIRCLE_BRANCH" == "dev" ] then - branches=("master") + branches=("master" "main") else - branches=("master" "dev") + branches=("master" "main" "dev") fi search