diff --git a/docs/Chipyard-Basics/Initial-Repo-Setup.rst b/docs/Chipyard-Basics/Initial-Repo-Setup.rst index 6543afc2..2102c1fb 100644 --- a/docs/Chipyard-Basics/Initial-Repo-Setup.rst +++ b/docs/Chipyard-Basics/Initial-Repo-Setup.rst @@ -63,9 +63,11 @@ Start by checking out the proper Chipyard version. Run: git checkout |version| Next run the following script to fully setup Chipyard with a specific toolchain. -There are two toolchains, one for normal RISC-V programs called ``riscv-tools`` which is the one needed for most Chipyard use-cases, and another for Hwacha/Gemmini called ``esp-tools``. +There are two toolchains, one for normal RISC-V programs called ``riscv-tools`` which is the one needed for most Chipyard use-cases, and another for Hwacha called ``esp-tools``. Run the following script based off which compiler you would like to use. +.. Note:: Prior versions of Chipyard recommended ``esp-tools`` for Gemmini development. Gemmini should now be used with the standard ``riscv-tools``. + .. Warning:: The following script will complete a "full" installation of Chipyard which may take a long time depending on the system. Ensure that this script completes fully (no interruptions) before continuing on. diff --git a/generators/chipyard/src/main/scala/config/NoCConfigs.scala b/generators/chipyard/src/main/scala/config/NoCConfigs.scala index c5ad178a..bd36fe04 100644 --- a/generators/chipyard/src/main/scala/config/NoCConfigs.scala +++ b/generators/chipyard/src/main/scala/config/NoCConfigs.scala @@ -186,3 +186,32 @@ class SharedNoCConfig extends Config( new chipyard.config.AbstractConfig ) // DOC include end: SharedNoCConfig + +class SbusRingNoCConfig extends Config( + new constellation.soc.WithSbusNoC(constellation.protocol.TLNoCParams( + constellation.protocol.DiplomaticNetworkNodeMapping( + inNodeMapping = ListMap( + "Core 0" -> 0, + "Core 1" -> 1, + "Core 2" -> 2, + "Core 3" -> 3, + "Core 4" -> 4, + "Core 5" -> 5, + "Core 6" -> 6, + "Core 7" -> 7, + "serial-tl" -> 8), + outNodeMapping = ListMap( + "system[0]" -> 9, + "system[1]" -> 10, + "system[2]" -> 11, + "system[3]" -> 12, + "pbus" -> 8)), // TSI is on the pbus, so serial-tl and pbus should be on the same node + NoCParams( + topology = UnidirectionalTorus1D(13), + channelParamGen = (a, b) => UserChannelParams(Seq.fill(10) { UserVirtualChannelParams(4) }), + routingRelation = NonblockingVirtualSubnetworksRouting(UnidirectionalTorus1DDatelineRouting(), 5, 2)) + )) ++ + new freechips.rocketchip.subsystem.WithNBigCores(8) ++ + new freechips.rocketchip.subsystem.WithNBanks(4) ++ + new chipyard.config.AbstractConfig +) diff --git a/generators/gemmini b/generators/gemmini index 49494fcf..b6389f3e 160000 --- a/generators/gemmini +++ b/generators/gemmini @@ -1 +1 @@ -Subproject commit 49494fcfce24798cd6da9afc7918135286e158d3 +Subproject commit b6389f3ea7bbf070aa3dd40972daa5be7e2d4261 diff --git a/scripts/build-setup.sh b/scripts/build-setup.sh index 77a988c3..7f14a738 100755 --- a/scripts/build-setup.sh +++ b/scripts/build-setup.sh @@ -87,6 +87,27 @@ run_step() { { +# esp-tools should ONLY be used for hwacha. +# Check for this, since many users will be attempting to use this with gemmini +if [ $TOOLCHAIN_TYPE == "esp-tools" ]; then + while true; do + read -p "WARNING: You are trying to install the esp-tools toolchain."$'n'"This should ONLY be used for Hwacha development."$'\n'"Gemmini should be used with riscv-tools."$'\n'"Type \"y\" to continue if this is intended, or \"n\" if not: " validate + case "$validate" in + y | Y) + echo "Installing esp-tools." + break + ;; + n | N) + error "Rerun with riscv-tools" + exit 3 + ;; + *) + error "Invalid response. Please type \"y\" or \"n\"" + ;; + esac + done +fi + # setup and install conda environment if run_step "1"; then # note: lock file must end in .conda-lock.yml - see https://github.com/conda-incubator/conda-lock/issues/154 diff --git a/scripts/build-toolchain-extra.sh b/scripts/build-toolchain-extra.sh index 1bc54297..54afe983 100755 --- a/scripts/build-toolchain-extra.sh +++ b/scripts/build-toolchain-extra.sh @@ -102,4 +102,13 @@ echo '==> Installing espresso logic minimizer' echo '==> Installing libgloss' CC= CXX= SRCDIR="$(pwd)/toolchains" module_all libgloss --prefix="${RISCV}/riscv${XLEN}-unknown-elf" --host=riscv${XLEN}-unknown-elf +cd $RDIR +if [ $TOOLCHAIN == "riscv-tools" ]; then + echo '==> Installing gemmini spike extensions' + git submodule update --init generators/gemmini + cd generators/gemmini + git submodule update --init software/libgemmini + make -C $RDIR/generators/gemmini/software/libgemmini install +fi + echo "Extra Toolchain Utilities/Tests Build Complete!" diff --git a/toolchains/riscv-tools/riscv-isa-sim b/toolchains/riscv-tools/riscv-isa-sim index f4035e2d..46176719 160000 --- a/toolchains/riscv-tools/riscv-isa-sim +++ b/toolchains/riscv-tools/riscv-isa-sim @@ -1 +1 @@ -Subproject commit f4035e2d87358f97a50e61a5edc6055f77e88219 +Subproject commit 461767199aac9c15894513254ae4844de5ee78d0