diff --git a/.github/scripts/check-commit.sh b/.github/scripts/check-commit.sh index c92d10a173..b2a0d1ec0f 100755 --- a/.github/scripts/check-commit.sh +++ b/.github/scripts/check-commit.sh @@ -46,7 +46,7 @@ search () { } -submodules=("cva6" "boom" "ibex" "gemmini" "icenet" "nvdla" "rocket-chip" "rocket-chip-blocks" "rocket-chip-inclusive-cache" "testchipip" "riscv-sodor" "mempress" "bar-fetchers" "shuttle" "constellation" "fft-generator" "hardfloat" "caliptra-aes-acc" "rocc-acc-utils" "diplomacy" "rerocc" "compress-acc" "saturn") +submodules=("cva6" "boom" "ibex" "gemmini" "icenet" "nvdla" "rocket-chip" "rocket-chip-blocks" "rocket-chip-inclusive-cache" "testchipip" "riscv-sodor" "mempress" "bar-fetchers" "shuttle" "constellation" "fft-generator" "hardfloat" "caliptra-aes-acc" "rocc-acc-utils" "diplomacy" "rerocc" "compress-acc" "saturn" "ara") dir="generators" branches=("master" "main" "dev") search diff --git a/.github/scripts/defaults.sh b/.github/scripts/defaults.sh index 74ce82772f..8d39785260 100755 --- a/.github/scripts/defaults.sh +++ b/.github/scripts/defaults.sh @@ -27,7 +27,7 @@ REMOTE_COURSIER_CACHE=$REMOTE_WORK_DIR/.coursier-cache declare -A grouping grouping["group-cores"]="chipyard-cva6 chipyard-ibex chipyard-rocket chipyard-hetero chipyard-boomv3 chipyard-boomv4 chipyard-sodor chipyard-digitaltop chipyard-multiclock-rocket chipyard-nomem-scratchpad chipyard-spike chipyard-clone chipyard-prefetchers chipyard-shuttle" grouping["group-peripherals"]="chipyard-dmirocket chipyard-dmiboomv3 chipyard-dmiboomv4 chipyard-spiflashwrite chipyard-mmios chipyard-nocores chipyard-manyperipherals chipyard-chiplike chipyard-tethered chipyard-symmetric chipyard-llcchiplet" -grouping["group-accels"]="chipyard-compressacc chipyard-mempress chipyard-gemmini chipyard-manymmioaccels chipyard-nvdla chipyard-aes256ecb chipyard-rerocc chipyard-rocketvector chipyard-shuttlevector" +grouping["group-accels"]="chipyard-compressacc chipyard-mempress chipyard-gemmini chipyard-manymmioaccels chipyard-nvdla chipyard-aes256ecb chipyard-rerocc chipyard-rocketvector chipyard-shuttlevector chipyard-shuttleara" grouping["group-constellation"]="chipyard-constellation" grouping["group-tracegen"]="tracegen tracegen-boomv3 tracegen-boomv4" grouping["group-other"]="icenet testchipip constellation rocketchip-amba rocketchip-tlsimple rocketchip-tlwidth rocketchip-tlxbar chipyard-clusters" @@ -75,6 +75,7 @@ mapping["chipyard-aes256ecb"]=" CONFIG=AES256ECBRocketConfig" mapping["chipyard-rerocc"]=" CONFIG=ReRoCCTestConfig" mapping["chipyard-rocketvector"]=" CONFIG=MINV128D64RocketConfig" mapping["chipyard-shuttlevector"]=" CONFIG=GENV256D128ShuttleConfig" +mapping["chipyard-shuttleara"]=" CONFIG=V4096Ara2LaneShuttleConfig USE_ARA=1 verilog" mapping["constellation"]=" SUB_PROJECT=constellation" mapping["firesim"]="TARGET_CONFIG=WithNIC_DDR3FRFCFSLLC4MB_FireSimRocketConfig" diff --git a/.github/scripts/run-tests.sh b/.github/scripts/run-tests.sh index 19cf50cd36..f15b66663b 100755 --- a/.github/scripts/run-tests.sh +++ b/.github/scripts/run-tests.sh @@ -144,6 +144,14 @@ case $1 in run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-daxpy.riscv LOADMEM=1 run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-memcpy.riscv LOADMEM=1 ;; + chipyard-shuttleara) + # Ara does not work with verilator + # run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-sgemm.riscv LOADMEM=1 + # Ara cannot run strcmp + # run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-strcmp.riscv LOADMEM=1 + # run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-daxpy.riscv LOADMEM=1 + # run_binary BINARY=$RISCV/riscv64-unknown-elf/share/riscv-tests/benchmarks/vec-memcpy.riscv LOADMEM=1 + ;; tracegen) run_tracegen ;; diff --git a/.gitmodules b/.gitmodules index 1fd75921f6..75643ec7f9 100644 --- a/.gitmodules +++ b/.gitmodules @@ -154,3 +154,6 @@ [submodule "software/firesim-paper-workloads"] path = software/firesim-paper-workloads url = https://github.com/firesim/firesim-paper-workloads.git +[submodule "generators/ara"] + path = generators/ara + url = https://github.com/ucb-bar/ara-wrapper.git diff --git a/build.sbt b/build.sbt index db68f56a95..28d912c492 100644 --- a/build.sbt +++ b/build.sbt @@ -176,7 +176,7 @@ lazy val chipyard = (project in file("generators/chipyard")) dsptools, rocket_dsp_utils, gemmini, icenet, tracegen, cva6, nvdla, sodor, ibex, fft_generator, constellation, mempress, barf, shuttle, caliptra_aes, rerocc, - compressacc, saturn) + compressacc, saturn, ara) .settings(libraryDependencies ++= rocketLibDeps.value) .settings( libraryDependencies ++= Seq( @@ -241,6 +241,11 @@ lazy val cva6 = (project in file("generators/cva6")) .settings(libraryDependencies ++= rocketLibDeps.value) .settings(commonSettings) +lazy val ara = (project in file("generators/ara")) + .dependsOn(rocketchip, shuttle) + .settings(libraryDependencies ++= rocketLibDeps.value) + .settings(commonSettings) + lazy val ibex = (project in file("generators/ibex")) .dependsOn(rocketchip) .settings(libraryDependencies ++= rocketLibDeps.value) diff --git a/common.mk b/common.mk index 759852c6a9..7c3d159ae2 100644 --- a/common.mk +++ b/common.mk @@ -64,6 +64,7 @@ HELP_COMMANDS += \ ######################################################################################### include $(base_dir)/generators/cva6/cva6.mk include $(base_dir)/generators/ibex/ibex.mk +include $(base_dir)/generators/ara/ara.mk include $(base_dir)/generators/tracegen/tracegen.mk include $(base_dir)/generators/nvdla/nvdla.mk include $(base_dir)/tools/torture.mk diff --git a/docs/Generators/Ara.rst b/docs/Generators/Ara.rst new file mode 100644 index 0000000000..08c17c5d0a --- /dev/null +++ b/docs/Generators/Ara.rst @@ -0,0 +1,16 @@ +Ara +=== + +`Ara `__ is a RISC-V vector unit developed by the PULP project. +The Ara vector unit supports integration with either the Rocket or Shuttle in-order cores, following a similar methodology as used in the original Ara+CVA6 system. +Example Ara configurations are listed in ``generators/chipyard/src/main/scala/config/AraConfigs.scala``. + +.. Warning:: Ara only supports a partial subset of the full V-extension. Notably, we do not support virtual memory or precise traps with Ara. + +To compile simulators using Ara, you must pass an additional ``USE_ARA`` flag to the makefile. + +.. Note:: Ara only supports VCS for simulation + +.. code-block:: shell + + make CONFIG=V4096Ara2LaneRocketConfig USE_ARA=1 diff --git a/docs/Generators/Saturn.rst b/docs/Generators/Saturn.rst index bbf2988f12..b0021fcfdf 100644 --- a/docs/Generators/Saturn.rst +++ b/docs/Generators/Saturn.rst @@ -5,6 +5,7 @@ Saturn is a parameterized RISC-V Vector Unit generator currently supporting inte Saturn implements a compact short-vector-length vector microarchitecture suitable for deployment in a DSP-optimized core or area-efficient general-purpose core. More documentation on Saturn will be released in the future. +A partial listing of supported Saturn configurations is in ``generators/chipyard/src/main/scala/config/SaturnConfigs.scala``. * Full support for `V` application-profile RVV 1.0 * Precise traps with virtual memory diff --git a/docs/Generators/index.rst b/docs/Generators/index.rst index 25d4d24430..53a8895f42 100644 --- a/docs/Generators/index.rst +++ b/docs/Generators/index.rst @@ -36,3 +36,4 @@ so changes to the generators themselves will automatically be used when building Mempress CompressAcc Prefetchers + Ara diff --git a/generators/ara b/generators/ara new file mode 160000 index 0000000000..ae77c7985e --- /dev/null +++ b/generators/ara @@ -0,0 +1 @@ +Subproject commit ae77c7985e60afefc1c2bcbe3617ff9f5d3960ad diff --git a/generators/chipyard/src/main/scala/config/AraConfigs.scala b/generators/chipyard/src/main/scala/config/AraConfigs.scala new file mode 100644 index 0000000000..803ff6212e --- /dev/null +++ b/generators/chipyard/src/main/scala/config/AraConfigs.scala @@ -0,0 +1,32 @@ +package chipyard + +import org.chipsalliance.cde.config.{Config} +import saturn.common.{VectorParams} + +// Rocket-integrated configs +class V4096Ara2LaneRocketConfig extends Config( + new ara.WithAraRocketVectorUnit(4096, 2) ++ + new freechips.rocketchip.rocket.WithNBigCores(1) ++ + new chipyard.config.AbstractConfig) + + +class V8192Ara4LaneRocketConfig extends Config( + new ara.WithAraRocketVectorUnit(8192, 4) ++ + new chipyard.config.WithSystemBusWidth(128) ++ + new freechips.rocketchip.rocket.WithNBigCores(1) ++ + new chipyard.config.AbstractConfig) + + +// Shuttle-integrated configs +class V4096Ara2LaneShuttleConfig extends Config( + new ara.WithAraShuttleVectorUnit(4096, 2) ++ + new shuttle.common.WithNShuttleCores(1) ++ + new chipyard.config.AbstractConfig) + + +class V8192Ara4LaneShuttleConfig extends Config( + new ara.WithAraShuttleVectorUnit(8192, 4) ++ + new chipyard.config.WithSystemBusWidth(128) ++ + new shuttle.common.WithShuttleTileBeatBytes(16) ++ + new shuttle.common.WithNShuttleCores(1) ++ + new chipyard.config.AbstractConfig) diff --git a/scripts/init-submodules-no-riscv-tools-nolog.sh b/scripts/init-submodules-no-riscv-tools-nolog.sh index dec397c34f..4e2ed43eca 100755 --- a/scripts/init-submodules-no-riscv-tools-nolog.sh +++ b/scripts/init-submodules-no-riscv-tools-nolog.sh @@ -70,6 +70,7 @@ cd "$RDIR" for name in \ toolchains/*-tools/* \ generators/cva6 \ + generators/ara \ generators/nvdla \ toolchains/libgloss \ generators/gemmini \ @@ -115,6 +116,10 @@ cd "$RDIR" git submodule update --init generators/nvdla git -C generators/nvdla submodule update --init src/main/resources/hw + # Non-recursive clone to exclude ara submods + git submodule update --init generators/ara + git -C generators/ara submodule update --init ara + # Non-recursive clone to exclude gemmini-software git submodule update --init generators/gemmini git -C generators/gemmini/ submodule update --init --recursive software/gemmini-rocc-tests diff --git a/sims/verilator/Makefile b/sims/verilator/Makefile index d7b1f14879..5df4315978 100644 --- a/sims/verilator/Makefile +++ b/sims/verilator/Makefile @@ -129,7 +129,7 @@ CHIPYARD_VERILATOR_FLAGS := \ # options dependent on whether external IP (cva6/NVDLA) or just chipyard is used # NOTE: defer the evaluation of this until it is used! PLATFORM_OPTS = $(shell \ - if grep -qiP "module\s+(CVA6|NVDLA)" $(GEN_COLLATERAL_DIR)/*.*v; \ + if grep -qiP "module\s+(CVA6|NVDLA|Ara)" $(GEN_COLLATERAL_DIR)/*.*v; \ then echo "$(VERILOG_IP_VERILATOR_FLAGS)"; \ else echo "$(CHIPYARD_VERILATOR_FLAGS)"; fi)