-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Initial commit for fine-grained instruction tracking in Gemmini
- Loading branch information
0 parents
commit aee1a5c
Showing
137 changed files
with
29,518 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
############# | ||
# SHARED VARS | ||
############# | ||
|
||
# make parallelism | ||
CI_MAKE_NPROC=4 | ||
LOCAL_MAKE_NPROC=$CI_MAKE_NPROC | ||
|
||
# local variables | ||
LOCAL_CHECKOUT_DIR=$GITHUB_WORKSPACE | ||
|
||
LOCAL_CHIPYARD_DIR=$REMOTE_WORK_DIR | ||
LOCAL_SIM_DIR=$LOCAL_CHIPYARD_DIR/sims/verilator | ||
|
||
CICONFIG=chipyard.config.WithNoDebug_GemminiRocketConfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/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 | ||
|
||
eval "$(conda shell.bash hook)" | ||
|
||
cd $LOCAL_CHIPYARD_DIR | ||
source env.sh | ||
|
||
cd $LOCAL_SIM_DIR | ||
make -C $LOCAL_SIM_DIR clean | ||
make -j$LOCAL_MAKE_NPROC -C $LOCAL_SIM_DIR CONFIG=$CICONFIG |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#!/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 | ||
|
||
eval "$(conda shell.bash hook)" | ||
|
||
mkdir -p $JAVA_TMP_DIR | ||
|
||
git clone --progress --verbose https://github.com/ucb-bar/chipyard.git $LOCAL_CHIPYARD_DIR | ||
cd $LOCAL_CHIPYARD_DIR | ||
|
||
git fetch | ||
git checkout $(cat $LOCAL_CHECKOUT_DIR/CHIPYARD.hash) | ||
|
||
export MAKEFLAGS="-j32" | ||
./build-setup.sh riscv-tools -f -s 6 -s 7 -s 8 -s 9 -v | ||
|
||
source env.sh | ||
|
||
cd $LOCAL_CHECKOUT_DIR | ||
chown -R $(whoami) . | ||
git config --global --add safe.directory $LOCAL_CHECKOUT_DIR | ||
git config --global --add safe.directory '*' | ||
|
||
cd $LOCAL_CHECKOUT_DIR | ||
git submodule update --init --recursive software/gemmini-rocc-tests | ||
rm -rf $LOCAL_CHIPYARD_DIR/generators/gemmini/* $LOCAL_CHIPYARD_DIR/generators/gemmini/.git* | ||
mv -f $LOCAL_CHECKOUT_DIR/* $LOCAL_CHECKOUT_DIR/.git* $LOCAL_CHIPYARD_DIR/generators/gemmini/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# turn echo on and error on earliest command | ||
set -ex | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" | ||
source $SCRIPT_DIR/defaults.sh | ||
|
||
eval "$(conda shell.bash hook)" | ||
|
||
cd $LOCAL_CHIPYARD_DIR | ||
source env.sh | ||
|
||
cd $LOCAL_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests | ||
CFLAGS=-DFAST ./build.sh | ||
|
||
cd build | ||
make test-baremetal-bareMetalC RUNNER="'make -C $LOCAL_SIM_DIR CONFIG=$CICONFIG run-binary-hex BINARY='" | ||
#make -j$LOCAL_MAKE_NPROC test-baremetal-bareMetalC RUNNER="'make -C $LOCAL_SIM_DIR CONFIG=$CICONFIG run-binary-hex BINARY='" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/bin/bash | ||
|
||
# turn echo on and error on earliest command | ||
set -ex | ||
|
||
SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" | ||
source $SCRIPT_DIR/defaults.sh | ||
|
||
eval "$(conda shell.bash hook)" | ||
|
||
cd $LOCAL_CHIPYARD_DIR | ||
source env.sh | ||
|
||
cd $LOCAL_CHECKOUT_DIR | ||
chown -R $(whoami) . | ||
git config --global --add safe.directory $LOCAL_CHECKOUT_DIR | ||
git config --global --add safe.directory '*' | ||
|
||
cd $LOCAL_CHECKOUT_DIR | ||
# Delete the stale libgemmini first installed by chipyard, switch to the one submoduled here | ||
rm -rf $RISCV/lib/libgemmini.so | ||
git submodule update --init software/libgemmini | ||
make -C software/libgemmini install | ||
|
||
cd $LOCAL_CHIPYARD_DIR/generators/gemmini/software/gemmini-rocc-tests | ||
./build.sh | ||
|
||
cd build | ||
make -j$LOCAL_MAKE_NPROC test-baremetal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
name: Gemmini CI | ||
|
||
on: [push] | ||
|
||
defaults: | ||
run: | ||
shell: bash -leo pipefail {0} | ||
|
||
env: | ||
REMOTE_WORK_DIR: /scratch/buildbot/gemmini-ci-shared/gemmini-${{ github.sha }} | ||
JAVA_TMP_DIR: /tmp/gemmini-${{ github.sha }}-full | ||
|
||
jobs: | ||
install-gemmini: | ||
runs-on: jktqos | ||
steps: | ||
- name: Delete old checkout | ||
run: | | ||
rm -rf ${{ github.workspace }}/* || true | ||
rm -rf ${{ github.workspace }}/.* || true | ||
- uses: actions/checkout@v3 | ||
- name: Setup repository | ||
run: | | ||
.github/scripts/install-gemmini.sh | ||
spike-run-tests: | ||
runs-on: jktqos | ||
needs: install-gemmini | ||
steps: | ||
- name: Delete old checkout | ||
run: | | ||
rm -rf ${{ github.workspace }}/* || true | ||
rm -rf ${{ github.workspace }}/.* || true | ||
- uses: actions/checkout@v3 | ||
- name: Run Gemmini Spike tests | ||
run: | | ||
.github/scripts/run-tests-spike.sh | ||
build-gemmini-config: | ||
runs-on: jktqos | ||
needs: install-gemmini | ||
steps: | ||
- name: Delete old checkout | ||
run: | | ||
rm -rf ${{ github.workspace }}/* || true | ||
rm -rf ${{ github.workspace }}/.* || true | ||
- uses: actions/checkout@v3 | ||
- name: Building Gemmini Config using Verilator | ||
run: | | ||
.github/scripts/do-rtl-build.sh | ||
rtl-run-tests: | ||
runs-on: jktqos | ||
needs: build-gemmini-config | ||
steps: | ||
- name: Delete old checkout | ||
run: | | ||
rm -rf ${{ github.workspace }}/* || true | ||
rm -rf ${{ github.workspace }}/.* || true | ||
- uses: actions/checkout@v3 | ||
- name: Run Gemmini Config tests using Verilator | ||
run: | | ||
.github/scripts/run-tests-rtl.sh | ||
cleanup: | ||
name: cleanup | ||
needs: [spike-run-tests, rtl-run-tests] | ||
runs-on: jktqos | ||
if: ${{ always() }} | ||
steps: | ||
- name: Delete repo copy | ||
run: | | ||
rm -rf ${{ env.REMOTE_WORK_DIR }} | ||
rm -rf ${{ env.JAVA_TMP_DIR }} |
Oops, something went wrong.