diff --git a/.circleci/create-hash.sh b/.circleci/create-hash.sh index 63dfa242..939eeb31 100755 --- a/.circleci/create-hash.sh +++ b/.circleci/create-hash.sh @@ -15,7 +15,7 @@ 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}" | while read -r line ; do + git submodule status "toolchains/${tools}" "toolchains/qemu" | while read -r line ; do echo "${line#[!0-9a-f]}" done > "${HOME}/${tools}.hash" done diff --git a/.gitmodules b/.gitmodules index 22fb8ea4..6843547b 100644 --- a/.gitmodules +++ b/.gitmodules @@ -92,3 +92,6 @@ [submodule "vlsi/hammer-mentor-plugins"] path = vlsi/hammer-mentor-plugins url = https://github.com/ucb-bar/hammer-mentor-plugins.git +[submodule "toolchains/qemu"] + path = toolchains/qemu + url = https://github.com/qemu/qemu.git diff --git a/docs/Software/FireMarshal.rst b/docs/Software/FireMarshal.rst index ecc23736..da529f13 100644 --- a/docs/Software/FireMarshal.rst +++ b/docs/Software/FireMarshal.rst @@ -1,5 +1,6 @@ FireMarshal ================= +``software/firemarshal`` FireMarshal is a workload generation tool for RISC-V based systems. It currently only supports the FireSim FPGA-accelerated simulation platform. diff --git a/scripts/build-toolchains.sh b/scripts/build-toolchains.sh index 738b5ae7..cde56227 100755 --- a/scripts/build-toolchains.sh +++ b/scripts/build-toolchains.sh @@ -121,6 +121,9 @@ cp -p "${SRCDIR}/riscv-isa-sim/build/libfesvr.a" "${RISCV}/lib/" CC= CXX= module_all riscv-pk --prefix="${RISCV}" --host=riscv64-unknown-elf module_all riscv-tests --prefix="${RISCV}/riscv64-unknown-elf" +# Common tools (not in any particular toolchain dir) +SRCDIR="$RDIR/toolchains" module_all qemu --prefix="${RISCV}" --target-list=riscv64-softmmu + cd "$RDIR" { diff --git a/scripts/init-submodules-no-riscv-tools.sh b/scripts/init-submodules-no-riscv-tools.sh index e17b67ef..0ce30475 100755 --- a/scripts/init-submodules-no-riscv-tools.sh +++ b/scripts/init-submodules-no-riscv-tools.sh @@ -6,11 +6,32 @@ set -o pipefail RDIR=$(git rev-parse --show-toplevel) +_usage() { + echo "usage: ${0} [--no-firesim]" >&2 + exit 1 +} + +NO_FIRESIM=false +while getopts 'h-:' opt ; do + case ${opt} in + -) + case ${OPTARG} in + no-firesim) NO_FIRESIM=true ;; + *) echo "invalid option: --${OPTARG}" >&2 ; _usage ;; + esac ;; + h) _usage ;; + *) echo "invalid option: -${opt}" >&2 ; _usage ;; + esac +done +shift $((OPTIND - 1)) + # Ignore toolchain submodules cd "$RDIR" for name in toolchains/*/*/ ; do git config submodule."${name%/}".update none done +git config submodule.toolchains/qemu.update none + # Disable updates to the FireSim submodule until explicitly requested git config submodule.sims/firesim.update none # Disable updates to the hammer tool plugins repos @@ -22,13 +43,19 @@ git submodule update --init --recursive #--jobs 8 for name in toolchains/*/*/ ; do git config --unset submodule."${name%/}".update done +git config --unset submodule.toolchains/qemu.update + git config --unset submodule.vlsi/hammer-cadence-plugins.update git config --unset submodule.vlsi/hammer-synopsys-plugins.update git config --unset submodule.vlsi/hammer-mentor-plugins.update -# Renable firesim and init only the required submodules to provide -# all required scala deps, without doing a full build-setup -git config --unset submodule.sims/firesim.update -git submodule update --init sims/firesim -git -C sims/firesim submodule update --init sim/midas -git config submodule.sims/firesim.update none +if [ $NO_FIRESIM = false ]; then +echo "initializing firesim" + # Renable firesim and init only the required submodules to provide + # all required scala deps, without doing a full build-setup + git config --unset submodule.sims/firesim.update + git submodule update --init sims/firesim + git -C sims/firesim submodule update --init sim/midas + git -C sims/firesim submodule update --init --recursive sw/firesim-software + git config submodule.sims/firesim.update none +fi diff --git a/sims/firesim b/sims/firesim index a1f3a927..226df1d6 160000 --- a/sims/firesim +++ b/sims/firesim @@ -1 +1 @@ -Subproject commit a1f3a927a975dea1200a56260c140998866a1c51 +Subproject commit 226df1d6134aca22e1e1592935b0b8033f8e0734 diff --git a/software/firemarshal b/software/firemarshal new file mode 120000 index 00000000..c1e20e80 --- /dev/null +++ b/software/firemarshal @@ -0,0 +1 @@ +../sims/firesim/sw/firesim-software/ \ No newline at end of file diff --git a/toolchains/qemu b/toolchains/qemu new file mode 160000 index 00000000..4f591025 --- /dev/null +++ b/toolchains/qemu @@ -0,0 +1 @@ +Subproject commit 4f59102571fce49af180cfc6d4cdd2b5df7bdb14