Revert everything to most recent dev commit

This commit is contained in:
Ella Schwarz
2021-11-17 15:21:09 -08:00
parent f2e8266ed6
commit b6741b052a
14 changed files with 33 additions and 1532 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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"

View File

@@ -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

View File

@@ -1,66 +0,0 @@
#!/bin/bash
# create the different verilator builds
# usage:
# do-rtl-build.sh <make command string> sim
# run rtl build for simulations and copy back results
# do-rtl-build.sh <make command string> 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

View File

@@ -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

View File

@@ -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]}

View File

@@ -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?"

File diff suppressed because it is too large Load Diff

View File

@@ -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