mirror of
https://github.com/lowRISC/ibex.git
synced 2025-04-24 13:57:19 -04:00
Update google_riscv-dv to 084fa3a (#152)
Update code from upstream repository https://github.com/google/riscv- dv to revision 084fa3a4debb682b34c9b7f9b17342bb06619a3b * Merge pull request #35 from google/dev (taoliug) * Add timeout mechanism for the regression script (Tao Liu) * Merge pull request #34 from google/dev (taoliug) * Add check for the toolchain path setup (Tao Liu)
This commit is contained in:
parent
98cfad26f3
commit
1d75e4c8b9
3 changed files with 46 additions and 9 deletions
2
vendor/google_riscv-dv.lock.hjson
vendored
2
vendor/google_riscv-dv.lock.hjson
vendored
|
@ -9,6 +9,6 @@
|
|||
upstream:
|
||||
{
|
||||
url: https://github.com/google/riscv-dv
|
||||
rev: 949552f964eec9d058c7c90889bdd5b80d1e60ad
|
||||
rev: 084fa3a4debb682b34c9b7f9b17342bb06619a3b
|
||||
}
|
||||
}
|
||||
|
|
20
vendor/google_riscv-dv/iss_sim
vendored
20
vendor/google_riscv-dv/iss_sim
vendored
|
@ -13,9 +13,9 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
# Path for RISC-V GCC toolchain
|
||||
# Environment variable for the path of RISC-V GCC toolchain
|
||||
# You can install the toolchain from https://github.com/riscv/riscv-gcc
|
||||
RISCV_TOOLCHAIN="XXX"
|
||||
# RISCV_TOOLCHAIN="XXX"
|
||||
|
||||
# GCC compile options
|
||||
ABI="lp64"
|
||||
|
@ -28,7 +28,10 @@ ISS="spike" # other options: ovpsim, all
|
|||
|
||||
# riscv-ovpsim options
|
||||
OVPSIM_VARIANT="RV64GC"
|
||||
RISCV_OVPSIM="YOUR_PATH_HERE/riscv-ovpsim/bin/Linux64/riscvOVPsim.exe"
|
||||
|
||||
# Binary of RISC-V ovpsim ISS
|
||||
# https://github.com/riscv/riscv-ovpsim
|
||||
RISCV_OVPSIM="${OVPSIM_PATH}/riscv-ovpsim/bin/Linux64/riscvOVPsim.exe"
|
||||
|
||||
# Directory of assemble tests
|
||||
SRC_DIR="./out_${DATE}/asm_tests"
|
||||
|
@ -42,11 +45,16 @@ REPORT="$SRC_DIR/regression_report.log"
|
|||
# Clean the result of the previous runs
|
||||
CLEAN=1
|
||||
|
||||
if [[ -z $RISCV_TOOLCHAIN ]]; then
|
||||
echo "ERROR: Please define RISCV_TOOLCHAIN environment variable first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Process command line options
|
||||
while [[ $# -gt 0 ]]
|
||||
do
|
||||
key="$1"
|
||||
case $key in
|
||||
case $key in
|
||||
-iss)
|
||||
ISS="$2"
|
||||
shift
|
||||
|
@ -154,6 +162,10 @@ while read asm_test; do
|
|||
fi
|
||||
# riscv_ovpsim sim
|
||||
if [[ "$ISS" == "ovpsim" ]] || [[ "$ISS" == "all" ]]; then
|
||||
if [[ -z $OVPSIM_PATH ]]; then
|
||||
echo "ERROR: Please define OVPSIM_PATH environment variable first"
|
||||
exit 1
|
||||
fi
|
||||
OVPSIM_LOG="$SRC_DIR/riscv_ovpsim/$TEST_NAME.log"
|
||||
echo "Running ovpsim: $TEST_NAME"
|
||||
RISCV_OVPSIM_CMD="$RISCV_OVPSIM --variant $OVPSIM_VARIANT \
|
||||
|
|
33
vendor/google_riscv-dv/run
vendored
33
vendor/google_riscv-dv/run
vendored
|
@ -60,7 +60,9 @@ VERBOSE=0
|
|||
|
||||
# Submit to LSF
|
||||
LSF_CMD="bsub"
|
||||
LSF_OPTS=""
|
||||
LSF=0
|
||||
LSF_TIMEOUT=100
|
||||
|
||||
# Testlist for regression
|
||||
TEST_LIST=testlist
|
||||
|
@ -98,6 +100,10 @@ case $key in
|
|||
TEST_LIST="$2"
|
||||
shift
|
||||
;;
|
||||
-timeout)
|
||||
LSF_TIMEOUT="$2"
|
||||
shift
|
||||
;;
|
||||
-so)
|
||||
SIM_ONLY=1
|
||||
;;
|
||||
|
@ -110,6 +116,10 @@ case $key in
|
|||
-lsf)
|
||||
LSF=1
|
||||
;;
|
||||
-lsf_opts)
|
||||
LSF_OPTS="$2"
|
||||
shift
|
||||
;;
|
||||
-o)
|
||||
OUT="$2"
|
||||
shift
|
||||
|
@ -204,9 +214,9 @@ if [[ ${TEST} == "all" ]]; then
|
|||
((PROGRAM_CNT+=$ITERATION))
|
||||
echo "${OUT}/sim_${TEST}.log" >> ${LOG_LIST}
|
||||
if [[ $VERBOSE == 1 ]]; then
|
||||
${LSF_CMD} ${CMD}
|
||||
${LSF_CMD} ${LSF_OPTS} ${CMD}
|
||||
else
|
||||
${LSF_CMD} ${CMD} > /dev/null
|
||||
${LSF_CMD} ${LSF_OPTS} ${CMD} > /dev/null
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
@ -214,6 +224,7 @@ if [[ ${TEST} == "all" ]]; then
|
|||
done < $TEST_LIST
|
||||
# Wait util all tests are generated
|
||||
if [[ $LSF == 1 ]]; then
|
||||
TIMEOUT_CNT=0
|
||||
TOTAL_CNT=`wc -l < ${LOG_LIST}`
|
||||
echo "Waiting for ${TOTAL_CNT} tests to complete, ${PROGRAM_CNT} programs to generate."
|
||||
while [[ 1 ]]; do
|
||||
|
@ -222,16 +233,30 @@ if [[ ${TEST} == "all" ]]; then
|
|||
if [[ -f "$log" ]]; then
|
||||
if grep -q "TEST GENERATION DONE" $log; then
|
||||
((COMPLETED_CNT+=1))
|
||||
else
|
||||
if [[ $VERBOSE == 1 ]]; then
|
||||
echo "$log is not completed"
|
||||
fi
|
||||
fi
|
||||
else
|
||||
if [[ $VERBOSE == 1 ]]; then
|
||||
echo "$log is not completed"
|
||||
fi
|
||||
fi
|
||||
done < ${LOG_LIST}
|
||||
GENERATED_CNT=`find ${OUT}/asm_tests/ -name "*.S" | wc -l`
|
||||
echo "Progress > Test:${COMPLETED_CNT}/${TOTAL_CNT} Program:${GENERATED_CNT}/${PROGRAM_CNT}"
|
||||
echo "[$TIMEOUT_CNT] Progress > Test:${COMPLETED_CNT}/${TOTAL_CNT} Program:${GENERATED_CNT}/${PROGRAM_CNT}"
|
||||
if [[ "$COMPLETED_CNT" == "$TOTAL_CNT" ]]; then
|
||||
break
|
||||
else
|
||||
sleep 10
|
||||
if [[ "$TIMEOUT_CNT" == "$LSF_TIMEOUT" ]]; then
|
||||
echo "Generator timeout after $LSF_TIMEOUT * 10 seconds"
|
||||
break
|
||||
else
|
||||
sleep 10
|
||||
fi
|
||||
fi
|
||||
((TIMEOUT_CNT+=1))
|
||||
done
|
||||
fi
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue