2015-06-26 08:17:35 +02:00
|
|
|
#! /bin/bash
|
|
|
|
#
|
|
|
|
# See LICENSE for license details.
|
|
|
|
|
|
|
|
# Script to setup submodules, build rocket-chip, and run asm tests, and optionally run torture
|
|
|
|
|
2015-07-20 21:21:19 +02:00
|
|
|
set -ex
|
|
|
|
|
2015-06-26 08:17:35 +02:00
|
|
|
echo "Starting Rocket-chip regression test"
|
|
|
|
if [ $# -lt 1 ]
|
|
|
|
then
|
2015-10-29 22:11:26 +01:00
|
|
|
echo "Usage: ./regression.sh [options] config [torture_config] [torture_output_dir]"
|
|
|
|
echo " --master: A comma-seperated list of repositories to use the master of"
|
2015-06-26 08:17:35 +02:00
|
|
|
exit
|
|
|
|
fi
|
|
|
|
|
|
|
|
git submodule update --init --recursive riscv-tools
|
2015-10-29 22:11:26 +01:00
|
|
|
|
|
|
|
if [[ "$1" == "--master" ]]
|
|
|
|
then
|
|
|
|
echo $2 | sed 's/,/\n/g' | while read repo
|
|
|
|
do
|
|
|
|
(
|
|
|
|
cd $repo
|
|
|
|
git fetch
|
|
|
|
git checkout master
|
|
|
|
git log --oneline | head -n5
|
|
|
|
)
|
|
|
|
done
|
|
|
|
|
|
|
|
shift
|
|
|
|
shift
|
|
|
|
fi
|
|
|
|
|
2015-06-26 08:17:35 +02:00
|
|
|
export RISCV="$(pwd)/install"; export PATH=$PATH:$RISCV/bin
|
|
|
|
cd riscv-tools; ./build.sh; cd ..
|
|
|
|
git submodule update --init
|
|
|
|
git submodule status --recursive
|
2015-07-20 21:20:32 +02:00
|
|
|
cd emulator; make CONFIG=$1; make CONFIG=$1 run-asm-tests; cd ..
|
2015-06-26 08:17:35 +02:00
|
|
|
if [ $# -ge 2 ]
|
|
|
|
then
|
2015-09-14 22:00:54 +02:00
|
|
|
cd emulator; make CONFIG=$1 debug; cd ..
|
2015-06-26 08:17:35 +02:00
|
|
|
git clone git@github.com:ucb-bar/riscv-torture.git
|
|
|
|
cd riscv-torture; git submodule update --init;
|
|
|
|
if [ $# -eq 3 ]
|
|
|
|
then
|
|
|
|
make cnight RTL_CONFIG=$1 OPTIONS="-C $2 -p $3 -m 30 -t 10"
|
|
|
|
else
|
|
|
|
make cnight RTL_CONFIG=$1 OPTIONS="-C $2 -m 30 -t 10"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
|