From 83101cd679f4635bb2df1d06a16973926635840b Mon Sep 17 00:00:00 2001 From: Nathan Pemberton Date: Wed, 16 Jun 2021 15:56:25 -0400 Subject: [PATCH 001/267] Add marshal support to the Dockerfile --- dockerfiles/Dockerfile | 15 ++++++++++++++- dockerfiles/README.md | 3 ++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index 1f8ece33..d17f4027 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -15,7 +15,9 @@ RUN apt-get update && \ sudo \ ca-certificates \ keyboard-configuration \ - console-setup + console-setup \ + bc \ + unzip WORKDIR /root @@ -51,6 +53,17 @@ RUN cd chipyard && \ export MAKEFLAGS=-"j $(nproc)" && \ ./scripts/build-toolchains.sh esp-tools 1>/dev/null + +# Set up FireMarshal +SHELL ["/bin/bash", "-c"] +RUN cd chipyard && \ + source env.sh && \ + cd software/firemarshal && \ + ./init-submodules.sh && \ + pip3 install -r python-requirements.txt && \ + marshal build br-base.json + + # Run script to set environment variables on entry ENTRYPOINT ["chipyard/scripts/entrypoint.sh"] diff --git a/dockerfiles/README.md b/dockerfiles/README.md index 09ede715..887cda62 100644 --- a/dockerfiles/README.md +++ b/dockerfiles/README.md @@ -13,7 +13,8 @@ Build and Deploy the Container sudo docker tag :tag . # to tag the image after the build (ex. 0.0.3) sudo docker login # login into the account to push to sudo docker push :tag # to push to repo with tag - sudo docker run -it bash # to run an interactive version of the container + sudo docker run -it --privileged bash # to run an interactive version of the container + Path Names ---------- From 4f64a78a8430d6f3ba598ffb3d2f4eb941f80398 Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Sat, 26 Jun 2021 21:24:17 -0700 Subject: [PATCH 002/267] Bump cva6 --- generators/cva6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/cva6 b/generators/cva6 index 139741a5..ae5a7d5a 160000 --- a/generators/cva6 +++ b/generators/cva6 @@ -1 +1 @@ -Subproject commit 139741a584d7e3c0446db592b5d99529bd6cf9fa +Subproject commit ae5a7d5a650277fdd0f1d5bc1a2a82591089bfee From 8874801af2dc139a19ef340eae8f026f80f8372c Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Mon, 28 Jun 2021 20:42:38 -0700 Subject: [PATCH 003/267] Fix whitespace --- generators/cva6 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/cva6 b/generators/cva6 index ae5a7d5a..47173903 160000 --- a/generators/cva6 +++ b/generators/cva6 @@ -1 +1 @@ -Subproject commit ae5a7d5a650277fdd0f1d5bc1a2a82591089bfee +Subproject commit 4717390310f8cf14f608e2a1d72d5c6f6a9ffc0f From 8f9b3a34d567ca1556fb73b152bf7e51a40c14ac Mon Sep 17 00:00:00 2001 From: Ella Schwarz Date: Tue, 29 Jun 2021 20:56:28 -0700 Subject: [PATCH 004/267] Bump RV tools cache string to v12 --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b6ac7178..567a1431 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,7 +6,7 @@ version: 2.1 parameters: tools-cache-version: type: string - default: "v11" + default: "v12" # default execution env.s executors: From 346db433610df65eeb399c8a703bc3356aa7666d Mon Sep 17 00:00:00 2001 From: John Wright Date: Sun, 11 Jul 2021 17:15:50 -0700 Subject: [PATCH 005/267] Update barstools to get the fix in ucb-bar/barstools#104, which uses the correct harness annotation file path (#918) --- tools/barstools | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/barstools b/tools/barstools index a3711c4e..61ab39f8 160000 --- a/tools/barstools +++ b/tools/barstools @@ -1 +1 @@ -Subproject commit a3711c4e19911b57b21bdcf8d459d19795f3201d +Subproject commit 61ab39f82976aaad09c174bc411015a86691c546 From 76f4bf28e0bb0008bf7f4a2229078ad398a2c014 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Sat, 17 Jul 2021 21:53:54 -0700 Subject: [PATCH 006/267] Fix naming of example-asap7.yml --- vlsi/{example-asap7yml => example-asap7.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename vlsi/{example-asap7yml => example-asap7.yml} (100%) diff --git a/vlsi/example-asap7yml b/vlsi/example-asap7.yml similarity index 100% rename from vlsi/example-asap7yml rename to vlsi/example-asap7.yml From 2e9fa01b64903884c7a9685b8ec06980418a1b48 Mon Sep 17 00:00:00 2001 From: Tingyuan LIANG Date: Mon, 2 Aug 2021 22:02:18 +0800 Subject: [PATCH 007/267] generate the .sbtopt file during repo initialization **Related issue**: #932 and #880 **Type of change**: other enhancement **Impact**: other (change a repo initialization script) **Release Notes** change a repo initialization script [init-submodules-no-riscv-tools-nolog.sh](https://github.com/zslwyuan/chipyard/blob/master/scripts/init-submodules-no-riscv-tools-nolog.sh) so it can generate the .sbtopt file in the Chipyard directory during repo initialization and use the absolute path for the SBT workspace variables in .sbtopts. Hope it can adapt to more compilation scenarios. For example, now users should be able to open the shipyard project directly using Intellij. --- scripts/init-submodules-no-riscv-tools-nolog.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/init-submodules-no-riscv-tools-nolog.sh b/scripts/init-submodules-no-riscv-tools-nolog.sh index 2d2e920c..0d47dd03 100755 --- a/scripts/init-submodules-no-riscv-tools-nolog.sh +++ b/scripts/init-submodules-no-riscv-tools-nolog.sh @@ -81,3 +81,5 @@ echo "# line auto-generated by init-submodules-no-riscv-tools.sh" >> env.sh echo '__DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")"' >> env.sh echo "PATH=\$__DIR/bin:\$PATH" >> env.sh echo "PATH=\$__DIR/software/firemarshal:\$PATH" >> env.sh +echo "-Dsbt.sourcemode=true" > .sbtopts +echo "-Dsbt.workspace=$CHIPYARD_DIR/tools" >> .sbtopts From 17272e3e0b41290275e2ddad121ab039db06e3ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kevin=20L=C3=A4ufer?= Date: Tue, 10 Aug 2021 12:28:02 -0700 Subject: [PATCH 008/267] qemu: build without -Werror While -Werror is nice for developer builds, it can easily lead to breakage when people use newer compilers which add new warnings. --- scripts/build-toolchains.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build-toolchains.sh b/scripts/build-toolchains.sh index 19fa524e..536a2e57 100755 --- a/scripts/build-toolchains.sh +++ b/scripts/build-toolchains.sh @@ -176,7 +176,7 @@ if [ -z "$IGNOREQEMU" ] ; then echo "==> PLEASE REMOVE qemu URL-REWRITING from scripts/build-toolchains.sh. It is no longer needed!" && exit 1 # now actually do the build - SRCDIR="$(pwd)/toolchains" module_build qemu --prefix="${RISCV}" --target-list=riscv${XLEN}-softmmu + SRCDIR="$(pwd)/toolchains" module_build qemu --prefix="${RISCV}" --target-list=riscv${XLEN}-softmmu --disable-werror fi # make Dromajo From d06abdb419ad5969e0a6953583cc920c4eb405aa Mon Sep 17 00:00:00 2001 From: Tingyuan LIANG Date: Thu, 12 Aug 2021 23:22:41 +0800 Subject: [PATCH 009/267] Swap two arguments to resolve bug **Related issue**: N/A **Type of change**: bug fix **Impact**: other **Release Notes** The string of path for "-ip-vivado-tcls" could be empty ("") For example, run "make SUB_PROJECT=arty bitstream" will get errors due the argument parsing in [prologue.tcl](https://github.com/sifive/fpga-shells/blob/d4b3878e4f5cf5c4621dbfe9b0bda1ed0dd3b995/xilinx/common/tcl/prologue.tcl) Swaping the two arguments can resolve bug. --- fpga/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fpga/Makefile b/fpga/Makefile index 8b2ed28b..b53e4fdf 100644 --- a/fpga/Makefile +++ b/fpga/Makefile @@ -118,8 +118,8 @@ $(BIT_FILE): $(synth_list_f) -tclargs \ -top-module "$(MODEL)" \ -F "$(synth_list_f)" \ - -ip-vivado-tcls "$(shell find '$(build_dir)' -name '*.vivado.tcl')" \ - -board "$(BOARD)" + -board "$(BOARD)" \ + -ip-vivado-tcls "$(shell find '$(build_dir)' -name '*.vivado.tcl')" .PHONY: bitstream bitstream: $(BIT_FILE) From 890d4c35069ce79147e7d589e6fea95c136c5245 Mon Sep 17 00:00:00 2001 From: Tynan McAuley Date: Thu, 12 Aug 2021 23:37:39 -0700 Subject: [PATCH 010/267] Add options for command-line arguments for Chisel and FIRRTL compilers (#921) * make: Break FIRRTL command into multiple lines * make: Use long form of FIRRTL command-line args * make: Add ability to set Chisel/FIRRTL options --- common.mk | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/common.mk b/common.mk index ce0b9e21..e349fbaa 100644 --- a/common.mk +++ b/common.mk @@ -18,7 +18,9 @@ HELP_COMPILATION_VARIABLES += \ " EXTRA_SIM_LDFLAGS = additional LDFLAGS for building simulators" \ " EXTRA_SIM_SOURCES = additional simulation sources needed for simulator" \ " EXTRA_SIM_REQS = additional make requirements to build the simulator" \ -" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best with sbtn or sbt script)" +" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best with sbtn or sbt script)" \ +" EXTRA_CHISEL_OPTIONS = additional options to pass to the Chisel compiler" \ +" EXTRA_FIRRTL_OPTIONS = additional options to pass to the FIRRTL compiler" EXTRA_GENERATOR_REQS ?= $(BOOTROM_TARGETS) EXTRA_SIM_CXXFLAGS ?= @@ -107,7 +109,8 @@ generator_temp: $(SCALA_SOURCES) $(sim_files) $(EXTRA_GENERATOR_REQS) --target-dir $(build_dir) \ --name $(long_name) \ --top-module $(MODEL_PACKAGE).$(MODEL) \ - --legacy-configs $(CONFIG_PACKAGE):$(CONFIG)) + --legacy-configs $(CONFIG_PACKAGE):$(CONFIG) \ + $(EXTRA_CHISEL_OPTIONS)) .PHONY: firrtl firrtl: $(FIRRTL_FILE) @@ -128,7 +131,25 @@ $(TOP_TARGETS) $(HARNESS_TARGETS): firrtl_temp @echo "" > /dev/null firrtl_temp: $(FIRRTL_FILE) $(ANNO_FILE) $(VLOG_SOURCES) - $(call run_scala_main,tapeout,barstools.tapeout.transforms.GenerateTopAndHarness,-o $(TOP_FILE) -tho $(HARNESS_FILE) -i $(FIRRTL_FILE) --syn-top $(TOP) --harness-top $(VLOG_MODEL) -faf $(ANNO_FILE) -tsaof $(TOP_ANNO) -tdf $(sim_top_blackboxes) -tsf $(TOP_FIR) -thaof $(HARNESS_ANNO) -hdf $(sim_harness_blackboxes) -thf $(HARNESS_FIR) $(REPL_SEQ_MEM) $(HARNESS_CONF_FLAGS) -td $(build_dir) -ll $(FIRRTL_LOGLEVEL)) && touch $(sim_top_blackboxes) $(sim_harness_blackboxes) + $(call run_scala_main,tapeout,barstools.tapeout.transforms.GenerateTopAndHarness,\ + --output-file $(TOP_FILE) \ + --harness-o $(HARNESS_FILE) \ + --input-file $(FIRRTL_FILE) \ + --syn-top $(TOP) \ + --harness-top $(VLOG_MODEL) \ + --annotation-file $(ANNO_FILE) \ + --top-anno-out $(TOP_ANNO) \ + --top-dotf-out $(sim_top_blackboxes) \ + --top-fir $(TOP_FIR) \ + --harness-anno-out $(HARNESS_ANNO) \ + --harness-dotf-out $(sim_harness_blackboxes) \ + --harness-fir $(HARNESS_FIR) \ + $(REPL_SEQ_MEM) \ + $(HARNESS_CONF_FLAGS) \ + --target-dir $(build_dir) \ + --log-level $(FIRRTL_LOGLEVEL) \ + $(EXTRA_FIRRTL_OPTIONS)) + touch $(sim_top_blackboxes) $(sim_harness_blackboxes) # DOC include end: FirrtlCompiler # This file is for simulation only. VLSI flows should replace this file with one containing hard SRAMs From 4a7bcd054bf98abc78ff8902fed2e29237e88fa9 Mon Sep 17 00:00:00 2001 From: Tingyuan LIANG Date: Tue, 24 Aug 2021 02:33:16 +0800 Subject: [PATCH 011/267] Delete .sbtopts Delete .sbtopt since it will be generated by the script for repo initialization --- .sbtopts | 2 -- 1 file changed, 2 deletions(-) delete mode 100644 .sbtopts diff --git a/.sbtopts b/.sbtopts deleted file mode 100644 index 2358d787..00000000 --- a/.sbtopts +++ /dev/null @@ -1,2 +0,0 @@ --Dsbt.sourcemode=true --Dsbt.workspace=$PWD/tools From 32a4810f63bbec123536873fba20dda3223c90ca Mon Sep 17 00:00:00 2001 From: Tingyuan LIANG Date: Tue, 24 Aug 2021 02:36:53 +0800 Subject: [PATCH 012/267] Update the .gitignore to not track .sbtops update the .gitignore to not track .sbtops --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 257d2c58..7c0f02bf 100644 --- a/.gitignore +++ b/.gitignore @@ -20,3 +20,4 @@ tags env-riscv-tools.sh env-esp-tools.sh .bsp/ +.sbtopts From 15a5ac0d7abfc3201386f424917432eaa084367f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 23 Aug 2021 15:23:06 -0700 Subject: [PATCH 013/267] Push .sbtopt CI fix --- .circleci/do-rtl-build.sh | 3 +++ .circleci/run-firesim-scala-tests.sh | 3 +++ 2 files changed, 6 insertions(+) diff --git a/.circleci/do-rtl-build.sh b/.circleci/do-rtl-build.sh index a13412e3..3a5d56ca 100755 --- a/.circleci/do-rtl-build.sh +++ b/.circleci/do-rtl-build.sh @@ -21,6 +21,9 @@ 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\"" diff --git a/.circleci/run-firesim-scala-tests.sh b/.circleci/run-firesim-scala-tests.sh index a2525297..23c4d08a 100755 --- a/.circleci/run-firesim-scala-tests.sh +++ b/.circleci/run-firesim-scala-tests.sh @@ -22,6 +22,9 @@ cd $LOCAL_CHIPYARD_DIR/sims/firesim ./scripts/build-libdwarf.sh 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) From 554b4363904e6db7ffc812d06507d1353ca12d9c Mon Sep 17 00:00:00 2001 From: Nathan Pemberton Date: Tue, 24 Aug 2021 19:54:51 -0400 Subject: [PATCH 014/267] Clean br-base after building to keep only the br.XXXX.img file around which is the painful one to build. Also moves the SHELL command earlier. --- dockerfiles/Dockerfile | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/dockerfiles/Dockerfile b/dockerfiles/Dockerfile index d17f4027..7011f38e 100644 --- a/dockerfiles/Dockerfile +++ b/dockerfiles/Dockerfile @@ -7,6 +7,8 @@ ARG CHIPYARD_HASH MAINTAINER https://groups.google.com/forum/#!forum/chipyard +SHELL ["/bin/bash", "-c"] + # Install dependencies for ubuntu-req.sh RUN apt-get update && \ DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \ @@ -54,14 +56,16 @@ RUN cd chipyard && \ ./scripts/build-toolchains.sh esp-tools 1>/dev/null -# Set up FireMarshal -SHELL ["/bin/bash", "-c"] +# Set up FireMarshal. Building and cleaning br-base.json builds the underlying +# buildroot image (which takes a long time) but doesn't keep all the br-base +# stuff around (since that's faster to rebuild). RUN cd chipyard && \ source env.sh && \ cd software/firemarshal && \ ./init-submodules.sh && \ pip3 install -r python-requirements.txt && \ - marshal build br-base.json + marshal build br-base.json && \ + marshal clean br-base.json # Run script to set environment variables on entry From 2511cd48c1e9a903a36ee8653c46194b318b7e36 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Thu, 26 Aug 2021 11:13:09 -0700 Subject: [PATCH 015/267] Bump CI image --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b6ac7178..2a78794a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,7 +12,7 @@ parameters: executors: main-env: docker: - - image: ucbbar/chipyard-ci-image:1d51bb90 + - image: ucbbar/chipyard-ci-image:554b436 environment: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit From dd810d826e4beceff25831943de2be4675ddb41a Mon Sep 17 00:00:00 2001 From: John Wright Date: Fri, 27 Aug 2021 16:38:00 -0700 Subject: [PATCH 016/267] Escape $1 in awk command --- common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mk b/common.mk index e349fbaa..d756813e 100644 --- a/common.mk +++ b/common.mk @@ -173,7 +173,7 @@ harness_macro_temp: $(HARNESS_SMEMS_CONF) | top_macro_temp # remove duplicate files and headers in list of simulation file inputs ######################################################################################## $(sim_common_files): $(sim_files) $(sim_top_blackboxes) $(sim_harness_blackboxes) - awk '{print $1;}' $^ | sort -u | grep -v '.*\.\(svh\|h\)$$' > $@ + awk '{print $$1;}' $^ | sort -u | grep -v '.*\.\(svh\|h\)$$' > $@ ######################################################################################### # helper rule to just make verilog files From 42912a196b3912591457f0d8bec82db6c5905718 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 30 Aug 2021 15:35:02 -0700 Subject: [PATCH 017/267] Print line entirely for Verilator --- common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mk b/common.mk index d756813e..65bc7129 100644 --- a/common.mk +++ b/common.mk @@ -173,7 +173,7 @@ harness_macro_temp: $(HARNESS_SMEMS_CONF) | top_macro_temp # remove duplicate files and headers in list of simulation file inputs ######################################################################################## $(sim_common_files): $(sim_files) $(sim_top_blackboxes) $(sim_harness_blackboxes) - awk '{print $$1;}' $^ | sort -u | grep -v '.*\.\(svh\|h\)$$' > $@ + awk '{print}' $^ | sort -u | grep -v '.*\.\(svh\|h\)$$' > $@ ######################################################################################### # helper rule to just make verilog files From cda174d3e666b7cb301b20c342eb34571b4834b7 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Mon, 30 Aug 2021 15:58:23 -0700 Subject: [PATCH 018/267] Update sim_common_files recipe to not use awk Co-authored-by: John Wright --- common.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.mk b/common.mk index 65bc7129..1fa626cf 100644 --- a/common.mk +++ b/common.mk @@ -173,7 +173,7 @@ harness_macro_temp: $(HARNESS_SMEMS_CONF) | top_macro_temp # remove duplicate files and headers in list of simulation file inputs ######################################################################################## $(sim_common_files): $(sim_files) $(sim_top_blackboxes) $(sim_harness_blackboxes) - awk '{print}' $^ | sort -u | grep -v '.*\.\(svh\|h\)$$' > $@ + sort -u $^ | grep -v '.*\.\(svh\|h\)$$' > $@ ######################################################################################### # helper rule to just make verilog files From d9858c1dc8ca995014ad08fc3ba8daad2e64a383 Mon Sep 17 00:00:00 2001 From: Duy-Hieu Bui Date: Fri, 3 Sep 2021 05:02:36 +0700 Subject: [PATCH 019/267] Fixes UART portmap for Arty. --- fpga/src/main/scala/arty/HarnessBinders.scala | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fpga/src/main/scala/arty/HarnessBinders.scala b/fpga/src/main/scala/arty/HarnessBinders.scala index a8c54dc6..aaec1a86 100644 --- a/fpga/src/main/scala/arty/HarnessBinders.scala +++ b/fpga/src/main/scala/arty/HarnessBinders.scala @@ -72,8 +72,8 @@ class WithArtyJTAGHarnessBinder extends OverrideHarnessBinder({ class WithArtyUARTHarnessBinder extends OverrideHarnessBinder({ (system: HasPeripheryUARTModuleImp, th: ArtyFPGATestHarness, ports: Seq[UARTPortIO]) => { withClockAndReset(th.clock_32MHz, th.ck_rst) { - IOBUF(th.uart_txd_in, ports.head.txd) - ports.head.rxd := IOBUF(th.uart_rxd_out) + IOBUF(th.uart_rxd_out, ports.head.txd) + ports.head.rxd := IOBUF(th.uart_txd_in) } } }) From 8a77a25dc9e5736b1408745eaca257916fb46fbe Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Wed, 8 Sep 2021 20:46:57 +0000 Subject: [PATCH 020/267] Bump Firesim --- sims/firesim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sims/firesim b/sims/firesim index b611551c..9598f1ef 160000 --- a/sims/firesim +++ b/sims/firesim @@ -1 +1 @@ -Subproject commit b611551ca5ea391513584dc2cde3d82717309125 +Subproject commit 9598f1efe9e838858b0b3d0fc66fe22f2471d486 From 3a0d0aa004738d684288996fea5af23335f63c7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Etzkorn=20=E6=98=8E=E5=87=AF?= <88842659+michael-etzkorn@users.noreply.github.com> Date: Thu, 9 Sep 2021 12:39:58 -0500 Subject: [PATCH 021/267] Correction to TLFragmenter argument documentation Argument is `holdFirstDeny`. Documentation references `holdFirstDenied`. --- docs/TileLink-Diplomacy-Reference/Widgets.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/TileLink-Diplomacy-Reference/Widgets.rst b/docs/TileLink-Diplomacy-Reference/Widgets.rst index 4a4bce7d..1fd13efa 100644 --- a/docs/TileLink-Diplomacy-Reference/Widgets.rst +++ b/docs/TileLink-Diplomacy-Reference/Widgets.rst @@ -178,7 +178,7 @@ transactions. - ``EarlyAck.PutFulls`` - acknowledge on first beat if PutFull, otherwise acknowledge on last beat. - ``EarlyAck.None`` - always acknowledge on last beat. - - ``holdFirstDenied: Boolean`` - (optional) Allow the Fragmenter to unsafely combine multibeat Gets by taking the first denied for the whole burst. (default: false) + - ``holdFirstDeny: Boolean`` - (optional) Allow the Fragmenter to unsafely combine multibeat Gets by taking the first denied for the whole burst. (default: false) **Example Usage:** From 6c61645d3cdbf5f5627e72c204011cf32de42aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Etzkorn=20=E6=98=8E=E5=87=AF?= <88842659+michael-etzkorn@users.noreply.github.com> Date: Thu, 9 Sep 2021 12:41:40 -0500 Subject: [PATCH 022/267] Update VCU118 Docs Grammar "from the expert menu" is modifying the command noun not the verb "zap" --- docs/Prototyping/VCU118.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/Prototyping/VCU118.rst b/docs/Prototyping/VCU118.rst index a30c4fff..4c236e25 100644 --- a/docs/Prototyping/VCU118.rst +++ b/docs/Prototyping/VCU118.rst @@ -110,7 +110,7 @@ The 1st partition will be used to store the Linux binary (created with FireMarsh Additionally, these instructions assume you are using Linux with ``sudo`` privileges and ``gdisk``, but you can follow a similar set of steps on Mac (using ``gpt`` or another similar program). 1. Wipe the GPT on the card using ``gdisk``. - Use the `z` command to zap everything from the expert menu (opened with 'x', closed with 'm'). + Use the `z` command from the expert menu (opened with 'x', closed with 'm') to zap everything. For rest of these instructions, we assume the SDCard path is ``/dev/sdc`` (replace this with the path to your SDCard). .. code-block:: shell From f064ff8848e75b034e1e567e73a8b8e35c3a9eab Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Wed, 8 Sep 2021 21:06:05 +0000 Subject: [PATCH 023/267] [CI] Update setup for firesim tests --- .circleci/run-firesim-scala-tests.sh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/.circleci/run-firesim-scala-tests.sh b/.circleci/run-firesim-scala-tests.sh index 23c4d08a..a848df62 100755 --- a/.circleci/run-firesim-scala-tests.sh +++ b/.circleci/run-firesim-scala-tests.sh @@ -13,13 +13,20 @@ 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 -./scripts/build-libelf.sh -./scripts/build-libdwarf.sh +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 @@ -42,8 +49,8 @@ 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 +LD_LIB_DIR=$remote_firesim_sysroot/lib:$REMOTE_RISCV_DIR/lib # Run Firesim Scala Tests run "export RISCV=\"$TOOLS_DIR\"; \ From 580d3110598e911d32cd840a702a9fc662d52f5f Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Wed, 8 Sep 2021 21:23:43 +0000 Subject: [PATCH 024/267] Use ResetPulseBridge + GlobalResetCondition; bump FireSim --- .../firechip/src/main/scala/FireSim.scala | 18 ++++++++++++++++-- sims/firesim | 2 +- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/generators/firechip/src/main/scala/FireSim.scala b/generators/firechip/src/main/scala/FireSim.scala index 79242d2e..661ddb99 100644 --- a/generators/firechip/src/main/scala/FireSim.scala +++ b/generators/firechip/src/main/scala/FireSim.scala @@ -13,7 +13,7 @@ import freechips.rocketchip.config.{Field, Config, Parameters} import freechips.rocketchip.diplomacy.{LazyModule, InModuleBody, ValName} import freechips.rocketchip.util.{ResetCatchAndSync, RecordMap} -import midas.widgets.{Bridge, PeekPokeBridge, RationalClockBridge, RationalClock} +import midas.widgets.{Bridge, PeekPokeBridge, RationalClockBridge, RationalClock, ResetPulseBridge, ResetPulseBridgeParameters} import chipyard._ import chipyard.harness._ @@ -227,7 +227,21 @@ class FireSim(implicit val p: Parameters) extends RawModule with HasHarnessSigna val buildtopClock = Wire(Clock()) val buildtopReset = WireInit(false.B) - val peekPokeBridge = PeekPokeBridge(buildtopClock, buildtopReset) + // The peek-poke bridge must still be instantiated even though it's + // functionally unused. This will be removed in a future PR. + val dummy = WireInit(false.B) + val peekPokeBridge = PeekPokeBridge(buildtopClock, dummy) + + val resetBridge = Module(new ResetPulseBridge(ResetPulseBridgeParameters())) + // In effect, the bridge counts the length of the reset in terms of this clock. + resetBridge.io.clock := buildtopClock + buildtopReset := resetBridge.io.reset + // Ensures FireSim-synthesized assertions and instrumentation is disabled + // while buildtopReset is asserted. This ensures assertions do not fire at + // time zero in the event their local reset is delayed (typically because it + // has been pipelined) + midas.targetutils.GlobalResetCondition(buildtopReset) + def dutReset = { require(false, "dutReset should not be used in Firesim"); false.B } def success = { require(false, "success should not be used in Firesim"); false.B } diff --git a/sims/firesim b/sims/firesim index 9598f1ef..a2a6b3bc 160000 --- a/sims/firesim +++ b/sims/firesim @@ -1 +1 @@ -Subproject commit 9598f1efe9e838858b0b3d0fc66fe22f2471d486 +Subproject commit a2a6b3bc27ee049d7bf5048287700d65ac66d126 From 4516e906b37d831b3373d4ef2fecb91f7588c84b Mon Sep 17 00:00:00 2001 From: Tynan McAuley Date: Tue, 21 Sep 2021 17:57:02 -0700 Subject: [PATCH 025/267] Use GNU readlink on macOS BSD readlink is quite different from GNU readlink, so DIR was not being filled in with the absolute path to the 'scripts' directory on macOS. --- scripts/build-toolchains.sh | 9 ++++++++- scripts/init-submodules-no-riscv-tools-nolog.sh | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/scripts/build-toolchains.sh b/scripts/build-toolchains.sh index 536a2e57..f11a3cbd 100755 --- a/scripts/build-toolchains.sh +++ b/scripts/build-toolchains.sh @@ -6,9 +6,16 @@ set -e set -o pipefail +# On macOS, use GNU readlink from 'coreutils' package in Homebrew/MacPorts +if [ "$(uname -s)" = "Darwin" ] ; then + READLINK=greadlink +else + READLINK=readlink +fi + # If BASH_SOURCE is undefined, we may be running under zsh, in that case # provide a zsh-compatible alternative -DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")" +DIR="$(dirname "$($READLINK -f "${BASH_SOURCE[0]:-${(%):-%x}}")")" CHIPYARD_DIR="$(dirname "$DIR")" usage() { diff --git a/scripts/init-submodules-no-riscv-tools-nolog.sh b/scripts/init-submodules-no-riscv-tools-nolog.sh index 0d47dd03..743ea198 100755 --- a/scripts/init-submodules-no-riscv-tools-nolog.sh +++ b/scripts/init-submodules-no-riscv-tools-nolog.sh @@ -17,9 +17,16 @@ if [ "$MINGIT" != "$(echo -e "$MINGIT\n$MYGIT" | sort -V | head -n1)" ]; then false fi +# On macOS, use GNU readlink from 'coreutils' package in Homebrew/MacPorts +if [ "$(uname -s)" = "Darwin" ] ; then + READLINK=greadlink +else + READLINK=readlink +fi + # If BASH_SOURCE is undefined we may be running under zsh, in that case # provide a zsh-compatible alternative -DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")" +DIR="$(dirname "$($READLINK -f "${BASH_SOURCE[0]:-${(%):-%x}}")")" CHIPYARD_DIR="$(dirname "$DIR")" cd "$CHIPYARD_DIR" From e3d76f343a9c4480763176b68ef4e7157ed81c91 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 27 Sep 2021 11:20:37 -0700 Subject: [PATCH 026/267] Bump Verilator (4.034 -> 4.212) and SBT (1.4.9 -> 1.5.5) --- .circleci/defaults.sh | 2 +- project/build.properties | 2 +- scripts/centos-req.sh | 2 +- scripts/ubuntu-req.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh index a9a56b74..c7036a69 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 diff --git a/project/build.properties b/project/build.properties index dbae93bc..10fd9eee 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.4.9 +sbt.version=1.5.5 diff --git a/scripts/centos-req.sh b/scripts/centos-req.sh index 8c7ac3a0..48fb398c 100755 --- a/scripts/centos-req.sh +++ b/scripts/centos-req.sh @@ -29,5 +29,5 @@ sudo yum install -y python # install verilator git clone http://git.veripool.org/git/verilator cd verilator -git checkout v4.034 +git checkout v4.212 autoconf && ./configure && make -j$(nproc) && sudo make install diff --git a/scripts/ubuntu-req.sh b/scripts/ubuntu-req.sh index ff5fe3ad..898386e8 100755 --- a/scripts/ubuntu-req.sh +++ b/scripts/ubuntu-req.sh @@ -29,5 +29,5 @@ sudo apt-get install git -y sudo apt-get install -y autoconf git clone http://git.veripool.org/git/verilator cd verilator -git checkout v4.034 +git checkout v4.212 autoconf && ./configure && make -j$(nproc) && sudo make install From 05b309f97dbc87cbe24a257cd44f0f88962e09ce Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 27 Sep 2021 11:23:05 -0700 Subject: [PATCH 027/267] Revert "Bump Verilator (4.034 -> 4.212) and SBT (1.4.9 -> 1.5.5)" This reverts commit e3d76f343a9c4480763176b68ef4e7157ed81c91. --- .circleci/defaults.sh | 2 +- project/build.properties | 2 +- scripts/centos-req.sh | 2 +- scripts/ubuntu-req.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh index c7036a69..a9a56b74 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 diff --git a/project/build.properties b/project/build.properties index 10fd9eee..dbae93bc 100644 --- a/project/build.properties +++ b/project/build.properties @@ -1 +1 @@ -sbt.version=1.5.5 +sbt.version=1.4.9 diff --git a/scripts/centos-req.sh b/scripts/centos-req.sh index 48fb398c..8c7ac3a0 100755 --- a/scripts/centos-req.sh +++ b/scripts/centos-req.sh @@ -29,5 +29,5 @@ sudo yum install -y python # install verilator git clone http://git.veripool.org/git/verilator cd verilator -git checkout v4.212 +git checkout v4.034 autoconf && ./configure && make -j$(nproc) && sudo make install diff --git a/scripts/ubuntu-req.sh b/scripts/ubuntu-req.sh index 898386e8..ff5fe3ad 100755 --- a/scripts/ubuntu-req.sh +++ b/scripts/ubuntu-req.sh @@ -29,5 +29,5 @@ sudo apt-get install git -y sudo apt-get install -y autoconf git clone http://git.veripool.org/git/verilator cd verilator -git checkout v4.212 +git checkout v4.034 autoconf && ./configure && make -j$(nproc) && sudo make install From f668ffdb0378d0cdf8ab0d49fd6d50d31b4f3bd3 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Thu, 10 Jun 2021 00:37:24 -0700 Subject: [PATCH 028/267] Switch PRCI to HarnessBinder/IOBinders --- fpga/src/main/scala/arty/TestHarness.scala | 5 +- fpga/src/main/scala/vcu118/TestHarness.scala | 10 +- .../chipyard/src/main/scala/ChipTop.scala | 25 +--- .../chipyard/src/main/scala/Clocks.scala | 128 ------------------ .../src/main/scala/ConfigFragments.scala | 5 +- .../chipyard/src/main/scala/DigitalTop.scala | 1 + .../src/main/scala/HarnessBinders.scala | 22 ++- .../chipyard/src/main/scala/IOBinders.scala | 45 +++++- .../chipyard/src/main/scala/TestHarness.scala | 28 ++-- .../scala/clocking/ClockGroupCombiner.scala | 81 +++++++++++ .../clocking/ClockGroupNamePrefixer.scala | 15 +- .../main/scala/clocking/HasChipyardPRCI.scala | 79 +++++++++++ .../main/scala/clocking/TileClockGater.scala | 55 ++++++++ .../main/scala/clocking/TileResetSetter.scala | 72 ++++++++++ .../main/scala/config/AbstractConfig.scala | 4 +- .../main/scala/config/TracegenConfigs.scala | 2 + .../firechip/src/main/scala/FireSim.scala | 95 +++++++------ .../src/main/scala/TargetConfigs.scala | 3 + 18 files changed, 440 insertions(+), 235 deletions(-) delete mode 100644 generators/chipyard/src/main/scala/Clocks.scala create mode 100644 generators/chipyard/src/main/scala/clocking/ClockGroupCombiner.scala create mode 100644 generators/chipyard/src/main/scala/clocking/HasChipyardPRCI.scala create mode 100644 generators/chipyard/src/main/scala/clocking/TileClockGater.scala create mode 100644 generators/chipyard/src/main/scala/clocking/TileResetSetter.scala diff --git a/fpga/src/main/scala/arty/TestHarness.scala b/fpga/src/main/scala/arty/TestHarness.scala index db7ddc01..fdb91a47 100644 --- a/fpga/src/main/scala/arty/TestHarness.scala +++ b/fpga/src/main/scala/arty/TestHarness.scala @@ -7,7 +7,7 @@ import freechips.rocketchip.config.{Parameters} import sifive.fpgashells.shell.xilinx.artyshell.{ArtyShell} -import chipyard.{BuildTop, HasHarnessSignalReferences, HasTestHarnessFunctions} +import chipyard.{BuildTop, HasHarnessSignalReferences} import chipyard.harness.{ApplyHarnessBinders} import chipyard.iobinders.{HasIOBinders} @@ -34,9 +34,6 @@ class ArtyFPGATestHarness(override implicit val p: Parameters) extends ArtyShell val dutReset = dReset // must be after HasHarnessSignalReferences assignments - lazyDut match { case d: HasTestHarnessFunctions => - d.harnessFunctions.foreach(_(this)) - } lazyDut match { case d: HasIOBinders => ApplyHarnessBinders(this, d.lazySystem, d.portMap) } diff --git a/fpga/src/main/scala/vcu118/TestHarness.scala b/fpga/src/main/scala/vcu118/TestHarness.scala index 33161b68..ab6897c9 100644 --- a/fpga/src/main/scala/vcu118/TestHarness.scala +++ b/fpga/src/main/scala/vcu118/TestHarness.scala @@ -17,7 +17,7 @@ import sifive.blocks.devices.uart._ import sifive.blocks.devices.spi._ import sifive.blocks.devices.gpio._ -import chipyard.{HasHarnessSignalReferences, HasTestHarnessFunctions, BuildTop, ChipTop, ExtTLMem, CanHaveMasterTLMemPort, DefaultClockFrequencyKey, HasReferenceClockFreq} +import chipyard.{HasHarnessSignalReferences, BuildTop, ChipTop, ExtTLMem, CanHaveMasterTLMemPort, DefaultClockFrequencyKey} import chipyard.iobinders.{HasIOBinders} import chipyard.harness.{ApplyHarnessBinders} @@ -129,17 +129,11 @@ class VCU118FPGATestHarnessImp(_outer: VCU118FPGATestHarness) extends LazyRawMod childReset := buildtopReset // harness binders are non-lazy - _outer.topDesign match { case d: HasTestHarnessFunctions => - d.harnessFunctions.foreach(_(this)) - } _outer.topDesign match { case d: HasIOBinders => ApplyHarnessBinders(this, d.lazySystem, d.portMap) } // check the top-level reference clock is equal to the default // non-exhaustive since you need all ChipTop clocks to equal the default - _outer.topDesign match { - case d: HasReferenceClockFreq => require(d.refClockFreqMHz == p(DefaultClockFrequencyKey)) - case _ => - } + require(getRefClockFreq == p(DefaultClockFrequencyKey)) } diff --git a/generators/chipyard/src/main/scala/ChipTop.scala b/generators/chipyard/src/main/scala/ChipTop.scala index 8d05d10e..96e5de17 100644 --- a/generators/chipyard/src/main/scala/ChipTop.scala +++ b/generators/chipyard/src/main/scala/ChipTop.scala @@ -15,10 +15,6 @@ import barstools.iocell.chisel._ case object BuildSystem extends Field[Parameters => LazyModule]((p: Parameters) => new DigitalTop()(p)) -trait HasReferenceClockFreq { - def refClockFreqMHz: Double -} - /** * The base class used for building chips. This constructor instantiates a module specified by the BuildSystem parameter, * named "system", which is an instance of DigitalTop by default. The diplomatic clocks of System, as well as its implicit clock, @@ -27,31 +23,14 @@ trait HasReferenceClockFreq { */ class ChipTop(implicit p: Parameters) extends LazyModule with BindingScope - with HasTestHarnessFunctions with HasReferenceClockFreq with HasIOBinders { + with HasIOBinders { // The system module specified by BuildSystem lazy val lazySystem = LazyModule(p(BuildSystem)(p)).suggestName("system") - // The implicitClockSinkNode provides the implicit clock and reset for the system (connected by clocking scheme) - val implicitClockSinkNode = ClockSinkNode(Seq(ClockSinkParameters(name = Some("implicit_clock")))) - - // Generate Clocks and Reset - val mvRefClkFreq = p(ClockingSchemeKey)(this) - def refClockFreqMHz: Double = mvRefClkFreq.getWrappedValue - // NOTE: Making this a LazyRawModule is moderately dangerous, as anonymous children // of ChipTop (ex: ClockGroup) do not receive clock or reset. // However. anonymous children of ChipTop should not need an implicit Clock or Reset // anyways, they probably need to be explicitly clocked. - lazy val module: LazyModuleImpLike = new LazyRawModuleImp(this) { - // These become the implicit clock and reset to the System - val implicit_clock = implicitClockSinkNode.in.head._1.clock - val implicit_reset = implicitClockSinkNode.in.head._1.reset - - // Connect the implicit clock/reset, if present - lazySystem.module match { case l: LazyModuleImp => { - l.clock := implicit_clock - l.reset := implicit_reset - }} - } + lazy val module: LazyModuleImpLike = new LazyRawModuleImp(this) { } } diff --git a/generators/chipyard/src/main/scala/Clocks.scala b/generators/chipyard/src/main/scala/Clocks.scala deleted file mode 100644 index b5553347..00000000 --- a/generators/chipyard/src/main/scala/Clocks.scala +++ /dev/null @@ -1,128 +0,0 @@ -package chipyard - -import chisel3._ - -import scala.collection.mutable.{ArrayBuffer} - -import freechips.rocketchip.prci._ -import freechips.rocketchip.subsystem.{BaseSubsystem, SubsystemDriveAsyncClockGroupsKey, InstantiatesTiles} -import freechips.rocketchip.config.{Parameters, Field, Config} -import freechips.rocketchip.diplomacy.{ModuleValue, OutwardNodeHandle, InModuleBody, LazyModule} -import freechips.rocketchip.util.{ResetCatchAndSync} - -import barstools.iocell.chisel._ -import testchipip.{TLTileResetCtrl} - -import chipyard.clocking._ -import chipyard.iobinders._ - -/** - * A simple reset implementation that punches out reset ports - * for standard Module classes. The ChipTop reset pin is Async. - * Synchronization is performed in the ClockGroupResetSynchronizer - */ -object GenerateReset { - def apply(chiptop: ChipTop, clock: Clock): Reset = { - implicit val p = chiptop.p - // this needs directionality so generateIOFromSignal works - val async_reset_wire = Wire(Input(AsyncReset())) - val (reset_io, resetIOCell) = IOCell.generateIOFromSignal(async_reset_wire, "reset", p(IOCellKey), - abstractResetAsAsync = true) - - chiptop.iocells ++= resetIOCell - chiptop.harnessFunctions += ((th: HasHarnessSignalReferences) => { - reset_io := th.dutReset - Nil - }) - async_reset_wire - } -} - - -case object ClockingSchemeKey extends Field[ChipTop => ModuleValue[Double]](ClockingSchemeGenerators.dividerOnlyClockGenerator) -/* - * This is a Seq of assignment functions, that accept a clock name and return an optional frequency. - * Functions that appear later in this seq have higher precedence that earlier ones. - * If no function returns a non-empty value, the value specified in - * [[DefaultClockFrequencyKey]] will be used. - */ -case object ClockFrequencyAssignersKey extends Field[Seq[(String) => Option[Double]]](Seq.empty) -case object DefaultClockFrequencyKey extends Field[Double]() - -class ClockNameMatchesAssignment(name: String, fMHz: Double) extends Config((site, here, up) => { - case ClockFrequencyAssignersKey => up(ClockFrequencyAssignersKey, site) ++ - Seq((cName: String) => if (cName == name) Some(fMHz) else None) -}) - -class ClockNameContainsAssignment(name: String, fMHz: Double) extends Config((site, here, up) => { - case ClockFrequencyAssignersKey => up(ClockFrequencyAssignersKey, site) ++ - Seq((cName: String) => if (cName.contains(name)) Some(fMHz) else None) -}) - -object ClockingSchemeGenerators { - val dividerOnlyClockGenerator: ChipTop => ModuleValue[Double] = { chiptop => - implicit val p = chiptop.p - - // Requires existence of undriven asyncClockGroups in subsystem - val systemAsyncClockGroup = chiptop.lazySystem match { - case l: BaseSubsystem if (p(SubsystemDriveAsyncClockGroupsKey).isEmpty) => - l.asyncClockGroupsNode - } - - // Add a control register for each tile's reset - val resetSetter = chiptop.lazySystem match { - case sys: BaseSubsystem with InstantiatesTiles => Some(TLTileResetCtrl(sys)) - case _ => None - } - val resetSetterResetProvider = resetSetter.map(_.tileResetProviderNode).getOrElse(ClockGroupEphemeralNode()) - - val aggregator = LazyModule(new ClockGroupAggregator("allClocks")).node - // provides the implicit clock to the system - (chiptop.implicitClockSinkNode - := ClockGroup() - := aggregator) - // provides the system clock (ex. the bus clocks) - (systemAsyncClockGroup - :*= ClockGroupNamePrefixer() - :*= aggregator) - - val referenceClockSource = ClockSourceNode(Seq(ClockSourceParameters())) - val dividerOnlyClkGenerator = LazyModule(new DividerOnlyClockGenerator("buildTopClockGenerator")) - // provides all the divided clocks (from the top-level clock) - (aggregator - := ClockGroupFrequencySpecifier(p(ClockFrequencyAssignersKey), p(DefaultClockFrequencyKey)) - := ClockGroupResetSynchronizer() - := resetSetterResetProvider - := dividerOnlyClkGenerator.node - := referenceClockSource) - - val asyncResetBroadcast = FixedClockBroadcast(None) - resetSetter.foreach(_.asyncResetSinkNode := asyncResetBroadcast) - val asyncResetSource = ClockSourceNode(Seq(ClockSourceParameters())) - asyncResetBroadcast := asyncResetSource - - InModuleBody { - val clock_wire = Wire(Input(Clock())) - val reset_wire = GenerateReset(chiptop, clock_wire) - val (clock_io, clockIOCell) = IOCell.generateIOFromSignal(clock_wire, "clock", p(IOCellKey)) - chiptop.iocells ++= clockIOCell - - referenceClockSource.out.unzip._1.map { o => - o.clock := clock_wire - o.reset := reset_wire - } - - asyncResetSource.out.unzip._1.map { o => - o.clock := false.B.asClock // async reset broadcast network does not provide a clock - o.reset := reset_wire - } - - chiptop.harnessFunctions += ((th: HasHarnessSignalReferences) => { - clock_io := th.buildtopClock - Nil }) - - // return the reference frequency - dividerOnlyClkGenerator.module.referenceFreq - } - } -} diff --git a/generators/chipyard/src/main/scala/ConfigFragments.scala b/generators/chipyard/src/main/scala/ConfigFragments.scala index 5d9dc81e..a41bfae0 100644 --- a/generators/chipyard/src/main/scala/ConfigFragments.scala +++ b/generators/chipyard/src/main/scala/ConfigFragments.scala @@ -31,6 +31,7 @@ import sifive.blocks.devices.uart._ import sifive.blocks.devices.spi._ import chipyard._ +import chipyard.clocking._ // ----------------------- // Common Config Fragments @@ -68,8 +69,10 @@ class WithL2TLBs(entries: Int) extends Config((site, here, up) => { } }) +class TraceGenTop(implicit p: Parameters) extends TraceGenSystem + with HasChipyardPRCI class WithTracegenSystem extends Config((site, here, up) => { - case BuildSystem => (p: Parameters) => new TraceGenSystem()(p) + case BuildSystem => (p: Parameters) => new TraceGenTop()(p) }) /** diff --git a/generators/chipyard/src/main/scala/DigitalTop.scala b/generators/chipyard/src/main/scala/DigitalTop.scala index a91fa479..ba094163 100644 --- a/generators/chipyard/src/main/scala/DigitalTop.scala +++ b/generators/chipyard/src/main/scala/DigitalTop.scala @@ -31,6 +31,7 @@ class DigitalTop(implicit p: Parameters) extends ChipyardSystem with chipyard.example.CanHavePeripheryStreamingFIR // Enables optionally adding the DSPTools FIR example widget with chipyard.example.CanHavePeripheryStreamingPassthrough // Enables optionally adding the DSPTools streaming-passthrough example widget with nvidia.blocks.dla.CanHavePeripheryNVDLA // Enables optionally having an NVDLA + with chipyard.clocking.HasChipyardPRCI // Use Chipyard reset/clock distribution { override lazy val module = new DigitalTopModule(this) } diff --git a/generators/chipyard/src/main/scala/HarnessBinders.scala b/generators/chipyard/src/main/scala/HarnessBinders.scala index c1ec2bda..1cc138f3 100644 --- a/generators/chipyard/src/main/scala/HarnessBinders.scala +++ b/generators/chipyard/src/main/scala/HarnessBinders.scala @@ -22,7 +22,8 @@ import barstools.iocell.chisel._ import testchipip._ import chipyard.{HasHarnessSignalReferences, HarnessClockInstantiatorKey} -import chipyard.iobinders.{GetSystemParameters, JTAGChipIO} +import chipyard.clocking.{HasChipyardPRCI} +import chipyard.iobinders.{GetSystemParameters, JTAGChipIO, ClockWithFreq} import tracegen.{TraceGenSystemModuleImp} import icenet.{CanHavePeripheryIceNIC, SimNetwork, NicLoopback, NICKey, NICIOvonly} @@ -322,8 +323,23 @@ class WithSimDromajoBridge extends ComposeHarnessBinder({ } }) -class WithTieOffCustomBootPin extends OverrideHarnessBinder({ +class WithCustomBootPinPlusArg extends OverrideHarnessBinder({ (system: CanHavePeripheryCustomBootPin, th: HasHarnessSignalReferences, ports: Seq[Bool]) => { - ports.foreach(_ := false.B) + val pin = PlusArg("custom_boot_pin", width=1) + ports.foreach(_ := pin) + } +}) + + +class WithClockAndResetFromHarness extends OverrideHarnessBinder({ + (system: HasChipyardPRCI, th: HasHarnessSignalReferences, ports: Seq[Data]) => { + implicit val p = GetSystemParameters(system) + ports.map ({ + case c: ClockWithFreq => { + th.setRefClockFreq(c.freqMHz) + c.clock := th.buildtopClock + } + case r: AsyncReset => r := th.buildtopReset.asAsyncReset + }) } }) diff --git a/generators/chipyard/src/main/scala/IOBinders.scala b/generators/chipyard/src/main/scala/IOBinders.scala index 448d4b72..65c8754f 100644 --- a/generators/chipyard/src/main/scala/IOBinders.scala +++ b/generators/chipyard/src/main/scala/IOBinders.scala @@ -11,7 +11,7 @@ import freechips.rocketchip.subsystem._ import freechips.rocketchip.system.{SimAXIMem} import freechips.rocketchip.amba.axi4.{AXI4Bundle, AXI4SlaveNode, AXI4MasterNode, AXI4EdgeParameters} import freechips.rocketchip.util._ -import freechips.rocketchip.prci.{ClockSinkNode, ClockSinkParameters} +import freechips.rocketchip.prci._ import freechips.rocketchip.groundtest.{GroundTestSubsystemModuleImp, GroundTestSubsystem} import sifive.blocks.devices.gpio._ @@ -23,6 +23,7 @@ import barstools.iocell.chisel._ import testchipip._ import icenet.{CanHavePeripheryIceNIC, SimNetwork, NicLoopback, NICKey, NICIOvonly} +import chipyard.clocking.{HasChipyardPRCI, DividerOnlyClockGenerator} import scala.reflect.{ClassTag} @@ -384,3 +385,45 @@ class WithDontTouchPorts extends OverrideIOBinder({ (system: DontTouch) => system.dontTouchPorts(); (Nil, Nil) }) +class ClockWithFreq(val freqMHz: Double) extends Bundle { + val clock = Clock() +} + +class WithDividerOnlyClockGenerator extends OverrideLazyIOBinder({ + (system: HasChipyardPRCI) => { + // Connect the implicit clock + implicit val p = GetSystemParameters(system) + val implicitClockSinkNode = ClockSinkNode(Seq(ClockSinkParameters(name = Some("implicit_clock")))) + system.connectImplicitClockSinkNode(implicitClockSinkNode) + InModuleBody { + val implicit_clock = implicitClockSinkNode.in.head._1.clock + val implicit_reset = implicitClockSinkNode.in.head._1.reset + system.asInstanceOf[BaseSubsystem].module match { case l: LazyModuleImp => { + l.clock := implicit_clock + l.reset := implicit_reset + }} + } + + // Connect all other requested clocks + val referenceClockSource = ClockSourceNode(Seq(ClockSourceParameters())) + val dividerOnlyClockGen = LazyModule(new DividerOnlyClockGenerator("buildTopClockGenerator")) + + (system.allClockGroupsNode + := dividerOnlyClockGen.node + := referenceClockSource) + + InModuleBody { + val clock_wire = Wire(Input(new ClockWithFreq(dividerOnlyClockGen.module.referenceFreq))) + val reset_wire = Wire(Input(AsyncReset())) + val (clock_io, clockIOCell) = IOCell.generateIOFromSignal(clock_wire, "clock", p(IOCellKey)) + val (reset_io, resetIOCell) = IOCell.generateIOFromSignal(reset_wire, "reset", p(IOCellKey)) + + referenceClockSource.out.unzip._1.map { o => + o.clock := clock_wire.clock + o.reset := reset_wire + } + + (Seq(clock_io, reset_io), clockIOCell ++ resetIOCell) + } + } +}) diff --git a/generators/chipyard/src/main/scala/TestHarness.scala b/generators/chipyard/src/main/scala/TestHarness.scala index ba09e6dc..e83c9fec 100644 --- a/generators/chipyard/src/main/scala/TestHarness.scala +++ b/generators/chipyard/src/main/scala/TestHarness.scala @@ -17,13 +17,14 @@ import chipyard.clocking.{SimplePllConfiguration, ClockDividerN} // ------------------------------- case object BuildTop extends Field[Parameters => LazyModule]((p: Parameters) => new ChipTop()(p)) - -trait HasTestHarnessFunctions { - val harnessFunctions = ArrayBuffer.empty[HasHarnessSignalReferences => Seq[Any]] -} +case object DefaultClockFrequencyKey extends Field[Double](100.0) // MHz trait HasHarnessSignalReferences { + implicit val p: Parameters // clock/reset of the chiptop reference clock (can be different than the implicit harness clock/reset) + var refClockFreq: Double = p(DefaultClockFrequencyKey) + def setRefClockFreq(freqMHz: Double) = { refClockFreq = freqMHz } + def getRefClockFreq: Double = refClockFreq def buildtopClock: Clock def buildtopReset: Reset def dutReset: Reset @@ -90,25 +91,18 @@ class TestHarness(implicit val p: Parameters) extends Module with HasHarnessSign io.success := false.B - val freqMHz = lazyDut match { - case d: HasReferenceClockFreq => d.refClockFreqMHz - case _ => p(DefaultClockFrequencyKey) - } - val refClkBundle = p(HarnessClockInstantiatorKey).requestClockBundle("buildtop_reference_clock", freqMHz * (1000 * 1000)) - - buildtopClock := refClkBundle.clock - buildtopReset := WireInit(refClkBundle.reset) - val dutReset = refClkBundle.reset.asAsyncReset - + val dutReset = buildtopReset.asAsyncReset val success = io.success - lazyDut match { case d: HasTestHarnessFunctions => - d.harnessFunctions.foreach(_(this)) - } lazyDut match { case d: HasIOBinders => ApplyHarnessBinders(this, d.lazySystem, d.portMap) } + val refClkBundle = p(HarnessClockInstantiatorKey).requestClockBundle("buildtop_reference_clock", getRefClockFreq * (1000 * 1000)) + + buildtopClock := refClkBundle.clock + buildtopReset := WireInit(refClkBundle.reset) + val implicitHarnessClockBundle = Wire(new ClockBundle(ClockBundleParameters())) implicitHarnessClockBundle.clock := clock implicitHarnessClockBundle.reset := reset diff --git a/generators/chipyard/src/main/scala/clocking/ClockGroupCombiner.scala b/generators/chipyard/src/main/scala/clocking/ClockGroupCombiner.scala new file mode 100644 index 00000000..07ae536b --- /dev/null +++ b/generators/chipyard/src/main/scala/clocking/ClockGroupCombiner.scala @@ -0,0 +1,81 @@ +package chipyard.clocking + +import chisel3._ +import chisel3.util._ +import chisel3.experimental.{Analog, IO} + +import freechips.rocketchip.config._ +import freechips.rocketchip.subsystem._ +import freechips.rocketchip.diplomacy._ +import freechips.rocketchip.prci._ +import freechips.rocketchip.util._ +import freechips.rocketchip.tilelink._ +import freechips.rocketchip.devices.tilelink._ +import freechips.rocketchip.regmapper._ +import freechips.rocketchip.subsystem._ + +object ClockGroupCombiner { + def apply()(implicit p: Parameters, valName: ValName): ClockGroupAdapterNode = { + LazyModule(new ClockGroupCombiner()).node + } +} + +case object ClockGroupCombinerKey extends Field[Seq[(String, ClockSinkParameters => Boolean)]](Nil) + +// All clock groups with a name containing any substring in names will be combined into a single clock group +class WithClockGroupsCombinedByName(grouped_name: String, names: String*) extends Config((site, here, up) => { + case ClockGroupCombinerKey => { + val combiner: ClockSinkParameters => Boolean = { m => names.map(n => m.name.get.contains(n)).reduce(_||_) } + up(ClockGroupCombinerKey) ++ Seq((grouped_name, combiner)) + } +}) + +/** This node combines sets of clock groups according to functions provided in the ClockGroupCombinerKey + * The ClockGroupCombinersKey contains a list of tuples of: + * - The name of the combined group + * - A function on the ClockSinkParameters, returning True if the associated clock group should be grouped by this node + * This node will fail if + * - Multiple grouping functions match a single clock group + * - A grouping function matches zero clock groups + * - A grouping function matches clock groups with different requested frequncies + */ +class ClockGroupCombiner(implicit p: Parameters, v: ValName) extends LazyModule { + val combiners = p(ClockGroupCombinerKey) + val sourceFn: ClockGroupSourceParameters => ClockGroupSourceParameters = { m => m } + val sinkFn: ClockGroupSinkParameters => ClockGroupSinkParameters = { u => + var i = 0 + val (grouped, rest) = combiners.map(_._2).foldLeft((Seq[ClockSinkParameters](), u.members)) { case ((grouped, rest), c) => + val (g, r) = rest.partition(c(_)) + val name = combiners(i)._1 + i = i + 1 + require(g.size >= 1) + require(g.forall(_.take.get == g.head.take.get)) + (grouped ++ Seq(ClockSinkParameters(take = g.head.take, name = Some(name))), r) + } + ClockGroupSinkParameters( + name = u.name, + members = grouped ++ rest + ) + } + + + val node = ClockGroupAdapterNode(sourceFn, sinkFn) + lazy val module = new LazyRawModuleImp(this) { + (node.out zip node.in).map { case ((o, oe), (i, ie)) => + { + val inMap = (i.member.data zip ie.sink.members).map { case (id, im) => + im.name.get -> id + }.toMap + (o.member.data zip oe.sink.members).map { case (od, om) => + val matches = combiners.filter(c => c._2(om)) + require(matches.size <= 1) + if (matches.size == 0) { + od := inMap(om.name.get) + } else { + od := inMap(matches(0)._1) + } + } + } + } + } +} diff --git a/generators/chipyard/src/main/scala/clocking/ClockGroupNamePrefixer.scala b/generators/chipyard/src/main/scala/clocking/ClockGroupNamePrefixer.scala index a5618c2d..965beed3 100644 --- a/generators/chipyard/src/main/scala/clocking/ClockGroupNamePrefixer.scala +++ b/generators/chipyard/src/main/scala/clocking/ClockGroupNamePrefixer.scala @@ -2,10 +2,23 @@ package chipyard.clocking import chisel3._ -import freechips.rocketchip.config.{Parameters} +import freechips.rocketchip.config.{Parameters, Config, Field} import freechips.rocketchip.diplomacy._ import freechips.rocketchip.prci._ +case object ClockFrequencyAssignersKey extends Field[Seq[(String) => Option[Double]]](Seq.empty) + +class ClockNameMatchesAssignment(name: String, fMHz: Double) extends Config((site, here, up) => { + case ClockFrequencyAssignersKey => up(ClockFrequencyAssignersKey, site) ++ + Seq((cName: String) => if (cName == name) Some(fMHz) else None) +}) + +class ClockNameContainsAssignment(name: String, fMHz: Double) extends Config((site, here, up) => { + case ClockFrequencyAssignersKey => up(ClockFrequencyAssignersKey, site) ++ + Seq((cName: String) => if (cName.contains(name)) Some(fMHz) else None) +}) + + /** * This sort of node can be used when it is a connectivity passthrough, but modifies * the flow of parameters (which may result in changing the names of the underlying signals). diff --git a/generators/chipyard/src/main/scala/clocking/HasChipyardPRCI.scala b/generators/chipyard/src/main/scala/clocking/HasChipyardPRCI.scala new file mode 100644 index 00000000..30a29bcb --- /dev/null +++ b/generators/chipyard/src/main/scala/clocking/HasChipyardPRCI.scala @@ -0,0 +1,79 @@ +package chipyard.clocking + +import chisel3._ + +import scala.collection.mutable.{ArrayBuffer} + +import freechips.rocketchip.config.{Parameters, Field, Config} +import freechips.rocketchip.diplomacy._ +import freechips.rocketchip.tilelink._ +import freechips.rocketchip.devices.tilelink._ +import freechips.rocketchip.regmapper._ +import freechips.rocketchip.subsystem._ +import freechips.rocketchip.util._ +import freechips.rocketchip.tile._ +import freechips.rocketchip.prci._ + +import testchipip.{TLTileResetCtrl} +import chipyard.{DefaultClockFrequencyKey} + +case class ChipyardPRCIControlParams( + slaveWhere: TLBusWrapperLocation = CBUS, + baseAddress: BigInt = 0x100000, + enableTileClockGating: Boolean = true +) + + +case object ChipyardPRCIControlKey extends Field[ChipyardPRCIControlParams](ChipyardPRCIControlParams()) + +trait HasChipyardPRCI { this: BaseSubsystem with InstantiatesTiles => + require(p(SubsystemDriveAsyncClockGroupsKey).isEmpty, "Subsystem asyncClockGroups must be undriven") + + implicit val n = ValName("chipyardPRCI") + + val prciParams = p(ChipyardPRCIControlKey) + + // Set up clock domain + private val tlbus = locateTLBusWrapper(prciParams.slaveWhere) + val prci_ctrl_domain = LazyModule(new ClockSinkDomain(name=Some("chipyard-prci-control"))) + prci_ctrl_domain.clockNode := tlbus.fixedClockNode + + // Aggregate all the clock groups into a single node + val aggregator = LazyModule(new ClockGroupAggregator("allClocks")).node + val allClockGroupsNode = ClockGroupEphemeralNode() + + // There are two "sets" of clocks which must be dealt with + + // 1. The implicit clock from the subsystem. RC is moving away from depending on this + // clock, but some modules still use it. Since the implicit clock sink node + // is created in the ChipTop (the hierarchy wrapping the subsystem), this function + // is provided to allow connecting that clock to the clock aggregator. This function + // should be called in the ChipTop context + def connectImplicitClockSinkNode(sink: ClockSinkNode) = + (sink + := ClockGroup() + := aggregator) + + // 2. The rest of the diplomatic clocks in the subsystem are routed to this asyncClockGroupsNode + (asyncClockGroupsNode + :*= ClockGroupNamePrefixer() + :*= aggregator) + + + // Once all the clocks are gathered in the aggregator node, several steps remain + // 1. Assign frequencies to any clock groups which did not specify a frequency. + // 2. Combine duplicated clock groups (clock groups which physically should be in the same clock domain) + // 3. Synchronize reset to each clock group + // 4. Clock gate the clock groups corresponding to Tiles (if desired). + // 5. Add reset control registers to the tiles (if desired) + // The final clock group here contains physically distinct clock domains, which some PRCI node in a + // diplomatic IOBinder should drive + (aggregator + := ClockGroupFrequencySpecifier(p(ClockFrequencyAssignersKey), p(DefaultClockFrequencyKey)) + := ClockGroupCombiner() + := ClockGroupResetSynchronizer() + := TileClockGater(prciParams.baseAddress + 0x00000, tlbus, prciParams.enableTileClockGating) + := TileResetSetter(prciParams.baseAddress + 0x10000, tlbus, tile_prci_domains.map(_.tile_reset_domain.clockNode.portParams(0).name.get), Nil) + := allClockGroupsNode) +} + diff --git a/generators/chipyard/src/main/scala/clocking/TileClockGater.scala b/generators/chipyard/src/main/scala/clocking/TileClockGater.scala new file mode 100644 index 00000000..9247bc81 --- /dev/null +++ b/generators/chipyard/src/main/scala/clocking/TileClockGater.scala @@ -0,0 +1,55 @@ +package chipyard.clocking + +import chisel3._ +import chisel3.util._ +import chisel3.experimental.{Analog, IO} + +import freechips.rocketchip.config._ +import freechips.rocketchip.subsystem._ +import freechips.rocketchip.diplomacy._ +import freechips.rocketchip.prci._ +import freechips.rocketchip.util._ +import freechips.rocketchip.tilelink._ +import freechips.rocketchip.devices.tilelink._ +import freechips.rocketchip.regmapper._ +import freechips.rocketchip.subsystem._ + +/** This node adds clock gating control registers. + * If deploying on a platform which does not support clock gating, deasserting the enable + * flag will generate the registers, preserving the same memory map and behavior, but will not + * generate any gaters + */ +class TileClockGater(address: BigInt, beatBytes: Int, enable: Boolean)(implicit p: Parameters, valName: ValName) extends LazyModule +{ + val device = new SimpleDevice(s"clock-gater", Nil) + val clockNode = ClockGroupIdentityNode() + val tlNode = TLRegisterNode(Seq(AddressSet(address, 4096-1)), device, "reg/control", beatBytes=beatBytes) + lazy val module = new LazyModuleImp(this) { + val sources = clockNode.in.head._1.member.data.toSeq + val sinks = clockNode.out.head._1.member.elements.toSeq + val nSinks = sinks.size + val regs = (0 until nSinks).map({i => + val sinkName = sinks(i)._1 + val reg = withReset(sources(i).reset) { Module(new AsyncResetRegVec(w=1, init=1)) } + if (sinkName.contains("tile") && enable) { + println(s"ClockGate for ${sinkName} regmapped at ${(address+i*4).toString(16)}") + sinks(i)._2.clock := ClockGate(sources(i).clock, reg.io.q.asBool) + sinks(i)._2.reset := sources(i).reset + } else { + sinks(i)._2 := sources(i) + } + reg + }) + tlNode.regmap((0 until nSinks).map({i => + i*4 -> Seq(RegField.rwReg(1, regs(i).io)) + }): _*) + } +} + +object TileClockGater { + def apply(address: BigInt, tlbus: TLBusWrapper, enable: Boolean)(implicit p: Parameters, v: ValName) = { + val gater = LazyModule(new TileClockGater(address, tlbus.beatBytes, enable)) + tlbus.toVariableWidthSlave(Some("clock-gater")) { gater.tlNode := TLBuffer() } + gater.clockNode + } +} diff --git a/generators/chipyard/src/main/scala/clocking/TileResetSetter.scala b/generators/chipyard/src/main/scala/clocking/TileResetSetter.scala new file mode 100644 index 00000000..41f6d317 --- /dev/null +++ b/generators/chipyard/src/main/scala/clocking/TileResetSetter.scala @@ -0,0 +1,72 @@ +package chipyard.clocking + +import chisel3._ +import chisel3.util._ +import chisel3.experimental.{Analog, IO} + +import freechips.rocketchip.config._ +import freechips.rocketchip.subsystem._ +import freechips.rocketchip.diplomacy._ +import freechips.rocketchip.prci._ +import freechips.rocketchip.util._ +import freechips.rocketchip.tilelink._ +import freechips.rocketchip.devices.tilelink._ +import freechips.rocketchip.regmapper._ +import freechips.rocketchip.subsystem._ + +// Currently only works if all tiles are already driven by independent clock groups +// TODO: After https://github.com/chipsalliance/rocket-chip/pull/2842 is merged, we should +// always put all tiles on independent clock groups +class TileResetSetter(address: BigInt, beatBytes: Int, tileNames: Seq[String], initResetHarts: Seq[Int])(implicit p: Parameters) + extends LazyModule { + val device = new SimpleDevice("tile-reset-setter", Nil) + val tlNode = TLRegisterNode(Seq(AddressSet(address, 4096-1)), device, "reg/control", beatBytes=beatBytes) + val clockNode = ClockGroupIdentityNode() + + lazy val module = new LazyModuleImp(this) { + val nTiles = p(TilesLocated(InSubsystem)).size + require (nTiles <= 4096 / 4) + val tile_async_resets = Wire(Vec(nTiles, Reset())) + val r_tile_resets = (0 until nTiles).map({ i => + tile_async_resets(i) := true.B.asAsyncReset // Remove this line after https://github.com/chipsalliance/rocket-chip/pull/2842 + withReset (tile_async_resets(i)) { + Module(new AsyncResetRegVec(w=1, init=(if (initResetHarts.contains(i)) 1 else 0))) + } + }) + tlNode.regmap((0 until nTiles).map({ i => + i * 4 -> Seq(RegField.rwReg(1, r_tile_resets(i).io)), + }): _*) + + val tileMap = tileNames.zipWithIndex.map({ case (n, i) => + n -> (tile_async_resets(i), r_tile_resets(i).io.q) + }) + + (clockNode.out zip clockNode.in).map { case ((o, _), (i, _)) => + (o.member.elements zip i.member.elements).foreach { case ((name, oD), (_, iD)) => + oD.clock := iD.clock + oD.reset := iD.reset + for ((n, (rIn, rOut)) <- tileMap) { + if (name.contains(n)) { + println(name, n) + // Async because the reset coming out of the AsyncResetRegVec is + // clocked to the bus this is attached to, not the clock in this + // clock bundle. We expect a ClockGroupResetSynchronizer downstream + // to synchronize the resets + // Also, this or enforces that the tiles come out of reset after the reset of the system + oD.reset := (rOut.asBool || iD.reset.asBool).asAsyncReset + rIn := iD.reset + } + } + } + } + } +} + + +object TileResetSetter { + def apply(address: BigInt, tlbus: TLBusWrapper, tileNames: Seq[String], initResetHarts: Seq[Int])(implicit p: Parameters, v: ValName) = { + val setter = LazyModule(new TileResetSetter(address, tlbus.beatBytes, tileNames, initResetHarts)) + tlbus.toVariableWidthSlave(Some("tile-reset-setter")) { setter.tlNode := TLBuffer() } + setter.clockNode + } +} diff --git a/generators/chipyard/src/main/scala/config/AbstractConfig.scala b/generators/chipyard/src/main/scala/config/AbstractConfig.scala index 6660d159..209bcf1f 100644 --- a/generators/chipyard/src/main/scala/config/AbstractConfig.scala +++ b/generators/chipyard/src/main/scala/config/AbstractConfig.scala @@ -21,7 +21,8 @@ class AbstractConfig extends Config( new chipyard.harness.WithSimAXIMMIO ++ // add SimAXIMem for axi4 mmio port, if enabled new chipyard.harness.WithTieOffInterrupts ++ // tie-off interrupt ports, if present new chipyard.harness.WithTieOffL2FBusAXI ++ // tie-off external AXI4 master, if present - new chipyard.harness.WithTieOffCustomBootPin ++ + new chipyard.harness.WithCustomBootPinPlusArg ++ + new chipyard.harness.WithClockAndResetFromHarness ++ // The IOBinders instantiate ChipTop IOs to match desired digital IOs // IOCells are generated for "Chip-like" IOs, while simulation-only IOs are directly punched through @@ -39,6 +40,7 @@ class AbstractConfig extends Config( new chipyard.iobinders.WithTraceIOPunchthrough ++ new chipyard.iobinders.WithExtInterruptIOCells ++ new chipyard.iobinders.WithCustomBootPin ++ + new chipyard.iobinders.WithDividerOnlyClockGenerator ++ new testchipip.WithDefaultSerialTL ++ // use serialized tilelink port to external serialadapter/harnessRAM new chipyard.config.WithBootROM ++ // use default bootrom diff --git a/generators/chipyard/src/main/scala/config/TracegenConfigs.scala b/generators/chipyard/src/main/scala/config/TracegenConfigs.scala index 3f9e27d1..4ab51994 100644 --- a/generators/chipyard/src/main/scala/config/TracegenConfigs.scala +++ b/generators/chipyard/src/main/scala/config/TracegenConfigs.scala @@ -6,8 +6,10 @@ import freechips.rocketchip.rocket.{DCacheParams} class AbstractTraceGenConfig extends Config( new chipyard.harness.WithBlackBoxSimMem ++ new chipyard.harness.WithTraceGenSuccess ++ + new chipyard.harness.WithClockAndResetFromHarness ++ new chipyard.iobinders.WithAXI4MemPunchthrough ++ new chipyard.iobinders.WithTraceGenSuccessPunchthrough ++ + new chipyard.iobinders.WithDividerOnlyClockGenerator ++ new chipyard.config.WithTracegenSystem ++ new chipyard.config.WithNoSubsystemDrivenClocks ++ new chipyard.config.WithPeripheryBusFrequencyAsDefault ++ diff --git a/generators/firechip/src/main/scala/FireSim.scala b/generators/firechip/src/main/scala/FireSim.scala index 661ddb99..3839bf14 100644 --- a/generators/firechip/src/main/scala/FireSim.scala +++ b/generators/firechip/src/main/scala/FireSim.scala @@ -10,7 +10,7 @@ import chisel3.experimental.{IO} import freechips.rocketchip.prci._ import freechips.rocketchip.subsystem.{BaseSubsystem, SubsystemDriveAsyncClockGroupsKey} import freechips.rocketchip.config.{Field, Config, Parameters} -import freechips.rocketchip.diplomacy.{LazyModule, InModuleBody, ValName} +import freechips.rocketchip.diplomacy.{LazyModule, LazyModuleImp, InModuleBody, ValName} import freechips.rocketchip.util.{ResetCatchAndSync, RecordMap} import midas.widgets.{Bridge, PeekPokeBridge, RationalClockBridge, RationalClock, ResetPulseBridge, ResetPulseBridgeParameters} @@ -166,59 +166,69 @@ class ClockBridgeInstantiator { case object ClockBridgeInstantiatorKey extends Field[ClockBridgeInstantiator](new ClockBridgeInstantiator) case object FireSimBaseClockNameKey extends Field[String]("implicit_clock") -class WithFireSimSimpleClocks extends Config((site, here, up) => { - case ClockingSchemeKey => { chiptop: ChipTop => - implicit val p = chiptop.p +class ClocksWithSinkParams(val params: Seq[ClockSinkParameters]) extends Bundle { + val clocks = Vec(params.size, Clock()) +} + +class WithFireSimSimpleClocks extends OverrideLazyIOBinder({ + (system: HasChipyardPRCI) => { + implicit val p = GetSystemParameters(system) // Figure out what provides this in the chipyard scheme implicit val valName = ValName("FireSimClocking") - // Requires existence of undriven asyncClockGroups in subsystem - val systemAsyncClockGroup = chiptop.lazySystem match { - case l: BaseSubsystem if (p(SubsystemDriveAsyncClockGroupsKey).isEmpty) => - l.asyncClockGroupsNode + val implicitClockSinkNode = ClockSinkNode(Seq(ClockSinkParameters(name = Some("implicit_clock")))) + system.connectImplicitClockSinkNode(implicitClockSinkNode) + InModuleBody { + val implicit_clock = implicitClockSinkNode.in.head._1.clock + val implicit_reset = implicitClockSinkNode.in.head._1.reset + system.asInstanceOf[BaseSubsystem].module match { case l: LazyModuleImp => { + l.clock := implicit_clock + l.reset := implicit_reset + }} } - val aggregator = LazyModule(new ClockGroupAggregator("allClocks")).node - (chiptop.implicitClockSinkNode := ClockGroup() := aggregator) - (systemAsyncClockGroup :*= ClockGroupNamePrefixer() :*= aggregator) - val inputClockSource = ClockGroupSourceNode(Seq(ClockGroupSourceParameters())) - - (aggregator - := ClockGroupResetSynchronizer() - := ClockGroupFrequencySpecifier(p(ClockFrequencyAssignersKey), p(DefaultClockFrequencyKey)) - := inputClockSource) - + system.allClockGroupsNode := inputClockSource InModuleBody { val (clockGroupBundle, clockGroupEdge) = inputClockSource.out.head - val input_clocks = IO(Input(RecordMap((clockGroupEdge.sink.members.map { m => (m.name.get, Clock()) }):_* ))) + val reset_io = IO(Input(AsyncReset())).suggestName("async_reset") + + val input_clocks = IO(Input(new ClocksWithSinkParams(clockGroupEdge.sink.members))) .suggestName("clocks") - val reset = IO(Input(Reset())).suggestName("reset") - (clockGroupBundle.member.data zip input_clocks.data).foreach { case (clockBundle, inputClock) => + (clockGroupBundle.member.data zip input_clocks.clocks).foreach { case (clockBundle, inputClock) => clockBundle.clock := inputClock - clockBundle.reset := reset + clockBundle.reset := reset_io } - val pllConfig = new SimplePllConfiguration("firesimBuildTopClockGenerator", clockGroupEdge.sink.members) - pllConfig.emitSummaries - val rationalClockSpecs = for ((sinkP, division) <- pllConfig.sinkDividerMap) yield { - RationalClock(sinkP.name.get, 1, division) - } + (Seq(reset_io, input_clocks), Nil) + } + } +}) - chiptop.harnessFunctions += ((th: HasHarnessSignalReferences) => { - reset := th.buildtopReset - input_clocks := p(ClockBridgeInstantiatorKey) - .requestClockRecordMap(BuildTopClockParameters( +class WithFireSimHarnessClockBinder extends OverrideHarnessBinder({ + (system: HasChipyardPRCI, th: FireSim, ports: Seq[Data]) => { + implicit val p = th.p + ports.map ({ + case c: ClocksWithSinkParams => { + val pllConfig = new SimplePllConfiguration("firesimBuildTopClockGenerator", c.params) + pllConfig.emitSummaries + th.setRefClockFreq(pllConfig.referenceFreqMHz) + val rationalClockSpecs = for ((sinkP, division) <- pllConfig.sinkDividerMap) yield { + RationalClock(sinkP.name.get, 1, division) + } + val input_clocks: RecordMap[Clock] = p(ClockBridgeInstantiatorKey).requestClockRecordMap( + BuildTopClockParameters( rationalClockSpecs.toSeq, p(FireSimBaseClockNameKey), pllConfig.referenceFreqMHz * (1000 * 1000))) - Nil }) - - // return the reference frequency - pllConfig.referenceFreqMHz - } + (c.clocks zip c.params) map ({ case (clock, param) => + clock := input_clocks(param.name.get).get + }) + } + case r: Reset => r := th.buildtopReset.asAsyncReset + }) } }) @@ -245,8 +255,6 @@ class FireSim(implicit val p: Parameters) extends RawModule with HasHarnessSigna def dutReset = { require(false, "dutReset should not be used in Firesim"); false.B } def success = { require(false, "success should not be used in Firesim"); false.B } - var btFreqMHz: Option[Double] = None - // Instantiate multiple instances of the DUT to implement supernode for (i <- 0 until p(NumNodes)) { // It's not a RC bump without some hacks... @@ -259,22 +267,13 @@ class FireSim(implicit val p: Parameters) extends RawModule with HasHarnessSigna }))) val module = Module(lazyModule.module) - btFreqMHz = Some(lazyModule match { - case d: HasReferenceClockFreq => d.refClockFreqMHz - case _ => p(DefaultClockFrequencyKey) - }) - - lazyModule match { case d: HasTestHarnessFunctions => - require(d.harnessFunctions.size == 1, "There should only be 1 harness function to connect clock+reset") - d.harnessFunctions.foreach(_(this)) - } lazyModule match { case d: HasIOBinders => ApplyHarnessBinders(this, d.lazySystem, d.portMap) } NodeIdx.increment() } - buildtopClock := p(ClockBridgeInstantiatorKey).requestClock("buildtop_reference_clock", btFreqMHz.get * (1000 * 1000)) + buildtopClock := p(ClockBridgeInstantiatorKey).requestClock("buildtop_reference_clock", getRefClockFreq * (1000 * 1000)) p(ClockBridgeInstantiatorKey).instantiateFireSimClockBridge } diff --git a/generators/firechip/src/main/scala/TargetConfigs.scala b/generators/firechip/src/main/scala/TargetConfigs.scala index 691ef15d..0c612cba 100644 --- a/generators/firechip/src/main/scala/TargetConfigs.scala +++ b/generators/firechip/src/main/scala/TargetConfigs.scala @@ -17,6 +17,7 @@ import testchipip.{BlockDeviceKey, BlockDeviceConfig, TracePortKey, TracePortPar import sifive.blocks.devices.uart.{PeripheryUARTKey, UARTParams} import scala.math.{min, max} +import chipyard.clocking.{ChipyardPRCIControlKey} import icenet._ import testchipip.WithRingSystemBus @@ -40,6 +41,7 @@ class WithBootROM extends Config((site, here, up) => { // Disables clock-gating; doesn't play nice with our FAME-1 pass class WithoutClockGating extends Config((site, here, up) => { case DebugModuleKey => up(DebugModuleKey, site).map(_.copy(clockGate = false)) + case ChipyardPRCIControlKey => up(ChipyardPRCIControlKey, site).copy(enableTileClockGating = false) }) // Testing configurations @@ -65,6 +67,7 @@ class WithFireSimDesignTweaks extends Config( // Required: Bake in the default FASED memory model new WithDefaultMemModel ++ // Required*: Uses FireSim ClockBridge and PeekPokeBridge to drive the system with a single clock/reset + new WithFireSimHarnessClockBinder ++ new WithFireSimSimpleClocks ++ // Required*: When using FireSim-as-top to provide a correct path to the target bootrom source new WithBootROM ++ From 3ef04c9cef302f19b1cb270d4072ca6840d2f47d Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Thu, 30 Sep 2021 20:50:45 +0000 Subject: [PATCH 029/267] Bump Firesin --- sims/firesim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sims/firesim b/sims/firesim index a2a6b3bc..cd13db4f 160000 --- a/sims/firesim +++ b/sims/firesim @@ -1 +1 @@ -Subproject commit a2a6b3bc27ee049d7bf5048287700d65ac66d126 +Subproject commit cd13db4f2006d47bf71c593b0255b32c6a0bbec5 From 21a44d75967518f696ef27248ec35deee9cac962 Mon Sep 17 00:00:00 2001 From: John Fang Date: Fri, 1 Oct 2021 11:19:43 -0700 Subject: [PATCH 030/267] Add torture run options to makefile (#992) * Add torture option to chipyard makefile * Bump spike to get the signature bug fix --- common.mk | 1 + docs/Advanced-Concepts/Debugging-RTL.rst | 16 ++++++++++++++-- toolchains/esp-tools/riscv-isa-sim | 2 +- toolchains/riscv-tools/riscv-isa-sim | 2 +- tools/torture | 2 +- tools/torture.mk | 18 ++++++++++++++++++ 6 files changed, 36 insertions(+), 5 deletions(-) create mode 100644 tools/torture.mk diff --git a/common.mk b/common.mk index 1fa626cf..1b756089 100644 --- a/common.mk +++ b/common.mk @@ -56,6 +56,7 @@ include $(base_dir)/generators/cva6/cva6.mk include $(base_dir)/generators/tracegen/tracegen.mk include $(base_dir)/generators/nvdla/nvdla.mk include $(base_dir)/tools/dromajo/dromajo.mk +include $(base_dir)/tools/torture.mk ######################################################################################### # Prerequisite lists diff --git a/docs/Advanced-Concepts/Debugging-RTL.rst b/docs/Advanced-Concepts/Debugging-RTL.rst index 6831cc4a..79b9428e 100644 --- a/docs/Advanced-Concepts/Debugging-RTL.rst +++ b/docs/Advanced-Concepts/Debugging-RTL.rst @@ -83,8 +83,20 @@ Torture tests The RISC-V torture utility generates random RISC-V assembly streams, compiles them, runs them on both the Spike functional model and the SW simulator, and verifies identical program behavior. The torture utility can also be configured to run -continuously for stress-testing. The torture utility exists within the ``utilities`` -directory. +continuously for stress-testing. The torture utility exists within the ``tools`` +directory. To run torture tests, run ``make`` in the simulation directories: + +.. code-block:: shell + + make CONFIG=CustomConfig torture + +To run overnight tests (repeated random tests), run + +.. code-block:: shell + + make CONFIG=CustomConfig TORTURE_ONIGHT_OPTIONS= torture-overnight + +You can find the overnight options in `overnight/src/main/scala/main.scala` in the torture repo. Firesim Debugging --------------------------- diff --git a/toolchains/esp-tools/riscv-isa-sim b/toolchains/esp-tools/riscv-isa-sim index 467da4f6..34741e07 160000 --- a/toolchains/esp-tools/riscv-isa-sim +++ b/toolchains/esp-tools/riscv-isa-sim @@ -1 +1 @@ -Subproject commit 467da4f613e2a447af35e69ee4f14e5adc94664f +Subproject commit 34741e07bc6b56f1762ce579537948d58e28cd5a diff --git a/toolchains/riscv-tools/riscv-isa-sim b/toolchains/riscv-tools/riscv-isa-sim index bf4b1e09..ce42f1b5 160000 --- a/toolchains/riscv-tools/riscv-isa-sim +++ b/toolchains/riscv-tools/riscv-isa-sim @@ -1 +1 @@ -Subproject commit bf4b1e09ed8e7a11ecff9891b12ce5d7f3375722 +Subproject commit ce42f1b55a3fa5a3a522439b5370be2256f68862 diff --git a/tools/torture b/tools/torture index 59b0f0f2..b2b66a66 160000 --- a/tools/torture +++ b/tools/torture @@ -1 +1 @@ -Subproject commit 59b0f0f224ff4f1eb6ebb1b4dd7eaf1ab3fac2e5 +Subproject commit b2b66a66d51b360e0ae95017774d03377c78c574 diff --git a/tools/torture.mk b/tools/torture.mk new file mode 100644 index 00000000..33bf98f6 --- /dev/null +++ b/tools/torture.mk @@ -0,0 +1,18 @@ +HELP_COMMANDS += \ +" torture = run torture on the RTL testbench" \ +" torture-overnight = run torture overnight tests (set TORTURE_ONIGHT_OPTIONS to pass test options)" + +######################################################################################### +# run torture rules +######################################################################################### +.PHONY: torture torture-overnight + +torture: $(output_dir) $(sim) + $(MAKE) -C $(base_dir)/tools/torture/output clean + $(MAKE) -C $(base_dir)/tools/torture R_SIM=$(sim) gen rtest + cp -r $(base_dir)/tools/torture/output $(output_dir)/torture + rm $(output_dir)/torture/Makefile + +TORTURE_ONIGHT_OPTIONS := +torture-overnight: $(output_dir) $(sim) + $(MAKE) -C $(base_dir)/tools/torture R_SIM=$(sim) OPTIONS="$(TORTURE_ONIGHT_OPTIONS)" rnight From 1a631e22ff3be6001951f2db4a35d449405bd995 Mon Sep 17 00:00:00 2001 From: chick Date: Fri, 1 Oct 2021 14:31:02 -0700 Subject: [PATCH 031/267] 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/config.yml | 524 ------- .github/README.md | 137 ++ .github/actions/build-extra-tests/action.yml | 28 + .github/actions/prepare-rtl/action.yml | 41 + .github/actions/run-tests/action.yml | 30 + .github/actions/toolchain-build/action.yml | 29 + .../scripts}/build-extra-tests.sh | 0 .../scripts}/build-toolchains.sh | 0 .../scripts}/check-commit.sh | 0 .../scripts}/clean-old-files.sh | 0 {.circleci => .github/scripts}/create-hash.sh | 5 +- {.circleci => .github/scripts}/defaults.sh | 22 +- .../scripts}/do-rtl-build.sh | 1 + .../scripts}/install-verilator.sh | 2 +- .../scripts}/run-firesim-scala-tests.sh | 0 {.circleci => .github/scripts}/run-tests.sh | 0 .../workflows/chipyard-rocket-run-tests.yml | 1285 +++++++++++++++++ README.md | 3 +- 19 files changed, 1568 insertions(+), 614 deletions(-) delete mode 100644 .circleci/README.md delete mode 100644 .circleci/config.yml create mode 100644 .github/README.md create mode 100644 .github/actions/build-extra-tests/action.yml create mode 100644 .github/actions/prepare-rtl/action.yml create mode 100644 .github/actions/run-tests/action.yml create mode 100644 .github/actions/toolchain-build/action.yml rename {.circleci => .github/scripts}/build-extra-tests.sh (100%) rename {.circleci => .github/scripts}/build-toolchains.sh (100%) rename {.circleci => .github/scripts}/check-commit.sh (100%) rename {.circleci => .github/scripts}/clean-old-files.sh (100%) rename {.circleci => .github/scripts}/create-hash.sh (87%) rename {.circleci => .github/scripts}/defaults.sh (85%) 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%) rename {.circleci => .github/scripts}/run-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/config.yml b/.circleci/config.yml deleted file mode 100644 index 30f0395c..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,524 +0,0 @@ -# CircleCI Configuration File - -# version of circleci -version: 2.1 - -parameters: - tools-cache-version: - type: string - default: "v12" - -# default execution env.s -executors: - main-env: - docker: - - image: ucbbar/chipyard-ci-image:554b436 - environment: - JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit - -# re-usable commands -commands: - toolchain-build: - description: "Build a toolchain" - parameters: - tools-version: - type: string - default: "riscv-tools" - steps: - - checkout - - run: - name: Create hash of toolchains - command: | - .circleci/create-hash.sh - - restore_cache: - keys: - - << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} - - run: - name: Building << parameters.tools-version >> - command: | - .circleci/build-toolchains.sh << parameters.tools-version >> - no_output_timeout: 120m - - save_cache: - key: << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} - paths: - - "/root/<< parameters.tools-version >>-install" - - ssh-checkout: - description: "Add SSH key and checkout code" - steps: - - add_ssh_keys: - fingerprints: - - "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e" - - "32:d6:89:d2:97:fa:db:de:a8:2d:2a:f2:70:dd:80:89" - - checkout - - setup-tools: - description: "Get toolchain" - parameters: - tools-version: - type: string - default: "riscv-tools" - steps: - - ssh-checkout - - run: - name: Create hash of toolchains - command: | - .circleci/create-hash.sh - - restore_cache: - keys: - - << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} - - prepare-rtl: - description: "Run the prepare step of RTL" - parameters: - tools-version: - type: string - default: "riscv-tools" - group-key: - type: string - timeout: - type: string - default: "120m" - build-script: - type: string - default: "do-rtl-build.sh" - build-type: - type: string - default: "sim" - steps: - - setup-tools: - tools-version: "<< parameters.tools-version >>" - - run: - name: Building << parameters.group-key >> subproject using Verilator - command: .circleci/<< parameters.build-script >> << parameters.group-key >> << parameters.build-type >> - no_output_timeout: << parameters.timeout >> - - save_cache: - key: << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} - paths: - - "/root/project" - - run-tests: - description: "Run a set of tests" - parameters: - tools-version: - type: string - default: "riscv-tools" - group-key: - type: string - project-key: - type: string - run-script: - type: string - default: "run-tests.sh" - timeout: - type: string - default: "25m" - steps: - - setup-tools: - tools-version: "<< parameters.tools-version >>" - - restore_cache: - keys: - - << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} - - run: - name: Run << parameters.project-key >> subproject tests - command: .circleci/<< parameters.run-script >> << parameters.project-key >> - no_output_timeout: << parameters.timeout >> - -# set of jobs to run -jobs: - commit-on-master-check: - executor: main-env - steps: - - checkout - - run: - name: Check commits of each submodule - command: | - .circleci/check-commit.sh - tutorial-setup-check: - executor: main-env - steps: - - checkout - - run: - name: Check that the tutorial-setup patches apply - command: | - scripts/tutorial-setup.sh - documentation-check: - executor: main-env - steps: - - checkout - - run: - name: Check that documentation builds with no warnings/errors - command: | - sudo apt-get update -y - sudo apt-get install -y python3-pip - sudo pip3 install -r docs/requirements.txt - make -C docs html - - install-riscv-toolchain: - executor: main-env - steps: - - toolchain-build: - tools-version: "riscv-tools" - install-esp-toolchain: - executor: main-env - steps: - - toolchain-build: - tools-version: "esp-tools" - install-verilator: - executor: main-env - steps: - - ssh-checkout - - run: - name: Install Verilator to remote - command: | - .circleci/install-verilator.sh - build-extra-tests: - executor: main-env - steps: - - ssh-checkout - - run: - name: Create hash of toolchains - command: | - .circleci/create-hash.sh - - restore_cache: - keys: - - riscv-tools-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../riscv-tools.hash" }} - - run: - name: Build extra tests - command: .circleci/build-extra-tests.sh - no_output_timeout: 120m - - save_cache: - key: extra-tests-{{ .Branch }}-{{ .Revision }} - paths: - - "/root/project/tests" - - prepare-chipyard-cores: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-cores" - prepare-chipyard-peripherals: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-peripherals" - prepare-chipyard-accels: - executor: main-env - steps: - - prepare-rtl: - tools-version: "esp-tools" - group-key: "group-accels" - prepare-chipyard-tracegen: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-tracegen" - prepare-chipyard-other: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-other" - - chipyard-rocket-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-rocket" - chipyard-hetero-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-hetero" - timeout: "20m" - chipyard-boom-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-boom" - chipyard-cva6-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-cva6" - timeout: "30m" - chipyard-sodor-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-sodor" - timeout: "30m" - chipyard-multiclock-rocket-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-cores" - project-key: "chipyard-multiclock-rocket" - chipyard-dmirocket-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-peripherals" - project-key: "chipyard-dmirocket" - chipyard-spiflashwrite-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-peripherals" - project-key: "chipyard-spiflashwrite" - chipyard-spiflashread-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-peripherals" - project-key: "chipyard-spiflashread" - chipyard-lbwif-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-peripherals" - project-key: "chipyard-lbwif" - - chipyard-sha3-run-tests: - executor: main-env - steps: - - run-tests: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-sha3" - chipyard-streaming-fir-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-accels" - project-key: "chipyard-streaming-fir" - chipyard-streaming-passthrough-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-accels" - project-key: "chipyard-streaming-passthrough" - chipyard-hwacha-run-tests: - executor: main-env - steps: - - run-tests: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-hwacha" - timeout: "30m" - chipyard-gemmini-run-tests: - executor: main-env - steps: - - run-tests: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-gemmini" - chipyard-nvdla-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-accels" - project-key: "chipyard-nvdla" - tracegen-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-tracegen" - project-key: "tracegen" - tracegen-boom-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-tracegen" - project-key: "tracegen-boom" - icenet-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-other" - project-key: "icenet" - timeout: "30m" - testchipip-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "group-other" - project-key: "testchipip" - timeout: "30m" - firesim-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "extra-tests" - project-key: "firesim" - run-script: "run-firesim-scala-tests.sh" - timeout: "20m" - fireboom-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "extra-tests" - project-key: "fireboom" - run-script: "run-firesim-scala-tests.sh" - timeout: "45m" - firesim-multiclock-run-tests: - executor: main-env - steps: - - run-tests: - group-key: "extra-tests" - project-key: "firesim-multiclock" - run-script: "run-firesim-scala-tests.sh" - timeout: "20m" - prepare-chipyard-fpga: - executor: main-env - steps: - - prepare-rtl: - group-key: "group-fpga" - build-type: "fpga" - -# Order and dependencies of jobs to run -workflows: - version: 2 - submodules-on-master: - jobs: - # Check to make sure submodule commits are on master branches - - commit-on-master-check - triggers: - - schedule: - cron: "0 0 * * *" - filters: - branches: - only: - - master - - build-and-test-chipyard-integration: - jobs: - # Make the toolchains - - install-riscv-toolchain - - - install-esp-toolchain - - - install-verilator - - - commit-on-master-check - - # Attempt to apply the tutorial patches - - tutorial-setup-check - - # Check that documentation builds - - documentation-check - - # Build extra tests - - build-extra-tests: - requires: - - install-riscv-toolchain - - # Prepare the verilator builds - - prepare-chipyard-cores: - requires: - - install-riscv-toolchain - - install-verilator - - prepare-chipyard-peripherals: - requires: - - install-riscv-toolchain - - install-verilator - - prepare-chipyard-accels: - requires: - - install-esp-toolchain - - install-verilator - - prepare-chipyard-tracegen: - requires: - - install-riscv-toolchain - - install-verilator - - prepare-chipyard-other: - requires: - - install-riscv-toolchain - - install-verilator - - # Run the example tests - - chipyard-rocket-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-hetero-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-boom-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-cva6-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-sodor-run-tests: - requires: - - prepare-chipyard-cores - - chipyard-dmirocket-run-tests: - requires: - - prepare-chipyard-peripherals - - chipyard-spiflashwrite-run-tests: - requires: - - prepare-chipyard-peripherals - - chipyard-spiflashread-run-tests: - requires: - - prepare-chipyard-peripherals - - chipyard-lbwif-run-tests: - requires: - - prepare-chipyard-peripherals - - - chipyard-sha3-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-streaming-fir-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-streaming-passthrough-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-hwacha-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-gemmini-run-tests: - requires: - - prepare-chipyard-accels - - chipyard-nvdla-run-tests: - requires: - - prepare-chipyard-accels - - - tracegen-run-tests: - requires: - - prepare-chipyard-tracegen - - tracegen-boom-run-tests: - requires: - - prepare-chipyard-tracegen - - - icenet-run-tests: - requires: - - prepare-chipyard-other - - testchipip-run-tests: - requires: - - prepare-chipyard-other - - # Run the firesim tests - - firesim-run-tests: - requires: - - install-riscv-toolchain - - install-verilator - - build-extra-tests - - firesim-multiclock-run-tests: - requires: - - install-riscv-toolchain - - install-verilator - - build-extra-tests - - fireboom-run-tests: - requires: - - install-riscv-toolchain - - install-verilator - - build-extra-tests - - # Prepare the fpga builds (just Verilog) - - prepare-chipyard-fpga: - requires: - - install-riscv-toolchain 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 new file mode 100644 index 00000000..fd9e9759 --- /dev/null +++ b/.github/actions/prepare-rtl/action.yml @@ -0,0 +1,41 @@ +name: prepare-rtl +description: 'Builds RTL based on parameters, caches the entire chipyard root dir when done' + +inputs: + tools-version: + description: Which toolchain to build + required: false + default: 'riscv-tools' + group-key: + description: group key + required: true + build-script: + description: rtl build script to use + required: false + default: "do-rtl-build.sh" + build-type: + description: type of build + required: false + default: "sim" + +runs: + using: "composite" + steps: + - 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 + diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml new file mode 100644 index 00000000..ea320615 --- /dev/null +++ b/.github/actions/run-tests/action.yml @@ -0,0 +1,30 @@ +name: run-tests +description: 'Runs tests according to input parameters' + +inputs: + tools-version: + description: Which toolchain to build + required: false + default: 'riscv-tools' + group-key: + description: group key + required: true + project-key: + description: project key + required: true + run-script: + description: rtl build script to use + required: false + default: "run-tests.sh" + +runs: + using: "composite" + steps: + - 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 + diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml new file mode 100644 index 00000000..de2b66ce --- /dev/null +++ b/.github/actions/toolchain-build/action.yml @@ -0,0 +1,29 @@ +name: toolchain-build +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 + diff --git a/.circleci/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh similarity index 100% rename from .circleci/build-extra-tests.sh rename to .github/scripts/build-extra-tests.sh diff --git a/.circleci/build-toolchains.sh b/.github/scripts/build-toolchains.sh similarity index 100% rename from .circleci/build-toolchains.sh rename to .github/scripts/build-toolchains.sh diff --git a/.circleci/check-commit.sh b/.github/scripts/check-commit.sh similarity index 100% rename from .circleci/check-commit.sh rename to .github/scripts/check-commit.sh diff --git a/.circleci/clean-old-files.sh b/.github/scripts/clean-old-files.sh similarity index 100% rename from .circleci/clean-old-files.sh rename to .github/scripts/clean-old-files.sh diff --git a/.circleci/create-hash.sh b/.github/scripts/create-hash.sh similarity index 87% rename from .circleci/create-hash.sh rename to .github/scripts/create-hash.sh index 7a8915a5..dae9f25d 100755 --- a/.circleci/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -10,14 +10,11 @@ set -o pipefail 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 > "${tools}.hash" done echo "Hashfile for riscv-tools and esp-tools created in $HOME" diff --git a/.circleci/defaults.sh b/.github/scripts/defaults.sh similarity index 85% rename from .circleci/defaults.sh rename to .github/scripts/defaults.sh index a9a56b74..0123fa88 100755 --- a/.circleci/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,15 +1,15 @@ #!/bin/bash copy () { - rsync -avzp -e 'ssh' --exclude '.git' $1 $2 + rsync -azp -e 'ssh' --exclude '.git' $1 $2 } run () { - ssh -o "StrictHostKeyChecking no" -t $SERVER $@ + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER $@ } run_script () { - ssh -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" } clean () { @@ -18,7 +18,7 @@ clean () { } # 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 @@ -26,8 +26,14 @@ REMOTE_MAKE_NPROC=4 VERILATOR_VERSION=v4.034 # remote variables -REMOTE_PREFIX=$CI_DIR/$CIRCLE_PROJECT_REPONAME-$CIRCLE_BRANCH -REMOTE_WORK_DIR=$REMOTE_PREFIX-$CIRCLE_SHA1-$CIRCLE_JOB + +CURRENT_BRANCH=$(git branch --show-current) + +# 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=$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 @@ -37,13 +43,13 @@ 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 +REMOTE_VERILATOR_DIR=$REMOTE_PREFIX-$GITHUB_SHA-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_CHIPYARD_DIR=$HOME LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator LOCAL_FIRESIM_DIR=$LOCAL_CHIPYARD_DIR/sims/firesim/sim 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 3a5d56ca..442b10fb 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/.circleci/run-tests.sh b/.github/scripts/run-tests.sh similarity index 100% rename from .circleci/run-tests.sh rename to .github/scripts/run-tests.sh 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 diff --git a/README.md b/README.md index d364a742..d231a73c 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,6 @@ ![CHIPYARD](https://github.com/ucb-bar/chipyard/raw/master/docs/_static/images/chipyard-logo-full.png) -# Chipyard Framework [![CircleCI](https://circleci.com/gh/ucb-bar/chipyard/tree/master.svg?style=svg)](https://circleci.com/gh/ucb-bar/chipyard/tree/master) - +# Chipyard Framework [![Test](https://github.com/ucb-bar/chipyard/workflows/chipyard-ci-process/badge.svg?style=svg)](https://github.com/ucb-bar/chipyard/actions) ## Using Chipyard To get started using Chipyard, see the documentation on the Chipyard documentation site: https://chipyard.readthedocs.io/ From f3f4b19fdeb3ebf45ae20bab756d66827907294e Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 4 Oct 2021 13:18:02 -0700 Subject: [PATCH 032/267] Per changes requested - build-extra-tests composite-action comment changed to Builds extra test required for FireSim tests - removed unneeded inputs tools-version and group-key from run-tests composite action - Added better comment to toolchain-build composite action - Change CI_MAKE_NPROC back to 8 in defaults.sh - Moved all the duplicated enviroment setting stuff in workflow file to the top - BUILDSERVER, BUILDUSER, CI_DIR, SERVER, and JVM_OPTS - Romoved all the not needed passed parameters in the calls to run-script - A bit of cleanup to .github/README.md - added link to SO `if` hack - cleaned up comments on CI_DIR - removed bad empty final bullet line --- .github/README.md | 12 +- .github/actions/build-extra-tests/action.yml | 2 +- .github/actions/run-tests/action.yml | 7 - .github/actions/toolchain-build/action.yml | 2 +- .github/scripts/defaults.sh | 2 +- .github/scripts/do-rtl-build.sh | 1 - ...t-run-tests.yml => chipyard-run-tests.yml} | 185 +----------------- 7 files changed, 10 insertions(+), 201 deletions(-) rename .github/workflows/{chipyard-rocket-run-tests.yml => chipyard-run-tests.yml} (82%) diff --git a/.github/README.md b/.github/README.md index 89fcc3f6..e864d705 100644 --- a/.github/README.md +++ b/.github/README.md @@ -42,7 +42,7 @@ will generate the data to be cached. The caching of the generated data is implic >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 +> of a bash based if is a [hack found on stackoverflow](https://stackoverflow.com/questions/65473359/github-action-unable-to-add-if-condition-in-steps) ```yaml - uses: actions/cache@v2 id: rtl-build-id @@ -106,13 +106,8 @@ To get the CI to work correctly you need to create the following GH Repository S | 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 +The main workflow also constructs and places in the environment a SERVER and a work directyory on that server env using the above secrets. +The SERVER is constructed like this: ```bash SERVER = ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} ``` @@ -134,4 +129,3 @@ This code is heavily based on the origin [CircleCI]() work. There a quite a few - 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 index 80ae8fdf..cb751998 100644 --- a/.github/actions/build-extra-tests/action.yml +++ b/.github/actions/build-extra-tests/action.yml @@ -1,5 +1,5 @@ name: build-extra-tests -description: 'Builds extra test required for some flows' +description: 'Builds extra test required for FireSim tests' inputs: tools-version: diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index ea320615..103d8f8c 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: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' - group-key: - description: group key - required: true project-key: description: project key required: true diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index de2b66ce..cd883c61 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,5 +1,5 @@ name: toolchain-build -description: 'Builds the selected toolchain' +description: 'Builds or retrieves cache of the selected toolchain' inputs: tools-version: diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 0123fa88..3d08e74b 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -18,7 +18,7 @@ clean () { } # 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 diff --git a/.github/scripts/do-rtl-build.sh b/.github/scripts/do-rtl-build.sh index 442b10fb..3a5d56ca 100755 --- a/.github/scripts/do-rtl-build.sh +++ b/.github/scripts/do-rtl-build.sh @@ -59,7 +59,6 @@ else fi # choose what make dir to use - case $2 in "sim") REMOTE_MAKE_DIR=$REMOTE_SIM_DIR diff --git a/.github/workflows/chipyard-rocket-run-tests.yml b/.github/workflows/chipyard-run-tests.yml similarity index 82% rename from .github/workflows/chipyard-rocket-run-tests.yml rename to .github/workflows/chipyard-run-tests.yml index 74dd262c..44ce27fc 100644 --- a/.github/workflows/chipyard-rocket-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -4,7 +4,11 @@ on: [push] env: tools-cache-version: v7 + BUILDSERVER: ${{ secrets.BUILDSERVER }} + BUILDUSER: ${{ secrets.BUILDUSER }} + SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} CI_DIR: ${{ secrets.BUILDDIR }} + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit jobs: commit-on-master-check: @@ -13,8 +17,6 @@ jobs: 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 @@ -27,8 +29,6 @@ jobs: 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 @@ -41,8 +41,6 @@ jobs: 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 @@ -62,8 +60,6 @@ jobs: 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 @@ -96,8 +92,6 @@ jobs: 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 @@ -116,8 +110,6 @@ jobs: 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 @@ -136,8 +128,6 @@ jobs: 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 @@ -167,11 +157,6 @@ jobs: 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 @@ -205,11 +190,6 @@ jobs: 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 @@ -239,11 +219,6 @@ jobs: 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 @@ -273,11 +248,6 @@ jobs: 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 @@ -307,11 +277,6 @@ jobs: 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 @@ -341,11 +306,6 @@ jobs: 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 @@ -375,11 +335,6 @@ jobs: 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 @@ -412,11 +367,6 @@ jobs: 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 @@ -441,7 +391,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-rocket" chipyard-hetero-run-tests: @@ -451,11 +400,6 @@ jobs: 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 @@ -480,7 +424,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-hetero" chipyard-boom-run-tests: @@ -490,11 +433,6 @@ jobs: 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 @@ -519,7 +457,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-boom" chipyard-cva6-run-tests: @@ -529,11 +466,6 @@ jobs: 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 @@ -558,7 +490,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-cva6" chipyard-sodor-run-tests: @@ -568,11 +499,6 @@ jobs: 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 @@ -597,7 +523,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-cores" project-key: "chipyard-sodor" chipyard-dmirocket-run-tests: @@ -607,11 +532,6 @@ jobs: 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 @@ -636,7 +556,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-peripherals" project-key: "chipyard-dmirocket" chipyard-spiflashwrite-run-tests: @@ -646,11 +565,6 @@ jobs: 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 @@ -675,7 +589,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-peripherals" project-key: "chipyard-spiflashwrite" chipyard-spiflashread-run-tests: @@ -685,11 +598,6 @@ jobs: 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 @@ -714,7 +622,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-peripherals" project-key: "chipyard-spiflashread" chipyard-lbwif-run-tests: @@ -724,11 +631,6 @@ jobs: 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 @@ -753,7 +655,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-peripherals" project-key: "chipyard-lbwif" chipyard-sha3-run-tests: @@ -763,11 +664,6 @@ jobs: 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 @@ -792,7 +688,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-sha3" chipyard-streaming-fir-run-tests: @@ -802,11 +697,6 @@ jobs: 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 @@ -831,7 +721,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-streaming-fir" chipyard-streaming-passthrough-run-tests: @@ -841,11 +730,6 @@ jobs: 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 @@ -870,7 +754,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-streaming-passthrough" chipyard-hwacha-run-tests: @@ -880,11 +763,6 @@ jobs: 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 @@ -909,7 +787,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-hwacha" chipyard-gemmini-run-tests: @@ -919,11 +796,6 @@ jobs: 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 @@ -948,7 +820,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-gemmini" chipyard-nvdla-run-tests: @@ -958,11 +829,6 @@ jobs: 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 @@ -987,7 +853,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-accels" project-key: "chipyard-nvdla" tracegen-boom-run-tests: @@ -997,11 +862,6 @@ jobs: 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 @@ -1026,7 +886,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-tracegen" project-key: "tracegen-boom" tracegen-run-tests: @@ -1036,11 +895,6 @@ jobs: 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 @@ -1065,7 +919,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-tracegen" project-key: "tracegen" icenet-run-tests: @@ -1075,11 +928,6 @@ jobs: 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 @@ -1104,7 +952,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-other" project-key: "icenet" testchipip-run-tests: @@ -1114,11 +961,6 @@ jobs: 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 @@ -1143,7 +985,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "group-other" project-key: "testchipip" firesim-run-tests: @@ -1153,11 +994,6 @@ jobs: 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 @@ -1182,7 +1018,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "extra-tests" project-key: "firesim" run-script: "run-firesim-scala-tests.sh" @@ -1193,11 +1028,6 @@ jobs: 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 @@ -1222,7 +1052,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "extra-tests" project-key: "fireboom" run-script: "run-firesim-scala-tests.sh" @@ -1233,11 +1062,6 @@ jobs: 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 @@ -1262,7 +1086,6 @@ jobs: - name: Run tests uses: ./.github/actions/run-tests with: - group-key: "extra-tests" project-key: "firesim-multiclock" run-script: "run-firesim-scala-tests.sh" From bbb0cd70e2add16a7147f670cd0fe38a84f2ef7a Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 4 Oct 2021 14:28:22 -0700 Subject: [PATCH 033/267] Per changes requested round 2 - In main workflow chipyard-run-tests.yml - Remove debug output in `make-keys` - remove export intializers in `build-extra-tests` - Add prepare-chipyard-fpga to `needs` in `all_tests_passed` --- .github/workflows/chipyard-run-tests.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 44ce27fc..2efac52d 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -75,11 +75,6 @@ jobs: 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 }} @@ -145,11 +140,7 @@ jobs: 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 + run: .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator @@ -1102,6 +1093,7 @@ jobs: chipyard-gemmini-run-tests, chipyard-nvdla-run-tests, tracegen-boom-run-tests, tracegen-run-tests, icenet-run-tests, testchipip-run-tests, + prepare-chipyard-fpga, firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] runs-on: ubuntu-latest steps: From b905ea540019a9b2625fa65cf96456fc8d7d6025 Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 4 Oct 2021 14:43:57 -0700 Subject: [PATCH 034/267] Per changes requested round 2.1 - export intializers in `build-extra-tests` --- .github/workflows/chipyard-run-tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 2efac52d..28dee8b2 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -140,7 +140,11 @@ jobs: 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: .github/scripts/build-extra-tests.sh + 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 From 36fa1efcb61196f58d4a8b22e335b4e3565e809d Mon Sep 17 00:00:00 2001 From: chick Date: Mon, 4 Oct 2021 20:34:44 -0700 Subject: [PATCH 035/267] Remove $(sim) targets in order to facilitate caching with GA The simulations binaries have been built and all we want is the cached binaries. We don't need all the files building the sim depended on --- common.mk | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/common.mk b/common.mk index 1fa626cf..efa36a0f 100644 --- a/common.mk +++ b/common.mk @@ -192,11 +192,15 @@ ifeq (,$(BINARY)) endif # run normal binary with hardware-logged insn dissassembly -run-binary: $(output_dir) $(sim) check-binary +#TODO: maybe put this back, this is a test of minimum caching in CI +#run-binary: $(output_dir) $(sim) check-binary +run-binary: $(output_dir) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log) # run simulator as fast as possible (no insn disassembly) -run-binary-fast: $(output_dir) $(sim) check-binary +#TODO: maybe put this back, this is a test of minimum caching in CI +#run-binary-fast: $(output_dir) $(sim) check-binary +run-binary-fast: $(output_dir) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $(BINARY) $(binary_hex) run-binary-hex: check-binary +#TODO: Restore this or figure out a better caching run-binary-hex: $(output_dir) $(sim) $(binary_hex) run-binary-hex: $(output_dir) $(sim) $(binary_hex) run-binary-hex: run-binary run-binary-hex: override LOADMEM_ADDR = 80000000 run-binary-hex: override LOADMEM = $(binary_hex) run-binary-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-debug-hex: check-binary +#TODO: Restore this or figure out a better caching run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) run-binary-debug-hex: run-binary-debug run-binary-debug-hex: override LOADMEM_ADDR = 80000000 run-binary-debug-hex: override LOADMEM = $(binary_hex) run-binary-debug-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-fast-hex: check-binary -run-binary-fast-hex: $(output_dir) $(sim) $(binary_hex) +#TODO: put this back run-binary-fast-hex: $(output_dir) $(sim) $(binary_hex) +run-binary-fast-hex: $(output_dir) $(binary_hex) run-binary-fast-hex: run-binary-fast run-binary-fast-hex: override LOADMEM_ADDR = 80000000 run-binary-fast-hex: override LOADMEM = $(binary_hex) @@ -239,10 +246,12 @@ $(output_dir): $(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/% $(output_dir) ln -sf $< $@ -$(output_dir)/%.run: $(output_dir)/% $(sim) +#$(output_dir)/%.run: $(output_dir)/% $(sim) +$(output_dir)/%.run: $(output_dir)/% (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $< >(spike-dasm > $@) | tee $<.log) ######################################################################################### From 93b0c97da18c0c2641c94a75cd382994376d7c20 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Mon, 4 Oct 2021 21:02:34 -0700 Subject: [PATCH 036/267] Missed removing a sim dependency --- generators/tracegen/tracegen.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/generators/tracegen/tracegen.mk b/generators/tracegen/tracegen.mk index fec62288..1766059f 100644 --- a/generators/tracegen/tracegen.mk +++ b/generators/tracegen/tracegen.mk @@ -8,7 +8,7 @@ AXE=$(AXE_DIR)/axe $(AXE): $(wildcard $(AXE_DIR)/*.[ch]) $(AXE_DIR)/make.sh cd $(AXE_DIR) && ./make.sh -$(output_dir)/tracegen.out: $(sim) +$(output_dir)/tracegen.out: mkdir -p $(output_dir) && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) none $@ $(output_dir)/tracegen.result: $(output_dir)/tracegen.out $(AXE) From dee18ad73b4678f86cf6cd990e4795009ee96409 Mon Sep 17 00:00:00 2001 From: chick Date: Tue, 5 Oct 2021 14:14:30 -0700 Subject: [PATCH 037/267] Remove export statements from build-extra-tests --- .github/workflows/chipyard-run-tests.yml | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 28dee8b2..2efac52d 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -140,11 +140,7 @@ jobs: 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 + run: .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator From bd39e0ad1edf8377c57d9761979bb6968d6ea81a Mon Sep 17 00:00:00 2001 From: chick Date: Tue, 5 Oct 2021 15:23:44 -0700 Subject: [PATCH 038/267] Putting export statements back in to build-extra-tests, build failed without them --- .github/workflows/chipyard-run-tests.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 2efac52d..a171b2a6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -140,7 +140,11 @@ jobs: 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: .github/scripts/build-extra-tests.sh + 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.github/scripts/build-extra-tests.sh install-verilator: name: install-verilator From c7293d507c3810adfbd7b93af3af4d5231b8b816 Mon Sep 17 00:00:00 2001 From: chick Date: Tue, 5 Oct 2021 15:42:51 -0700 Subject: [PATCH 039/267] Remove export statements from build-extra-tests --- .github/workflows/chipyard-run-tests.yml | 2 +- script1.sh | 51 ++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 script1.sh diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index a171b2a6..a5204332 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -144,7 +144,7 @@ jobs: 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.github/scripts/build-extra-tests.sh + .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator diff --git a/script1.sh b/script1.sh new file mode 100644 index 00000000..94fec76d --- /dev/null +++ b/script1.sh @@ -0,0 +1,51 @@ +#!/bin/bash + +cd /scratch/chick/chipyard && java \ + -Xmx8G \ + -Xss8M \ + -XX:MaxPermSize=256M \ + -Djava.io.tmpdir=/scratch/chick/chipyard/.java_tmp \ + -jar \ + /scratch/chick/chipyard/generators/rocket-chip/sbt-launch.jar \ + -Dsbt.sourcemode=true \ + -Dsbt.workspace=/scratch/chick/chipyard/tools \ + \ + ";project \ + tapeout; \ + runMain \ + barstools.tapeout.transforms.GenerateTopAndHarness \ + --output-file \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.v \ + --harness-o \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.v \ + --input-file \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.fir \ + --syn-top \ + ChipTop \ + --harness-top \ + TestHarness \ + --annotation-file \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.anno.json \ + --top-anno-out \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.anno.json \ + --top-dotf-out \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/firrtl_black_box_resource_files.top.f \ + --top-fir \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.fir \ + --harness-anno-out \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.anno.json \ + --harness-dotf-out \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/firrtl_black_box_resource_files.harness.f \ + --harness-fir \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.fir \ + --infer-rw \ + --repl-seq-mem \ + -c:TestHarness:-o:/scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.mems.conf \ + -thconf \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.mems.conf \ + --target-dir \ + /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig \ + --log-level \ + error \ + " + From 52e8aa1957b67c6e793647238eb33d04ab5f805b Mon Sep 17 00:00:00 2001 From: chick Date: Tue, 5 Oct 2021 21:15:25 -0700 Subject: [PATCH 040/267] This is branch with the new GA CI It has the .circleci CI stuff as well for comparison purposes. --- .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/config.yml | 524 +++++++++++++++++++++++ .circleci/create-hash.sh | 23 + .circleci/defaults.sh | 90 ++++ .circleci/do-rtl-build.sh | 95 ++++ .circleci/install-verilator.sh | 25 ++ .circleci/run-firesim-scala-tests.sh | 62 +++ .circleci/run-tests.sh | 117 +++++ .github/workflows/chipyard-run-tests.yml | 2 +- 13 files changed, 1222 insertions(+), 1 deletion(-) create mode 100644 .circleci/README.md create mode 100755 .circleci/build-extra-tests.sh create mode 100755 .circleci/build-toolchains.sh create mode 100755 .circleci/check-commit.sh create mode 100755 .circleci/clean-old-files.sh create mode 100644 .circleci/config.yml create mode 100755 .circleci/create-hash.sh create mode 100755 .circleci/defaults.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 create mode 100755 .circleci/run-tests.sh 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. 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/check-commit.sh b/.circleci/check-commit.sh new file mode 100755 index 00000000..1b59191e --- /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" "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 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/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..e207db9d --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,524 @@ +# CircleCI Configuration File + +# version of circleci +version: 2.1 + +parameters: + tools-cache-version: + type: string + default: "v13" + +# default execution env.s +executors: + main-env: + docker: + - image: ucbbar/chipyard-ci-image:554b436 + environment: + JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit + +# re-usable commands +commands: + toolchain-build: + description: "Build a toolchain" + parameters: + tools-version: + type: string + default: "riscv-tools" + steps: + - checkout + - run: + name: Create hash of toolchains + command: | + .circleci/create-hash.sh + - restore_cache: + keys: + - << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} + - run: + name: Building << parameters.tools-version >> + command: | + .circleci/build-toolchains.sh << parameters.tools-version >> + no_output_timeout: 120m + - save_cache: + key: << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} + paths: + - "/root/<< parameters.tools-version >>-install" + + ssh-checkout: + description: "Add SSH key and checkout code" + steps: + - add_ssh_keys: + fingerprints: + - "3e:c3:02:5b:ed:64:8c:b7:b0:04:43:bc:83:43:73:1e" + - "32:d6:89:d2:97:fa:db:de:a8:2d:2a:f2:70:dd:80:89" + - checkout + + setup-tools: + description: "Get toolchain" + parameters: + tools-version: + type: string + default: "riscv-tools" + steps: + - ssh-checkout + - run: + name: Create hash of toolchains + command: | + .circleci/create-hash.sh + - restore_cache: + keys: + - << parameters.tools-version >>-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../<< parameters.tools-version >>.hash" }} + + prepare-rtl: + description: "Run the prepare step of RTL" + parameters: + tools-version: + type: string + default: "riscv-tools" + group-key: + type: string + timeout: + type: string + default: "120m" + build-script: + type: string + default: "do-rtl-build.sh" + build-type: + type: string + default: "sim" + steps: + - setup-tools: + tools-version: "<< parameters.tools-version >>" + - run: + name: Building << parameters.group-key >> subproject using Verilator + command: .circleci/<< parameters.build-script >> << parameters.group-key >> << parameters.build-type >> + no_output_timeout: << parameters.timeout >> + - save_cache: + key: << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} + paths: + - "/root/project" + + run-tests: + description: "Run a set of tests" + parameters: + tools-version: + type: string + default: "riscv-tools" + group-key: + type: string + project-key: + type: string + run-script: + type: string + default: "run-tests.sh" + timeout: + type: string + default: "25m" + steps: + - setup-tools: + tools-version: "<< parameters.tools-version >>" + - restore_cache: + keys: + - << parameters.group-key >>-{{ .Branch }}-{{ .Revision }} + - run: + name: Run << parameters.project-key >> subproject tests + command: .circleci/<< parameters.run-script >> << parameters.project-key >> + no_output_timeout: << parameters.timeout >> + +# set of jobs to run +jobs: + commit-on-master-check: + executor: main-env + steps: + - checkout + - run: + name: Check commits of each submodule + command: | + .circleci/check-commit.sh + tutorial-setup-check: + executor: main-env + steps: + - checkout + - run: + name: Check that the tutorial-setup patches apply + command: | + scripts/tutorial-setup.sh + documentation-check: + executor: main-env + steps: + - checkout + - run: + name: Check that documentation builds with no warnings/errors + command: | + sudo apt-get update -y + sudo apt-get install -y python3-pip + sudo pip3 install -r docs/requirements.txt + make -C docs html + + install-riscv-toolchain: + executor: main-env + steps: + - toolchain-build: + tools-version: "riscv-tools" + install-esp-toolchain: + executor: main-env + steps: + - toolchain-build: + tools-version: "esp-tools" + install-verilator: + executor: main-env + steps: + - ssh-checkout + - run: + name: Install Verilator to remote + command: | + .circleci/install-verilator.sh + build-extra-tests: + executor: main-env + steps: + - ssh-checkout + - run: + name: Create hash of toolchains + command: | + .circleci/create-hash.sh + - restore_cache: + keys: + - riscv-tools-installed-<< pipeline.parameters.tools-cache-version >>-{{ checksum "../riscv-tools.hash" }} + - run: + name: Build extra tests + command: .circleci/build-extra-tests.sh + no_output_timeout: 120m + - save_cache: + key: extra-tests-{{ .Branch }}-{{ .Revision }} + paths: + - "/root/project/tests" + + prepare-chipyard-cores: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-cores" + prepare-chipyard-peripherals: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-peripherals" + prepare-chipyard-accels: + executor: main-env + steps: + - prepare-rtl: + tools-version: "esp-tools" + group-key: "group-accels" + prepare-chipyard-tracegen: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-tracegen" + prepare-chipyard-other: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-other" + + chipyard-rocket-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-rocket" + chipyard-hetero-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-hetero" + timeout: "20m" + chipyard-boom-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-boom" + chipyard-cva6-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-cva6" + timeout: "30m" + chipyard-sodor-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-sodor" + timeout: "30m" + chipyard-multiclock-rocket-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-cores" + project-key: "chipyard-multiclock-rocket" + chipyard-dmirocket-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-peripherals" + project-key: "chipyard-dmirocket" + chipyard-spiflashwrite-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-peripherals" + project-key: "chipyard-spiflashwrite" + chipyard-spiflashread-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-peripherals" + project-key: "chipyard-spiflashread" + chipyard-lbwif-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-peripherals" + project-key: "chipyard-lbwif" + + chipyard-sha3-run-tests: + executor: main-env + steps: + - run-tests: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-sha3" + chipyard-streaming-fir-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-accels" + project-key: "chipyard-streaming-fir" + chipyard-streaming-passthrough-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-accels" + project-key: "chipyard-streaming-passthrough" + chipyard-hwacha-run-tests: + executor: main-env + steps: + - run-tests: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-hwacha" + timeout: "30m" + chipyard-gemmini-run-tests: + executor: main-env + steps: + - run-tests: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-gemmini" + chipyard-nvdla-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-accels" + project-key: "chipyard-nvdla" + tracegen-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-tracegen" + project-key: "tracegen" + tracegen-boom-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-tracegen" + project-key: "tracegen-boom" + icenet-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-other" + project-key: "icenet" + timeout: "30m" + testchipip-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "group-other" + project-key: "testchipip" + timeout: "30m" + firesim-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "extra-tests" + project-key: "firesim" + run-script: "run-firesim-scala-tests.sh" + timeout: "20m" + fireboom-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "extra-tests" + project-key: "fireboom" + run-script: "run-firesim-scala-tests.sh" + timeout: "45m" + firesim-multiclock-run-tests: + executor: main-env + steps: + - run-tests: + group-key: "extra-tests" + project-key: "firesim-multiclock" + run-script: "run-firesim-scala-tests.sh" + timeout: "20m" + prepare-chipyard-fpga: + executor: main-env + steps: + - prepare-rtl: + group-key: "group-fpga" + build-type: "fpga" + +# Order and dependencies of jobs to run +workflows: + version: 2 + submodules-on-master: + jobs: + # Check to make sure submodule commits are on master branches + - commit-on-master-check + triggers: + - schedule: + cron: "0 0 * * *" + filters: + branches: + only: + - master + + build-and-test-chipyard-integration: + jobs: + # Make the toolchains + - install-riscv-toolchain + + - install-esp-toolchain + + - install-verilator + + - commit-on-master-check + + # Attempt to apply the tutorial patches + - tutorial-setup-check + + # Check that documentation builds + - documentation-check + + # Build extra tests + - build-extra-tests: + requires: + - install-riscv-toolchain + + # Prepare the verilator builds + - prepare-chipyard-cores: + requires: + - install-riscv-toolchain + - install-verilator + - prepare-chipyard-peripherals: + requires: + - install-riscv-toolchain + - install-verilator + - prepare-chipyard-accels: + requires: + - install-esp-toolchain + - install-verilator + - prepare-chipyard-tracegen: + requires: + - install-riscv-toolchain + - install-verilator + - prepare-chipyard-other: + requires: + - install-riscv-toolchain + - install-verilator + + # Run the example tests + - chipyard-rocket-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-hetero-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-boom-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-cva6-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-sodor-run-tests: + requires: + - prepare-chipyard-cores + - chipyard-dmirocket-run-tests: + requires: + - prepare-chipyard-peripherals + - chipyard-spiflashwrite-run-tests: + requires: + - prepare-chipyard-peripherals + - chipyard-spiflashread-run-tests: + requires: + - prepare-chipyard-peripherals + - chipyard-lbwif-run-tests: + requires: + - prepare-chipyard-peripherals + + - chipyard-sha3-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-streaming-fir-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-streaming-passthrough-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-hwacha-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-gemmini-run-tests: + requires: + - prepare-chipyard-accels + - chipyard-nvdla-run-tests: + requires: + - prepare-chipyard-accels + + - tracegen-run-tests: + requires: + - prepare-chipyard-tracegen + - tracegen-boom-run-tests: + requires: + - prepare-chipyard-tracegen + + - icenet-run-tests: + requires: + - prepare-chipyard-other + - testchipip-run-tests: + requires: + - prepare-chipyard-other + + # Run the firesim tests + - firesim-run-tests: + requires: + - install-riscv-toolchain + - install-verilator + - build-extra-tests + - firesim-multiclock-run-tests: + requires: + - install-riscv-toolchain + - install-verilator + - build-extra-tests + - fireboom-run-tests: + requires: + - install-riscv-toolchain + - install-verilator + - build-extra-tests + + # Prepare the fpga builds (just Verilog) + - prepare-chipyard-fpga: + requires: + - install-riscv-toolchain 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/defaults.sh b/.circleci/defaults.sh new file mode 100755 index 00000000..a9a56b74 --- /dev/null +++ b/.circleci/defaults.sh @@ -0,0 +1,90 @@ +#!/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/do-rtl-build.sh b/.circleci/do-rtl-build.sh new file mode 100755 index 00000000..3a5d56ca --- /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_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 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..a848df62 --- /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_OPTS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" testOnly ${mapping[$1]}" diff --git a/.circleci/run-tests.sh b/.circleci/run-tests.sh new file mode 100755 index 00000000..ab3cf5cc --- /dev/null +++ b/.circleci/run-tests.sh @@ -0,0 +1,117 @@ +#!/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/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index a5204332..686ccd8d 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -3,7 +3,7 @@ name: chipyard-ci-process on: [push] env: - tools-cache-version: v7 + tools-cache-version: v8 BUILDSERVER: ${{ secrets.BUILDSERVER }} BUILDUSER: ${{ secrets.BUILDUSER }} SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} From f61410c95793a74a3efda631ace0399ecc59cb97 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 5 Oct 2021 21:54:13 -0700 Subject: [PATCH 041/267] Update docs --- docs/Advanced-Concepts/Debugging-RTL.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/Advanced-Concepts/Debugging-RTL.rst b/docs/Advanced-Concepts/Debugging-RTL.rst index 6831cc4a..678ab33a 100644 --- a/docs/Advanced-Concepts/Debugging-RTL.rst +++ b/docs/Advanced-Concepts/Debugging-RTL.rst @@ -22,8 +22,8 @@ make target. For example: make CONFIG=CustomConfig debug -The ``run-binary-debug`` rule will also automatically build a simulator, -run it on a custom binary, and generate a waveform. For example, to run a +The ``run-binary-debug`` rule uses the prebuilt simulator to run a custom binary +and generate a waveform. For example, to run a test on ``helloworld.riscv``, use .. code-block:: shell From c0a60f50f974ff774b19a74b2a0d013c151a827f Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 5 Oct 2021 21:54:52 -0700 Subject: [PATCH 042/267] Update docs --- docs/Customization/MMIO-Peripherals.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Customization/MMIO-Peripherals.rst b/docs/Customization/MMIO-Peripherals.rst index 15ed5a00..bffe6f26 100644 --- a/docs/Customization/MMIO-Peripherals.rst +++ b/docs/Customization/MMIO-Peripherals.rst @@ -137,6 +137,7 @@ Now with all of that done, we can go ahead and run our simulation. .. code-block:: shell cd sims/verilator + make CONFIG=GCDTLRocketConfig make CONFIG=GCDTLRocketConfig BINARY=../../tests/gcd.riscv run-binary From e9642f5eba8fd6847aa34dd328f11d5b4e3bdfb3 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 5 Oct 2021 21:55:21 -0700 Subject: [PATCH 043/267] Update docs --- docs/Customization/Dsptools-Blocks.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/docs/Customization/Dsptools-Blocks.rst b/docs/Customization/Dsptools-Blocks.rst index bdf68fc1..52109a75 100644 --- a/docs/Customization/Dsptools-Blocks.rst +++ b/docs/Customization/Dsptools-Blocks.rst @@ -120,6 +120,7 @@ Now we can run our simulation. .. code-block:: shell cd sims/verilator + make CONFIG=StreamingFIRRocketConfig make CONFIG=StreamingFIRRocketConfig BINARY=../../tests/streaming-fir.riscv run-binary .. [#] ``ReadQueue`` and ``WriteQueue`` are good illustrations of how to write a ``DspBlock`` and how they can be integrated into rocket, but in a real design a DMA engine would be preferred. ``ReadQueue`` will stall the processor if you try to read an empty queue, and ``WriteQueue`` will stall if you try to write to a full queue, which a DMA engine can more elegantly avoid. Furthermore, a DMA engine can do the work of moving data, freeing the processor to do other useful work (or sleep). From 4cbdd9bb2647fd1b09b9c99e41780fd9b737d4d0 Mon Sep 17 00:00:00 2001 From: chick Date: Wed, 6 Oct 2021 11:57:58 -0700 Subject: [PATCH 044/267] - remove unused GA build-extra-tests/action.yml - cleanup exports in CA - remove exports from build-extra-tests CA - put exports in build-extra-tests.sh - based it on $GITHUB_WORKSPACE - changed exports in run-tests CA to use $GITHUB_WORKSPACE - in common.mk - removed TODO comment lines where `$(sim)` had been removed - removed commented out lines that used `$(sim)` - removed unused debugging script1.sh --- .github/actions/build-extra-tests/action.yml | 28 ----------- .github/actions/run-tests/action.yml | 2 +- .github/scripts/build-extra-tests.sh | 4 ++ .github/workflows/chipyard-run-tests.yml | 6 +-- common.mk | 9 ---- script1.sh | 51 -------------------- 6 files changed, 6 insertions(+), 94 deletions(-) delete mode 100644 .github/actions/build-extra-tests/action.yml delete mode 100644 script1.sh diff --git a/.github/actions/build-extra-tests/action.yml b/.github/actions/build-extra-tests/action.yml deleted file mode 100644 index cb751998..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 FireSim tests' - -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/run-tests/action.yml b/.github/actions/run-tests/action.yml index 103d8f8c..a7cdebcb 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -15,7 +15,7 @@ runs: steps: - 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 RISCV="$GITHUB_WORKSPACE/riscv-tools-install" export LD_LIBRARY_PATH="$RISCV/lib" export PATH="$RISCV/bin:$PATH" ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} diff --git a/.github/scripts/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh index e38b50fe..68bf7fe6 100755 --- a/.github/scripts/build-extra-tests.sh +++ b/.github/scripts/build-extra-tests.sh @@ -3,6 +3,10 @@ # turn echo on and error on earliest command set -ex +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +export LD_LIBRARY_PATH="$RISCV/lib" +export PATH="$RISCV/bin:$PATH" + # get shared variables SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" source $SCRIPT_DIR/defaults.sh diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 686ccd8d..aa5c438e 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -140,11 +140,7 @@ jobs: 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 + run: .github/scripts/build-extra-tests.sh install-verilator: name: install-verilator diff --git a/common.mk b/common.mk index efa36a0f..634f7767 100644 --- a/common.mk +++ b/common.mk @@ -192,14 +192,10 @@ ifeq (,$(BINARY)) endif # run normal binary with hardware-logged insn dissassembly -#TODO: maybe put this back, this is a test of minimum caching in CI -#run-binary: $(output_dir) $(sim) check-binary run-binary: $(output_dir) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log) # run simulator as fast as possible (no insn disassembly) -#TODO: maybe put this back, this is a test of minimum caching in CI -#run-binary-fast: $(output_dir) $(sim) check-binary run-binary-fast: $(output_dir) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $(BINARY) $(binary_hex) run-binary-hex: check-binary -#TODO: Restore this or figure out a better caching run-binary-hex: $(output_dir) $(sim) $(binary_hex) run-binary-hex: $(output_dir) $(sim) $(binary_hex) run-binary-hex: run-binary run-binary-hex: override LOADMEM_ADDR = 80000000 run-binary-hex: override LOADMEM = $(binary_hex) run-binary-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-debug-hex: check-binary -#TODO: Restore this or figure out a better caching run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) run-binary-debug-hex: run-binary-debug run-binary-debug-hex: override LOADMEM_ADDR = 80000000 run-binary-debug-hex: override LOADMEM = $(binary_hex) run-binary-debug-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-fast-hex: check-binary -#TODO: put this back run-binary-fast-hex: $(output_dir) $(sim) $(binary_hex) run-binary-fast-hex: $(output_dir) $(binary_hex) run-binary-fast-hex: run-binary-fast run-binary-fast-hex: override LOADMEM_ADDR = 80000000 @@ -246,11 +239,9 @@ $(output_dir): $(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/% $(output_dir) ln -sf $< $@ -#$(output_dir)/%.run: $(output_dir)/% $(sim) $(output_dir)/%.run: $(output_dir)/% (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $< >(spike-dasm > $@) | tee $<.log) diff --git a/script1.sh b/script1.sh deleted file mode 100644 index 94fec76d..00000000 --- a/script1.sh +++ /dev/null @@ -1,51 +0,0 @@ -#!/bin/bash - -cd /scratch/chick/chipyard && java \ - -Xmx8G \ - -Xss8M \ - -XX:MaxPermSize=256M \ - -Djava.io.tmpdir=/scratch/chick/chipyard/.java_tmp \ - -jar \ - /scratch/chick/chipyard/generators/rocket-chip/sbt-launch.jar \ - -Dsbt.sourcemode=true \ - -Dsbt.workspace=/scratch/chick/chipyard/tools \ - \ - ";project \ - tapeout; \ - runMain \ - barstools.tapeout.transforms.GenerateTopAndHarness \ - --output-file \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.v \ - --harness-o \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.v \ - --input-file \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.fir \ - --syn-top \ - ChipTop \ - --harness-top \ - TestHarness \ - --annotation-file \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.anno.json \ - --top-anno-out \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.anno.json \ - --top-dotf-out \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/firrtl_black_box_resource_files.top.f \ - --top-fir \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.fir \ - --harness-anno-out \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.anno.json \ - --harness-dotf-out \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/firrtl_black_box_resource_files.harness.f \ - --harness-fir \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.fir \ - --infer-rw \ - --repl-seq-mem \ - -c:TestHarness:-o:/scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.top.mems.conf \ - -thconf \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig/chipyard.TestHarness.RocketConfig.harness.mems.conf \ - --target-dir \ - /scratch/chick/chipyard/sims/verilator/generated-src/chipyard.TestHarness.RocketConfig \ - --log-level \ - error \ - " - From 26d1731bd9a061688574938567a8f6923eca2059 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 19:42:50 -0700 Subject: [PATCH 045/267] Move RISCV env. var. setting interal to scripts --- .github/actions/run-tests/action.yml | 3 --- .github/scripts/build-extra-tests.sh | 8 ++++---- .github/scripts/run-firesim-scala-tests.sh | 4 ++++ .github/scripts/run-tests.sh | 4 ++++ 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index a7cdebcb..33bcad77 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -15,9 +15,6 @@ runs: steps: - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl run: | - export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" - export LD_LIBRARY_PATH="$RISCV/lib" - export PATH="$RISCV/bin:$PATH" ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} shell: bash diff --git a/.github/scripts/build-extra-tests.sh b/.github/scripts/build-extra-tests.sh index 68bf7fe6..a77f5482 100755 --- a/.github/scripts/build-extra-tests.sh +++ b/.github/scripts/build-extra-tests.sh @@ -3,13 +3,13 @@ # turn echo on and error on earliest command set -ex -export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" -export LD_LIBRARY_PATH="$RISCV/lib" -export PATH="$RISCV/bin:$PATH" - # get shared variables 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/run-firesim-scala-tests.sh b/.github/scripts/run-firesim-scala-tests.sh index a848df62..55a22365 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/run-firesim-scala-tests.sh @@ -13,6 +13,10 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT +export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +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 diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index ab3cf5cc..7729579c 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -9,6 +9,10 @@ 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" + run_bmark () { make run-bmark-tests-fast -j$CI_MAKE_NPROC -C $LOCAL_SIM_DIR $@ } From f117f7a0fe723ddd7e1437175fac5383150c1e10 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 20:05:43 -0700 Subject: [PATCH 046/267] Try to skip successful jobs on rerun workflow --- .github/actions/job-end/action.yml | 8 + .github/actions/job-start/action.yml | 19 ++ .github/workflows/chipyard-run-tests.yml | 294 ++++++++++++++++++++++- 3 files changed, 319 insertions(+), 2 deletions(-) create mode 100644 .github/actions/job-end/action.yml create mode 100644 .github/actions/job-start/action.yml diff --git a/.github/actions/job-end/action.yml b/.github/actions/job-end/action.yml new file mode 100644 index 00000000..51b4f4d7 --- /dev/null +++ b/.github/actions/job-end/action.yml @@ -0,0 +1,8 @@ +name: job-end +description: "Save a job status" + +runs: + using: "composite" + steps: + - run: echo "success" > run_result + shell: bash diff --git a/.github/actions/job-start/action.yml b/.github/actions/job-start/action.yml new file mode 100644 index 00000000..dc4d0642 --- /dev/null +++ b/.github/actions/job-start/action.yml @@ -0,0 +1,19 @@ +name: job-start +description: "Setup a job status" +outputs: + run_result: + value: ${{ steps.run_result.outputs.run_result }} + +runs: + using: "composite" + steps: + - name: Restore the previous run result + uses: actions/cache@v2 + with: + path: run_result + key: ${{ github.run_id }}-${{ github.job }} + restore-keys: ${{ github.run_id }}-${{ github.job }} + - name: Set run_result to default or use cached value + id: run_result + run: echo "::set-output name=run_result::$(cat run_result 2>/dev/null || echo 'default')" + shell: bash diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index aa5c438e..0167d455 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,8 +20,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check commits of each submodule + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh + - uses: ./.github/actions/job-end tutorial-setup-check: name: tutorial-setup-check @@ -32,8 +36,12 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check that the tutorial-setup patches apply + if: steps.job-start.outputs.run_result != 'success' run: scripts/tutorial-setup.sh + - uses: ./.github/actions/job-end documentation-check: name: documentation-check @@ -44,15 +52,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Check that documentation builds with no warnings/errors + if: steps.job-start.outputs.run_result != 'success' 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() }} + if: (steps.job-start.outputs.run_result != 'success') && ${{ failure() }} run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end make-keys: name: make-keys @@ -67,14 +79,19 @@ jobs: access_token: ${{ github.token }} - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Generate hashes + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/create-hash.sh - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' 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 }}" + - uses: ./.github/actions/job-end outputs: riscvtools-cache-key: ${{ steps.genkey.outputs.riscvtools-cache-key }} esptools-cache-key: ${{ steps.genkey.outputs.esptools-cache-key }} @@ -90,13 +107,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - uses: ./.github/actions/job-end install-esp-toolchain: needs: make-keys @@ -108,13 +130,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} + - uses: ./.github/actions/job-end build-extra-tests: name: build-extra-tests @@ -126,21 +153,28 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - uses: actions/cache@v2 + if: steps.job-start.outputs.run_result != 'success' 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 + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/build-extra-tests.sh + - uses: ./.github/actions/job-end install-verilator: name: install-verilator @@ -151,13 +185,18 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Build verilator on remote + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/install-verilator.sh + - uses: ./.github/actions/job-end # Sentinel job to simplify how we specify which that basic setup is complete # @@ -169,8 +208,12 @@ jobs: build-extra-tests] runs-on: ubuntu-latest steps: + - uses: ./.github/actions/job-start + id: job-start - name: Set up complete + if: steps.job-start.outputs.run_result != 'success' run: echo Set up is complete! + - uses: ./.github/actions/job-end ########################################################################## @@ -184,24 +227,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" + - uses: ./.github/actions/job-end prepare-chipyard-peripherals: name: prepare-chipyard-peripherals @@ -213,24 +264,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" + - uses: ./.github/actions/job-end prepare-chipyard-accels: name: prepare-chipyard-accels @@ -242,24 +301,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" + - uses: ./.github/actions/job-end prepare-chipyard-tracegen: name: prepare-chipyard-tracegen @@ -271,24 +338,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" + - uses: ./.github/actions/job-end prepare-chipyard-other: name: prepare-chipyard-other @@ -300,24 +375,32 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" + - uses: ./.github/actions/job-end prepare-chipyard-fpga: name: prepare-chipyard-fpga @@ -329,25 +412,33 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-fpga" build-type: "fpga" + - uses: ./.github/actions/job-end ########################################################################## @@ -361,28 +452,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-rocket" + - uses: ./.github/actions/job-end chipyard-hetero-run-tests: name: chipyard-hetero-run-tests @@ -394,28 +494,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-hetero" + - uses: ./.github/actions/job-end chipyard-boom-run-tests: name: chipyard-boom-run-tests @@ -427,28 +536,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-boom" + - uses: ./.github/actions/job-end chipyard-cva6-run-tests: name: chipyard-cva6-run-tests @@ -460,28 +578,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-cva6" + - uses: ./.github/actions/job-end chipyard-sodor-run-tests: name: chipyard-sodor-run-tests @@ -493,28 +620,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-cores" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-sodor" + - uses: ./.github/actions/job-end chipyard-dmirocket-run-tests: name: chipyard-dmirocket-run-tests @@ -526,28 +662,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-dmirocket" + - uses: ./.github/actions/job-end chipyard-spiflashwrite-run-tests: name: chipyard-spiflashwrite-run-tests @@ -559,28 +704,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-spiflashwrite" + - uses: ./.github/actions/job-end chipyard-spiflashread-run-tests: name: chipyard-spiflashread-run-tests @@ -592,28 +746,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-spiflashread" + - uses: ./.github/actions/job-end chipyard-lbwif-run-tests: name: chipyard-lbwif-run-tests @@ -625,28 +788,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-peripherals" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-lbwif" + - uses: ./.github/actions/job-end chipyard-sha3-run-tests: name: chipyard-sha3-run-tests @@ -658,28 +830,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-sha3" + - uses: ./.github/actions/job-end chipyard-streaming-fir-run-tests: name: chipyard-streaming-fir-run-tests @@ -691,28 +872,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-streaming-fir" + - uses: ./.github/actions/job-end chipyard-streaming-passthrough-run-tests: name: chipyard-streaming-passthrough-run-tests @@ -724,28 +914,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-streaming-passthrough" + - uses: ./.github/actions/job-end chipyard-hwacha-run-tests: name: chipyard-hwacha-run-tests @@ -757,28 +956,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-hwacha" + - uses: ./.github/actions/job-end chipyard-gemmini-run-tests: name: chipyard-gemmini-run-tests @@ -790,28 +998,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-gemmini" + - uses: ./.github/actions/job-end chipyard-nvdla-run-tests: name: chipyard-nvdla-run-tests @@ -823,28 +1040,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-accels" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "chipyard-nvdla" + - uses: ./.github/actions/job-end tracegen-boom-run-tests: name: tracegen-boom-run-tests @@ -856,28 +1082,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "tracegen-boom" + - uses: ./.github/actions/job-end tracegen-run-tests: name: tracegen-run-tests @@ -889,28 +1124,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-tracegen" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "tracegen" + - uses: ./.github/actions/job-end icenet-run-tests: name: icenet-run-tests @@ -922,28 +1166,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + if: steps.job-start.outputs.run_result != 'success' + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "icenet" + - uses: ./.github/actions/job-end testchipip-run-tests: name: testchipip-run-tests @@ -955,28 +1209,37 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "group-other" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "testchipip" + - uses: ./.github/actions/job-end firesim-run-tests: name: firesim-run-tests @@ -988,29 +1251,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "firesim" run-script: "run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end fireboom-run-tests: name: fireboom-run-tests @@ -1022,29 +1294,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "fireboom" run-script: "run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end firesim-multiclock-run-tests: name: firesim-multiclock-run-tests @@ -1056,29 +1337,38 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start - name: Install SSH key + if: steps.job-start.outputs.run_result != 'success' uses: shimataro/ssh-key-action@v2 with: key: ${{ secrets.SERVERKEY }} known_hosts: ${{ secrets.BUILDSERVER }} - name: Init submodules + if: steps.job-start.outputs.run_result != 'success' run: ./scripts/init-submodules-no-riscv-tools.sh - name: Check commits of each submodle + if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/check-commit.sh - name: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: group-key: "extra-tests" - name: Run tests + if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: project-key: "firesim-multiclock" run-script: "run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end # Sentinel job to simplify how we specify which checks need to pass in branch # protection and in Mergify @@ -1097,4 +1387,4 @@ jobs: firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] runs-on: ubuntu-latest steps: - - run: echo Success! \ No newline at end of file + - run: echo Success! From ff41808df4536eaaa9928eeeed7e1e14c2abf4df Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 22:57:29 -0700 Subject: [PATCH 047/267] Try abstracting more away into composite actions --- .github/actions/prepare-rtl/action.yml | 11 +- .github/actions/run-tests/action.yml | 25 +- .github/actions/ssh-checkout/action.yml | 14 + .github/actions/toolchain-build/action.yml | 50 +- .github/workflows/chipyard-run-tests.yml | 851 +++------------------ 5 files changed, 170 insertions(+), 781 deletions(-) create mode 100644 .github/actions/ssh-checkout/action.yml diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index fd9e9759..89dbb431 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -21,6 +21,11 @@ inputs: runs: using: "composite" steps: + - name: Build toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: ${{ inputs.tools-version }} + - uses: actions/cache@v2 id: rtl-build-id with: @@ -29,13 +34,13 @@ runs: 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 + + - name: Run RTL build 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" + echo "Cache hit do not rebuild RTL for ${{ inputs.group-key }}" fi shell: bash - diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 33bcad77..f0aa9d25 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: + tools-version: + description: Which toolchain to build + required: false + default: 'riscv-tools' + group-key: + description: group key + required: true project-key: description: project key required: true @@ -13,8 +20,18 @@ inputs: runs: using: "composite" steps: - - name: run rtl build script cache of chipyard root should have been loaded by prepare-rtl - run: | - ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} - shell: bash + - name: Build toolchain + uses: ./.github/actions/toolchain-build + with: + tools-version: ${{ inputs.tools-version }} + # Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch + - name: Build RTL + uses: ./.github/actions/toolchain-build + with: + tools-version: ${{ inputs.tools-version }} + group-key: ${{ inputs.group-key }} + + - name: Run RTL tests + run: ./.github/scripts/${{ inputs.run-script }} ${{ inputs.project-key }} + shell: bash diff --git a/.github/actions/ssh-checkout/action.yml b/.github/actions/ssh-checkout/action.yml new file mode 100644 index 00000000..bed48cf6 --- /dev/null +++ b/.github/actions/ssh-checkout/action.yml @@ -0,0 +1,14 @@ +name: ssh-checkout +description: "Checkout code and add SSH keys to access remote build server" + +runs: + using: "composite" + 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 }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index cd883c61..f6afb68c 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -6,24 +6,42 @@ inputs: 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 + - name: Generate hashes + run: .github/scripts/create-hash.sh shell: bash + - 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)" + shell: bash + + # brute force way to swap between riscv/esp-tools caches + - uses: actions/cache@v2 + id: toolchain-build-riscv-tools + if: ${{ inputs.tools-version == "riscv-tools" }} + with: + path: ${{ inputs.tools-version }}-install + key: ${{ steps.genkey.outputs.riscvtools-cache-key }} + + - uses: actions/cache@v2 + id: toolchain-build-esp-tools + if: ${{ inputs.tools-version == "esp-tools" }} + with: + path: ${{ inputs.tools-version }}-install + key: ${{ steps.genkey.outputs.esptools-cache-key }} + + - name: Build toolchain if not cached + run: | + if [[ "${{ steps.toolchain-build-riscv-tools.outputs.cache-hit }}" != 'true' || "${{ steps.toolchain-build-esp-tools.outputs.cache-hit }}" != 'true' ]]; then + echo "Cache miss on ${{ inputs.tools-version }}-install. Build." + ./.github/scripts/build-toolchains.sh ${{ inputs.tools-version }} + else + echo "Cache hit do not rebuild toolchain ${{ inputs.tools-version }}." + fi + shell: bash diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 0167d455..d908014a 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -66,39 +66,7 @@ jobs: run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end - make-keys: - name: make-keys - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.9.1 - with: - access_token: ${{ github.token }} - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Generate hashes - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/create-hash.sh - - name: Generate keys - if: steps.job-start.outputs.run_result != 'success' - 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 }}" - - uses: ./.github/actions/job-end - 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: @@ -109,19 +77,14 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - uses: ./.github/actions/job-end install-esp-toolchain: - needs: make-keys name: install-esp-toolchain runs-on: ubuntu-latest container: @@ -132,20 +95,16 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build ESP RISC-V toolchain if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - uses: ./.github/actions/job-end build-extra-tests: name: build-extra-tests - needs: [make-keys, install-riscv-toolchain] + needs: install-riscv-toolchain runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -155,23 +114,24 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - name: Build default RISC-V toolchain if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build with: tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} + - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' + id: genkey + run: | + echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - uses: actions/cache@v2 if: steps.job-start.outputs.run_result != 'success' 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 + key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + - name: Build extra tests if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/build-extra-tests.sh - uses: ./.github/actions/job-end @@ -183,16 +143,9 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - name: Checkout - uses: actions/checkout@v2 + - uses: ./.github/actions/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - name: Build verilator on remote if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/install-verilator.sh @@ -203,8 +156,7 @@ jobs: # 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, + needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: @@ -219,34 +171,15 @@ jobs: prepare-chipyard-cores: name: prepare-chipyard-cores - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -256,34 +189,15 @@ jobs: prepare-chipyard-peripherals: name: prepare-chipyard-peripherals - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -293,71 +207,34 @@ jobs: prepare-chipyard-accels: name: prepare-chipyard-accels - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: + tools-version: "esp-tools" group-key: "group-accels" - uses: ./.github/actions/job-end prepare-chipyard-tracegen: name: prepare-chipyard-tracegen - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -367,34 +244,15 @@ jobs: prepare-chipyard-other: name: prepare-chipyard-other - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -404,34 +262,15 @@ jobs: prepare-chipyard-fpga: name: prepare-chipyard-fpga - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - name: Build RTL if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl @@ -444,928 +283,424 @@ jobs: chipyard-rocket-run-tests: name: chipyard-rocket-run-tests - needs: [make-keys, prepare-chipyard-cores] + 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-rocket" - uses: ./.github/actions/job-end chipyard-hetero-run-tests: name: chipyard-hetero-run-tests - needs: [make-keys, prepare-chipyard-cores] + 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-hetero" - uses: ./.github/actions/job-end chipyard-boom-run-tests: name: chipyard-boom-run-tests - needs: [make-keys, prepare-chipyard-cores] + 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-boom" - uses: ./.github/actions/job-end chipyard-cva6-run-tests: name: chipyard-cva6-run-tests - needs: [make-keys, prepare-chipyard-cores] + 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-cva6" - uses: ./.github/actions/job-end chipyard-sodor-run-tests: name: chipyard-sodor-run-tests - needs: [make-keys, prepare-chipyard-cores] + 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-cores" project-key: "chipyard-sodor" - uses: ./.github/actions/job-end chipyard-dmirocket-run-tests: name: chipyard-dmirocket-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-dmirocket" - uses: ./.github/actions/job-end chipyard-spiflashwrite-run-tests: name: chipyard-spiflashwrite-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-spiflashwrite" - uses: ./.github/actions/job-end chipyard-spiflashread-run-tests: name: chipyard-spiflashread-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-spiflashread" - uses: ./.github/actions/job-end chipyard-lbwif-run-tests: name: chipyard-lbwif-run-tests - needs: [make-keys, prepare-chipyard-peripherals] + needs: prepare-chipyard-peripherals 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-peripherals" project-key: "chipyard-lbwif" - uses: ./.github/actions/job-end chipyard-sha3-run-tests: name: chipyard-sha3-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + tools-version: "esp-tools" + group-key: "group-accels" project-key: "chipyard-sha3" - uses: ./.github/actions/job-end chipyard-streaming-fir-run-tests: name: chipyard-streaming-fir-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-streaming-fir" - uses: ./.github/actions/job-end chipyard-streaming-passthrough-run-tests: name: chipyard-streaming-passthrough-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-streaming-passthrough" - uses: ./.github/actions/job-end chipyard-hwacha-run-tests: name: chipyard-hwacha-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + tools-version: "esp-tools" + group-key: "group-accels" project-key: "chipyard-hwacha" - uses: ./.github/actions/job-end chipyard-gemmini-run-tests: name: chipyard-gemmini-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - cache-key: ${{ needs.make-keys.outputs.esptools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + tools-version: "esp-tools" + group-key: "group-accels" project-key: "chipyard-gemmini" - uses: ./.github/actions/job-end chipyard-nvdla-run-tests: name: chipyard-nvdla-run-tests - needs: [make-keys, prepare-chipyard-accels] + needs: prepare-chipyard-accels 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-accels" project-key: "chipyard-nvdla" - uses: ./.github/actions/job-end tracegen-boom-run-tests: name: tracegen-boom-run-tests - needs: [make-keys, prepare-chipyard-tracegen] + needs: prepare-chipyard-tracegen 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-tracegen" project-key: "tracegen-boom" - uses: ./.github/actions/job-end tracegen-run-tests: name: tracegen-run-tests - needs: [make-keys, prepare-chipyard-tracegen] + needs: prepare-chipyard-tracegen 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-tracegen" project-key: "tracegen" - uses: ./.github/actions/job-end icenet-run-tests: name: icenet-run-tests - needs: [make-keys, prepare-chipyard-other] + needs: prepare-chipyard-other 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/ssh-checkout - uses: ./.github/actions/job-start - if: steps.job-start.outputs.run_result != 'success' id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-other" project-key: "icenet" - uses: ./.github/actions/job-end testchipip-run-tests: name: testchipip-run-tests - needs: [make-keys, prepare-chipyard-other] + needs: prepare-chipyard-other 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "group-other" project-key: "testchipip" - uses: ./.github/actions/job-end firesim-run-tests: name: firesim-run-tests - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "firesim" run-script: "run-firesim-scala-tests.sh" - uses: ./.github/actions/job-end fireboom-run-tests: name: fireboom-run-tests - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "fireboom" run-script: "run-firesim-scala-tests.sh" - uses: ./.github/actions/job-end firesim-multiclock-run-tests: name: firesim-multiclock-run-tests - needs: [make-keys, setup-complete] + needs: setup-complete 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/ssh-checkout - uses: ./.github/actions/job-start id: job-start - - name: Install SSH key - if: steps.job-start.outputs.run_result != 'success' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - - name: Init submodules - if: steps.job-start.outputs.run_result != 'success' - run: ./scripts/init-submodules-no-riscv-tools.sh - - name: Check commits of each submodle - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - name: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - cache-key: ${{ needs.make-keys.outputs.riscvtools-cache-key }} - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "extra-tests" - name: Run tests if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: + group-key: "extra-tests" project-key: "firesim-multiclock" run-script: "run-firesim-scala-tests.sh" - uses: ./.github/actions/job-end From 4584a37951267f2d8f252390ab566f465e8cb3ee Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:10:53 -0700 Subject: [PATCH 048/267] Unnest ssh-checkout action | Remove unnecessary SSH key additions --- .github/actions/ssh-checkout/action.yml | 14 --- .github/actions/toolchain-build/action.yml | 10 +- .github/workflows/chipyard-run-tests.yml | 137 ++++++++++++++++----- 3 files changed, 114 insertions(+), 47 deletions(-) delete mode 100644 .github/actions/ssh-checkout/action.yml diff --git a/.github/actions/ssh-checkout/action.yml b/.github/actions/ssh-checkout/action.yml deleted file mode 100644 index bed48cf6..00000000 --- a/.github/actions/ssh-checkout/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: ssh-checkout -description: "Checkout code and add SSH keys to access remote build server" - -runs: - using: "composite" - 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 }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f6afb68c..5994546b 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -22,16 +22,18 @@ runs: shell: bash # brute force way to swap between riscv/esp-tools caches - - uses: actions/cache@v2 - id: toolchain-build-riscv-tools + - name: Cache riscv-tools if: ${{ inputs.tools-version == "riscv-tools" }} + uses: actions/cache@v2 + id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install key: ${{ steps.genkey.outputs.riscvtools-cache-key }} - - uses: actions/cache@v2 - id: toolchain-build-esp-tools + - name: Cache esp-tools if: ${{ inputs.tools-version == "esp-tools" }} + uses: actions/cache@v2 + id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install key: ${{ steps.genkey.outputs.esptools-cache-key }} diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index d908014a..aec5d8d3 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -143,7 +143,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build verilator on remote @@ -177,7 +183,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -195,7 +207,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -213,7 +231,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -232,7 +256,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -250,7 +280,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -268,7 +304,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -289,7 +331,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -308,7 +351,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -327,7 +371,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -346,7 +391,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -365,7 +411,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -384,7 +431,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -403,7 +451,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -422,7 +471,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -441,7 +491,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -460,7 +511,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -480,7 +532,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -499,7 +552,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -518,7 +572,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -538,7 +593,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -558,7 +614,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -577,7 +634,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -596,7 +654,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -615,7 +674,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -634,7 +694,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -653,7 +714,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -673,7 +740,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests @@ -693,7 +766,13 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: ./.github/actions/ssh-checkout + - name: Checkout + uses: actions/checkout@v2 + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SERVERKEY }} + known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Run tests From f4b88ac9135ad776adf3782041a500dc464d7a3f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:12:05 -0700 Subject: [PATCH 049/267] Slightly more robust run_script function --- .github/scripts/defaults.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 3d08e74b..f250023b 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -9,7 +9,9 @@ run () { } run_script () { - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $1 "$2" + SCRIPT=$1 + shift + ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $SCRIPT "$@" } clean () { From 897156ad5b5f7ccdfc0b4419fd8473bb054a89ec Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:25:42 -0700 Subject: [PATCH 050/267] Workaround not allowing if: within composite actions --- .github/actions/toolchain-build/action.yml | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 5994546b..f05b5be8 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -14,29 +14,21 @@ runs: run: .github/scripts/create-hash.sh shell: bash - - 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)" - shell: bash - # brute force way to swap between riscv/esp-tools caches - name: Cache riscv-tools - if: ${{ inputs.tools-version == "riscv-tools" }} uses: actions/cache@v2 id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install - key: ${{ steps.genkey.outputs.riscvtools-cache-key }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(riscv-tools.hash) }} + # brute force way to swap between riscv/esp-tools caches - name: Cache esp-tools - if: ${{ inputs.tools-version == "esp-tools" }} uses: actions/cache@v2 id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install - key: ${{ steps.genkey.outputs.esptools-cache-key }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(esp-tools.hash) }} - name: Build toolchain if not cached run: | From c776ebf970a79eeb40a4ef20337231ab3ce85c98 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:33:18 -0700 Subject: [PATCH 051/267] Try to search/add hash files into GH-workspace --- .github/actions/toolchain-build/action.yml | 4 ++-- .github/scripts/create-hash.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f05b5be8..bbaf6513 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -20,7 +20,7 @@ runs: id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install - key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(riscv-tools.hash) }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(**/riscv-tools.hash) }} # brute force way to swap between riscv/esp-tools caches - name: Cache esp-tools @@ -28,7 +28,7 @@ runs: id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install - key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(esp-tools.hash) }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(**/esp-tools.hash) }} - name: Build toolchain if not cached run: | diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index dae9f25d..0fa95628 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -15,6 +15,6 @@ 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 > "${tools}.hash" + done > "$GITHUB_WORKSPACE/${tools}.hash" done echo "Hashfile for riscv-tools and esp-tools created in $HOME" From 7064c469bc3b6133ef55b68a52a6d0193c9ebf65 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:35:05 -0700 Subject: [PATCH 052/267] Forgot quotes --- .github/actions/toolchain-build/action.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index bbaf6513..6e5329a7 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -20,7 +20,7 @@ runs: id: toolchain-build-riscv-tools with: path: ${{ inputs.tools-version }}-install - key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(**/riscv-tools.hash) }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/riscv-tools.hash') }} # brute force way to swap between riscv/esp-tools caches - name: Cache esp-tools @@ -28,7 +28,7 @@ runs: id: toolchain-build-esp-tools with: path: ${{ inputs.tools-version }}-install - key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles(**/esp-tools.hash) }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }} - name: Build toolchain if not cached run: | From 9c6f4bc2ac5e50ccb11dbb66308a40c4b5146d87 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 7 Oct 2021 23:44:04 -0700 Subject: [PATCH 053/267] Try fixing docs + Add non-rtl checks to final pass --- .github/workflows/chipyard-run-tests.yml | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index aec5d8d3..7a50ce25 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -11,6 +11,18 @@ env: JVM_OPTS: -Xmx3200m # Customize the JVM maximum heap limit jobs: + cancel-prior-workflows: + name: cancel-prior-workflows + runs-on: ubuntu-latest + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.9.1 + with: + access_token: ${{ github.token }} + commit-on-master-check: name: commit-on-master-check runs-on: ubuntu-latest @@ -62,7 +74,7 @@ jobs: sudo pip3 install -r docs/requirements.txt make -C docs html - name: Show error log from sphinx if failed - if: (steps.job-start.outputs.run_result != 'success') && ${{ failure() }} + if: steps.job-start.outputs.run_result != 'success' && ${{ failure() }} run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end @@ -790,7 +802,8 @@ jobs: # 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, + 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-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 c2647e333a67093a268e1bc5fc8962bc5a3c07b3 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 10:17:58 -0700 Subject: [PATCH 054/267] Fix doc build error | Don't skip setup-complete --- .github/workflows/chipyard-run-tests.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 7a50ce25..ffe3e95a 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -73,9 +73,7 @@ jobs: 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: steps.job-start.outputs.run_result != 'success' && ${{ failure() }} - run: cat /tmp/sphinx-err*.log + cat /tmp/sphinx-err*.log 2>/dev/null - uses: ./.github/actions/job-end install-riscv-toolchain: @@ -173,17 +171,13 @@ jobs: # # When adding new prep jobs, please add them to `needs` below setup-complete: - name: "setup complete" + name: setup-complete needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: - - uses: ./.github/actions/job-start - id: job-start - name: Set up complete - if: steps.job-start.outputs.run_result != 'success' run: echo Set up is complete! - - uses: ./.github/actions/job-end ########################################################################## From d7f7d071ed4b5c78061d60ffe9cb228ae40bfacb Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 10:24:23 -0700 Subject: [PATCH 055/267] Retry fixing doc build error --- .github/workflows/chipyard-run-tests.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index ffe3e95a..74f46aa1 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -73,7 +73,9 @@ jobs: sudo apt-get install -y python3-pip sudo pip3 install -r docs/requirements.txt make -C docs html - cat /tmp/sphinx-err*.log 2>/dev/null + - name: Show error log from sphinx if failed + if: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end install-riscv-toolchain: From b9401dbc4b2bb19f879c335a601d4dfd8b836c2c Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 13:43:27 -0700 Subject: [PATCH 056/267] Mockup self-hosted runners + Bugfix run-tests by init-submods --- .github/actions/run-tests/action.yml | 4 + .github/scripts/defaults.sh | 27 +- .github/scripts/do-rtl-build.sh | 58 +- .github/scripts/install-verilator.sh | 20 +- .github/scripts/run-firesim-scala-tests.sh | 50 +- .github/workflows/chipyard-run-tests.yml | 1544 ++++++++++---------- 6 files changed, 815 insertions(+), 888 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index f0aa9d25..892ea699 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -20,6 +20,10 @@ inputs: runs: using: "composite" steps: + - name: Init submodules (since only the RTL is cached) + run: ./scripts/init-submodules-no-riscv-tools.sh + shell: bash + - name: Build toolchain uses: ./.github/actions/toolchain-build with: diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index f250023b..22307531 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -1,24 +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 () { - SCRIPT=$1 - shift - ssh -o "ServerAliveInterval=60" -o "StrictHostKeyChecking no" -t $SERVER 'bash -s' < $SCRIPT "$@" -} - -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 @@ -35,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 3a5d56ca..e37cc863 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 @@ -69,27 +46,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_OPTS=\"$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 55a22365..9b329fa7 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/run-firesim-scala-tests.sh @@ -13,54 +13,36 @@ source $SCRIPT_DIR/defaults.sh # call clean on exit trap clean EXIT -export RISCV="$GITHUB_WORKSPACE/riscv-tools-install" +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_OPTS=\"$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 74f46aa1..753bd66c 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -23,791 +23,783 @@ jobs: with: access_token: ${{ github.token }} - commit-on-master-check: - name: commit-on-master-check - 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: Check commits of each submodule - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - uses: ./.github/actions/job-end - - tutorial-setup-check: - name: tutorial-setup-check - 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: Check that the tutorial-setup patches apply - if: steps.job-start.outputs.run_result != 'success' - run: scripts/tutorial-setup.sh - - uses: ./.github/actions/job-end - - documentation-check: - name: documentation-check - 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: Check that documentation builds with no warnings/errors - if: steps.job-start.outputs.run_result != 'success' - 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - run: cat /tmp/sphinx-err*.log - - uses: ./.github/actions/job-end - - install-riscv-toolchain: - name: install-riscv-toolchain - 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: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - - uses: ./.github/actions/job-end - - install-esp-toolchain: - name: install-esp-toolchain - 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: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - - uses: ./.github/actions/job-end - - build-extra-tests: - name: build-extra-tests - needs: install-riscv-toolchain - 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: Build default RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - - name: Generate keys - if: steps.job-start.outputs.run_result != 'success' - id: genkey - run: | - echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - - uses: actions/cache@v2 - if: steps.job-start.outputs.run_result != 'success' - id: build-extra-tools-cache - with: - path: extra-tests-install - key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} - - name: Build extra tests - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/build-extra-tests.sh - - uses: ./.github/actions/job-end + # commit-on-master-check: + # name: commit-on-master-check + # 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: Check commits of each submodule + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/check-commit.sh + # - uses: ./.github/actions/job-end + # + # tutorial-setup-check: + # name: tutorial-setup-check + # 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: Check that the tutorial-setup patches apply + # if: steps.job-start.outputs.run_result != 'success' + # run: scripts/tutorial-setup.sh + # - uses: ./.github/actions/job-end + # + # documentation-check: + # name: documentation-check + # 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: Check that documentation builds with no warnings/errors + # if: steps.job-start.outputs.run_result != 'success' + # 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + # run: cat /tmp/sphinx-err*.log + # - uses: ./.github/actions/job-end + # + # install-riscv-toolchain: + # name: install-riscv-toolchain + # 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: Build default RISC-V toolchain + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # with: + # tools-version: 'riscv-tools' + # - uses: ./.github/actions/job-end + # + # install-esp-toolchain: + # name: install-esp-toolchain + # 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: Build ESP RISC-V toolchain + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # with: + # tools-version: 'esp-tools' + # - uses: ./.github/actions/job-end + # + # build-extra-tests: + # name: build-extra-tests + # needs: install-riscv-toolchain + # 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: Build default RISC-V toolchain + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # with: + # tools-version: 'riscv-tools' + # - name: Generate keys + # if: steps.job-start.outputs.run_result != 'success' + # id: genkey + # run: | + # echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + # - uses: actions/cache@v2 + # if: steps.job-start.outputs.run_result != 'success' + # id: build-extra-tools-cache + # with: + # path: extra-tests-install + # key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + # restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + # - name: Build extra tests + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/build-extra-tests.sh + # - uses: ./.github/actions/job-end install-verilator: name: install-verilator - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash + runs-on: self-hosted 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 }} - uses: ./.github/actions/job-start id: job-start - - name: Build verilator on remote + - name: Build verilator on self-hosted if: steps.job-start.outputs.run_result != 'success' run: .github/scripts/install-verilator.sh - uses: ./.github/actions/job-end - # 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: [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: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - uses: ./.github/actions/job-end - - prepare-chipyard-peripherals: - name: prepare-chipyard-peripherals - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - uses: ./.github/actions/job-end - - prepare-chipyard-accels: - name: prepare-chipyard-accels - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - tools-version: "esp-tools" - group-key: "group-accels" - - uses: ./.github/actions/job-end - - prepare-chipyard-tracegen: - name: prepare-chipyard-tracegen - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - - uses: ./.github/actions/job-end - - prepare-chipyard-other: - name: prepare-chipyard-other - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - - uses: ./.github/actions/job-end - - prepare-chipyard-fpga: - name: prepare-chipyard-fpga - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-fpga" - build-type: "fpga" - - uses: ./.github/actions/job-end - - ########################################################################## - - chipyard-rocket-run-tests: - name: chipyard-rocket-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-rocket" - - uses: ./.github/actions/job-end - - chipyard-hetero-run-tests: - name: chipyard-hetero-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-hetero" - - uses: ./.github/actions/job-end - - chipyard-boom-run-tests: - name: chipyard-boom-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-boom" - - uses: ./.github/actions/job-end - - chipyard-cva6-run-tests: - name: chipyard-cva6-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-cva6" - - uses: ./.github/actions/job-end - - chipyard-sodor-run-tests: - name: chipyard-sodor-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-sodor" - - uses: ./.github/actions/job-end - - chipyard-dmirocket-run-tests: - name: chipyard-dmirocket-run-tests - needs: prepare-chipyard-peripherals - 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-peripherals" - project-key: "chipyard-dmirocket" - - uses: ./.github/actions/job-end - - chipyard-spiflashwrite-run-tests: - name: chipyard-spiflashwrite-run-tests - needs: prepare-chipyard-peripherals - 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-peripherals" - project-key: "chipyard-spiflashwrite" - - uses: ./.github/actions/job-end - - chipyard-spiflashread-run-tests: - name: chipyard-spiflashread-run-tests - needs: prepare-chipyard-peripherals - 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-peripherals" - project-key: "chipyard-spiflashread" - - uses: ./.github/actions/job-end - - chipyard-lbwif-run-tests: - name: chipyard-lbwif-run-tests - needs: prepare-chipyard-peripherals - 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-peripherals" - project-key: "chipyard-lbwif" - - uses: ./.github/actions/job-end - - chipyard-sha3-run-tests: - name: chipyard-sha3-run-tests - needs: prepare-chipyard-accels - 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: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-sha3" - - uses: ./.github/actions/job-end - - chipyard-streaming-fir-run-tests: - name: chipyard-streaming-fir-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-streaming-fir" - - uses: ./.github/actions/job-end - - chipyard-streaming-passthrough-run-tests: - name: chipyard-streaming-passthrough-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-streaming-passthrough" - - uses: ./.github/actions/job-end - - chipyard-hwacha-run-tests: - name: chipyard-hwacha-run-tests - needs: prepare-chipyard-accels - 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: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-hwacha" - - uses: ./.github/actions/job-end - - chipyard-gemmini-run-tests: - name: chipyard-gemmini-run-tests - needs: prepare-chipyard-accels - 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: - tools-version: "esp-tools" - group-key: "group-accels" - project-key: "chipyard-gemmini" - - uses: ./.github/actions/job-end - - chipyard-nvdla-run-tests: - name: chipyard-nvdla-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-nvdla" - - uses: ./.github/actions/job-end - - tracegen-boom-run-tests: - name: tracegen-boom-run-tests - needs: prepare-chipyard-tracegen - 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-tracegen" - project-key: "tracegen-boom" - - uses: ./.github/actions/job-end - - tracegen-run-tests: - name: tracegen-run-tests - needs: prepare-chipyard-tracegen - 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-tracegen" - project-key: "tracegen" - - uses: ./.github/actions/job-end - - icenet-run-tests: - name: icenet-run-tests - needs: prepare-chipyard-other - 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-other" - project-key: "icenet" - - uses: ./.github/actions/job-end - - testchipip-run-tests: - name: testchipip-run-tests - needs: prepare-chipyard-other - 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-other" - project-key: "testchipip" - - uses: ./.github/actions/job-end - - firesim-run-tests: - name: firesim-run-tests - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - 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: "extra-tests" - project-key: "firesim" - run-script: "run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - fireboom-run-tests: - name: fireboom-run-tests - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - 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: "extra-tests" - project-key: "fireboom" - run-script: "run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - firesim-multiclock-run-tests: - name: firesim-multiclock-run-tests - needs: setup-complete - runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash - 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 }} - - 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: "extra-tests" - project-key: "firesim-multiclock" - run-script: "run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - # 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: [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-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, - prepare-chipyard-fpga, - firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - runs-on: ubuntu-latest - steps: - - run: echo Success! + # # 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: [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: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-cores" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-peripherals: + # name: prepare-chipyard-peripherals + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-peripherals" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-accels: + # name: prepare-chipyard-accels + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # tools-version: "esp-tools" + # group-key: "group-accels" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-tracegen: + # name: prepare-chipyard-tracegen + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-tracegen" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-other: + # name: prepare-chipyard-other + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-other" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-fpga: + # name: prepare-chipyard-fpga + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-fpga" + # build-type: "fpga" + # - uses: ./.github/actions/job-end + # + # ########################################################################## + # + # chipyard-rocket-run-tests: + # name: chipyard-rocket-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-rocket" + # - uses: ./.github/actions/job-end + # + # chipyard-hetero-run-tests: + # name: chipyard-hetero-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-hetero" + # - uses: ./.github/actions/job-end + # + # chipyard-boom-run-tests: + # name: chipyard-boom-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-boom" + # - uses: ./.github/actions/job-end + # + # chipyard-cva6-run-tests: + # name: chipyard-cva6-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-cva6" + # - uses: ./.github/actions/job-end + # + # chipyard-sodor-run-tests: + # name: chipyard-sodor-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-sodor" + # - uses: ./.github/actions/job-end + # + # chipyard-dmirocket-run-tests: + # name: chipyard-dmirocket-run-tests + # needs: prepare-chipyard-peripherals + # 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-peripherals" + # project-key: "chipyard-dmirocket" + # - uses: ./.github/actions/job-end + # + # chipyard-spiflashwrite-run-tests: + # name: chipyard-spiflashwrite-run-tests + # needs: prepare-chipyard-peripherals + # 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-peripherals" + # project-key: "chipyard-spiflashwrite" + # - uses: ./.github/actions/job-end + # + # chipyard-spiflashread-run-tests: + # name: chipyard-spiflashread-run-tests + # needs: prepare-chipyard-peripherals + # 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-peripherals" + # project-key: "chipyard-spiflashread" + # - uses: ./.github/actions/job-end + # + # chipyard-lbwif-run-tests: + # name: chipyard-lbwif-run-tests + # needs: prepare-chipyard-peripherals + # 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-peripherals" + # project-key: "chipyard-lbwif" + # - uses: ./.github/actions/job-end + # + # chipyard-sha3-run-tests: + # name: chipyard-sha3-run-tests + # needs: prepare-chipyard-accels + # 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: + # tools-version: "esp-tools" + # group-key: "group-accels" + # project-key: "chipyard-sha3" + # - uses: ./.github/actions/job-end + # + # chipyard-streaming-fir-run-tests: + # name: chipyard-streaming-fir-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-streaming-fir" + # - uses: ./.github/actions/job-end + # + # chipyard-streaming-passthrough-run-tests: + # name: chipyard-streaming-passthrough-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-streaming-passthrough" + # - uses: ./.github/actions/job-end + # + # chipyard-hwacha-run-tests: + # name: chipyard-hwacha-run-tests + # needs: prepare-chipyard-accels + # 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: + # tools-version: "esp-tools" + # group-key: "group-accels" + # project-key: "chipyard-hwacha" + # - uses: ./.github/actions/job-end + # + # chipyard-gemmini-run-tests: + # name: chipyard-gemmini-run-tests + # needs: prepare-chipyard-accels + # 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: + # tools-version: "esp-tools" + # group-key: "group-accels" + # project-key: "chipyard-gemmini" + # - uses: ./.github/actions/job-end + # + # chipyard-nvdla-run-tests: + # name: chipyard-nvdla-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-nvdla" + # - uses: ./.github/actions/job-end + # + # tracegen-boom-run-tests: + # name: tracegen-boom-run-tests + # needs: prepare-chipyard-tracegen + # 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-tracegen" + # project-key: "tracegen-boom" + # - uses: ./.github/actions/job-end + # + # tracegen-run-tests: + # name: tracegen-run-tests + # needs: prepare-chipyard-tracegen + # 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-tracegen" + # project-key: "tracegen" + # - uses: ./.github/actions/job-end + # + # icenet-run-tests: + # name: icenet-run-tests + # needs: prepare-chipyard-other + # 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-other" + # project-key: "icenet" + # - uses: ./.github/actions/job-end + # + # testchipip-run-tests: + # name: testchipip-run-tests + # needs: prepare-chipyard-other + # 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-other" + # project-key: "testchipip" + # - uses: ./.github/actions/job-end + # + # firesim-run-tests: + # name: firesim-run-tests + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - 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: "extra-tests" + # project-key: "firesim" + # run-script: "run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # fireboom-run-tests: + # name: fireboom-run-tests + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - 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: "extra-tests" + # project-key: "fireboom" + # run-script: "run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # firesim-multiclock-run-tests: + # name: firesim-multiclock-run-tests + # needs: setup-complete + # runs-on: ubuntu-latest + # container: + # image: ucbbar/chipyard-ci-image:554b436 + # options: --entrypoint /bin/bash + # 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 }} + # - 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: "extra-tests" + # project-key: "firesim-multiclock" + # run-script: "run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # # 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: [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-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, + # prepare-chipyard-fpga, + # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + # runs-on: ubuntu-latest + # steps: + # - run: echo Success! From 43430cb8bc05edd6d8d713e292789b8e48b23fd6 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 13:56:07 -0700 Subject: [PATCH 057/267] Retry --- .github/scripts/defaults.sh | 5 ++-- .github/workflows/chipyard-run-tests.yml | 34 ++++++++++++------------ 2 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 22307531..04ccd331 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -8,13 +8,12 @@ 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/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 753bd66c..61b3bfc4 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -78,23 +78,23 @@ jobs: # run: cat /tmp/sphinx-err*.log # - uses: ./.github/actions/job-end # - # install-riscv-toolchain: - # name: install-riscv-toolchain - # 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: Build default RISC-V toolchain - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # with: - # tools-version: 'riscv-tools' - # - uses: ./.github/actions/job-end + install-riscv-toolchain: + name: install-riscv-toolchain + 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: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + - uses: ./.github/actions/job-end # # install-esp-toolchain: # name: install-esp-toolchain From ca4e9563b9829728e198499fe2752a4e06313d1b Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:15:46 -0700 Subject: [PATCH 058/267] Clearer script naming | Renable all CI --- .github/actions/prepare-rtl/action.yml | 2 +- .github/scripts/create-hash.sh | 4 +- ...do-rtl-build.sh => remote-do-rtl-build.sh} | 0 ...rilator.sh => remote-install-verilator.sh} | 3 +- ...s.sh => remote-run-firesim-scala-tests.sh} | 15 +- .github/workflows/chipyard-run-tests.yml | 1487 ++++++++--------- 6 files changed, 745 insertions(+), 766 deletions(-) rename .github/scripts/{do-rtl-build.sh => remote-do-rtl-build.sh} (100%) rename .github/scripts/{install-verilator.sh => remote-install-verilator.sh} (93%) rename .github/scripts/{run-firesim-scala-tests.sh => remote-run-firesim-scala-tests.sh} (77%) diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index 89dbb431..45996a90 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -12,7 +12,7 @@ inputs: build-script: description: rtl build script to use required: false - default: "do-rtl-build.sh" + default: "remote-do-rtl-build.sh" build-type: description: type of build required: false diff --git a/.github/scripts/create-hash.sh b/.github/scripts/create-hash.sh index 0fa95628..f64c0696 100755 --- a/.github/scripts/create-hash.sh +++ b/.github/scripts/create-hash.sh @@ -15,6 +15,6 @@ 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 > "$GITHUB_WORKSPACE/${tools}.hash" + 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/do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh similarity index 100% rename from .github/scripts/do-rtl-build.sh rename to .github/scripts/remote-do-rtl-build.sh diff --git a/.github/scripts/install-verilator.sh b/.github/scripts/remote-install-verilator.sh similarity index 93% rename from .github/scripts/install-verilator.sh rename to .github/scripts/remote-install-verilator.sh index 1159fc47..b244614e 100755 --- a/.github/scripts/install-verilator.sh +++ b/.github/scripts/remote-install-verilator.sh @@ -1,6 +1,6 @@ #!/bin/bash -# move verilator to the remote server +# install verilator # turn echo on and error on earliest command set -ex @@ -10,7 +10,6 @@ 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* diff --git a/.github/scripts/run-firesim-scala-tests.sh b/.github/scripts/remote-run-firesim-scala-tests.sh similarity index 77% rename from .github/scripts/run-firesim-scala-tests.sh rename to .github/scripts/remote-run-firesim-scala-tests.sh index 9b329fa7..916c7ca5 100755 --- a/.github/scripts/run-firesim-scala-tests.sh +++ b/.github/scripts/remote-run-firesim-scala-tests.sh @@ -10,33 +10,28 @@ set -ex 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 +REMOTE_FIRESIM_SYSROOT=$REMOTE_FIRESIM_DIR/lib-install -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 +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 +LD_LIB_DIR=$REMOTE_FIRESIM_SYSROOT/lib:$REMOTE_RISCV_DIR/lib # Run Firesim Scala Tests export RISCV=$TOOLS_DIR diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 61b3bfc4..35ea5c45 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -23,64 +23,64 @@ jobs: with: access_token: ${{ github.token }} - # commit-on-master-check: - # name: commit-on-master-check - # 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: Check commits of each submodule - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/check-commit.sh - # - uses: ./.github/actions/job-end - # - # tutorial-setup-check: - # name: tutorial-setup-check - # 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: Check that the tutorial-setup patches apply - # if: steps.job-start.outputs.run_result != 'success' - # run: scripts/tutorial-setup.sh - # - uses: ./.github/actions/job-end - # - # documentation-check: - # name: documentation-check - # 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: Check that documentation builds with no warnings/errors - # if: steps.job-start.outputs.run_result != 'success' - # 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - # run: cat /tmp/sphinx-err*.log - # - uses: ./.github/actions/job-end - # + commit-on-master-check: + name: commit-on-master-check + 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: Check commits of each submodule + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/check-commit.sh + - uses: ./.github/actions/job-end + + tutorial-setup-check: + name: tutorial-setup-check + 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: Check that the tutorial-setup patches apply + if: steps.job-start.outputs.run_result != 'success' + run: scripts/tutorial-setup.sh + - uses: ./.github/actions/job-end + + documentation-check: + name: documentation-check + 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: Check that documentation builds with no warnings/errors + if: steps.job-start.outputs.run_result != 'success' + 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end + install-riscv-toolchain: name: install-riscv-toolchain - runs-on: ubuntu-latest + runs-on: self-hosted container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash @@ -95,58 +95,58 @@ jobs: with: tools-version: 'riscv-tools' - uses: ./.github/actions/job-end - # - # install-esp-toolchain: - # name: install-esp-toolchain - # 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: Build ESP RISC-V toolchain - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # with: - # tools-version: 'esp-tools' - # - uses: ./.github/actions/job-end - # - # build-extra-tests: - # name: build-extra-tests - # needs: install-riscv-toolchain - # 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: Build default RISC-V toolchain - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # with: - # tools-version: 'riscv-tools' - # - name: Generate keys - # if: steps.job-start.outputs.run_result != 'success' - # id: genkey - # run: | - # echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - # - uses: actions/cache@v2 - # if: steps.job-start.outputs.run_result != 'success' - # id: build-extra-tools-cache - # with: - # path: extra-tests-install - # key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - # restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} - # - name: Build extra tests - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/build-extra-tests.sh - # - uses: ./.github/actions/job-end + + install-esp-toolchain: + name: install-esp-toolchain + 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: Build ESP RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + with: + tools-version: 'esp-tools' + - uses: ./.github/actions/job-end + + build-extra-tests: + name: build-extra-tests + needs: install-riscv-toolchain + 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: Build default RISC-V toolchain + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + with: + tools-version: 'riscv-tools' + - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' + id: genkey + run: | + echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + - uses: actions/cache@v2 + if: steps.job-start.outputs.run_result != 'success' + id: build-extra-tools-cache + with: + path: extra-tests-install + key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + - name: Build extra tests + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/build-extra-tests.sh + - uses: ./.github/actions/job-end install-verilator: name: install-verilator @@ -158,648 +158,633 @@ jobs: id: job-start - name: Build verilator on self-hosted if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/install-verilator.sh + run: .github/scripts/remote-install-verilator.sh - uses: ./.github/actions/job-end - # # 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: [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: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-cores" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-peripherals: - # name: prepare-chipyard-peripherals - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-peripherals" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-accels: - # name: prepare-chipyard-accels - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # tools-version: "esp-tools" - # group-key: "group-accels" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-tracegen: - # name: prepare-chipyard-tracegen - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-tracegen" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-other: - # name: prepare-chipyard-other - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-other" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-fpga: - # name: prepare-chipyard-fpga - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-fpga" - # build-type: "fpga" - # - uses: ./.github/actions/job-end - # - # ########################################################################## - # - # chipyard-rocket-run-tests: - # name: chipyard-rocket-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-rocket" - # - uses: ./.github/actions/job-end - # - # chipyard-hetero-run-tests: - # name: chipyard-hetero-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-hetero" - # - uses: ./.github/actions/job-end - # - # chipyard-boom-run-tests: - # name: chipyard-boom-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-boom" - # - uses: ./.github/actions/job-end - # - # chipyard-cva6-run-tests: - # name: chipyard-cva6-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-cva6" - # - uses: ./.github/actions/job-end - # - # chipyard-sodor-run-tests: - # name: chipyard-sodor-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-sodor" - # - uses: ./.github/actions/job-end - # - # chipyard-dmirocket-run-tests: - # name: chipyard-dmirocket-run-tests - # needs: prepare-chipyard-peripherals - # 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-peripherals" - # project-key: "chipyard-dmirocket" - # - uses: ./.github/actions/job-end - # - # chipyard-spiflashwrite-run-tests: - # name: chipyard-spiflashwrite-run-tests - # needs: prepare-chipyard-peripherals - # 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-peripherals" - # project-key: "chipyard-spiflashwrite" - # - uses: ./.github/actions/job-end - # - # chipyard-spiflashread-run-tests: - # name: chipyard-spiflashread-run-tests - # needs: prepare-chipyard-peripherals - # 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-peripherals" - # project-key: "chipyard-spiflashread" - # - uses: ./.github/actions/job-end - # - # chipyard-lbwif-run-tests: - # name: chipyard-lbwif-run-tests - # needs: prepare-chipyard-peripherals - # 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-peripherals" - # project-key: "chipyard-lbwif" - # - uses: ./.github/actions/job-end - # - # chipyard-sha3-run-tests: - # name: chipyard-sha3-run-tests - # needs: prepare-chipyard-accels - # 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: - # tools-version: "esp-tools" - # group-key: "group-accels" - # project-key: "chipyard-sha3" - # - uses: ./.github/actions/job-end - # - # chipyard-streaming-fir-run-tests: - # name: chipyard-streaming-fir-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-streaming-fir" - # - uses: ./.github/actions/job-end - # - # chipyard-streaming-passthrough-run-tests: - # name: chipyard-streaming-passthrough-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-streaming-passthrough" - # - uses: ./.github/actions/job-end - # - # chipyard-hwacha-run-tests: - # name: chipyard-hwacha-run-tests - # needs: prepare-chipyard-accels - # 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: - # tools-version: "esp-tools" - # group-key: "group-accels" - # project-key: "chipyard-hwacha" - # - uses: ./.github/actions/job-end - # - # chipyard-gemmini-run-tests: - # name: chipyard-gemmini-run-tests - # needs: prepare-chipyard-accels - # 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: - # tools-version: "esp-tools" - # group-key: "group-accels" - # project-key: "chipyard-gemmini" - # - uses: ./.github/actions/job-end - # - # chipyard-nvdla-run-tests: - # name: chipyard-nvdla-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-nvdla" - # - uses: ./.github/actions/job-end - # - # tracegen-boom-run-tests: - # name: tracegen-boom-run-tests - # needs: prepare-chipyard-tracegen - # 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-tracegen" - # project-key: "tracegen-boom" - # - uses: ./.github/actions/job-end - # - # tracegen-run-tests: - # name: tracegen-run-tests - # needs: prepare-chipyard-tracegen - # 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-tracegen" - # project-key: "tracegen" - # - uses: ./.github/actions/job-end - # - # icenet-run-tests: - # name: icenet-run-tests - # needs: prepare-chipyard-other - # 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-other" - # project-key: "icenet" - # - uses: ./.github/actions/job-end - # - # testchipip-run-tests: - # name: testchipip-run-tests - # needs: prepare-chipyard-other - # 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-other" - # project-key: "testchipip" - # - uses: ./.github/actions/job-end - # - # firesim-run-tests: - # name: firesim-run-tests - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - 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: "extra-tests" - # project-key: "firesim" - # run-script: "run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # fireboom-run-tests: - # name: fireboom-run-tests - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - 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: "extra-tests" - # project-key: "fireboom" - # run-script: "run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # firesim-multiclock-run-tests: - # name: firesim-multiclock-run-tests - # needs: setup-complete - # runs-on: ubuntu-latest - # container: - # image: ucbbar/chipyard-ci-image:554b436 - # options: --entrypoint /bin/bash - # 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 }} - # - 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: "extra-tests" - # project-key: "firesim-multiclock" - # run-script: "run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # # 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: [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-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, - # prepare-chipyard-fpga, - # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - # runs-on: ubuntu-latest - # steps: - # - run: echo Success! + # 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: [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: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - uses: ./.github/actions/job-end + + prepare-chipyard-peripherals: + name: prepare-chipyard-peripherals + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + - uses: ./.github/actions/job-end + + prepare-chipyard-accels: + name: prepare-chipyard-accels + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + tools-version: "esp-tools" + group-key: "group-accels" + - uses: ./.github/actions/job-end + + prepare-chipyard-tracegen: + name: prepare-chipyard-tracegen + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-tracegen" + - uses: ./.github/actions/job-end + + prepare-chipyard-other: + name: prepare-chipyard-other + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-other" + - uses: ./.github/actions/job-end + + prepare-chipyard-fpga: + name: prepare-chipyard-fpga + needs: setup-complete + runs-on: self-hosted + container: + image: ucbbar/chipyard-ci-image:554b436 + options: --entrypoint /bin/bash + 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 }} + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-fpga" + build-type: "fpga" + - uses: ./.github/actions/job-end + + ########################################################################## + + chipyard-rocket-run-tests: + name: chipyard-rocket-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-rocket" + - uses: ./.github/actions/job-end + + chipyard-hetero-run-tests: + name: chipyard-hetero-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-hetero" + - uses: ./.github/actions/job-end + + chipyard-boom-run-tests: + name: chipyard-boom-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-boom" + - uses: ./.github/actions/job-end + + chipyard-cva6-run-tests: + name: chipyard-cva6-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-cva6" + - uses: ./.github/actions/job-end + + chipyard-sodor-run-tests: + name: chipyard-sodor-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-sodor" + - uses: ./.github/actions/job-end + + chipyard-dmirocket-run-tests: + name: chipyard-dmirocket-run-tests + needs: prepare-chipyard-peripherals + 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-peripherals" + project-key: "chipyard-dmirocket" + - uses: ./.github/actions/job-end + + chipyard-spiflashwrite-run-tests: + name: chipyard-spiflashwrite-run-tests + needs: prepare-chipyard-peripherals + 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-peripherals" + project-key: "chipyard-spiflashwrite" + - uses: ./.github/actions/job-end + + chipyard-spiflashread-run-tests: + name: chipyard-spiflashread-run-tests + needs: prepare-chipyard-peripherals + 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-peripherals" + project-key: "chipyard-spiflashread" + - uses: ./.github/actions/job-end + + chipyard-lbwif-run-tests: + name: chipyard-lbwif-run-tests + needs: prepare-chipyard-peripherals + 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-peripherals" + project-key: "chipyard-lbwif" + - uses: ./.github/actions/job-end + + chipyard-sha3-run-tests: + name: chipyard-sha3-run-tests + needs: prepare-chipyard-accels + 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: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-sha3" + - uses: ./.github/actions/job-end + + chipyard-streaming-fir-run-tests: + name: chipyard-streaming-fir-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-streaming-fir" + - uses: ./.github/actions/job-end + + chipyard-streaming-passthrough-run-tests: + name: chipyard-streaming-passthrough-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-streaming-passthrough" + - uses: ./.github/actions/job-end + + chipyard-hwacha-run-tests: + name: chipyard-hwacha-run-tests + needs: prepare-chipyard-accels + 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: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-hwacha" + - uses: ./.github/actions/job-end + + chipyard-gemmini-run-tests: + name: chipyard-gemmini-run-tests + needs: prepare-chipyard-accels + 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: + tools-version: "esp-tools" + group-key: "group-accels" + project-key: "chipyard-gemmini" + - uses: ./.github/actions/job-end + + chipyard-nvdla-run-tests: + name: chipyard-nvdla-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-nvdla" + - uses: ./.github/actions/job-end + + tracegen-boom-run-tests: + name: tracegen-boom-run-tests + needs: prepare-chipyard-tracegen + 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-tracegen" + project-key: "tracegen-boom" + - uses: ./.github/actions/job-end + + tracegen-run-tests: + name: tracegen-run-tests + needs: prepare-chipyard-tracegen + 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-tracegen" + project-key: "tracegen" + - uses: ./.github/actions/job-end + + icenet-run-tests: + name: icenet-run-tests + needs: prepare-chipyard-other + 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-other" + project-key: "icenet" + - uses: ./.github/actions/job-end + + testchipip-run-tests: + name: testchipip-run-tests + needs: prepare-chipyard-other + 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-other" + project-key: "testchipip" + - uses: ./.github/actions/job-end + + firesim-run-tests: + name: firesim-run-tests + needs: setup-complete + runs-on: self-hosted + 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: "extra-tests" + project-key: "firesim" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + fireboom-run-tests: + name: fireboom-run-tests + needs: setup-complete + runs-on: self-hosted + 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: "extra-tests" + project-key: "fireboom" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + firesim-multiclock-run-tests: + name: firesim-multiclock-run-tests + needs: setup-complete + runs-on: self-hosted + 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: "extra-tests" + project-key: "firesim-multiclock" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + # 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: [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-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, + prepare-chipyard-fpga, + firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + runs-on: ubuntu-latest + steps: + - run: echo Success! From 3d1301040b525e5af68eb37f744372b051f7a082 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:18:08 -0700 Subject: [PATCH 059/267] Revert toolchain to use GH-A area --- .github/workflows/chipyard-run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 35ea5c45..5e42678d 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -80,7 +80,7 @@ jobs: install-riscv-toolchain: name: install-riscv-toolchain - runs-on: self-hosted + runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash From b612d04db007613a5fb6fb9556392c68ecc21eb5 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 14:49:27 -0700 Subject: [PATCH 060/267] Update README --- .github/README.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/README.md b/.github/README.md index e864d705..030fbc96 100644 --- a/.github/README.md +++ b/.github/README.md @@ -6,11 +6,11 @@ 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. +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. +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: @@ -36,7 +36,7 @@ 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. +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 @@ -117,11 +117,6 @@ After adding a private key, it will show a fingerprint that should be added unde 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 From c7e251db137f6d9eebd8468d79c421a2ecd8e890 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 15:11:32 -0700 Subject: [PATCH 061/267] Bump README again --- .github/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 030fbc96..4af1e9d9 100644 --- a/.github/README.md +++ b/.github/README.md @@ -73,14 +73,14 @@ 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) + `remote-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 + `remote-install-verilator.sh` # install verilator on build server + `remote-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 From 51bc3ad7bb0f7e4e33d5385bd8aed46887d0ce1e Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 15:41:26 -0700 Subject: [PATCH 062/267] Fix setting JAVA/SBT make variables + Use run-binary-fast in run-tests --- .github/scripts/remote-do-rtl-build.sh | 2 +- .../scripts/remote-run-firesim-scala-tests.sh | 2 +- .github/scripts/run-tests.sh | 20 +++++++++---------- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index e37cc863..ffe7e6e0 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -59,7 +59,7 @@ do 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]} + 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/remote-run-firesim-scala-tests.sh b/.github/scripts/remote-run-firesim-scala-tests.sh index 916c7ca5..732cb59d 100755 --- a/.github/scripts/remote-run-firesim-scala-tests.sh +++ b/.github/scripts/remote-run-firesim-scala-tests.sh @@ -40,4 +40,4 @@ 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]} +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 7729579c..93475a19 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -30,8 +30,6 @@ 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]} @@ -64,32 +62,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 ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal + make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal + make -C $LOCAL_SIM_DIR ${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 ${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 ${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 ${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 ${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 ${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) @@ -106,7 +104,7 @@ case $1 in ;; 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 ${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]} From 0cca14c910d6791824aa0f51bea3e03118a81c43 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:09:36 -0700 Subject: [PATCH 063/267] Try to work around perm. issues on self-hosted | Remove SSH key installs --- .github/workflows/chipyard-run-tests.yml | 50 ++++++++++-------------- 1 file changed, 20 insertions(+), 30 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 5e42678d..6ef2ee1b 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -152,6 +152,8 @@ jobs: name: install-verilator runs-on: self-hosted steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -183,13 +185,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -207,13 +206,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -231,13 +227,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -256,13 +249,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -280,13 +270,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -304,13 +291,10 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - - name: Install SSH key - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.SERVERKEY }} - known_hosts: ${{ secrets.BUILDSERVER }} - uses: ./.github/actions/job-start id: job-start - name: Build RTL @@ -714,6 +698,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -735,6 +721,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -756,6 +744,8 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - name: Change directory owner to working user + run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start From 9c335ef1899ebaee36f8f166242886aacf71df41 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:12:50 -0700 Subject: [PATCH 064/267] test --- .github/workflows/chipyard-run-tests.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 6ef2ee1b..3aa55caf 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -152,8 +152,10 @@ jobs: name: install-verilator runs-on: self-hosted steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE + - name: TESTING + run: | + whoami + ls -al $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start From a66666a2e519554d92be4753e269a9c26eada909 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:34:51 -0700 Subject: [PATCH 065/267] Remove containers from self-hosted + Remove sudo dir stuff --- .github/workflows/chipyard-run-tests.yml | 68 ++++-------------------- 1 file changed, 10 insertions(+), 58 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index 3aa55caf..fcadc402 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -151,11 +151,8 @@ jobs: install-verilator: name: install-verilator runs-on: self-hosted + needs: cancel-prior-workflows steps: - - name: TESTING - run: | - whoami - ls -al $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start @@ -183,17 +180,12 @@ jobs: name: prepare-chipyard-cores needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -204,17 +196,12 @@ jobs: name: prepare-chipyard-peripherals needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -225,17 +212,12 @@ jobs: name: prepare-chipyard-accels needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -247,17 +229,12 @@ jobs: name: prepare-chipyard-tracegen needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -268,17 +245,12 @@ jobs: name: prepare-chipyard-other needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -289,17 +261,12 @@ jobs: name: prepare-chipyard-fpga needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build RTL + - name: Build RTL on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: @@ -696,17 +663,12 @@ jobs: name: firesim-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: @@ -719,17 +681,12 @@ jobs: name: fireboom-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: @@ -742,17 +699,12 @@ jobs: name: firesim-multiclock-run-tests needs: setup-complete runs-on: self-hosted - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - - name: Change directory owner to working user - run: sudo chown -R $USER:$USER $GITHUB_WORKSPACE - name: Checkout uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Run tests + - name: Run tests on self-hosted if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: From e7b0cb4aedc38a1a74d256fc04c96bb2426800cf Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 16:36:37 -0700 Subject: [PATCH 066/267] Remove need for container for cleanup old workflow job --- .github/workflows/chipyard-run-tests.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index fcadc402..c2348ae8 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -14,9 +14,6 @@ jobs: cancel-prior-workflows: name: cancel-prior-workflows runs-on: ubuntu-latest - container: - image: ucbbar/chipyard-ci-image:554b436 - options: --entrypoint /bin/bash steps: - name: Cancel Previous Runs uses: styfle/cancel-workflow-action@0.9.1 From 379ad3a73cbfa42be0428f1edc23d2f5edd1e5b7 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 8 Oct 2021 21:08:39 -0700 Subject: [PATCH 067/267] Forgot to remove clean in one place --- .github/scripts/remote-do-rtl-build.sh | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index ffe7e6e0..bda81ead 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -14,9 +14,6 @@ set -ex 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 From 20ebcc9f1bb2ee72c1d10bc2dcd689e5af5e06de Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sat, 9 Oct 2021 10:35:47 -0700 Subject: [PATCH 068/267] Fix run-tests to use prep-rtl action + Fix Gemmini software build --- .github/actions/run-tests/action.yml | 7 +------ .github/actions/toolchain-build/action.yml | 2 +- .github/scripts/remote-do-rtl-build.sh | 7 ++++--- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 892ea699..28064e31 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -24,14 +24,9 @@ runs: run: ./scripts/init-submodules-no-riscv-tools.sh shell: bash - - name: Build toolchain - uses: ./.github/actions/toolchain-build - with: - tools-version: ${{ inputs.tools-version }} - # Note: You shouldn't need the other inputs since it shouldn't build RTL from scratch - name: Build RTL - uses: ./.github/actions/toolchain-build + uses: ./.github/actions/prepare-rtl with: tools-version: ${{ inputs.tools-version }} group-key: ${{ inputs.group-key }} diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 6e5329a7..f84a0fd9 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,5 +1,5 @@ name: toolchain-build -description: 'Builds or retrieves cache of the selected toolchain' +description: 'Builds or retrieves cache of the all toolchains' inputs: tools-version: diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index bda81ead..e5c4e101 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -25,11 +25,12 @@ 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 + pushd $REMOTE_CHIPYARD_DIR/generators/gemmini/software git submodule update --init --recursive gemmini-rocc-tests - cd gemmini-rocc-tests + pushd gemmini-rocc-tests ./build.sh + popd + popd fi # choose what make dir to use From 78e733b99274056d4a4a63be8477218e2e27ae16 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Sat, 9 Oct 2021 11:59:24 -0700 Subject: [PATCH 069/267] Build both toolchains in 1 job + Rename toolchain build job --- .github/actions/prepare-rtl/action.yml | 8 +---- .github/actions/run-tests/action.yml | 5 --- .github/actions/toolchain-build/action.yml | 30 +++++----------- .github/scripts/remote-do-rtl-build.sh | 2 -- .github/workflows/chipyard-run-tests.yml | 41 ++++------------------ 5 files changed, 17 insertions(+), 69 deletions(-) diff --git a/.github/actions/prepare-rtl/action.yml b/.github/actions/prepare-rtl/action.yml index 45996a90..25098bfc 100644 --- a/.github/actions/prepare-rtl/action.yml +++ b/.github/actions/prepare-rtl/action.yml @@ -2,10 +2,6 @@ name: prepare-rtl description: 'Builds RTL based on parameters, caches the entire chipyard root dir when done' inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' group-key: description: group key required: true @@ -21,10 +17,8 @@ inputs: runs: using: "composite" steps: - - name: Build toolchain + - name: Build RISC-V toolchains uses: ./.github/actions/toolchain-build - with: - tools-version: ${{ inputs.tools-version }} - uses: actions/cache@v2 id: rtl-build-id diff --git a/.github/actions/run-tests/action.yml b/.github/actions/run-tests/action.yml index 28064e31..d74b18af 100644 --- a/.github/actions/run-tests/action.yml +++ b/.github/actions/run-tests/action.yml @@ -2,10 +2,6 @@ name: run-tests description: 'Runs tests according to input parameters' inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' group-key: description: group key required: true @@ -28,7 +24,6 @@ runs: - name: Build RTL uses: ./.github/actions/prepare-rtl with: - tools-version: ${{ inputs.tools-version }} group-key: ${{ inputs.group-key }} - name: Run RTL tests diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index f84a0fd9..88da9a1a 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -1,11 +1,5 @@ name: toolchain-build -description: 'Builds or retrieves cache of the all toolchains' - -inputs: - tools-version: - description: Which toolchain to build - required: false - default: 'riscv-tools' +description: 'Build/cache both toolchains' runs: using: "composite" @@ -14,28 +8,22 @@ runs: run: .github/scripts/create-hash.sh shell: bash - # brute force way to swap between riscv/esp-tools caches - name: Cache riscv-tools uses: actions/cache@v2 - id: toolchain-build-riscv-tools with: - path: ${{ inputs.tools-version }}-install + path: riscv-tools-install key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/riscv-tools.hash') }} - # brute force way to swap between riscv/esp-tools caches + - name: Build RISC-V toolchain if not cached + run: ./.github/scripts/build-toolchains.sh riscv-tools + shell: bash + - name: Cache esp-tools uses: actions/cache@v2 - id: toolchain-build-esp-tools with: - path: ${{ inputs.tools-version }}-install + path: esp-tools-install key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }} - - name: Build toolchain if not cached - run: | - if [[ "${{ steps.toolchain-build-riscv-tools.outputs.cache-hit }}" != 'true' || "${{ steps.toolchain-build-esp-tools.outputs.cache-hit }}" != 'true' ]]; then - echo "Cache miss on ${{ inputs.tools-version }}-install. Build." - ./.github/scripts/build-toolchains.sh ${{ inputs.tools-version }} - else - echo "Cache hit do not rebuild toolchain ${{ inputs.tools-version }}." - fi + - name: Build ESP RISC-V toolchain if not cached + run: ./.github/scripts/build-toolchains.sh esp-tools shell: bash diff --git a/.github/scripts/remote-do-rtl-build.sh b/.github/scripts/remote-do-rtl-build.sh index e5c4e101..a5268288 100755 --- a/.github/scripts/remote-do-rtl-build.sh +++ b/.github/scripts/remote-do-rtl-build.sh @@ -59,5 +59,3 @@ do 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/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c2348ae8..c932d3e6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -3,7 +3,7 @@ name: chipyard-ci-process on: [push] env: - tools-cache-version: v8 + tools-cache-version: v13 BUILDSERVER: ${{ secrets.BUILDSERVER }} BUILDUSER: ${{ secrets.BUILDUSER }} SERVER: ${{ secrets.BUILDUSER }}@${{ secrets.BUILDSERVER }} @@ -75,8 +75,8 @@ jobs: run: cat /tmp/sphinx-err*.log - uses: ./.github/actions/job-end - install-riscv-toolchain: - name: install-riscv-toolchain + install-toolchains: + name: install-toolchains runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -86,34 +86,14 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build default RISC-V toolchain + - name: Build RISC-V toolchains if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - - uses: ./.github/actions/job-end - - install-esp-toolchain: - name: install-esp-toolchain - 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: Build ESP RISC-V toolchain - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - with: - tools-version: 'esp-tools' - uses: ./.github/actions/job-end build-extra-tests: name: build-extra-tests - needs: install-riscv-toolchain + needs: install-toolchains runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 @@ -123,11 +103,9 @@ jobs: uses: actions/checkout@v2 - uses: ./.github/actions/job-start id: job-start - - name: Build default RISC-V toolchain + - name: Build RISC-V toolchains if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/toolchain-build - with: - tools-version: 'riscv-tools' - name: Generate keys if: steps.job-start.outputs.run_result != 'success' id: genkey @@ -164,8 +142,7 @@ jobs: # When adding new prep jobs, please add them to `needs` below setup-complete: name: setup-complete - needs: [install-riscv-toolchain, install-esp-toolchain, install-verilator, - build-extra-tests] + needs: [install-toolchains, install-verilator, build-extra-tests] runs-on: ubuntu-latest steps: - name: Set up complete @@ -218,7 +195,6 @@ jobs: if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/prepare-rtl with: - tools-version: "esp-tools" group-key: "group-accels" - uses: ./.github/actions/job-end @@ -469,7 +445,6 @@ jobs: if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: - tools-version: "esp-tools" group-key: "group-accels" project-key: "chipyard-sha3" - uses: ./.github/actions/job-end @@ -530,7 +505,6 @@ jobs: if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: - tools-version: "esp-tools" group-key: "group-accels" project-key: "chipyard-hwacha" - uses: ./.github/actions/job-end @@ -551,7 +525,6 @@ jobs: if: steps.job-start.outputs.run_result != 'success' uses: ./.github/actions/run-tests with: - tools-version: "esp-tools" group-key: "group-accels" project-key: "chipyard-gemmini" - uses: ./.github/actions/job-end From 748c973d4427748f33d2e044cbb7b57da3207b61 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 11 Oct 2021 09:49:27 -0700 Subject: [PATCH 070/267] Clean extra disk space after build toolchains --- .github/scripts/build-toolchains.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/scripts/build-toolchains.sh b/.github/scripts/build-toolchains.sh index 160b6f5a..cd1abb1d 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 + git submodule deinit $LOCAL_CHIPYARD_DIR/toolchains/$1 fi From 192e60f5a19933ea39fd632841f439105f3273f7 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 11 Oct 2021 16:45:57 -0700 Subject: [PATCH 071/267] Debug --- .github/actions/toolchain-build/action.yml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 88da9a1a..0c74cc44 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -8,6 +8,15 @@ runs: run: .github/scripts/create-hash.sh shell: bash + - run: | + cat $GITHUB_WORKSPACE/riscv-tools.hash + ls -alh $GITHUB_WORKSPACE/riscv-tools.hash + cat $GITHUB_WORKSPACE/esp-tools.hash + ls -alh $GITHUB_WORKSPACE/esp-tools.hash + echo "${{ hashFiles('**/riscv-tools.hash') }}" + echo "${{ hashFiles('**/esp-tools.hash') }}" + shell: bash + - name: Cache riscv-tools uses: actions/cache@v2 with: From 6eb06137f12e976e4346c1320a54f88fcd3b066a Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:31:56 -0700 Subject: [PATCH 072/267] Testing theory --- .github/workflows/chipyard-run-tests.yml | 1367 +++++++++++----------- 1 file changed, 700 insertions(+), 667 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c932d3e6..f27f726b 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,685 +20,718 @@ jobs: with: access_token: ${{ github.token }} - commit-on-master-check: - name: commit-on-master-check - 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: Check commits of each submodule - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/check-commit.sh - - uses: ./.github/actions/job-end - - tutorial-setup-check: - name: tutorial-setup-check - 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: Check that the tutorial-setup patches apply - if: steps.job-start.outputs.run_result != 'success' - run: scripts/tutorial-setup.sh - - uses: ./.github/actions/job-end - - documentation-check: - name: documentation-check - 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: Check that documentation builds with no warnings/errors - if: steps.job-start.outputs.run_result != 'success' - 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - run: cat /tmp/sphinx-err*.log - - uses: ./.github/actions/job-end - - install-toolchains: - name: install-toolchains - 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: Build RISC-V toolchains - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - - uses: ./.github/actions/job-end - - build-extra-tests: - name: build-extra-tests - needs: install-toolchains - 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: Build RISC-V toolchains - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/toolchain-build - - name: Generate keys - if: steps.job-start.outputs.run_result != 'success' - id: genkey - run: | - echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - - uses: actions/cache@v2 - if: steps.job-start.outputs.run_result != 'success' - id: build-extra-tools-cache - with: - path: extra-tests-install - key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} - - name: Build extra tests - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/build-extra-tests.sh - - uses: ./.github/actions/job-end - - install-verilator: - name: install-verilator - runs-on: self-hosted - needs: cancel-prior-workflows - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build verilator on self-hosted - if: steps.job-start.outputs.run_result != 'success' - run: .github/scripts/remote-install-verilator.sh - - uses: ./.github/actions/job-end - - # 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: [install-toolchains, install-verilator, build-extra-tests] + test1: + name: test1 runs-on: ubuntu-latest steps: - - name: Set up complete - run: echo Set up is complete! + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - ########################################################################## - - prepare-chipyard-cores: - name: prepare-chipyard-cores - needs: setup-complete + test2: + name: test2 runs-on: self-hosted steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-cores" - - uses: ./.github/actions/job-end + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - prepare-chipyard-peripherals: - name: prepare-chipyard-peripherals - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-peripherals" - - uses: ./.github/actions/job-end - - prepare-chipyard-accels: - name: prepare-chipyard-accels - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-accels" - - uses: ./.github/actions/job-end - - prepare-chipyard-tracegen: - name: prepare-chipyard-tracegen - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-tracegen" - - uses: ./.github/actions/job-end - - prepare-chipyard-other: - name: prepare-chipyard-other - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-other" - - uses: ./.github/actions/job-end - - prepare-chipyard-fpga: - name: prepare-chipyard-fpga - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Build RTL on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/prepare-rtl - with: - group-key: "group-fpga" - build-type: "fpga" - - uses: ./.github/actions/job-end - - ########################################################################## - - chipyard-rocket-run-tests: - name: chipyard-rocket-run-tests - needs: prepare-chipyard-cores + test3: + name: test3 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-rocket" - - uses: ./.github/actions/job-end + - run: | + mkdir -p $GITHUB_WORKSPACE + echo "dummy" >> $GITHUB_WORKSPACE/temp.file + echo "${{ hashFiles('**/temp.file') }}" - chipyard-hetero-run-tests: - name: chipyard-hetero-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-hetero" - - uses: ./.github/actions/job-end - chipyard-boom-run-tests: - name: chipyard-boom-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-boom" - - uses: ./.github/actions/job-end - chipyard-cva6-run-tests: - name: chipyard-cva6-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-cva6" - - uses: ./.github/actions/job-end - chipyard-sodor-run-tests: - name: chipyard-sodor-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-sodor" - - uses: ./.github/actions/job-end - - chipyard-dmirocket-run-tests: - name: chipyard-dmirocket-run-tests - needs: prepare-chipyard-peripherals - 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-peripherals" - project-key: "chipyard-dmirocket" - - uses: ./.github/actions/job-end - - chipyard-spiflashwrite-run-tests: - name: chipyard-spiflashwrite-run-tests - needs: prepare-chipyard-peripherals - 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-peripherals" - project-key: "chipyard-spiflashwrite" - - uses: ./.github/actions/job-end - - chipyard-spiflashread-run-tests: - name: chipyard-spiflashread-run-tests - needs: prepare-chipyard-peripherals - 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-peripherals" - project-key: "chipyard-spiflashread" - - uses: ./.github/actions/job-end - - chipyard-lbwif-run-tests: - name: chipyard-lbwif-run-tests - needs: prepare-chipyard-peripherals - 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-peripherals" - project-key: "chipyard-lbwif" - - uses: ./.github/actions/job-end - - chipyard-sha3-run-tests: - name: chipyard-sha3-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-sha3" - - uses: ./.github/actions/job-end - - chipyard-streaming-fir-run-tests: - name: chipyard-streaming-fir-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-streaming-fir" - - uses: ./.github/actions/job-end - - chipyard-streaming-passthrough-run-tests: - name: chipyard-streaming-passthrough-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-streaming-passthrough" - - uses: ./.github/actions/job-end - - chipyard-hwacha-run-tests: - name: chipyard-hwacha-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-hwacha" - - uses: ./.github/actions/job-end - - chipyard-gemmini-run-tests: - name: chipyard-gemmini-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-gemmini" - - uses: ./.github/actions/job-end - - chipyard-nvdla-run-tests: - name: chipyard-nvdla-run-tests - needs: prepare-chipyard-accels - 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-accels" - project-key: "chipyard-nvdla" - - uses: ./.github/actions/job-end - - tracegen-boom-run-tests: - name: tracegen-boom-run-tests - needs: prepare-chipyard-tracegen - 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-tracegen" - project-key: "tracegen-boom" - - uses: ./.github/actions/job-end - - tracegen-run-tests: - name: tracegen-run-tests - needs: prepare-chipyard-tracegen - 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-tracegen" - project-key: "tracegen" - - uses: ./.github/actions/job-end - - icenet-run-tests: - name: icenet-run-tests - needs: prepare-chipyard-other - 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-other" - project-key: "icenet" - - uses: ./.github/actions/job-end - - testchipip-run-tests: - name: testchipip-run-tests - needs: prepare-chipyard-other - 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-other" - project-key: "testchipip" - - uses: ./.github/actions/job-end - - firesim-run-tests: - name: firesim-run-tests - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "firesim" - run-script: "remote-run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - fireboom-run-tests: - name: fireboom-run-tests - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "fireboom" - run-script: "remote-run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - firesim-multiclock-run-tests: - name: firesim-multiclock-run-tests - needs: setup-complete - runs-on: self-hosted - steps: - - name: Checkout - uses: actions/checkout@v2 - - uses: ./.github/actions/job-start - id: job-start - - name: Run tests on self-hosted - if: steps.job-start.outputs.run_result != 'success' - uses: ./.github/actions/run-tests - with: - group-key: "extra-tests" - project-key: "firesim-multiclock" - run-script: "remote-run-firesim-scala-tests.sh" - - uses: ./.github/actions/job-end - - # 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: [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-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, - prepare-chipyard-fpga, - firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - runs-on: ubuntu-latest - steps: - - run: echo Success! + # commit-on-master-check: + # name: commit-on-master-check + # 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: Check commits of each submodule + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/check-commit.sh + # - uses: ./.github/actions/job-end + # + # tutorial-setup-check: + # name: tutorial-setup-check + # 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: Check that the tutorial-setup patches apply + # if: steps.job-start.outputs.run_result != 'success' + # run: scripts/tutorial-setup.sh + # - uses: ./.github/actions/job-end + # + # documentation-check: + # name: documentation-check + # 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: Check that documentation builds with no warnings/errors + # if: steps.job-start.outputs.run_result != 'success' + # 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + # run: cat /tmp/sphinx-err*.log + # - uses: ./.github/actions/job-end + # + # install-toolchains: + # name: install-toolchains + # 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: Build RISC-V toolchains + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # - uses: ./.github/actions/job-end + # + # build-extra-tests: + # name: build-extra-tests + # needs: install-toolchains + # 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: Build RISC-V toolchains + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/toolchain-build + # - name: Generate keys + # if: steps.job-start.outputs.run_result != 'success' + # id: genkey + # run: | + # echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + # - uses: actions/cache@v2 + # if: steps.job-start.outputs.run_result != 'success' + # id: build-extra-tools-cache + # with: + # path: extra-tests-install + # key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + # restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + # - name: Build extra tests + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/build-extra-tests.sh + # - uses: ./.github/actions/job-end + # + # install-verilator: + # name: install-verilator + # runs-on: self-hosted + # needs: cancel-prior-workflows + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build verilator on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # run: .github/scripts/remote-install-verilator.sh + # - uses: ./.github/actions/job-end + # + # # 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: [install-toolchains, 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: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-cores" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-peripherals: + # name: prepare-chipyard-peripherals + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-peripherals" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-accels: + # name: prepare-chipyard-accels + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-accels" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-tracegen: + # name: prepare-chipyard-tracegen + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-tracegen" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-other: + # name: prepare-chipyard-other + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-other" + # - uses: ./.github/actions/job-end + # + # prepare-chipyard-fpga: + # name: prepare-chipyard-fpga + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Build RTL on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/prepare-rtl + # with: + # group-key: "group-fpga" + # build-type: "fpga" + # - uses: ./.github/actions/job-end + # + # ########################################################################## + # + # chipyard-rocket-run-tests: + # name: chipyard-rocket-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-rocket" + # - uses: ./.github/actions/job-end + # + # chipyard-hetero-run-tests: + # name: chipyard-hetero-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-hetero" + # - uses: ./.github/actions/job-end + # + # chipyard-boom-run-tests: + # name: chipyard-boom-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-boom" + # - uses: ./.github/actions/job-end + # + # chipyard-cva6-run-tests: + # name: chipyard-cva6-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-cva6" + # - uses: ./.github/actions/job-end + # + # chipyard-sodor-run-tests: + # name: chipyard-sodor-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-sodor" + # - uses: ./.github/actions/job-end + # + # chipyard-dmirocket-run-tests: + # name: chipyard-dmirocket-run-tests + # needs: prepare-chipyard-peripherals + # 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-peripherals" + # project-key: "chipyard-dmirocket" + # - uses: ./.github/actions/job-end + # + # chipyard-spiflashwrite-run-tests: + # name: chipyard-spiflashwrite-run-tests + # needs: prepare-chipyard-peripherals + # 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-peripherals" + # project-key: "chipyard-spiflashwrite" + # - uses: ./.github/actions/job-end + # + # chipyard-spiflashread-run-tests: + # name: chipyard-spiflashread-run-tests + # needs: prepare-chipyard-peripherals + # 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-peripherals" + # project-key: "chipyard-spiflashread" + # - uses: ./.github/actions/job-end + # + # chipyard-lbwif-run-tests: + # name: chipyard-lbwif-run-tests + # needs: prepare-chipyard-peripherals + # 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-peripherals" + # project-key: "chipyard-lbwif" + # - uses: ./.github/actions/job-end + # + # chipyard-sha3-run-tests: + # name: chipyard-sha3-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-sha3" + # - uses: ./.github/actions/job-end + # + # chipyard-streaming-fir-run-tests: + # name: chipyard-streaming-fir-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-streaming-fir" + # - uses: ./.github/actions/job-end + # + # chipyard-streaming-passthrough-run-tests: + # name: chipyard-streaming-passthrough-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-streaming-passthrough" + # - uses: ./.github/actions/job-end + # + # chipyard-hwacha-run-tests: + # name: chipyard-hwacha-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-hwacha" + # - uses: ./.github/actions/job-end + # + # chipyard-gemmini-run-tests: + # name: chipyard-gemmini-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-gemmini" + # - uses: ./.github/actions/job-end + # + # chipyard-nvdla-run-tests: + # name: chipyard-nvdla-run-tests + # needs: prepare-chipyard-accels + # 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-accels" + # project-key: "chipyard-nvdla" + # - uses: ./.github/actions/job-end + # + # tracegen-boom-run-tests: + # name: tracegen-boom-run-tests + # needs: prepare-chipyard-tracegen + # 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-tracegen" + # project-key: "tracegen-boom" + # - uses: ./.github/actions/job-end + # + # tracegen-run-tests: + # name: tracegen-run-tests + # needs: prepare-chipyard-tracegen + # 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-tracegen" + # project-key: "tracegen" + # - uses: ./.github/actions/job-end + # + # icenet-run-tests: + # name: icenet-run-tests + # needs: prepare-chipyard-other + # 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-other" + # project-key: "icenet" + # - uses: ./.github/actions/job-end + # + # testchipip-run-tests: + # name: testchipip-run-tests + # needs: prepare-chipyard-other + # 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-other" + # project-key: "testchipip" + # - uses: ./.github/actions/job-end + # + # firesim-run-tests: + # name: firesim-run-tests + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "firesim" + # run-script: "remote-run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # fireboom-run-tests: + # name: fireboom-run-tests + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "fireboom" + # run-script: "remote-run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # firesim-multiclock-run-tests: + # name: firesim-multiclock-run-tests + # needs: setup-complete + # runs-on: self-hosted + # steps: + # - name: Checkout + # uses: actions/checkout@v2 + # - uses: ./.github/actions/job-start + # id: job-start + # - name: Run tests on self-hosted + # if: steps.job-start.outputs.run_result != 'success' + # uses: ./.github/actions/run-tests + # with: + # group-key: "extra-tests" + # project-key: "firesim-multiclock" + # run-script: "remote-run-firesim-scala-tests.sh" + # - uses: ./.github/actions/job-end + # + # # 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: [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-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, + # prepare-chipyard-fpga, + # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + # runs-on: ubuntu-latest + # steps: + # - run: echo Success! From 3afce5718b1b97596266c45182f9643bb3d9cd2f Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:37:18 -0700 Subject: [PATCH 073/267] Testing theory --- .github/workflows/chipyard-run-tests.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index f27f726b..c4b4f6d3 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -24,19 +24,22 @@ jobs: name: test1 runs-on: ubuntu-latest steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" + echo "${{ hashFiles('**/README.md') }}" test2: name: test2 runs-on: self-hosted steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" + echo "${{ hashFiles('**/README.md') }}" + test3: name: test3 @@ -45,12 +48,11 @@ jobs: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: + - uses: actions/checkout@v2 - run: | - mkdir -p $GITHUB_WORKSPACE echo "dummy" >> $GITHUB_WORKSPACE/temp.file echo "${{ hashFiles('**/temp.file') }}" - - + echo "${{ hashFiles('**/README.md') }}" # commit-on-master-check: From 99f5345891ecc8703cd23e0380a4ec55cf92cdf2 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 12 Oct 2021 21:55:52 -0700 Subject: [PATCH 074/267] Try hack --- .github/actions/toolchain-build/action.yml | 32 +- .github/workflows/chipyard-run-tests.yml | 1385 ++++++++++---------- 2 files changed, 701 insertions(+), 716 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index 0c74cc44..b2ee75c2 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -9,11 +9,31 @@ runs: shell: bash - run: | - cat $GITHUB_WORKSPACE/riscv-tools.hash - ls -alh $GITHUB_WORKSPACE/riscv-tools.hash - cat $GITHUB_WORKSPACE/esp-tools.hash - ls -alh $GITHUB_WORKSPACE/esp-tools.hash + echo "${{ hashFiles('**/riscv-tools.hash') }}" > riscv-tools.hashFilesOutput + echo "${{ hashFiles('**/esp-tools.hash') }}" > esp-tools.hashFilesOutput + shell: bash + + # AJG: hacky since "hashFiles" function differs on self-hosted vs GH-A machines + - name: Cache hashFiles outputs + uses: actions/cache@v2 + with: + path: | + riscv-tools.hashFilesOutput + esp-tools.hashFilesOutput + key: hashFiles-${{ github.sha }} + + - name: Generate cache keys based off hashFiles output + id: genkey + run: | + echo "::set-output name=riscv-tools-cache-key::$(cat riscv-tools.hashFilesOutput)" + echo "::set-output name=esp-tools-cache-key::$(cat esp-tools.hashFilesOutput)" + shell: bash + + - name: DEBUG - Check the output of the file vs the actual hashFiles output + run: | + echo "${{ steps.genkey.outputs.riscv-tools-cache-key }}" echo "${{ hashFiles('**/riscv-tools.hash') }}" + echo "${{ steps.genkey.outputs.esp-tools-cache-key }}" echo "${{ hashFiles('**/esp-tools.hash') }}" shell: bash @@ -21,7 +41,7 @@ runs: uses: actions/cache@v2 with: path: riscv-tools-install - key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/riscv-tools.hash') }} + key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.riscv-tools-cache-key }} - name: Build RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh riscv-tools @@ -31,7 +51,7 @@ runs: uses: actions/cache@v2 with: path: esp-tools-install - key: esp-tools-installed-${{ env.tools-cache-version }}-${{ hashFiles('**/esp-tools.hash') }} + key: esp-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.esp-tools-cache-key }} - name: Build ESP RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh esp-tools diff --git a/.github/workflows/chipyard-run-tests.yml b/.github/workflows/chipyard-run-tests.yml index c4b4f6d3..c932d3e6 100644 --- a/.github/workflows/chipyard-run-tests.yml +++ b/.github/workflows/chipyard-run-tests.yml @@ -20,720 +20,685 @@ jobs: with: access_token: ${{ github.token }} - test1: - name: test1 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" - - test2: - name: test2 - runs-on: self-hosted - steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" - - - test3: - name: test3 + commit-on-master-check: + name: commit-on-master-check runs-on: ubuntu-latest container: image: ucbbar/chipyard-ci-image:554b436 options: --entrypoint /bin/bash steps: - - uses: actions/checkout@v2 - - run: | - echo "dummy" >> $GITHUB_WORKSPACE/temp.file - echo "${{ hashFiles('**/temp.file') }}" - echo "${{ hashFiles('**/README.md') }}" + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Check commits of each submodule + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/check-commit.sh + - uses: ./.github/actions/job-end + tutorial-setup-check: + name: tutorial-setup-check + 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: Check that the tutorial-setup patches apply + if: steps.job-start.outputs.run_result != 'success' + run: scripts/tutorial-setup.sh + - uses: ./.github/actions/job-end - # commit-on-master-check: - # name: commit-on-master-check - # 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: Check commits of each submodule - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/check-commit.sh - # - uses: ./.github/actions/job-end - # - # tutorial-setup-check: - # name: tutorial-setup-check - # 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: Check that the tutorial-setup patches apply - # if: steps.job-start.outputs.run_result != 'success' - # run: scripts/tutorial-setup.sh - # - uses: ./.github/actions/job-end - # - # documentation-check: - # name: documentation-check - # 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: Check that documentation builds with no warnings/errors - # if: steps.job-start.outputs.run_result != 'success' - # 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} - # run: cat /tmp/sphinx-err*.log - # - uses: ./.github/actions/job-end - # - # install-toolchains: - # name: install-toolchains - # 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: Build RISC-V toolchains - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # - uses: ./.github/actions/job-end - # - # build-extra-tests: - # name: build-extra-tests - # needs: install-toolchains - # 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: Build RISC-V toolchains - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/toolchain-build - # - name: Generate keys - # if: steps.job-start.outputs.run_result != 'success' - # id: genkey - # run: | - # echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" - # - uses: actions/cache@v2 - # if: steps.job-start.outputs.run_result != 'success' - # id: build-extra-tools-cache - # with: - # path: extra-tests-install - # key: ${{ steps.genkey.outputs.extra-tests-cache-key }} - # restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} - # - name: Build extra tests - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/build-extra-tests.sh - # - uses: ./.github/actions/job-end - # - # install-verilator: - # name: install-verilator - # runs-on: self-hosted - # needs: cancel-prior-workflows - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build verilator on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # run: .github/scripts/remote-install-verilator.sh - # - uses: ./.github/actions/job-end - # - # # 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: [install-toolchains, 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: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-cores" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-peripherals: - # name: prepare-chipyard-peripherals - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-peripherals" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-accels: - # name: prepare-chipyard-accels - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-accels" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-tracegen: - # name: prepare-chipyard-tracegen - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-tracegen" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-other: - # name: prepare-chipyard-other - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-other" - # - uses: ./.github/actions/job-end - # - # prepare-chipyard-fpga: - # name: prepare-chipyard-fpga - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Build RTL on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/prepare-rtl - # with: - # group-key: "group-fpga" - # build-type: "fpga" - # - uses: ./.github/actions/job-end - # - # ########################################################################## - # - # chipyard-rocket-run-tests: - # name: chipyard-rocket-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-rocket" - # - uses: ./.github/actions/job-end - # - # chipyard-hetero-run-tests: - # name: chipyard-hetero-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-hetero" - # - uses: ./.github/actions/job-end - # - # chipyard-boom-run-tests: - # name: chipyard-boom-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-boom" - # - uses: ./.github/actions/job-end - # - # chipyard-cva6-run-tests: - # name: chipyard-cva6-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-cva6" - # - uses: ./.github/actions/job-end - # - # chipyard-sodor-run-tests: - # name: chipyard-sodor-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-sodor" - # - uses: ./.github/actions/job-end - # - # chipyard-dmirocket-run-tests: - # name: chipyard-dmirocket-run-tests - # needs: prepare-chipyard-peripherals - # 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-peripherals" - # project-key: "chipyard-dmirocket" - # - uses: ./.github/actions/job-end - # - # chipyard-spiflashwrite-run-tests: - # name: chipyard-spiflashwrite-run-tests - # needs: prepare-chipyard-peripherals - # 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-peripherals" - # project-key: "chipyard-spiflashwrite" - # - uses: ./.github/actions/job-end - # - # chipyard-spiflashread-run-tests: - # name: chipyard-spiflashread-run-tests - # needs: prepare-chipyard-peripherals - # 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-peripherals" - # project-key: "chipyard-spiflashread" - # - uses: ./.github/actions/job-end - # - # chipyard-lbwif-run-tests: - # name: chipyard-lbwif-run-tests - # needs: prepare-chipyard-peripherals - # 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-peripherals" - # project-key: "chipyard-lbwif" - # - uses: ./.github/actions/job-end - # - # chipyard-sha3-run-tests: - # name: chipyard-sha3-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-sha3" - # - uses: ./.github/actions/job-end - # - # chipyard-streaming-fir-run-tests: - # name: chipyard-streaming-fir-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-streaming-fir" - # - uses: ./.github/actions/job-end - # - # chipyard-streaming-passthrough-run-tests: - # name: chipyard-streaming-passthrough-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-streaming-passthrough" - # - uses: ./.github/actions/job-end - # - # chipyard-hwacha-run-tests: - # name: chipyard-hwacha-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-hwacha" - # - uses: ./.github/actions/job-end - # - # chipyard-gemmini-run-tests: - # name: chipyard-gemmini-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-gemmini" - # - uses: ./.github/actions/job-end - # - # chipyard-nvdla-run-tests: - # name: chipyard-nvdla-run-tests - # needs: prepare-chipyard-accels - # 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-accels" - # project-key: "chipyard-nvdla" - # - uses: ./.github/actions/job-end - # - # tracegen-boom-run-tests: - # name: tracegen-boom-run-tests - # needs: prepare-chipyard-tracegen - # 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-tracegen" - # project-key: "tracegen-boom" - # - uses: ./.github/actions/job-end - # - # tracegen-run-tests: - # name: tracegen-run-tests - # needs: prepare-chipyard-tracegen - # 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-tracegen" - # project-key: "tracegen" - # - uses: ./.github/actions/job-end - # - # icenet-run-tests: - # name: icenet-run-tests - # needs: prepare-chipyard-other - # 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-other" - # project-key: "icenet" - # - uses: ./.github/actions/job-end - # - # testchipip-run-tests: - # name: testchipip-run-tests - # needs: prepare-chipyard-other - # 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-other" - # project-key: "testchipip" - # - uses: ./.github/actions/job-end - # - # firesim-run-tests: - # name: firesim-run-tests - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "firesim" - # run-script: "remote-run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # fireboom-run-tests: - # name: fireboom-run-tests - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "fireboom" - # run-script: "remote-run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # firesim-multiclock-run-tests: - # name: firesim-multiclock-run-tests - # needs: setup-complete - # runs-on: self-hosted - # steps: - # - name: Checkout - # uses: actions/checkout@v2 - # - uses: ./.github/actions/job-start - # id: job-start - # - name: Run tests on self-hosted - # if: steps.job-start.outputs.run_result != 'success' - # uses: ./.github/actions/run-tests - # with: - # group-key: "extra-tests" - # project-key: "firesim-multiclock" - # run-script: "remote-run-firesim-scala-tests.sh" - # - uses: ./.github/actions/job-end - # - # # 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: [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-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, - # prepare-chipyard-fpga, - # firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] - # runs-on: ubuntu-latest - # steps: - # - run: echo Success! + documentation-check: + name: documentation-check + 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: Check that documentation builds with no warnings/errors + if: steps.job-start.outputs.run_result != 'success' + 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: ${{ steps.job-start.outputs.run_result != 'success' && failure() }} + run: cat /tmp/sphinx-err*.log + - uses: ./.github/actions/job-end + + install-toolchains: + name: install-toolchains + 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: Build RISC-V toolchains + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + - uses: ./.github/actions/job-end + + build-extra-tests: + name: build-extra-tests + needs: install-toolchains + 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: Build RISC-V toolchains + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/toolchain-build + - name: Generate keys + if: steps.job-start.outputs.run_result != 'success' + id: genkey + run: | + echo "::set-output name=extra-tests-cache-key::extra-tests-${{ github.ref }}-${{ github.sha }}" + - uses: actions/cache@v2 + if: steps.job-start.outputs.run_result != 'success' + id: build-extra-tools-cache + with: + path: extra-tests-install + key: ${{ steps.genkey.outputs.extra-tests-cache-key }} + restore-keys: ${{ steps.genkey.outputs.extra-tests-cache-key }} + - name: Build extra tests + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/build-extra-tests.sh + - uses: ./.github/actions/job-end + + install-verilator: + name: install-verilator + runs-on: self-hosted + needs: cancel-prior-workflows + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build verilator on self-hosted + if: steps.job-start.outputs.run_result != 'success' + run: .github/scripts/remote-install-verilator.sh + - uses: ./.github/actions/job-end + + # 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: [install-toolchains, 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: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-cores" + - uses: ./.github/actions/job-end + + prepare-chipyard-peripherals: + name: prepare-chipyard-peripherals + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-peripherals" + - uses: ./.github/actions/job-end + + prepare-chipyard-accels: + name: prepare-chipyard-accels + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-accels" + - uses: ./.github/actions/job-end + + prepare-chipyard-tracegen: + name: prepare-chipyard-tracegen + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-tracegen" + - uses: ./.github/actions/job-end + + prepare-chipyard-other: + name: prepare-chipyard-other + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-other" + - uses: ./.github/actions/job-end + + prepare-chipyard-fpga: + name: prepare-chipyard-fpga + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Build RTL on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/prepare-rtl + with: + group-key: "group-fpga" + build-type: "fpga" + - uses: ./.github/actions/job-end + + ########################################################################## + + chipyard-rocket-run-tests: + name: chipyard-rocket-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-rocket" + - uses: ./.github/actions/job-end + + chipyard-hetero-run-tests: + name: chipyard-hetero-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-hetero" + - uses: ./.github/actions/job-end + + chipyard-boom-run-tests: + name: chipyard-boom-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-boom" + - uses: ./.github/actions/job-end + + chipyard-cva6-run-tests: + name: chipyard-cva6-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-cva6" + - uses: ./.github/actions/job-end + + chipyard-sodor-run-tests: + name: chipyard-sodor-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-sodor" + - uses: ./.github/actions/job-end + + chipyard-dmirocket-run-tests: + name: chipyard-dmirocket-run-tests + needs: prepare-chipyard-peripherals + 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-peripherals" + project-key: "chipyard-dmirocket" + - uses: ./.github/actions/job-end + + chipyard-spiflashwrite-run-tests: + name: chipyard-spiflashwrite-run-tests + needs: prepare-chipyard-peripherals + 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-peripherals" + project-key: "chipyard-spiflashwrite" + - uses: ./.github/actions/job-end + + chipyard-spiflashread-run-tests: + name: chipyard-spiflashread-run-tests + needs: prepare-chipyard-peripherals + 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-peripherals" + project-key: "chipyard-spiflashread" + - uses: ./.github/actions/job-end + + chipyard-lbwif-run-tests: + name: chipyard-lbwif-run-tests + needs: prepare-chipyard-peripherals + 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-peripherals" + project-key: "chipyard-lbwif" + - uses: ./.github/actions/job-end + + chipyard-sha3-run-tests: + name: chipyard-sha3-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-sha3" + - uses: ./.github/actions/job-end + + chipyard-streaming-fir-run-tests: + name: chipyard-streaming-fir-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-streaming-fir" + - uses: ./.github/actions/job-end + + chipyard-streaming-passthrough-run-tests: + name: chipyard-streaming-passthrough-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-streaming-passthrough" + - uses: ./.github/actions/job-end + + chipyard-hwacha-run-tests: + name: chipyard-hwacha-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-hwacha" + - uses: ./.github/actions/job-end + + chipyard-gemmini-run-tests: + name: chipyard-gemmini-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-gemmini" + - uses: ./.github/actions/job-end + + chipyard-nvdla-run-tests: + name: chipyard-nvdla-run-tests + needs: prepare-chipyard-accels + 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-accels" + project-key: "chipyard-nvdla" + - uses: ./.github/actions/job-end + + tracegen-boom-run-tests: + name: tracegen-boom-run-tests + needs: prepare-chipyard-tracegen + 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-tracegen" + project-key: "tracegen-boom" + - uses: ./.github/actions/job-end + + tracegen-run-tests: + name: tracegen-run-tests + needs: prepare-chipyard-tracegen + 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-tracegen" + project-key: "tracegen" + - uses: ./.github/actions/job-end + + icenet-run-tests: + name: icenet-run-tests + needs: prepare-chipyard-other + 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-other" + project-key: "icenet" + - uses: ./.github/actions/job-end + + testchipip-run-tests: + name: testchipip-run-tests + needs: prepare-chipyard-other + 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-other" + project-key: "testchipip" + - uses: ./.github/actions/job-end + + firesim-run-tests: + name: firesim-run-tests + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + fireboom-run-tests: + name: fireboom-run-tests + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "fireboom" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + firesim-multiclock-run-tests: + name: firesim-multiclock-run-tests + needs: setup-complete + runs-on: self-hosted + steps: + - name: Checkout + uses: actions/checkout@v2 + - uses: ./.github/actions/job-start + id: job-start + - name: Run tests on self-hosted + if: steps.job-start.outputs.run_result != 'success' + uses: ./.github/actions/run-tests + with: + group-key: "extra-tests" + project-key: "firesim-multiclock" + run-script: "remote-run-firesim-scala-tests.sh" + - uses: ./.github/actions/job-end + + # 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: [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-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, + prepare-chipyard-fpga, + firesim-run-tests, fireboom-run-tests, firesim-multiclock-run-tests] + runs-on: ubuntu-latest + steps: + - run: echo Success! From fdd9cb2f1d48ebdd410a7e9e398f9a5e51979b07 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Wed, 13 Oct 2021 09:43:44 -0700 Subject: [PATCH 075/267] Cleanup toolchain-build a bit more --- .github/actions/toolchain-build/action.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/actions/toolchain-build/action.yml b/.github/actions/toolchain-build/action.yml index b2ee75c2..c3492054 100644 --- a/.github/actions/toolchain-build/action.yml +++ b/.github/actions/toolchain-build/action.yml @@ -8,12 +8,13 @@ runs: run: .github/scripts/create-hash.sh shell: bash + # since "hashFiles" function differs on self-hosted vs GH-A machines + # make sure to cache the GH-A hashFiles result so that self-hosted can use it - run: | echo "${{ hashFiles('**/riscv-tools.hash') }}" > riscv-tools.hashFilesOutput echo "${{ hashFiles('**/esp-tools.hash') }}" > esp-tools.hashFilesOutput shell: bash - # AJG: hacky since "hashFiles" function differs on self-hosted vs GH-A machines - name: Cache hashFiles outputs uses: actions/cache@v2 with: @@ -29,30 +30,22 @@ runs: echo "::set-output name=esp-tools-cache-key::$(cat esp-tools.hashFilesOutput)" shell: bash - - name: DEBUG - Check the output of the file vs the actual hashFiles output - run: | - echo "${{ steps.genkey.outputs.riscv-tools-cache-key }}" - echo "${{ hashFiles('**/riscv-tools.hash') }}" - echo "${{ steps.genkey.outputs.esp-tools-cache-key }}" - echo "${{ hashFiles('**/esp-tools.hash') }}" - shell: bash - - name: Cache riscv-tools uses: actions/cache@v2 with: path: riscv-tools-install key: riscv-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.riscv-tools-cache-key }} - - name: Build RISC-V toolchain if not cached - run: ./.github/scripts/build-toolchains.sh riscv-tools - shell: bash - - name: Cache esp-tools uses: actions/cache@v2 with: path: esp-tools-install key: esp-tools-installed-${{ env.tools-cache-version }}-${{ steps.genkey.outputs.esp-tools-cache-key }} + - name: Build RISC-V toolchain if not cached + run: ./.github/scripts/build-toolchains.sh riscv-tools + shell: bash + - name: Build ESP RISC-V toolchain if not cached run: ./.github/scripts/build-toolchains.sh esp-tools shell: bash From 2fb3dc7c423b9b72bde1b79aa85de9bc1c408e3f Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Wed, 13 Oct 2021 23:13:52 -0700 Subject: [PATCH 076/267] Small cleanup on README.md/comments [ci skip] Co-authored-by: Jerry Zhao --- .github/README.md | 4 ++-- .github/scripts/check-commit.sh | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/README.md b/.github/README.md index 4af1e9d9..2f70449e 100644 --- a/.github/README.md +++ b/.github/README.md @@ -7,7 +7,7 @@ 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`. +In our case, we have just one workflow named `chipyard-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. @@ -120,7 +120,7 @@ Note: On the remote server you need to have the `*.pub` key file added to the `a 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 supports workflow level variables, in GA we must define things 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 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 From b7fd1ffae228e65385075e0aff4c32013b3312a1 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 18 Oct 2021 10:33:49 -0700 Subject: [PATCH 077/267] Add bypass to ignore simulator dependency --- .github/scripts/run-tests.sh | 34 +++++++++++++++++---------------- common.mk | 19 ++++++++++++------ generators/tracegen/tracegen.mk | 2 +- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index 93475a19..ffa61db5 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -13,12 +13,14 @@ 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 () { @@ -27,7 +29,7 @@ run_both () { } run_tracegen () { - make tracegen -C $LOCAL_SIM_DIR $@ + make tracegen -C $LOCAL_SIM_DIR $DISABLE_SIM_PREREQ $@ } case $1 in @@ -53,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 @@ -62,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 - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/aligned-baremetal - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$GEMMINI_SOFTWARE_DIR/build/bareMetalC/raw_hazard-baremetal - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$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) - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$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 - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$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 - make -C $LOCAL_SIM_DIR ${mapping[$1]} run-binary-fast BINARY=$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-fast + 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-fast + 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) @@ -97,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-fast + 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/common.mk b/common.mk index 634f7767..7adb91d5 100644 --- a/common.mk +++ b/common.mk @@ -31,7 +31,8 @@ EXTRA_SIM_REQS ?= #---------------------------------------------------------------------------- HELP_SIMULATION_VARIABLES += \ " EXTRA_SIM_FLAGS = additional runtime simulation flags (passed within +permissive)" \ -" NUMACTL = set to '1' to wrap simulator in the appropriate numactl command" +" NUMACTL = set to '1' to wrap simulator in the appropriate numactl command" \ +" BREAK_SIM_PREREQ = when running a binary, doesn't rebuild RTL on source changes" EXTRA_SIM_FLAGS ?= NUMACTL ?= 0 @@ -191,16 +192,22 @@ ifeq (,$(BINARY)) $(error BINARY variable is not set. Set it to the simulation binary) endif +# allow you to override sim prereq +ifeq(,$(BREAK_SIM_PREREQ)) +SIM_PREREQ = $(sim) +SIM_DEBUG_PREREQ = $(sim_debug) +else + # run normal binary with hardware-logged insn dissassembly -run-binary: $(output_dir) check-binary +run-binary: $(output_dir) $(SIM_PREREQ) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) $(BINARY) >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log) # run simulator as fast as possible (no insn disassembly) -run-binary-fast: $(output_dir) check-binary +run-binary-fast: $(output_dir) $(SIM_PREREQ) check-binary (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $(BINARY) >(spike-dasm > $(sim_out_name).out) | tee $(sim_out_name).log) run-fast: run-asm-tests-fast run-bmark-tests-fast @@ -239,10 +246,10 @@ $(output_dir): $(output_dir)/%: $(RISCV)/riscv64-unknown-elf/share/riscv-tests/isa/% $(output_dir) ln -sf $< $@ -$(output_dir)/%.run: $(output_dir)/% +$(output_dir)/%.run: $(output_dir)/% $(SIM_PREREQ) (set -o pipefail && $(NUMA_PREFIX) $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(PERMISSIVE_OFF) $< >(spike-dasm > $@) | tee $<.log) ######################################################################################### diff --git a/generators/tracegen/tracegen.mk b/generators/tracegen/tracegen.mk index 1766059f..55a544e7 100644 --- a/generators/tracegen/tracegen.mk +++ b/generators/tracegen/tracegen.mk @@ -8,7 +8,7 @@ AXE=$(AXE_DIR)/axe $(AXE): $(wildcard $(AXE_DIR)/*.[ch]) $(AXE_DIR)/make.sh cd $(AXE_DIR) && ./make.sh -$(output_dir)/tracegen.out: +$(output_dir)/tracegen.out: $(SIM_PREREQ) mkdir -p $(output_dir) && $(sim) $(PERMISSIVE_ON) $(SIM_FLAGS) $(EXTRA_SIM_FLAGS) $(SEED_FLAG) $(VERBOSE_FLAGS) $(PERMISSIVE_OFF) none $@ $(output_dir)/tracegen.result: $(output_dir)/tracegen.out $(AXE) From 52f76ced67a438d23d6d20927614b89dd8e48c18 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Wed, 20 Oct 2021 14:21:21 -0700 Subject: [PATCH 078/267] Set JAVA_TOOL_OPTIONS environment variable instead of nonstandard JAVA_OPTS (#1013) * Set JAVA_TOOL_OPTIONS environment variable instead of nonstandard JAVA_OPTS The JAVA_TOOL_OPTIONS environment variable is passed to all Java processes. This is useful for Java processes that somehow miss the flags passed in via command line, in particular, the JVM launched by initialization of the SBT thin client only sees flags passed in by JAVA_TOOL_OPTIONS. * Update CI with JAVA_TOOL_OPTIONS --- .circleci/do-rtl-build.sh | 2 +- .circleci/run-firesim-scala-tests.sh | 2 +- variables.mk | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/do-rtl-build.sh b/.circleci/do-rtl-build.sh index 3a5d56ca..95f3c903 100755 --- a/.circleci/do-rtl-build.sh +++ b/.circleci/do-rtl-build.sh @@ -82,7 +82,7 @@ do 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]}" + 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" diff --git a/.circleci/run-firesim-scala-tests.sh b/.circleci/run-firesim-scala-tests.sh index a848df62..0a74adb8 100755 --- a/.circleci/run-firesim-scala-tests.sh +++ b/.circleci/run-firesim-scala-tests.sh @@ -59,4 +59,4 @@ run "export RISCV=\"$TOOLS_DIR\"; \ 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]}" + make -C $REMOTE_FIRESIM_DIR JAVA_TOOL_OPTIONS=\"$REMOTE_JAVA_OPTS\" SBT_OPTS=\"$REMOTE_SBT_OPTS\" testOnly ${mapping[$1]}" diff --git a/variables.mk b/variables.mk index 5d136e80..1279c28e 100644 --- a/variables.mk +++ b/variables.mk @@ -153,7 +153,7 @@ sim_common_files ?= $(build_dir)/sim_files.common.f # java arguments used in sbt ######################################################################################### JAVA_HEAP_SIZE ?= 8G -JAVA_OPTS ?= -Xmx$(JAVA_HEAP_SIZE) -Xss8M -XX:MaxPermSize=256M -Djava.io.tmpdir=$(base_dir)/.java_tmp +export JAVA_TOOL_OPTIONS ?= -Xmx$(JAVA_HEAP_SIZE) -Xss8M -XX:MaxPermSize=256M -Djava.io.tmpdir=$(base_dir)/.java_tmp ######################################################################################### # default sbt launch command @@ -175,7 +175,7 @@ override SCALA_BUILDTOOL_DEPS += $(SBT_THIN_CLIENT_TIMESTAMP) SBT_CLIENT_FLAG = --client endif -SBT ?= java $(JAVA_OPTS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS) $(SBT_CLIENT_FLAG) +SBT ?= java $(JAVA_TOOL_OPTIONS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS) $(SBT_CLIENT_FLAG) SBT_NON_THIN ?= $(subst $(SBT_CLIENT_FLAG),,$(SBT)) define run_scala_main From f7ab5d62605365236985e027c84229880ce94eb6 Mon Sep 17 00:00:00 2001 From: Quy Le Anh Date: Sun, 24 Oct 2021 10:22:23 +0700 Subject: [PATCH 079/267] Add define for MAKE variable Currently there is no define for MAKE. Running script always throws `obsolete make version; need GNU make 4.x or later` error. This config is from [`build-util.sh` script](https://github.com/ucb-bar/chipyard/blob/9d055fdac638ab90735cbde42fd2d86355eb260b/scripts/build-util.sh#L17-L19) --- scripts/build-toolchains.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/build-toolchains.sh b/scripts/build-toolchains.sh index 19fa524e..d09370d1 100755 --- a/scripts/build-toolchains.sh +++ b/scripts/build-toolchains.sh @@ -11,6 +11,10 @@ set -o pipefail DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")" CHIPYARD_DIR="$(dirname "$DIR")" +# Allow user to override MAKE +[ -n "${MAKE:+x}" ] || MAKE=$(command -v gnumake || command -v gmake || command -v make) +readonly MAKE + usage() { echo "usage: ${0} [OPTIONS] [riscv-tools | esp-tools | ec2fast]" echo "" From 1d3d8e4e0151030d1c35d6ca609307e9d18376e3 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 25 Oct 2021 22:29:38 -0700 Subject: [PATCH 080/267] Reverse documentation on breaking prereqs --- docs/Advanced-Concepts/Debugging-RTL.rst | 20 ++++++++++++++++---- docs/Customization/Dsptools-Blocks.rst | 1 - docs/Customization/MMIO-Peripherals.rst | 1 - 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/docs/Advanced-Concepts/Debugging-RTL.rst b/docs/Advanced-Concepts/Debugging-RTL.rst index 678ab33a..79b9428e 100644 --- a/docs/Advanced-Concepts/Debugging-RTL.rst +++ b/docs/Advanced-Concepts/Debugging-RTL.rst @@ -22,8 +22,8 @@ make target. For example: make CONFIG=CustomConfig debug -The ``run-binary-debug`` rule uses the prebuilt simulator to run a custom binary -and generate a waveform. For example, to run a +The ``run-binary-debug`` rule will also automatically build a simulator, +run it on a custom binary, and generate a waveform. For example, to run a test on ``helloworld.riscv``, use .. code-block:: shell @@ -83,8 +83,20 @@ Torture tests The RISC-V torture utility generates random RISC-V assembly streams, compiles them, runs them on both the Spike functional model and the SW simulator, and verifies identical program behavior. The torture utility can also be configured to run -continuously for stress-testing. The torture utility exists within the ``utilities`` -directory. +continuously for stress-testing. The torture utility exists within the ``tools`` +directory. To run torture tests, run ``make`` in the simulation directories: + +.. code-block:: shell + + make CONFIG=CustomConfig torture + +To run overnight tests (repeated random tests), run + +.. code-block:: shell + + make CONFIG=CustomConfig TORTURE_ONIGHT_OPTIONS= torture-overnight + +You can find the overnight options in `overnight/src/main/scala/main.scala` in the torture repo. Firesim Debugging --------------------------- diff --git a/docs/Customization/Dsptools-Blocks.rst b/docs/Customization/Dsptools-Blocks.rst index 52109a75..bdf68fc1 100644 --- a/docs/Customization/Dsptools-Blocks.rst +++ b/docs/Customization/Dsptools-Blocks.rst @@ -120,7 +120,6 @@ Now we can run our simulation. .. code-block:: shell cd sims/verilator - make CONFIG=StreamingFIRRocketConfig make CONFIG=StreamingFIRRocketConfig BINARY=../../tests/streaming-fir.riscv run-binary .. [#] ``ReadQueue`` and ``WriteQueue`` are good illustrations of how to write a ``DspBlock`` and how they can be integrated into rocket, but in a real design a DMA engine would be preferred. ``ReadQueue`` will stall the processor if you try to read an empty queue, and ``WriteQueue`` will stall if you try to write to a full queue, which a DMA engine can more elegantly avoid. Furthermore, a DMA engine can do the work of moving data, freeing the processor to do other useful work (or sleep). diff --git a/docs/Customization/MMIO-Peripherals.rst b/docs/Customization/MMIO-Peripherals.rst index bffe6f26..15ed5a00 100644 --- a/docs/Customization/MMIO-Peripherals.rst +++ b/docs/Customization/MMIO-Peripherals.rst @@ -137,7 +137,6 @@ Now with all of that done, we can go ahead and run our simulation. .. code-block:: shell cd sims/verilator - make CONFIG=GCDTLRocketConfig make CONFIG=GCDTLRocketConfig BINARY=../../tests/gcd.riscv run-binary From e6387e06272e42de0bdf28042a494d3597184668 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 25 Oct 2021 22:30:00 -0700 Subject: [PATCH 081/267] Fix Makefile bug w/ BREAK_SIM_PREREQ --- common.mk | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 7adb91d5..6bd1e04c 100644 --- a/common.mk +++ b/common.mk @@ -193,10 +193,10 @@ ifeq (,$(BINARY)) endif # allow you to override sim prereq -ifeq(,$(BREAK_SIM_PREREQ)) +ifeq (,$(BREAK_SIM_PREREQ)) SIM_PREREQ = $(sim) SIM_DEBUG_PREREQ = $(sim_debug) -else +endif # run normal binary with hardware-logged insn dissassembly run-binary: $(output_dir) $(SIM_PREREQ) check-binary From 2e86495e80053f9ad2f513d7d05960b4bea132d0 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Mon, 25 Oct 2021 22:30:22 -0700 Subject: [PATCH 082/267] Force removal of toolchain files after build --- .github/scripts/build-toolchains.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/scripts/build-toolchains.sh b/.github/scripts/build-toolchains.sh index cd1abb1d..1f23c408 100755 --- a/.github/scripts/build-toolchains.sh +++ b/.github/scripts/build-toolchains.sh @@ -16,6 +16,6 @@ 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 - git submodule deinit $LOCAL_CHIPYARD_DIR/toolchains/$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 From 23bb89e21ea3936805b5cfc7fa77c494bc2a3574 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 26 Oct 2021 23:15:18 -0700 Subject: [PATCH 083/267] Forgot a couple of sim prereqs --- common.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/common.mk b/common.mk index 6bd1e04c..2bb0f511 100644 --- a/common.mk +++ b/common.mk @@ -219,19 +219,19 @@ $(binary_hex): $(output_dir) $(BINARY) $(base_dir)/scripts/smartelf2hex.sh $(BINARY) > $(binary_hex) run-binary-hex: check-binary -run-binary-hex: $(output_dir) $(sim) $(binary_hex) +run-binary-hex: $(output_dir) $(SIM_PREREQ) $(binary_hex) run-binary-hex: run-binary run-binary-hex: override LOADMEM_ADDR = 80000000 run-binary-hex: override LOADMEM = $(binary_hex) run-binary-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-debug-hex: check-binary -run-binary-debug-hex: $(output_dir) $(sim) $(binary_hex) +run-binary-debug-hex: $(output_dir) $(SIM_DEBUG_REREQ) $(binary_hex) run-binary-debug-hex: run-binary-debug run-binary-debug-hex: override LOADMEM_ADDR = 80000000 run-binary-debug-hex: override LOADMEM = $(binary_hex) run-binary-debug-hex: override SIM_FLAGS += +loadmem=$(LOADMEM) +loadmem_addr=$(LOADMEM_ADDR) run-binary-fast-hex: check-binary -run-binary-fast-hex: $(output_dir) $(binary_hex) +run-binary-fast-hex: $(output_dir) $(SIM_PREREQ) $(binary_hex) run-binary-fast-hex: run-binary-fast run-binary-fast-hex: override LOADMEM_ADDR = 80000000 run-binary-fast-hex: override LOADMEM = $(binary_hex) From 5da1eab9d5e1536c8122f9b3bd621d0af98eeaf1 Mon Sep 17 00:00:00 2001 From: Harrison Liew Date: Tue, 3 Aug 2021 13:57:47 -0700 Subject: [PATCH 084/267] full flow working with example config --- vlsi/example-asap7.yml | 31 ++------ vlsi/example-tools.yml | 2 + vlsi/example-vlsi | 24 +------ vlsi/hammer | 2 +- vlsi/hammer-cadence-plugins | 2 +- vlsi/view_gds.py | 138 ++++++++++++++++++++---------------- 6 files changed, 87 insertions(+), 112 deletions(-) diff --git a/vlsi/example-asap7.yml b/vlsi/example-asap7.yml index d8011a80..683edaae 100644 --- a/vlsi/example-asap7.yml +++ b/vlsi/example-asap7.yml @@ -1,8 +1,11 @@ # Technology Setup # Technology used is ASAP7 vlsi.core.technology: asap7 -# Specify dir with ASAP7 tarball -technology.asap7.tarball_dir: "" +# Specify dir with ASAP7 Calibre deck tarball +technology.asap7.tarball_dir: "/path/to/asap7" +# Specify PDK and std cell install directories +# technology.asap7.pdk_install_dir: "/path/to/asap7/asap7PDK_r1p7" +# technology.asap7.stdcell_install_dir: "/path/to/asap7/asap7sc7p5t_27" vlsi.core.max_threads: 12 @@ -20,30 +23,6 @@ vlsi.inputs.clocks: [ # Generate Make include to aid in flow vlsi.core.build_system: make -# Power Straps -par.power_straps_mode: generate -par.generate_power_straps_method: by_tracks -par.blockage_spacing: 2.0 -par.generate_power_straps_options: - by_tracks: - strap_layers: - - M3 - - M4 - - M5 - - M6 - - M7 - - M8 - - M9 - pin_layers: - - M9 - track_width: 7 # minimum allowed for M2 & M3 - track_spacing: 0 - track_spacing_M3: 1 # to avoid M2 shorts at higher density - track_start: 10 - power_utilization: 0.2 - power_utilization_M8: 1.0 - power_utilization_M9: 1.0 - # Placement Constraints # For ASAP7, all numbers must be 4x larger than final GDS vlsi.inputs.placement_constraints: diff --git a/vlsi/example-tools.yml b/vlsi/example-tools.yml index aad8afe5..63ae4b0f 100644 --- a/vlsi/example-tools.yml +++ b/vlsi/example-tools.yml @@ -20,8 +20,10 @@ par.inputs.gds_merge: true # Calibre options vlsi.core.drc_tool: "calibre" vlsi.core.drc_tool_path: ["hammer-mentor-plugins/drc"] +drc.calibre.version: "2017.3_38.30" vlsi.core.lvs_tool: "calibre" vlsi.core.lvs_tool_path: ["hammer-mentor-plugins/lvs"] +lvs.calibre.version: "2017.3_38.30" # VCS options vlsi.core.sim_tool: "vcs" vlsi.core.sim_tool_path: ["hammer-synopsys-plugins/sim"] diff --git a/vlsi/example-vlsi b/vlsi/example-vlsi index 550b56c5..bf280f0f 100755 --- a/vlsi/example-vlsi +++ b/vlsi/example-vlsi @@ -36,25 +36,6 @@ set_db route_design_top_routing_layer 7 ''') return True -def scale_final_gds(x: hammer_vlsi.HammerTool) -> bool: - """ - Scale the final GDS by a factor of 4 - hammer/src/hammer-vlsi/technology/asap7/__init__.py implements scale_gds_script - """ - if x.get_setting("vlsi.core.technology") == "asap7": - x.append(''' -# Write script out to a temporary file and execute it -set fp [open "{script_file}" "w"] -puts -nonewline $fp "{script_text}" -close $fp - -# Innovus <19.1 appends some bad LD_LIBRARY_PATHS, so remove them before executing python -set env(LD_LIBRARY_PATH) [join [lsearch -not -all -inline [split $env(LD_LIBRARY_PATH) ":"] "*INNOVUS*"] ":"] -python3 {script_file} -'''.format(script_text=x.technology.scale_gds_script(x.output_gds_filename), script_file=os.path.join(x.run_dir, "gds_scale.py"))) - return True - - class ExampleDriver(CLIDriver): def get_extra_par_hooks(self) -> List[HammerToolHookAction]: extra_hooks = [ @@ -66,7 +47,7 @@ class ExampleDriver(CLIDriver): # hammer_vlsi.HammerTool.make_pre_insertion_hook("route_design", example_add_fillers), # make_post_insertion_hook will execute the custom hook after the specified step - hammer_vlsi.HammerTool.make_post_insertion_hook("init_design", example_tool_settings), + # hammer_vlsi.HammerTool.make_post_insertion_hook("init_design", example_tool_settings), # make_replacement_hook will replace the specified step with a custom hook # hammer_vlsi.HammerTool.make_replacement_hook("place_tap_cells", example_place_tap_cells), @@ -75,9 +56,6 @@ class ExampleDriver(CLIDriver): hammer_vlsi.HammerTool.make_removal_hook("place_bumps"), # The target step in any of the above calls may be a default step or another one of your custom hooks - - # This is an example of a technology-supplied hook - hammer_vlsi.HammerTool.make_post_insertion_hook("write_design", scale_final_gds) ] return extra_hooks diff --git a/vlsi/hammer b/vlsi/hammer index 353af21d..3b3061d8 160000 --- a/vlsi/hammer +++ b/vlsi/hammer @@ -1 +1 @@ -Subproject commit 353af21da3fe6f0c2e054ac513b5db583031b962 +Subproject commit 3b3061d8a4d7170d89673d3356f0109cbc6d3a1a diff --git a/vlsi/hammer-cadence-plugins b/vlsi/hammer-cadence-plugins index 191026ed..b9acde1d 160000 --- a/vlsi/hammer-cadence-plugins +++ b/vlsi/hammer-cadence-plugins @@ -1 +1 @@ -Subproject commit 191026ed35fd86ba471d81a130f898db2928c7f4 +Subproject commit b9acde1d06f567e356e4c8ab401d068f70735fa7 diff --git a/vlsi/view_gds.py b/vlsi/view_gds.py index edc94926..746513f4 100755 --- a/vlsi/view_gds.py +++ b/vlsi/view_gds.py @@ -1,66 +1,82 @@ -import sys +#!/usr/bin/python3 -try: - import gdspy -except ImportError: - print('Bad gdspy installation!') - sys.exit() +import sys, os, subprocess print('Loading GDS...') -gds_lib = gdspy.GdsLibrary().read_gds(infile=str(sys.argv[1]), units='import') -# Comment to show layer -hidden=[ - (1, 0), #well - (1, 251), #well lbl - (2, 0), #fin - (3, 0), #psub - (3, 251), #psub lbl - (7, 0), #gate - (8, 0), #dummy - (10, 0), #gate cut - (11, 0), #active - (12, 0), #nselect - (13, 0), #pselect - (16, 0), #LIG - (17, 0), #LISD - (18, 0), #V0 - (19, 0), #M1 - (19, 251), #M1 lbl - (21, 0), #V1 - #(20, 0), #M2 - (20, 251), #M2 lbl - #(25, 0), #V2 - #(30, 0), #M3 - (30, 251), #M3 lbl - #(35, 0), #V3 - #(40, 0), #M4 - (40, 251), #M4 lbl - (45, 0), #V4 - (50, 0), #M5 - (50, 251), #M5 lbl - (55, 0), #V5 - (60, 0), #M6 - (60, 251), #M6 lbl - (65, 0), #V6 - (70, 0), #M7 - (70, 251), #M7 lbl - (75, 0), #V7 - (80, 0), #M8 - (80, 251), #M8 lbl - (85, 0), #V8 - (88, 0), #SDT - (90, 0), #M9 - (90, 251), #M9 lbl - (95, 0), #V9 - (96, 0), #Pad - (97, 0), #SLVT - (98, 0), #LVT - (99, 0), #SRAMDRC - (100, 0), #??? - (101, 0), #??? - (110, 0) #SRAMVT - ] +#try: +# # gdstk created SVG +# import gdstk +#except ImportError: +# try: +# import gdspy +# import tkinter +# except ImportError: +# print('Bad gdspy (requires tkinter) installation!') +# sys.exit() +import gdspy -print('Opening layout...') -gdspy.LayoutViewer(gds_lib, hidden_types=hidden, depth=1) +if 'gdstk' in sys.modules: + svg_file = os.path.splitext(str(sys.argv[1]))[0] + '.svg' + print('Opening {} with xdg-open...'.format(os.path.basename(svg_file))) + subprocess.call(['xdg-open', svg_file]) + +elif 'gdspy' in sys.modules: + gds_lib = gdspy.GdsLibrary().read_gds(infile=str(sys.argv[1]), units='import') + + # Comment to show layer + hidden=[ + (1, 0), #well + (1, 251), #well lbl + (2, 0), #fin + (3, 0), #psub + (3, 251), #psub lbl + (7, 0), #gate + (8, 0), #dummy + (10, 0), #gate cut + (11, 0), #active + (12, 0), #nselect + (13, 0), #pselect + (16, 0), #LIG + (17, 0), #LISD + (18, 0), #V0 + (19, 0), #M1 + (19, 251), #M1 lbl + (21, 0), #V1 + #(20, 0), #M2 + (20, 251), #M2 lbl + #(25, 0), #V2 + #(30, 0), #M3 + (30, 251), #M3 lbl + #(35, 0), #V3 + #(40, 0), #M4 + (40, 251), #M4 lbl + (45, 0), #V4 + (50, 0), #M5 + (50, 251), #M5 lbl + (55, 0), #V5 + (60, 0), #M6 + (60, 251), #M6 lbl + (65, 0), #V6 + (70, 0), #M7 + (70, 251), #M7 lbl + (75, 0), #V7 + (80, 0), #M8 + (80, 251), #M8 lbl + (85, 0), #V8 + (88, 0), #SDT + (90, 0), #M9 + (90, 251), #M9 lbl + (95, 0), #V9 + (96, 0), #Pad + (97, 0), #SLVT + (98, 0), #LVT + (99, 0), #SRAMDRC + (100, 0), #BOUNDARY + (101, 0), #TEXT + (110, 0), #SRAMVT + (235, 5) #DIEAREA + ] + + print('Opening layout in gdspy...') + gdspy.LayoutViewer(gds_lib, hidden_types=hidden, depth=1) From 10ec5078aef659b2789b16e97c5784e4a02b498b Mon Sep 17 00:00:00 2001 From: Harrison Liew Date: Tue, 3 Aug 2021 15:33:53 -0700 Subject: [PATCH 085/267] update docs --- docs/VLSI/Advanced-Usage.rst | 10 ++++++---- docs/VLSI/Basic-Flow.rst | 10 +++++----- docs/VLSI/Tutorial.rst | 31 +++++++++++++------------------ 3 files changed, 24 insertions(+), 27 deletions(-) diff --git a/docs/VLSI/Advanced-Usage.rst b/docs/VLSI/Advanced-Usage.rst index 2e2961f5..602065cd 100644 --- a/docs/VLSI/Advanced-Usage.rst +++ b/docs/VLSI/Advanced-Usage.rst @@ -49,9 +49,9 @@ Say you need to update some power straps settings in ``example.yml`` and want to make redo-par HAMMER_REDO_ARGS='-p example.yml --only_step power_straps' -RTL/Gate-level Simulation, Power Estimation -------------------------------------------- -With the Synopsys plugin, RTL and gate-level simulation is supported using VCS at the chip-level. Also, post-par power estimation with Voltus in the Cadence plugin is also supported. While the provided example does not implement any simulation, some Make targets are provided in the ``vlsi/`` directory. Here is a brief description: +Hierarchical RTL/Gate-level Simulation, Power Estimation +-------------------------------------------------------- +With the Synopsys plugin, hierarchical RTL and gate-level simulation is supported using VCS at the chip-level. Also, post-par power estimation with Voltus in the Cadence plugin is also supported. Special Make targets are provided in the ``vlsi/`` directory in ``sims.mk`` and ``power.mk``. Here is a brief description: * ``sim-rtl``: RTL-level simulation @@ -73,4 +73,6 @@ With the Synopsys plugin, RTL and gate-level simulation is supported using VCS a * ``redo-`` can be appended to all above targets to break dependency tracking, like described above. -The simulation configuration (e.g. binaries) can be edited for your design. See the Makefile and refer to Hammer's documentation for how to set up simulation parameters for your design. +* ``-$(VLSI_TOP)`` suffixes denote simulations/power analysis on a submodule in a hierarchical flow. Note that you must provide the testbenches for these modules since the default testbench only simulates a Chipyard-based ``ChipTop`` DUT instance. + +The simulation configuration (e.g. binaries) can be edited for your design. See the ``Makefile`` and refer to Hammer's documentation for how to set up simulation parameters for your design. diff --git a/docs/VLSI/Basic-Flow.rst b/docs/VLSI/Basic-Flow.rst index 20d36de1..8943af95 100644 --- a/docs/VLSI/Basic-Flow.rst +++ b/docs/VLSI/Basic-Flow.rst @@ -46,11 +46,11 @@ Hammer relies on YAML-based configuration files. While these configuration can b OpenRoad example), the generally suggested way to work with an arbitrary process technology or tools plugins would be to use three configuration files, matching the three Hammer concerns - tools, tech, and design. The ``vlsi`` directory includes three such example configuration files matching the three concerns: ``example-tools.yml``, ``example-tech.yml``, and ``example-design.yml``. -The ``example-tools.yml`` file configures which EDA tools hammer will use. This example file uses Cadence Innovus, Genus and Voltus, Synopsys VCS, and Mentor Calibre (which are likely the tools you will use if you're working in the Berkeley Wireless Research Center). Note that tool versions are highly sensitive to the process-technology in-use. Hence, tool versions that work with one process technology may not work with another (for example, ASAP7 will not work with an Innovus version newer than 18.1, while other proprietary process technologies will likely require newer versions such as 19.1). +The ``example-tools.yml`` file configures which EDA tools hammer will use. This example file uses Cadence Innovus, Genus and Voltus, Synopsys VCS, and Mentor Calibre (which are likely the tools you will use if you're working in the Berkeley Wireless Research Center). Note that tool versions are highly sensitive to the process-technology in-use. Hence, tool versions that work with one process technology may not work with another. The ``example-design.yml`` file contains basic build system information (how many cores/threads to use, etc.), as well as configurations that are specific to the design we are working on such as clock signal name and frequency, power modes, floorplan, and additional constraints that we will add later on. -Finally, the ``example-tech`` file is a template file for a process technology plugin configuration. We will copy this file, and replace its fields with the appropriate process technology details for the tech plugin that we have access to. For example, for the ``asap7`` tech plugin we will replace the field with "asap7", the Node size "N" with "7", and the path to the process technology files installation directory. +Finally, the ``example-tech.yml`` file is a template file for a process technology plugin configuration. We will copy this file, and replace its fields with the appropriate process technology details for the tech plugin that we have access to. For example, for the ``asap7`` tech plugin we will replace the field with "asap7", the Node size "N" with "7", and the path to the process technology files installation directory. We recommend copying these example configuration files and customizing them with a different name, so you can have different configuration files for different process technologies and designs (e.g. create tech-tsmintel3.yml from example-tech.yml) @@ -143,12 +143,12 @@ The relevant ``make`` command would then be: Note that the width and height specification can vary widely between different modulesi and level of the module hierarchy. Make sure to set sane width and height values. Place-and-route generally requires more fine-grained input specifications regarding power nets, clock nets, pin assignments and floorplanning. While the template configuration files provide defaults for automatic tool defaults, these will usually result in very bad QoR, and therefore it is recommended to specify better-informed floorplans, pin assignments and power nets. For more information about cutomizing theses parameters, please refer to the :ref:`VLSI/Basic-Flow:Customizing Your VLSI Flow in Hammer` sections or to the Hammer documentation. -Additionally, some Hammer process technology plugins do not provide sufficient default values for requires settings such as power nets and pin assignments (for example, ASAP7). In those cases, these constraints will need to be specified manually in the top-level configuration yml files, as is the case in the ``example-asap7.yml`` configuration file. +Additionally, some Hammer process technology plugins do not provide default values for required settings such as tool paths and pin assignments (for example, ASAP7). In those cases, these constraints will need to be specified manually in the top-level configuration yml files, as is the case in the ``example-asap7.yml`` configuration file. Place-and-route tools are very sensitive to process technologes (significantly more sensitive than synthesis tools), and different process technologies may work only on specific tool versions. It is recommended to check what is the appropriate tool version for the specific process technology you are working with. -.. Note:: If you edit the yml configuration files in between synthesis and place-and-route, the `make par` command will automatically re-run synthesis. If you would like to avoid that and are confident that your configuration file changes do not affect synthesis results, you may use the `make redo-par` instead. +.. Note:: If you edit the yml configuration files in between synthesis and place-and-route, the `make par` command will automatically re-run synthesis. If you would like to avoid that and are confident that your configuration file changes do not affect synthesis results, you may use the `make redo-par` instead with the variable ``HAMMER_EXTRA_ARGS='-p '``. @@ -311,4 +311,4 @@ In this specification, ``vlsi.inputs.hierarchical.mode`` indicates the manual sp Customizing Generated Tcl Scripts ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -The ``example-vlsi`` python script is the Hammer entry script with placeholders for hooks. Hooks are additional snippets of python and TCL (via ``x.append()``) to extend the Hammer APIs. Hooks can be inserted using the ``make_pre/post/replacement_hook`` methods as shown in the ``example-vlsi`` entry script example. In this particular example, a list of hooks is paased in the ``get_extra_par_hooks`` function in the ``ExampleDriver`` class. Refer to the `Hammer documentation on hooks `__ for a detailed description of how these are injected into the VLSI flow. +The ``example-vlsi`` python script is the Hammer entry script with placeholders for hooks. Hooks are additional snippets of python and TCL (via ``x.append()``) to extend the Hammer APIs. Hooks can be inserted using the ``make_pre/post/replacement_hook`` methods as shown in the ``example-vlsi`` entry script example. In this particular example, a list of hooks is passed in the ``get_extra_par_hooks`` function in the ``ExampleDriver`` class. Refer to the `Hammer documentation on hooks `__ for a detailed description of how these are injected into the VLSI flow. diff --git a/docs/VLSI/Tutorial.rst b/docs/VLSI/Tutorial.rst index 38eee0b5..65ee0b5e 100644 --- a/docs/VLSI/Tutorial.rst +++ b/docs/VLSI/Tutorial.rst @@ -44,19 +44,18 @@ This example gives a suggested file structure and build system. The ``vlsi/`` fo * view_gds.py - * A convenience script to view a layout using gdspy. Note that this will be very slow for large layouts (e.g. a Rocket core)! + * A convenience script to view a layout using gdstk or gdspy. Note that this will be very slow for large layouts (e.g. a Rocket core)! Prerequisites ------------- * Python 3.4+ -* numpy and gdspy packages. gdspy must be version 1.4. -* Genus, Innovus, and Calibre licenses -* For ASAP7 specifically: +* numpy and `gdstk `__ or `gdspy `__ packages. Note: gdspy must be version 1.4. +* Genus, Innovus, Voltus, VCS, and Calibre licenses +* For ASAP7 specifically (`README `__ for more details): - * Download the `ASAP7 PDK v1p5 `__ tarball to a directory of choice but do not extract it. The tech plugin is configured to extract the PDK into a cache directory for you. Note: v1p5 of the PDK is not publicly available, and you will need to contact the developers for it. The v1p7 version that is `publicly released `__ currently has several critical issues which prevent it from being fully integrated into the Hammer flow. - * If you have additional ASAP7 hard macros, their LEF & GDS need to be 4x upscaled @ 4000 DBU precision. They may live outside ``extra_libraries`` at your discretion. - * Innovus version must be >= 15.2 or <= 18.1 (ISRs excluded). + * First, download the `ASAP7 v1p7 PDK `__ (we recommend shallow-cloning or downloading an archive of the repository). Then, download the `encrypted Calibre decks tarball `__ tarball to a directory of choice (e.g. the root directory of the PDK) but do not extract it like the instructions say. The tech plugin is configured to extract the tarball into a cache directory for you. + * If you have additional ASAP7 hard macros, their LEF & GDS need to be 4x upscaled @ 4000 DBU precision. Initial Setup ------------- @@ -95,13 +94,11 @@ example-vlsi ^^^^^^^^^^^^ This is the entry script with placeholders for hooks. In the ``ExampleDriver`` class, a list of hooks is passed in the ``get_extra_par_hooks``. Hooks are additional snippets of python and TCL (via ``x.append()``) to extend the Hammer APIs. Hooks can be inserted using the ``make_pre/post/replacement_hook`` methods as shown in this example. Refer to the Hammer documentation on hooks for a detailed description of how these are injected into the VLSI flow. -The ``scale_final_gds`` hook is a particularly powerful hook. It dumps a Python script provided by the ASAP7 tech plugin, an executes it within the Innovus TCL interpreter, and should be inserted after ``write_design``. This hook is necessary because the ASAP7 PDK does place-and-route using 4x upscaled LEFs for Innovus licensing reasons, thereby requiring the cells created in the post-P&R GDS to be scaled down by a factor of 4. - -example.yml +example-asap7.yml ^^^^^^^^^^^ This contains the Hammer configuration for this example project. Example clock constraints, power straps definitions, placement constraints, and pin constraints are given. Additional configuration for the extra libraries and tools are at the bottom. -First, set ``technology.asap7.tarball_dir`` to the absolute path to the directory where the downloaded the ASAP7 PDK tarball lives. +First, set ``technology.asap7.tarball_dir`` to the absolute path to the directory where the downloaded the ASAP7 Calibre deck tarball lives. If it is not in the PDK's root directory, then also set ``technology.asap7.pdk_install_dir`` and ``technology.asap7.stdcell_install_dir``. Synthesis ^^^^^^^^^ @@ -127,7 +124,7 @@ Timing reports are found in ``build/par-rundir/timingReports``. They are gzipped .. code-block:: shell - python3 view_gds.py build/chipyard.TestHarness.TinyRocketConfig/par-rundir/ChipTop.gds + ./view_gds.py build/chipyard.TestHarness.TinyRocketConfig/par-rundir/ChipTop.gds By default, this script only shows the M2 thru M4 routing. Layers can be toggled in the layout viewer's side pane and ``view_gds.py`` has a mapping of layer numbers to layer names. @@ -143,7 +140,7 @@ To run DRC & LVS, and view the results in Calibre: ./build/lvs-rundir/generated-scripts/view-lvs Some DRC errors are expected from this PDK, as explained in the `ASAP7 plugin readme `__. -Furthermore, the dummy SRAMs that are provided in this tutorial and PDK do not have any geometry inside, so will certainly cause DRC and LVS errors. +Furthermore, the dummy SRAMs that are provided in this tutorial and PDK do not have any geometry inside, so will certainly cause DRC errors. Simulation ^^^^^^^^^^ @@ -151,13 +148,11 @@ Simulation with VCS is supported, and can be run at the RTL- or gate-level (post .. code-block:: shell - make sim-rtl CONFIG=TinyRocketConfig BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/isa/rv64ui-p-simple + make sim-rtl CONFIG=TinyRocketConfig BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/isa/rv32ui-p-simple Post-synthesis and post-P&R simulations use the ``sim-syn`` and ``sim-par`` targets, respectively. -There are also ``-debug`` and ``-debug-timing``, which will instruct VCS to write a SAIF + VPD and do timing-annotated simulations, respectively. See the ``sim.mk`` file for all available targets. - -Note that for the ASAP7 example, gate-level simulations will currently timeout. +You can also append ``-debug`` and ``-debug-timing`` to the above sim targets, which will instruct VCS to write a SAIF + VPD and do timing-annotated simulations, respectively. See the ``sim.mk`` file for all available targets. Power/Rail Analysis ^^^^^^^^^^^^^^^^^^^ @@ -169,4 +164,4 @@ Post-P&R power and rail (IR drop) analysis is supported with Voltus: If you append the ``BINARY`` variable to the command, it will use the activity file generated from a ``sim--debug`` run and report dynamic power & IR drop from the toggles encoded in the waveform. -Note that for ASAP7, to bypass gate-level simulation, you will need to run the power tool manually (see the generated commands in the generated ``hammer.d`` buildfile). Static and active (vectorless) power & IR drop will be reported. +Note that power and rail analysis can also be run without gate-level simulation, but you will need to run the power tool manually (see the generated commands in the generated ``hammer.d`` buildfile). Only static and active (vectorless) power & IR drop will be reported. From 9f4f4144f40e6c2fc43147ab11a372242b551875 Mon Sep 17 00:00:00 2001 From: Harrison Liew Date: Tue, 3 Aug 2021 15:40:30 -0700 Subject: [PATCH 086/267] Basic-Flow update --- docs/VLSI/Basic-Flow.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/VLSI/Basic-Flow.rst b/docs/VLSI/Basic-Flow.rst index 8943af95..3969f7db 100644 --- a/docs/VLSI/Basic-Flow.rst +++ b/docs/VLSI/Basic-Flow.rst @@ -148,7 +148,7 @@ Additionally, some Hammer process technology plugins do not provide default valu Place-and-route tools are very sensitive to process technologes (significantly more sensitive than synthesis tools), and different process technologies may work only on specific tool versions. It is recommended to check what is the appropriate tool version for the specific process technology you are working with. -.. Note:: If you edit the yml configuration files in between synthesis and place-and-route, the `make par` command will automatically re-run synthesis. If you would like to avoid that and are confident that your configuration file changes do not affect synthesis results, you may use the `make redo-par` instead with the variable ``HAMMER_EXTRA_ARGS='-p '``. +.. Note:: If you edit the yml configuration files in between synthesis and place-and-route, the ``make par`` command will automatically re-run synthesis. If you would like to avoid that and are confident that your configuration file changes do not affect synthesis results, you may use the ``make redo-par`` command instead with the variable ``HAMMER_EXTRA_ARGS='-p '``. From 418ddc1a29fa84ba0499e8109c58400a4a0f8a50 Mon Sep 17 00:00:00 2001 From: Harrison Liew Date: Tue, 3 Aug 2021 15:44:44 -0700 Subject: [PATCH 087/267] view_gds.py update --- docs/VLSI/Tutorial.rst | 2 +- vlsi/view_gds.py | 21 ++++++++++----------- 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/docs/VLSI/Tutorial.rst b/docs/VLSI/Tutorial.rst index 65ee0b5e..f69e5469 100644 --- a/docs/VLSI/Tutorial.rst +++ b/docs/VLSI/Tutorial.rst @@ -44,7 +44,7 @@ This example gives a suggested file structure and build system. The ``vlsi/`` fo * view_gds.py - * A convenience script to view a layout using gdstk or gdspy. Note that this will be very slow for large layouts (e.g. a Rocket core)! + * A convenience script to view a layout using gdstk or gdspy. Only use this for small layouts (i.e. smaller than the TinyRocketConfig example) since the gdstk-produced SVG will be too big and gdspy's GUI is very slow for large layouts! Prerequisites ------------- diff --git a/vlsi/view_gds.py b/vlsi/view_gds.py index 746513f4..fc33527b 100755 --- a/vlsi/view_gds.py +++ b/vlsi/view_gds.py @@ -4,17 +4,16 @@ import sys, os, subprocess print('Loading GDS...') -#try: -# # gdstk created SVG -# import gdstk -#except ImportError: -# try: -# import gdspy -# import tkinter -# except ImportError: -# print('Bad gdspy (requires tkinter) installation!') -# sys.exit() -import gdspy +try: + # gdstk created SVG + import gdstk +except ImportError: + try: + import gdspy + import tkinter + except ImportError: + print('Bad gdspy (requires tkinter) installation!') + sys.exit() if 'gdstk' in sys.modules: svg_file = os.path.splitext(str(sys.argv[1]))[0] + '.svg' From a02965c9754d5e76d97a9caf758a4a64cb751e23 Mon Sep 17 00:00:00 2001 From: Harrison Liew Date: Tue, 3 Aug 2021 15:48:02 -0700 Subject: [PATCH 088/267] underline fix --- docs/VLSI/Tutorial.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/VLSI/Tutorial.rst b/docs/VLSI/Tutorial.rst index f69e5469..ccf7eb39 100644 --- a/docs/VLSI/Tutorial.rst +++ b/docs/VLSI/Tutorial.rst @@ -95,7 +95,7 @@ example-vlsi This is the entry script with placeholders for hooks. In the ``ExampleDriver`` class, a list of hooks is passed in the ``get_extra_par_hooks``. Hooks are additional snippets of python and TCL (via ``x.append()``) to extend the Hammer APIs. Hooks can be inserted using the ``make_pre/post/replacement_hook`` methods as shown in this example. Refer to the Hammer documentation on hooks for a detailed description of how these are injected into the VLSI flow. example-asap7.yml -^^^^^^^^^^^ +^^^^^^^^^^^^^^^^^ This contains the Hammer configuration for this example project. Example clock constraints, power straps definitions, placement constraints, and pin constraints are given. Additional configuration for the extra libraries and tools are at the bottom. First, set ``technology.asap7.tarball_dir`` to the absolute path to the directory where the downloaded the ASAP7 Calibre deck tarball lives. If it is not in the PDK's root directory, then also set ``technology.asap7.pdk_install_dir`` and ``technology.asap7.stdcell_install_dir``. From d3867f2cf0ba8e3ccfe8e30ae9e399249ec958ae Mon Sep 17 00:00:00 2001 From: dpgrubb13 Date: Wed, 27 Oct 2021 13:39:59 -0700 Subject: [PATCH 089/267] asap7 docs change and hammer submodules bump --- docs/VLSI/Basic-Flow.rst | 26 +++++++++++++------------- vlsi/hammer | 2 +- vlsi/hammer-cadence-plugins | 2 +- vlsi/hammer-synopsys-plugins | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/docs/VLSI/Basic-Flow.rst b/docs/VLSI/Basic-Flow.rst index 3969f7db..8ac01523 100644 --- a/docs/VLSI/Basic-Flow.rst +++ b/docs/VLSI/Basic-Flow.rst @@ -12,7 +12,7 @@ In the Chipyard root, run: .. code-block:: shell ./scripts/init-vlsi.sh - + This will pull the Hammer & CAD tool plugin submodules, assuming the technology plugins are available on github. Currently only the asap7 technology plugin is available on github. If you have additional private technology plugins (this is a typical use-case for proprietry process technologies with require NDAs and secure servers), you can clone them directly @@ -40,17 +40,17 @@ Setting up the Hammer Configuration Files -------------------------------------------- The first configuration file that needs to be set up is the Hammer environment configuration file ``env.yml``. In this file you need to set the paths to the EDA tools and license servers you will be using. You do not have to fill all the fields in this configuration file, you only need to fill in the paths for the tools that you will be using. -If you are working within a shared server farm environment with an LSF cluster setup (for example, the Berkeley Wireless Research Center), please note the additional possible environment configuration listed in the :ref:`VLSI/Basic-Flow:Advanced Environment Setup` segment of this documentation page. +If you are working within a shared server farm environment with an LSF cluster setup (for example, the Berkeley Wireless Research Center), please note the additional possible environment configuration listed in the :ref:`VLSI/Basic-Flow:Advanced Environment Setup` segment of this documentation page. Hammer relies on YAML-based configuration files. While these configuration can be consolidated within a single files (as is the case in the ASAP7 tutorial :ref:`tutorial` and the ``nangate45`` -OpenRoad example), the generally suggested way to work with an arbitrary process technology or tools plugins would be to use three configuration files, matching the three Hammer concerns - tools, tech, and design. +OpenRoad example), the generally suggested way to work with an arbitrary process technology or tools plugins would be to use three configuration files, matching the three Hammer concerns - tools, tech, and design. The ``vlsi`` directory includes three such example configuration files matching the three concerns: ``example-tools.yml``, ``example-tech.yml``, and ``example-design.yml``. The ``example-tools.yml`` file configures which EDA tools hammer will use. This example file uses Cadence Innovus, Genus and Voltus, Synopsys VCS, and Mentor Calibre (which are likely the tools you will use if you're working in the Berkeley Wireless Research Center). Note that tool versions are highly sensitive to the process-technology in-use. Hence, tool versions that work with one process technology may not work with another. The ``example-design.yml`` file contains basic build system information (how many cores/threads to use, etc.), as well as configurations that are specific to the design we are working on such as clock signal name and frequency, power modes, floorplan, and additional constraints that we will add later on. -Finally, the ``example-tech.yml`` file is a template file for a process technology plugin configuration. We will copy this file, and replace its fields with the appropriate process technology details for the tech plugin that we have access to. For example, for the ``asap7`` tech plugin we will replace the field with "asap7", the Node size "N" with "7", and the path to the process technology files installation directory. +Finally, the ``example-tech.yml`` file is a template file for a process technology plugin configuration. We will copy this file, and replace its fields with the appropriate process technology details for the tech plugin that we have access to. For example, for the ``asap7`` tech plugin, we will replace the field with "asap7" and the path to the process technology files installation directory. The technology plugin (which for ASAP7 is within Hammer) will define the technology node and other parameters. We recommend copying these example configuration files and customizing them with a different name, so you can have different configuration files for different process technologies and designs (e.g. create tech-tsmintel3.yml from example-tech.yml) @@ -60,10 +60,10 @@ Building the Design After we have set the configuration files, we will now elaborate our Chipyard Chisel design into Verilog, while also performing the required transformations in order to make the Verilog VLSI-friendly. Additionally, we will automatically generate another set of Hammer configuration files matching to this design, which will be used in order to configure the physical design tools. We will do so by calling ``make buildfile`` with appropriate Chipyard configuration variables and Hammer configuration files. -As in the rest of the Chipyard flows, we specify our SoC configuration using the ``CONFIG`` make variable. +As in the rest of the Chipyard flows, we specify our SoC configuration using the ``CONFIG`` make variable. However, unlike the rest of the Chipyard flows, in the case of physical design we might be interested in working in a hierarchical fashion and therefore we would like to work on a single module. Therefore, we can also specify a ``VLSI_TOP`` make variable with the same of a specific Verilog module (which should also match the name of the equivalent Chisel module) which we would like to work on. -The makefile will automatically call tools such as Barstools and the MacroCompiler (:ref:`Tools/Barstools:barstools`) in order to make the generated Verilog more VLSI friendly. +The makefile will automatically call tools such as Barstools and the MacroCompiler (:ref:`Tools/Barstools:barstools`) in order to make the generated Verilog more VLSI friendly. By default, the MacroCompiler will attempt to map memories into the SRAM options within the Hammer technology plugin. However, if you are working with a new process technology and prefer to work with flip-flop arrays, you can configure the MacroCompiler using the ``MACROCOMPILER_MODE`` make variable. For example, if your technology plugin does not have an SRAM compiler ready, you can use the ``MACROCOMPILER_MODE='--mode synflops'`` option (Note that synthesizing a design with only flipflops is very slow and will often may not meet constraints). We call the ``make buildfile`` command while also specifying the name of the process technology we are working with (same ``tech_name`` for the configuration files and plugin name) and the configuration files we created. Note, in the ASAP7 tutorial ((:ref:`tutorial`)) these configuration files are merged into a single file called ``example-asap7.yml``. @@ -88,7 +88,7 @@ Running a basic VLSI flow using the Hammer default configurations is fairly simp Synthesis ^^^^^^^^^ -In order to run synthesis, we run ``make syn`` with the matching Make variables. +In order to run synthesis, we run ``make syn`` with the matching Make variables. Post-synthesis logs and collateral will be saved in ``build//syn-rundir``. The raw QoR data (area, timing, gate counts, etc.) will be found in ``build//syn-rundir/reports``. Hence, if we want to monolithically synthesize the entire SoC, the relevant command would be: @@ -142,7 +142,7 @@ The relevant ``make`` command would then be: make par CONFIG=GemminiRocketConfig VLSI_TOP=Gemmini tech_name=tsmintel3 INPUT_CONFS="example-design.yml example-tools.yml example-tech.yml" Note that the width and height specification can vary widely between different modulesi and level of the module hierarchy. Make sure to set sane width and height values. -Place-and-route generally requires more fine-grained input specifications regarding power nets, clock nets, pin assignments and floorplanning. While the template configuration files provide defaults for automatic tool defaults, these will usually result in very bad QoR, and therefore it is recommended to specify better-informed floorplans, pin assignments and power nets. For more information about cutomizing theses parameters, please refer to the :ref:`VLSI/Basic-Flow:Customizing Your VLSI Flow in Hammer` sections or to the Hammer documentation. +Place-and-route generally requires more fine-grained input specifications regarding power nets, clock nets, pin assignments and floorplanning. While the template configuration files provide defaults for automatic tool defaults, these will usually result in very bad QoR, and therefore it is recommended to specify better-informed floorplans, pin assignments and power nets. For more information about cutomizing theses parameters, please refer to the :ref:`VLSI/Basic-Flow:Customizing Your VLSI Flow in Hammer` sections or to the Hammer documentation. Additionally, some Hammer process technology plugins do not provide default values for required settings such as tool paths and pin assignments (for example, ASAP7). In those cases, these constraints will need to be specified manually in the top-level configuration yml files, as is the case in the ``example-asap7.yml`` configuration file. Place-and-route tools are very sensitive to process technologes (significantly more sensitive than synthesis tools), and different process technologies may work only on specific tool versions. It is recommended to check what is the appropriate tool version for the specific process technology you are working with. @@ -175,10 +175,10 @@ The simulation-extracted power estimation flow implicitly uses Hammer's gate-lev Signoff ^^^^^^^^^ -During chip tapeout, you will need to perform sign-off check to make sure the generated GDSII can be fabricated as intended. This is done using dedicated signoff tools that perform design rule checking (DRC) and layout versus schematic (LVS) verification. -In most cases, placed-and-routed designs will not pass DRC and LVS on first attempts due to nuanced design rules and subtle/silent failures of the place-and-route tools. Passing DRC and LVS will often requires adding manual placement constraints to "force" the EDA tools into certain patterns. +During chip tapeout, you will need to perform sign-off check to make sure the generated GDSII can be fabricated as intended. This is done using dedicated signoff tools that perform design rule checking (DRC) and layout versus schematic (LVS) verification. +In most cases, placed-and-routed designs will not pass DRC and LVS on first attempts due to nuanced design rules and subtle/silent failures of the place-and-route tools. Passing DRC and LVS will often requires adding manual placement constraints to "force" the EDA tools into certain patterns. If you have placed-and-routed a design with the goal of getting area and power estimates, DRC and LVS are not strictly neccessary and the results will likely be quite similar. If you are intending to tapeout and fabricate a chip, DRC and LVS are mandatory and will likely requires multiple-iterations of refining manual placement constraints. -Having a large number of DRC/LVS violations can have a significant impact on the runtime of the place-and-route procedure (since the tools will try to fix each of them several times). A large number of DRC/LVS violations may also be an indication that the design is not necessarily realistic for this particular process technology, which may have power/area implications. +Having a large number of DRC/LVS violations can have a significant impact on the runtime of the place-and-route procedure (since the tools will try to fix each of them several times). A large number of DRC/LVS violations may also be an indication that the design is not necessarily realistic for this particular process technology, which may have power/area implications. Since signoff checks are required only for a complete chip tapeout, they are currently not fully automated in Hammer, and often require some additional manual inclusion of custom Makefiles associated with specific process technologies. However, the general steps from running signoff within Hammer (under the assumption of a fully automated tech plug-in) are Make commands similar to the previous steps. @@ -193,7 +193,7 @@ DRC does not emit easily audited reports, as the rule names violated can be quit In order to run LVS, the relevant ``make`` command is ``make lvs``. As in the previous stages, the make command should be accompanied by the relevant configuration Make variables: - + .. code-block:: shell make lvs CONFIG=GemminiRocketConfig VLSI_TOP=Gemmini tech_name=tsmintel3 INPUT_CONFS="example-design.yml example-tools.yml example-tech.yml" @@ -228,7 +228,7 @@ If you have access to a shared LSF cluster and you would like Hammer to submit i Composing a Hierarchical Design ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -For large designs, a monolithic VLSI flow may take the EDA tools a very long time to process and optimize, to the extent that it may not be feasable sometimes. +For large designs, a monolithic VLSI flow may take the EDA tools a very long time to process and optimize, to the extent that it may not be feasable sometimes. Hammer supports a hierarchical physical design flow, which decomposes the design into several specified sub-components and runs the flow on each sub-components separetly. Hammer is then able to assemble these blocks together into a top-level design. This hierarchical approach speeds up the VLSI flow for large designs, especially designs in which there may me multiple instantiations of the same sub-components(since the sub-component can simply be replicated in the layout). While hierarchical physical design can be performed in multiple ways (top-down, bottom-up, abutment etc.), Hammer currently supports only the bottom-up approach. The bottom-up approach traverses a tree representing the hierarchy starting from the leaves and towards the direction of the root (the "top level"), and runs the physical design flow on each node of the hierarchy tree using the previously layed-out children nodes. diff --git a/vlsi/hammer b/vlsi/hammer index 3b3061d8..95428fb4 160000 --- a/vlsi/hammer +++ b/vlsi/hammer @@ -1 +1 @@ -Subproject commit 3b3061d8a4d7170d89673d3356f0109cbc6d3a1a +Subproject commit 95428fb44f3d8eda395b496dbdd4e04689e08acb diff --git a/vlsi/hammer-cadence-plugins b/vlsi/hammer-cadence-plugins index b9acde1d..84fe5968 160000 --- a/vlsi/hammer-cadence-plugins +++ b/vlsi/hammer-cadence-plugins @@ -1 +1 @@ -Subproject commit b9acde1d06f567e356e4c8ab401d068f70735fa7 +Subproject commit 84fe59682ce326fba27624a383d8b5c3ba0716af diff --git a/vlsi/hammer-synopsys-plugins b/vlsi/hammer-synopsys-plugins index 5825e6dc..e9355168 160000 --- a/vlsi/hammer-synopsys-plugins +++ b/vlsi/hammer-synopsys-plugins @@ -1 +1 @@ -Subproject commit 5825e6dc4b935e0c1ce3030dc7a94bd8d90ee5eb +Subproject commit e9355168f636e5bc8e5d7df66b286993be817823 From fd09d8d3489d12f2115818dfc60564928ba2b60f Mon Sep 17 00:00:00 2001 From: Nathan Pemberton Date: Mon, 1 Nov 2021 13:25:22 -0400 Subject: [PATCH 090/267] Bump firemarshal to get a number of fixes. Most importantly get the jlevel fix that causes crashes on some systems (https://github.com/firesim/FireMarshal/pull/207). --- software/firemarshal | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/software/firemarshal b/software/firemarshal index daf1040c..73f17936 160000 --- a/software/firemarshal +++ b/software/firemarshal @@ -1 +1 @@ -Subproject commit daf1040c0f0ec449734cd183be876880357644fc +Subproject commit 73f17936e7bd4dcd01175181496bf814b692ac5f From ff9efb96511d33ba91b138041014658661cdefeb Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Tue, 2 Nov 2021 11:19:59 -0700 Subject: [PATCH 091/267] Modify GH Issues - Only support bug report + feature requests - Direct people to relevant docs/question places --- .github/ISSUE_TEMPLATE/bug-report.md | 21 ------ .github/ISSUE_TEMPLATE/bug-report.yml | 74 ++++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 11 ++++ .github/ISSUE_TEMPLATE/feature-request.md | 13 ---- .github/ISSUE_TEMPLATE/feature-request.yml | 27 ++++++++ .github/ISSUE_TEMPLATE/other.md | 6 -- .github/ISSUE_TEMPLATE/question.md | 18 ------ 7 files changed, 112 insertions(+), 58 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/bug-report.md create mode 100644 .github/ISSUE_TEMPLATE/bug-report.yml create mode 100644 .github/ISSUE_TEMPLATE/config.yml delete mode 100644 .github/ISSUE_TEMPLATE/feature-request.md create mode 100644 .github/ISSUE_TEMPLATE/feature-request.yml delete mode 100644 .github/ISSUE_TEMPLATE/other.md delete mode 100644 .github/ISSUE_TEMPLATE/question.md diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md deleted file mode 100644 index 959b6306..00000000 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ /dev/null @@ -1,21 +0,0 @@ ---- -name: Bug Report -about: Report a problem with Chipyard -labels: bug - ---- - - -**Impact**: rtl | software | unknown | other - -**Tell us about your environment:** -*Chipyard Version:* -*OS:* -*Other:* - -**What is the current behavior?** - -**What is the expected behavior?** - -**Other information** - diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml new file mode 100644 index 00000000..4d6e6a78 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug-report.yml @@ -0,0 +1,74 @@ +name: Bug Report +description: File a bug report +labels: ["bug"] +body: + - type: checkboxes + attributes: + label: Background Work + description: Yes, I searched the following areas for a prior solution. + options: + - label: Yes, I searched the [mailing list](https://groups.google.com/forum/#!forum/chipyard) + required: true + - label: Yes, I searched [prior issues](https://github.com/ucb-bar/chipyard/issues) + required: true + - label: Yes, I searched the [documentation](https://chipyard.readthedocs.io/) + required: true + + - type: textarea + attributes: + label: Chipyard Version and Hash + description: Repository version for reproducibility + placeholder: Version + Hash + value: | + Release: 1.5.0 + Hash: a6a6a6 + validations: + required: true + + - type: textarea + attributes: + label: OS Setup + description: OS setup for reproducibility + placeholder: OS information + value: | + Ex: Output of `uname -a` and `lsb_release -a` + validations: + required: true + + - type: textarea + attributes: + label: Other Setup + description: Any other setup relevant + placeholder: Other setup + value: | + Ex: Prior steps taken / Documentation Followed / etc... + validations: + required: false + + - type: textarea + attributes: + label: Current Behavior + description: A concise description of what you're experiencing. + validations: + required: true + + - type: textarea + attributes: + label: Expected Behavior + description: A concise description of what you expected to happen. + validations: + required: true + + - type: textarea + attributes: + label: Other Information + description: Other information needed to reproduce the issue. + placeholder: | + Detailed explanations + Stack traces + Log files. Tip - You can add images / log files by clicking this area to highlight it and then dragging files in + Related issues + Suggestions on fixes + Other links + validations: + required: false diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..79f95b52 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,11 @@ +blank_issues_enabled: false +contact_links: + - name: Chipyard Mailing List + url: https://groups.google.com/forum/#!forum/chipyard + about: Please ask and answer questions here. + - name: Rocket Chip Support + url: https://github.com/chipsalliance/rocket-chip/issues + about: Please ask and answer questions here. + - name: Chisel Support + url: https://www.chisel-lang.org/community.html + about: Please ask and answer questions here. diff --git a/.github/ISSUE_TEMPLATE/feature-request.md b/.github/ISSUE_TEMPLATE/feature-request.md deleted file mode 100644 index 70e2081d..00000000 --- a/.github/ISSUE_TEMPLATE/feature-request.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Feature Request -about: Propose a change to Chipyard - ---- - - -**Impact**: rtl | software | unknown | other - -**Description** - - -**What is a motivating example for changing the behavior?** diff --git a/.github/ISSUE_TEMPLATE/feature-request.yml b/.github/ISSUE_TEMPLATE/feature-request.yml new file mode 100644 index 00000000..4683ecc6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature-request.yml @@ -0,0 +1,27 @@ +name: Feature Request +description: File a feature request +labels: ["enhancement"] +body: + - type: checkboxes + attributes: + label: Background Work + description: Yes, I searched the following areas for a prior feature/solution to this problem. + options: + - label: Yes, I searched the [mailing list](https://groups.google.com/forum/#!forum/chipyard) + required: true + - label: Yes, I searched the [documentation](https://chipyard.readthedocs.io/) + required: true + + - type: textarea + attributes: + label: Feature Description + description: Description of feature wanted + validations: + required: true + + - type: textarea + attributes: + label: Motivating Example + description: A concise example demonstrating the feature. + validations: + required: true diff --git a/.github/ISSUE_TEMPLATE/other.md b/.github/ISSUE_TEMPLATE/other.md deleted file mode 100644 index b41a5e5c..00000000 --- a/.github/ISSUE_TEMPLATE/other.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -name: Other -about: Something else! - ---- - diff --git a/.github/ISSUE_TEMPLATE/question.md b/.github/ISSUE_TEMPLATE/question.md deleted file mode 100644 index f1b4e218..00000000 --- a/.github/ISSUE_TEMPLATE/question.md +++ /dev/null @@ -1,18 +0,0 @@ ---- -name: Question -about: Ask a question -labels: question - ---- - - - - - - - - - From 862099ab1106c80c39c5f356fa3d9e391375464f Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Tue, 2 Nov 2021 16:01:44 -0700 Subject: [PATCH 092/267] Fix custom MODEL feature Previously, the TestDriver would set MODEL to TestHarness if unset. This fixes the feature to let us set MODEL from the makefile. --- vcs.mk | 1 + 1 file changed, 1 insertion(+) diff --git a/vcs.mk b/vcs.mk index c3ba6da6..e62b3f07 100644 --- a/vcs.mk +++ b/vcs.mk @@ -50,6 +50,7 @@ PREPROC_DEFINES = \ +define+RESET_DELAY=$(RESET_DELAY) \ +define+PRINTF_COND=$(TB).printf_cond \ +define+STOP_COND=!$(TB).reset \ + +define+MODEL=$(MODEL) \ +define+RANDOMIZE_MEM_INIT \ +define+RANDOMIZE_REG_INIT \ +define+RANDOMIZE_GARBAGE_ASSIGN \ From a55594bd0c1feda0fd9c8aef1dc5cd7e4b1e13d3 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Wed, 3 Nov 2021 11:24:37 -0700 Subject: [PATCH 093/267] Update pull request template [ci skip] --- .github/PULL_REQUEST_TEMPLATE.md | 23 ++++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 4949e777..b10927ba 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,10 +1,27 @@ -**Related issue**: +**Related PRs / Issues **: + -**Type of change**: bug fix | new feature | other enhancement +**Type of change**: +- [ ] bug fix +- [ ] new feature +- [ ] other enhancement -**Impact**: rtl change | software change | unknown | other +**Impact**: +- [ ] rtl change +- [ ] software change +- [ ] unknown +- [ ] other + + +**Contributer Checklist**: +- [ ] Did you set `dev` as the base branch? +- [ ] Did you add documentation for the feature? +- [ ] Did you add a test demonstrating the PR? +- [ ] Did you delete any extraneous prints/debugging code? + +- [ ] (If applicable) Did you mark the PR as "Please Backport"? **Release Notes** From e1b9f938f0857a666dc1e3a3e1ef8a503686f528 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Thu, 4 Nov 2021 16:54:30 -0700 Subject: [PATCH 094/267] Small changes [ci skip] --- .github/PULL_REQUEST_TEMPLATE.md | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index b10927ba..34fd6ebd 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -3,23 +3,25 @@ **Type of change**: -- [ ] bug fix -- [ ] new feature -- [ ] other enhancement +- [ ] Bug fix +- [ ] New feature +- [ ] Other enhancement **Impact**: -- [ ] rtl change -- [ ] software change -- [ ] unknown -- [ ] other +- [ ] RTL change +- [ ] Software change (RISC-V software) +- [ ] Build system change +- [ ] Other - -**Contributer Checklist**: + +**Contributor Checklist**: +- [ ] Yes, I specified the "Type of Change" +- [ ] Yes, I specified the "Impact" - [ ] Did you set `dev` as the base branch? -- [ ] Did you add documentation for the feature? -- [ ] Did you add a test demonstrating the PR? - [ ] Did you delete any extraneous prints/debugging code? +- [ ] (If applicable) Did you add documentation for the feature? +- [ ] (If applicable) Did you add a test demonstrating the PR? - [ ] (If applicable) Did you mark the PR as "Please Backport"? From c90576288a6e1c3c7a83f8cd534c699ccc8d4e44 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Thu, 4 Nov 2021 17:43:26 -0700 Subject: [PATCH 095/267] Address reviewer comments [ci skip] --- .github/PULL_REQUEST_TEMPLATE.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 34fd6ebd..b3c1c40f 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -16,8 +16,6 @@ **Contributor Checklist**: -- [ ] Yes, I specified the "Type of Change" -- [ ] Yes, I specified the "Impact" - [ ] Did you set `dev` as the base branch? - [ ] Did you delete any extraneous prints/debugging code? - [ ] (If applicable) Did you add documentation for the feature? From 2c4b1dae652df0256ed6cf194e68b63e050c8351 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Thu, 4 Nov 2021 22:33:52 -0700 Subject: [PATCH 096/267] Use Chipyard top-level README | Add README Quick Links + Update resources [ci skip] --- .github/{README.md => README} | 0 README.md | 14 +++++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) rename .github/{README.md => README} (100%) diff --git a/.github/README.md b/.github/README similarity index 100% rename from .github/README.md rename to .github/README diff --git a/README.md b/README.md index d231a73c..fe8f54a7 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,13 @@ ![CHIPYARD](https://github.com/ucb-bar/chipyard/raw/master/docs/_static/images/chipyard-logo-full.png) # Chipyard Framework [![Test](https://github.com/ucb-bar/chipyard/workflows/chipyard-ci-process/badge.svg?style=svg)](https://github.com/ucb-bar/chipyard/actions) + +## Quick Links + +* **DOCUMENTATION**: https://chipyard.readthedocs.io/ +* **USER QUESTION FORUM**: https://groups.google.com/forum/#!forum/chipyard +* **BUGS AND FEATURE-REQUESTS**: https://github.com/ucb-bar/chipyard/issues + ## Using Chipyard To get started using Chipyard, see the documentation on the Chipyard documentation site: https://chipyard.readthedocs.io/ @@ -16,13 +23,14 @@ Chipyard is actively developed in the [Berkeley Architecture Research Group][ucb ## Resources * Chipyard Documentation: https://chipyard.readthedocs.io/ -* Chipyard Basics slides: https://fires.im/micro19-slides-pdf/02_chipyard_basics.pdf -* Chipyard Tutorial Exercise slides: https://fires.im/micro19-slides-pdf/03_building_custom_socs.pdf +* Chipyard (x FireSim) Tutorial: https://fires.im/tutorial +* Chipyard Basics slides: https://fires.im/micro21-slides-pdf/02_chipyard_basics.pdf +* Chipyard Tutorial Exercise slides: https://fires.im/micro21-slides-pdf/03_building_custom_socs.pdf ## Need help? * Join the Chipyard Mailing List: https://groups.google.com/forum/#!forum/chipyard -* If you find a bug, post an issue on this repo +* If you find a bug or would like propose a feature, post an issue on this repo: https://github.com/ucb-bar/chipyard/issues ## Contributing From bb5bcc7aaef266503b6f4308c97097e79fd1c255 Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Thu, 4 Nov 2021 22:40:52 -0700 Subject: [PATCH 097/267] Rename CI README to CI_README.md [ci skip] --- .github/{README => CI_README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{README => CI_README.md} (100%) diff --git a/.github/README b/.github/CI_README.md similarity index 100% rename from .github/README rename to .github/CI_README.md From 99f1a3aed3ce9119110ab7db919b83625218bc15 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Fri, 12 Nov 2021 12:09:02 -0800 Subject: [PATCH 098/267] Separate the base SBT command from the --client addition This makes it easier to override just SBT_BIN and still use the ENABLE_SBT_THIN_CLIENT flag when using a downloaded SBT script --- common.mk | 2 +- variables.mk | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index ceddb765..157bb9a3 100644 --- a/common.mk +++ b/common.mk @@ -18,7 +18,7 @@ HELP_COMPILATION_VARIABLES += \ " EXTRA_SIM_LDFLAGS = additional LDFLAGS for building simulators" \ " EXTRA_SIM_SOURCES = additional simulation sources needed for simulator" \ " EXTRA_SIM_REQS = additional make requirements to build the simulator" \ -" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best with sbtn or sbt script)" \ +" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best when overridding SBT_BIN with sbt script)" \ " EXTRA_CHISEL_OPTIONS = additional options to pass to the Chisel compiler" \ " EXTRA_FIRRTL_OPTIONS = additional options to pass to the FIRRTL compiler" diff --git a/variables.mk b/variables.mk index 1279c28e..02b2c6be 100644 --- a/variables.mk +++ b/variables.mk @@ -175,7 +175,8 @@ override SCALA_BUILDTOOL_DEPS += $(SBT_THIN_CLIENT_TIMESTAMP) SBT_CLIENT_FLAG = --client endif -SBT ?= java $(JAVA_TOOL_OPTIONS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS) $(SBT_CLIENT_FLAG) +SBT_BIN ?= java $(JAVA_TOOL_OPTIONS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS) +SBT ?= $(SBT_BIN) $(SBT_CLIENT_FLAG) SBT_NON_THIN ?= $(subst $(SBT_CLIENT_FLAG),,$(SBT)) define run_scala_main From f8d83dddf56eea0d67283bfea6cd18e165a8eb44 Mon Sep 17 00:00:00 2001 From: Jerry Zhao Date: Fri, 12 Nov 2021 12:23:48 -0800 Subject: [PATCH 099/267] Increase default SerialTL width to 32 (#1040) --- generators/chipyard/src/main/scala/config/AbstractConfig.scala | 1 + generators/firechip/src/main/scala/TargetConfigs.scala | 2 ++ 2 files changed, 3 insertions(+) diff --git a/generators/chipyard/src/main/scala/config/AbstractConfig.scala b/generators/chipyard/src/main/scala/config/AbstractConfig.scala index 209bcf1f..ef44a500 100644 --- a/generators/chipyard/src/main/scala/config/AbstractConfig.scala +++ b/generators/chipyard/src/main/scala/config/AbstractConfig.scala @@ -42,6 +42,7 @@ class AbstractConfig extends Config( new chipyard.iobinders.WithCustomBootPin ++ new chipyard.iobinders.WithDividerOnlyClockGenerator ++ + new testchipip.WithSerialTLWidth(32) ++ // fatten the serialTL interface to improve testing performance new testchipip.WithDefaultSerialTL ++ // use serialized tilelink port to external serialadapter/harnessRAM new chipyard.config.WithBootROM ++ // use default bootrom new chipyard.config.WithUART ++ // add a UART diff --git a/generators/firechip/src/main/scala/TargetConfigs.scala b/generators/firechip/src/main/scala/TargetConfigs.scala index 0c612cba..8ba903c6 100644 --- a/generators/firechip/src/main/scala/TargetConfigs.scala +++ b/generators/firechip/src/main/scala/TargetConfigs.scala @@ -64,6 +64,8 @@ class WithNVDLASmall extends nvidia.blocks.dla.WithNVDLA("small") // Non-frequency tweaks that are generally applied to all firesim configs class WithFireSimDesignTweaks extends Config( + // Optional: reduce the width of the Serial TL interface + new testchipip.WithSerialTLWidth(4) ++ // Required: Bake in the default FASED memory model new WithDefaultMemModel ++ // Required*: Uses FireSim ClockBridge and PeekPokeBridge to drive the system with a single clock/reset From e0fe08e266cd155d5ce6ac03d243d54dfabf65ed Mon Sep 17 00:00:00 2001 From: Abraham Gonzalez Date: Mon, 15 Nov 2021 11:40:38 -0800 Subject: [PATCH 100/267] Remove duplicate `WithUARTIOCells` [ci skip] --- generators/chipyard/src/main/scala/config/AbstractConfig.scala | 1 - 1 file changed, 1 deletion(-) diff --git a/generators/chipyard/src/main/scala/config/AbstractConfig.scala b/generators/chipyard/src/main/scala/config/AbstractConfig.scala index ef44a500..3cbeb32a 100644 --- a/generators/chipyard/src/main/scala/config/AbstractConfig.scala +++ b/generators/chipyard/src/main/scala/config/AbstractConfig.scala @@ -35,7 +35,6 @@ class AbstractConfig extends Config( new chipyard.iobinders.WithDebugIOCells ++ new chipyard.iobinders.WithUARTIOCells ++ new chipyard.iobinders.WithGPIOCells ++ - new chipyard.iobinders.WithUARTIOCells ++ new chipyard.iobinders.WithSPIIOCells ++ new chipyard.iobinders.WithTraceIOPunchthrough ++ new chipyard.iobinders.WithExtInterruptIOCells ++ From 32ffbd29df0045efb1d829732924d66003a8ad15 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Wed, 17 Nov 2021 00:38:01 -0800 Subject: [PATCH 101/267] Update make help | Small make cleanup --- common.mk | 20 +++++++++++--------- variables.mk | 17 ++++++++++++----- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/common.mk b/common.mk index 157bb9a3..3b307317 100644 --- a/common.mk +++ b/common.mk @@ -18,7 +18,7 @@ HELP_COMPILATION_VARIABLES += \ " EXTRA_SIM_LDFLAGS = additional LDFLAGS for building simulators" \ " EXTRA_SIM_SOURCES = additional simulation sources needed for simulator" \ " EXTRA_SIM_REQS = additional make requirements to build the simulator" \ -" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best when overridding SBT_BIN with sbt script)" \ +" ENABLE_SBT_THIN_CLIENT = if set, use sbt's experimental thin client (works best when overridding SBT_BIN with the mainline sbt script)" \ " EXTRA_CHISEL_OPTIONS = additional options to pass to the Chisel compiler" \ " EXTRA_FIRRTL_OPTIONS = additional options to pass to the FIRRTL compiler" @@ -41,13 +41,14 @@ NUMA_PREFIX = $(if $(filter $(NUMACTL),0),,$(shell $(base_dir)/scripts/numa_pref #---------------------------------------------------------------------------- HELP_COMMANDS += \ -" run-binary = run [./$(shell basename $(sim))] and log instructions to file" \ -" run-binary-fast = run [./$(shell basename $(sim))] and don't log instructions" \ -" run-binary-debug = run [./$(shell basename $(sim_debug))] and log instructions and waveform to files" \ -" verilog = generate intermediate verilog files from chisel elaboration and firrtl passes" \ -" firrtl = generate intermediate firrtl files from chisel elaboration" \ -" run-tests = run all assembly and benchmark tests" \ -" launch-sbt = start sbt terminal" +" run-binary = run [./$(shell basename $(sim))] and log instructions to file" \ +" run-binary-fast = run [./$(shell basename $(sim))] and don't log instructions" \ +" run-binary-debug = run [./$(shell basename $(sim_debug))] and log instructions and waveform to files" \ +" verilog = generate intermediate verilog files from chisel elaboration and firrtl passes" \ +" firrtl = generate intermediate firrtl files from chisel elaboration" \ +" run-tests = run all assembly and benchmark tests" \ +" launch-sbt = start sbt terminal" \ +" {shutdown,start}-sbt-server = shutdown or start sbt server if using ENABLE_SBT_THIN_CLIENT" \ ######################################################################################### # include additional subproject make fragments @@ -105,7 +106,7 @@ $(FIRRTL_FILE) $(ANNO_FILE): generator_temp @echo "" > /dev/null # AG: must re-elaborate if cva6 sources have changed... otherwise just run firrtl compile -generator_temp: $(SCALA_SOURCES) $(sim_files) $(EXTRA_GENERATOR_REQS) +generator_temp: $(SCALA_SOURCES) $(sim_files) $(SCALA_BUILDTOOL_DEPS) $(EXTRA_GENERATOR_REQS) mkdir -p $(build_dir) $(call run_scala_main,$(SBT_PROJECT),$(GENERATOR_PACKAGE).Generator,\ --target-dir $(build_dir) \ @@ -279,6 +280,7 @@ SBT_COMMAND ?= shell launch-sbt: cd $(base_dir) && $(SBT_NON_THIN) "$(SBT_COMMAND)" +.PHONY: check-thin-client check-thin-client: ifeq (,$(ENABLE_SBT_THIN_CLIENT)) $(error ENABLE_SBT_THIN_CLIENT not set.) diff --git a/variables.mk b/variables.mk index 02b2c6be..9ba9f4a3 100644 --- a/variables.mk +++ b/variables.mk @@ -3,7 +3,13 @@ # - to use the help text, your Makefile should have a 'help' target that just # prints all the HELP_LINES ######################################################################################### -HELP_COMPILATION_VARIABLES = +HELP_COMPILATION_VARIABLES = \ +" JAVA_HEAP_SIZE = if overridden, set the default java heap size (default is 8G)" \ +" JAVA_TOOL_OPTIONS = if overridden, set underlying java tool options (default sets misc. sizes and tmp dir)" \ +" SBT_OPTS = if overridden, set underlying sbt options (default uses options in .sbtopts)" \ +" SBT_BIN = if overridden, used to invoke sbt (default is to invoke sbt by sbt-launch.jar)" \ +" FIRRTL_LOGLEVEL = if overridden, set firrtl log level (default is error)" + HELP_PROJECT_VARIABLES = \ " SUB_PROJECT = use the specific subproject default variables [$(SUB_PROJECT)]" \ " SBT_PROJECT = the SBT project that you should find the classes/packages in [$(SBT_PROJECT)]" \ @@ -169,15 +175,16 @@ SCALA_BUILDTOOL_DEPS = $(SBT_SOURCES) SBT_THIN_CLIENT_TIMESTAMP = $(base_dir)/project/target/active.json ifdef ENABLE_SBT_THIN_CLIENT -override SCALA_BUILDTOOL_DEPS += $(SBT_THIN_CLIENT_TIMESTAMP) +SCALA_BUILDTOOL_DEPS += $(SBT_THIN_CLIENT_TIMESTAMP) # enabling speeds up sbt loading # use with sbt script or sbtn to bypass error code issues SBT_CLIENT_FLAG = --client endif -SBT_BIN ?= java $(JAVA_TOOL_OPTIONS) -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS) -SBT ?= $(SBT_BIN) $(SBT_CLIENT_FLAG) -SBT_NON_THIN ?= $(subst $(SBT_CLIENT_FLAG),,$(SBT)) +# passes $(JAVA_TOOL_OPTIONS) from env to java +SBT_BIN ?= java -jar $(ROCKETCHIP_DIR)/sbt-launch.jar $(SBT_OPTS) +SBT = $(SBT_BIN) $(SBT_CLIENT_FLAG) +SBT_NON_THIN = $(subst $(SBT_CLIENT_FLAG),,$(SBT)) define run_scala_main cd $(base_dir) && $(SBT) ";project $(1); runMain $(2) $(3)" From 60ba6357a0e6ba9aacc4369395d1fbcf66a88639 Mon Sep 17 00:00:00 2001 From: chick Date: Fri, 1 Oct 2021 14:31:02 -0700 Subject: [PATCH 102/267] 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 103/267] 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 104/267] 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 105/267] 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 106/267] 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 107/267] 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 108/267] 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 109/267] 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 110/267] 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 111/267] 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 112/267] 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 113/267] 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 114/267] 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 115/267] 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 116/267] 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 117/267] 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 118/267] 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 119/267] 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 120/267] 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 121/267] 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 122/267] 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 123/267] 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 124/267] 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 125/267] 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 From 7d244d635c5f02512e8e9a3d2c0a057fdd4b0bd1 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Tue, 30 Nov 2021 19:54:54 -0800 Subject: [PATCH 126/267] Force FIRRTL 1.4.1 --- variables.mk | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/variables.mk b/variables.mk index 9ba9f4a3..d5f5cb41 100644 --- a/variables.mk +++ b/variables.mk @@ -169,6 +169,10 @@ SBT_OPTS_FILE := $(base_dir)/.sbtopts ifneq (,$(wildcard $(SBT_OPTS_FILE))) override SBT_OPTS += $(subst $$PWD,$(base_dir),$(shell cat $(SBT_OPTS_FILE))) endif +# Workaround: Specify a firrtl version in system properties so that Treadle uses a +# compatible version of FIRRTL and not 1.5-SNAPSHOT (which is the default +# specified in it's build.sbt, and is not overridden by Chipyard's build.sbt) +override SBT_OPTS += -DfirrtlVersion=1.4.1 SCALA_BUILDTOOL_DEPS = $(SBT_SOURCES) From 0a513e45794398fd97f102e720c8365882418e0d Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Wed, 1 Dec 2021 21:08:13 +0000 Subject: [PATCH 127/267] Used published dependencies for Chisel & Friends --- build.sbt | 103 +++++++++++++++++++----------------------------------- 1 file changed, 35 insertions(+), 68 deletions(-) diff --git a/build.sbt b/build.sbt index b1f7e004..509c67d7 100644 --- a/build.sbt +++ b/build.sbt @@ -17,14 +17,7 @@ lazy val commonSettings = Seq( unmanagedBase := (chipyardRoot / unmanagedBase).value, allDependencies := { // drop specific maven dependencies in subprojects in favor of Chipyard's version - val dropDeps = Seq( - ("edu.berkeley.cs", "firrtl"), - ("edu.berkeley.cs", "chisel3"), - ("edu.berkeley.cs", "rocketchip"), - ("edu.berkeley.cs", "chisel-iotesters"), - ("edu.berkeley.cs", "treadle"), - ("edu.berkeley.cs", "firrtl-interpreter")) - + val dropDeps = Seq(("edu.berkeley.cs", "rocketchip")) allDependencies.value.filterNot { dep => dropDeps.contains((dep.organization, dep.name)) } @@ -67,34 +60,23 @@ def isolateAllTests(tests: Seq[TestDefinition]) = tests map { test => new Group(test.name, Seq(test), SubProcess(options)) } toSeq +val chiselVersion = "3.4.1" + +lazy val chiselSettings = Seq( + libraryDependencies ++= Seq("edu.berkeley.cs" %% "chisel3" % chiselVersion), + addCompilerPlugin("edu.berkeley.cs" % "chisel3-plugin" % chiselVersion cross CrossVersion.full)) + +val firrtlVersion = "1.4.1" + +lazy val firrtlSettings = Seq(libraryDependencies ++= Seq("edu.berkeley.cs" %% "firrtl" % firrtlVersion)) + // Subproject definitions begin // -- Rocket Chip -- -// This needs to stay in sync with the chisel3 and firrtl git submodules -val chiselVersion = "3.4.1" -lazy val chiselRef = ProjectRef(workspaceDirectory / "chisel3", "chisel") -lazy val chiselLib = "edu.berkeley.cs" %% "chisel3" % chiselVersion -lazy val chiselLibDeps = (chiselRef / Keys.libraryDependencies) -// While not built from source, *must* be in sync with the chisel3 git submodule -// Building from source requires extending sbt-sriracha or a similar plugin and -// keeping scalaVersion in sync with chisel3 to the minor version -lazy val chiselPluginLib = "edu.berkeley.cs" % "chisel3-plugin" % chiselVersion cross CrossVersion.full - -val firrtlVersion = "1.4.1" -lazy val firrtlRef = ProjectRef(workspaceDirectory / "firrtl", "firrtl") -lazy val firrtlLib = "edu.berkeley.cs" %% "firrtl" % firrtlVersion -val firrtlLibDeps = settingKey[Seq[sbt.librarymanagement.ModuleID]]("FIRRTL Library Dependencies sans antlr4") -Global / firrtlLibDeps := { - // drop antlr4 compile dep. but keep antlr4-runtime dep. (compile needs the plugin to be setup) - (firrtlRef / Keys.libraryDependencies).value.filterNot(_.name == "antlr4") -} - - // Rocket-chip dependencies (subsumes making RC a RootProject) +// Rocket-chip dependencies (subsumes making RC a RootProject) lazy val hardfloat = (project in rocketChipDir / "hardfloat") - .sourceDependency(chiselRef, chiselLib) - .settings(addCompilerPlugin(chiselPluginLib)) - .settings(libraryDependencies ++= chiselLibDeps.value) + .settings(chiselSettings) .dependsOn(midasTargetUtils) .settings(commonSettings) .settings( @@ -126,11 +108,8 @@ lazy val rocketConfig = (project in rocketChipDir / "api-config-chipsalliance/bu ) lazy val rocketchip = freshProject("rocketchip", rocketChipDir) - .sourceDependency(chiselRef, chiselLib) - .settings(addCompilerPlugin(chiselPluginLib)) - .settings(libraryDependencies ++= chiselLibDeps.value) .dependsOn(hardfloat, rocketMacros, rocketConfig) - .settings(commonSettings) + .settings(commonSettings, chiselSettings) .settings( libraryDependencies ++= Seq( "org.scala-lang" % "scala-reflect" % scalaVersion.value, @@ -145,29 +124,27 @@ lazy val rocketchip = freshProject("rocketchip", rocketChipDir) ) lazy val rocketLibDeps = (rocketchip / Keys.libraryDependencies) + // -- Chipyard-managed External Projects -- -lazy val firrtl_interpreter = (project in file("tools/firrtl-interpreter")) - .sourceDependency(firrtlRef, firrtlLib) - .settings(commonSettings) - .settings(libraryDependencies ++= (Global / firrtlLibDeps).value) -lazy val firrtlInterpreterLibDeps = (firrtl_interpreter / Keys.libraryDependencies) - -lazy val treadle = (project in file("tools/treadle")) - .sourceDependency(firrtlRef, firrtlLib) - .settings(commonSettings) - .settings(libraryDependencies ++= (Global / firrtlLibDeps).value) -lazy val treadleLibDeps = (treadle / Keys.libraryDependencies) +// Because we're not using a release version of iotesters to work around a +// scala test version problem, override it's libdeps to prevent using snapshots +lazy val chipyardMandatedVersions = Map( + "chisel-iotesters" -> "1.5.4", + "firrtl-interpreter" -> "1.4.4", + "treadle" -> "1.3.4", + "chisel3" -> chiselVersion, + "firrtl" -> firrtlVersion +) lazy val chisel_testers = (project in file("tools/chisel-testers")) - .sourceDependency(chiselRef, chiselLib) - .settings(addCompilerPlugin(chiselPluginLib)) - .settings(libraryDependencies ++= chiselLibDeps.value) - .dependsOn(firrtl_interpreter, treadle) - .settings(libraryDependencies ++= firrtlInterpreterLibDeps.value) - .settings(libraryDependencies ++= treadleLibDeps.value) - .settings(commonSettings) -lazy val chiselTestersLibDeps = (chisel_testers / Keys.libraryDependencies) + .settings(chiselSettings) + .settings( + allDependencies := allDependencies.value.map { + case dep if chipyardMandatedVersions.isDefinedAt(dep.name) => + dep.organization %% dep.name % chipyardMandatedVersions(dep.name) + case o => o + }) // -- Normal Projects -- @@ -231,14 +208,12 @@ lazy val sodor = (project in file("generators/riscv-sodor")) lazy val sha3 = (project in file("generators/sha3")) .dependsOn(rocketchip, chisel_testers, midasTargetUtils) .settings(libraryDependencies ++= rocketLibDeps.value) - .settings(libraryDependencies ++= chiselTestersLibDeps.value) .settings(commonSettings) lazy val gemmini = (project in file("generators/gemmini")) .sourceDependency(testchipip, testchipipLib) .dependsOn(rocketchip, chisel_testers) .settings(libraryDependencies ++= rocketLibDeps.value) - .settings(libraryDependencies ++= chiselTestersLibDeps.value) .settings(commonSettings) lazy val nvdla = (project in file("generators/nvdla")) @@ -247,39 +222,31 @@ lazy val nvdla = (project in file("generators/nvdla")) .settings(commonSettings) lazy val iocell = (project in file("./tools/barstools/iocell/")) - .sourceDependency(chiselRef, chiselLib) - .settings(addCompilerPlugin(chiselPluginLib)) - .settings(libraryDependencies ++= chiselLibDeps.value) + .settings(chiselSettings) .settings(commonSettings) lazy val tapeout = (project in file("./tools/barstools/tapeout/")) .dependsOn(chisel_testers, chipyard) // must depend on chipyard to get scala resources - .settings(libraryDependencies ++= chiselTestersLibDeps.value) .settings(commonSettings) lazy val mdf = (project in file("./tools/barstools/mdf/scalalib/")) .settings(commonSettings) lazy val barstoolsMacros = (project in file("./tools/barstools/macros/")) - .sourceDependency(chiselRef, chiselLib) - .settings(addCompilerPlugin(chiselPluginLib)) - .settings(libraryDependencies ++= chiselLibDeps.value) - .dependsOn(firrtl_interpreter, mdf, chisel_testers) - .settings(libraryDependencies ++= chiselTestersLibDeps.value) - .settings(libraryDependencies ++= firrtlInterpreterLibDeps.value) + .dependsOn(mdf) .enablePlugins(sbtassembly.AssemblyPlugin) + .settings(firrtlSettings) .settings(commonSettings) lazy val dsptools = freshProject("dsptools", file("./tools/dsptools")) .dependsOn(chisel_testers) - .settings(libraryDependencies ++= chiselTestersLibDeps.value) .settings( commonSettings, libraryDependencies ++= Seq( + "org.scalatest" %% "scalatest" % "3.2.+" % "test", "org.typelevel" %% "spire" % "0.16.2", "org.scalanlp" %% "breeze" % "1.1", "junit" % "junit" % "4.13" % "test", - "org.scalatest" %% "scalatest" % "3.0.+" % "test", "org.scalacheck" %% "scalacheck" % "1.14.3" % "test", )) From 5886a848852735ca5736cc3e17b0dd8d75405aea Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Wed, 1 Dec 2021 21:29:05 +0000 Subject: [PATCH 128/267] Bump FireSim --- sims/firesim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sims/firesim b/sims/firesim index cd13db4f..7591ff12 160000 --- a/sims/firesim +++ b/sims/firesim @@ -1 +1 @@ -Subproject commit cd13db4f2006d47bf71c593b0255b32c6a0bbec5 +Subproject commit 7591ff12cf7e7afc8ae0f0d6369404ec18411621 From 804e3de41c6a5b845ef4713acf5c0dc9f8b13773 Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Wed, 1 Dec 2021 23:16:03 +0000 Subject: [PATCH 129/267] Revert "Force FIRRTL 1.4.1" This reverts commit 7d244d635c5f02512e8e9a3d2c0a057fdd4b0bd1. --- variables.mk | 4 ---- 1 file changed, 4 deletions(-) diff --git a/variables.mk b/variables.mk index d5f5cb41..9ba9f4a3 100644 --- a/variables.mk +++ b/variables.mk @@ -169,10 +169,6 @@ SBT_OPTS_FILE := $(base_dir)/.sbtopts ifneq (,$(wildcard $(SBT_OPTS_FILE))) override SBT_OPTS += $(subst $$PWD,$(base_dir),$(shell cat $(SBT_OPTS_FILE))) endif -# Workaround: Specify a firrtl version in system properties so that Treadle uses a -# compatible version of FIRRTL and not 1.5-SNAPSHOT (which is the default -# specified in it's build.sbt, and is not overridden by Chipyard's build.sbt) -override SBT_OPTS += -DfirrtlVersion=1.4.1 SCALA_BUILDTOOL_DEPS = $(SBT_SOURCES) From b1b047bdc2cf6045823743db53b6b42588ad8378 Mon Sep 17 00:00:00 2001 From: John Wright Date: Sun, 14 Nov 2021 18:31:26 -0800 Subject: [PATCH 130/267] Fix WithAXI4MMIOPunchthrough IO binder to use the SBUS instead of MBUS. Also adds a config and test --- .circleci/defaults.sh | 3 ++- generators/chipyard/src/main/scala/IOBinders.scala | 2 +- .../chipyard/src/main/scala/config/RocketConfigs.scala | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.circleci/defaults.sh b/.circleci/defaults.sh index 2d49d92a..bfb63a33 100755 --- a/.circleci/defaults.sh +++ b/.circleci/defaults.sh @@ -49,7 +49,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-ibex 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 chipyard-nomem-scratchpad" 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" @@ -80,6 +80,7 @@ mapping["tracegen-boom"]=" CONFIG=BoomTraceGenConfig" mapping["chipyard-nvdla"]=" CONFIG=SmallNVDLARocketConfig" mapping["chipyard-sodor"]=" CONFIG=Sodor5StageConfig" mapping["chipyard-multiclock-rocket"]=" CONFIG=MulticlockRocketConfig" +mapping["chipyard-nomem-scratchpad"]=" CONFIG=MMIOScratchpadOnlyRocketConfig" mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests" mapping["firesim-multiclock"]="SCALA_TEST=firesim.firesim.RocketMulticlockF1Tests" diff --git a/generators/chipyard/src/main/scala/IOBinders.scala b/generators/chipyard/src/main/scala/IOBinders.scala index 65c8754f..1903ddc3 100644 --- a/generators/chipyard/src/main/scala/IOBinders.scala +++ b/generators/chipyard/src/main/scala/IOBinders.scala @@ -297,7 +297,7 @@ class WithAXI4MMIOPunchthrough extends OverrideLazyIOBinder({ (system: CanHaveMasterAXI4MMIOPort) => { implicit val p: Parameters = GetSystemParameters(system) val clockSinkNode = p(ExtBus).map(_ => ClockSinkNode(Seq(ClockSinkParameters()))) - clockSinkNode.map(_ := system.asInstanceOf[HasTileLinkLocations].locateTLBusWrapper(MBUS).fixedClockNode) + clockSinkNode.map(_ := system.asInstanceOf[HasTileLinkLocations].locateTLBusWrapper(SBUS).fixedClockNode) def clockBundle = clockSinkNode.get.in.head._1 InModuleBody { diff --git a/generators/chipyard/src/main/scala/config/RocketConfigs.scala b/generators/chipyard/src/main/scala/config/RocketConfigs.scala index 96257838..43bb2fb2 100644 --- a/generators/chipyard/src/main/scala/config/RocketConfigs.scala +++ b/generators/chipyard/src/main/scala/config/RocketConfigs.scala @@ -143,6 +143,12 @@ class ScratchpadOnlyRocketConfig extends Config( new chipyard.config.AbstractConfig) // DOC include end: l1scratchpadrocket +class MMIOScratchpadOnlyRocketConfig extends Config( + new freechips.rocketchip.subsystem.WithDefaultMMIOPort ++ // add default external master port + new freechips.rocketchip.subsystem.WithDefaultSlavePort ++ // add default external slave port + new ScratchpadOnlyRocketConfig +) + class L1ScratchpadRocketConfig extends Config( new chipyard.config.WithRocketICacheScratchpad ++ // use rocket ICache scratchpad new chipyard.config.WithRocketDCacheScratchpad ++ // use rocket DCache scratchpad From 51480d74127b1e1f459155e88e64ef05a87e2430 Mon Sep 17 00:00:00 2001 From: abejgonzalez Date: Thu, 2 Dec 2021 20:33:56 -0800 Subject: [PATCH 131/267] Add GH-A test --- .github/scripts/defaults.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 33805e77..5d33cbf7 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-ibex 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 chipyard-nomem-scratchpad" 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" @@ -68,6 +68,7 @@ mapping["tracegen-boom"]=" CONFIG=BoomTraceGenConfig" mapping["chipyard-nvdla"]=" CONFIG=SmallNVDLARocketConfig" mapping["chipyard-sodor"]=" CONFIG=Sodor5StageConfig" mapping["chipyard-multiclock-rocket"]=" CONFIG=MulticlockRocketConfig" +mapping["chipyard-nomem-scratchpad"]=" CONFIG=MMIOScratchpadOnlyRocketConfig" mapping["firesim"]="SCALA_TEST=firesim.firesim.RocketNICF1Tests" mapping["firesim-multiclock"]="SCALA_TEST=firesim.firesim.RocketMulticlockF1Tests" From a2d88c714094ddb5ff1c0cdfea57782a4effb52d Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Sat, 4 Dec 2021 20:10:53 +0000 Subject: [PATCH 132/267] Update tutorial patches --- scripts/tutorial-patches/build.sbt.patch | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/scripts/tutorial-patches/build.sbt.patch b/scripts/tutorial-patches/build.sbt.patch index dd26bcc9..bdbb3a7e 100644 --- a/scripts/tutorial-patches/build.sbt.patch +++ b/scripts/tutorial-patches/build.sbt.patch @@ -1,8 +1,8 @@ diff --git a/build.sbt b/build.sbt -index b1f7e004..f39c3712 100644 +index c38f5180..551aa8c0 100644 --- a/build.sbt +++ b/build.sbt -@@ -184,7 +184,7 @@ lazy val testchipipLib = "edu.berkeley.cs" %% "testchipip" % "1.0-020719-SNAPSHO +@@ -169,7 +169,7 @@ lazy val testchipipLib = "edu.berkeley.cs" %% "testchipip" % "1.0-020719-SNAPSHO lazy val chipyard = (project in file("generators/chipyard")) .sourceDependency(testchipip, testchipipLib) .dependsOn(rocketchip, boom, hwacha, sifive_blocks, sifive_cache, iocell, @@ -11,19 +11,17 @@ index b1f7e004..f39c3712 100644 dsptools, `rocket-dsp-utils`, gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex) .settings(libraryDependencies ++= rocketLibDeps.value) -@@ -228,11 +228,11 @@ lazy val sodor = (project in file("generators/riscv-sodor")) +@@ -213,10 +213,10 @@ lazy val sodor = (project in file("generators/riscv-sodor")) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) -lazy val sha3 = (project in file("generators/sha3")) - .dependsOn(rocketchip, chisel_testers, midasTargetUtils) - .settings(libraryDependencies ++= rocketLibDeps.value) -- .settings(libraryDependencies ++= chiselTestersLibDeps.value) - .settings(commonSettings) +//lazy val sha3 = (project in file("generators/sha3")) +// .dependsOn(rocketchip, chisel_testers, midasTargetUtils) +// .settings(libraryDependencies ++= rocketLibDeps.value) -+// .settings(libraryDependencies ++= chiselTestersLibDeps.value) +// .settings(commonSettings) lazy val gemmini = (project in file("generators/gemmini")) From a5b412cfbcae3ed8237aab964bb03ef7ee9f4188 Mon Sep 17 00:00:00 2001 From: David Biancolin Date: Mon, 6 Dec 2021 23:36:13 +0000 Subject: [PATCH 133/267] Remove sriracha and generated .sbtopts --- .circleci/do-rtl-build.sh | 3 --- .circleci/run-firesim-scala-tests.sh | 3 --- .gitignore | 1 - build.sbt | 17 +++++------------ project/plugins.sbt | 1 - scripts/init-submodules-no-riscv-tools-nolog.sh | 2 -- variables.mk | 9 ++------- 7 files changed, 7 insertions(+), 29 deletions(-) diff --git a/.circleci/do-rtl-build.sh b/.circleci/do-rtl-build.sh index 95f3c903..3a537ea3 100755 --- a/.circleci/do-rtl-build.sh +++ b/.circleci/do-rtl-build.sh @@ -21,9 +21,6 @@ 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\"" diff --git a/.circleci/run-firesim-scala-tests.sh b/.circleci/run-firesim-scala-tests.sh index 0a74adb8..022894f2 100755 --- a/.circleci/run-firesim-scala-tests.sh +++ b/.circleci/run-firesim-scala-tests.sh @@ -29,9 +29,6 @@ mkdir -p $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) diff --git a/.gitignore b/.gitignore index 7c0f02bf..257d2c58 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,3 @@ tags env-riscv-tools.sh env-esp-tools.sh .bsp/ -.sbtopts diff --git a/build.sbt b/build.sbt index 509c67d7..d44a9243 100644 --- a/build.sbt +++ b/build.sbt @@ -156,11 +156,9 @@ lazy val testchipip = (project in file("generators/testchipip")) .dependsOn(rocketchip, sifive_blocks) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) -lazy val testchipipLib = "edu.berkeley.cs" %% "testchipip" % "1.0-020719-SNAPSHOT" lazy val chipyard = (project in file("generators/chipyard")) - .sourceDependency(testchipip, testchipipLib) - .dependsOn(rocketchip, boom, hwacha, sifive_blocks, sifive_cache, iocell, + .dependsOn(testchipip, 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, ibex) @@ -168,14 +166,12 @@ lazy val chipyard = (project in file("generators/chipyard")) .settings(commonSettings) lazy val tracegen = (project in file("generators/tracegen")) - .sourceDependency(testchipip, testchipipLib) - .dependsOn(rocketchip, sifive_cache, boom) + .dependsOn(testchipip, rocketchip, sifive_cache, boom) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) lazy val icenet = (project in file("generators/icenet")) - .sourceDependency(testchipip, testchipipLib) - .dependsOn(rocketchip) + .dependsOn(testchipip, rocketchip) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) @@ -185,8 +181,7 @@ lazy val hwacha = (project in file("generators/hwacha")) .settings(commonSettings) lazy val boom = (project in file("generators/boom")) - .sourceDependency(testchipip, testchipipLib) - .dependsOn(rocketchip) + .dependsOn(testchipip, rocketchip) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) @@ -211,8 +206,7 @@ lazy val sha3 = (project in file("generators/sha3")) .settings(commonSettings) lazy val gemmini = (project in file("generators/gemmini")) - .sourceDependency(testchipip, testchipipLib) - .dependsOn(rocketchip, chisel_testers) + .dependsOn(testchipip, rocketchip, chisel_testers) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) @@ -280,7 +274,6 @@ lazy val midas = ProjectRef(firesimDir, "midas") lazy val firesimLib = ProjectRef(firesimDir, "firesimLib") lazy val firechip = (project in file("generators/firechip")) - .sourceDependency(testchipip, testchipipLib) .dependsOn(chipyard, midasTargetUtils, midas, firesimLib % "test->test;compile->compile") .settings( commonSettings, diff --git a/project/plugins.sbt b/project/plugins.sbt index 7e6f3aa8..026b95e9 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,5 +11,4 @@ addSbtPlugin("com.simplytyped" % "sbt-antlr4" % "0.8.2") addSbtPlugin("com.github.gseitz" % "sbt-protobuf" % "0.6.3") addSbtPlugin("ch.epfl.scala" % "sbt-scalafix" % "0.9.21") addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "0.6.1") -addSbtPlugin("com.eed3si9n" % "sbt-sriracha" % "0.1.0") addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.2.5" ) diff --git a/scripts/init-submodules-no-riscv-tools-nolog.sh b/scripts/init-submodules-no-riscv-tools-nolog.sh index 743ea198..967c4ba7 100755 --- a/scripts/init-submodules-no-riscv-tools-nolog.sh +++ b/scripts/init-submodules-no-riscv-tools-nolog.sh @@ -88,5 +88,3 @@ echo "# line auto-generated by init-submodules-no-riscv-tools.sh" >> env.sh echo '__DIR="$(dirname "$(readlink -f "${BASH_SOURCE[0]:-${(%):-%x}}")")"' >> env.sh echo "PATH=\$__DIR/bin:\$PATH" >> env.sh echo "PATH=\$__DIR/software/firemarshal:\$PATH" >> env.sh -echo "-Dsbt.sourcemode=true" > .sbtopts -echo "-Dsbt.workspace=$CHIPYARD_DIR/tools" >> .sbtopts diff --git a/variables.mk b/variables.mk index 9ba9f4a3..dd40f565 100644 --- a/variables.mk +++ b/variables.mk @@ -6,7 +6,8 @@ HELP_COMPILATION_VARIABLES = \ " JAVA_HEAP_SIZE = if overridden, set the default java heap size (default is 8G)" \ " JAVA_TOOL_OPTIONS = if overridden, set underlying java tool options (default sets misc. sizes and tmp dir)" \ -" SBT_OPTS = if overridden, set underlying sbt options (default uses options in .sbtopts)" \ +" SBT_OPTS = set additional sbt command line options (these take the form -Dsbt.