1
0
mirror of https://github.com/antonblanchard/microwatt.git synced 2026-01-13 07:09:54 +00:00
Paul Mackerras 204fedc63f Move XER low bits out of register file
Besides the overflow and status carry bits, XER has 18 bits which need
to retain the value written by mtxer (in case software wants to
emulate the move-assist instructions (lswi, lswx, stswi, stswx).
Until now these bits (and others) have been stored in the GPR file as
a "fast" SPR, but this causes complications because XER is not really
a fast SPR.

Instead, we now store these 18 bits in the 'ctrl' signal, which exists
in execute1.  This will enable us to simplify the data path in future,
and has the added bonus that with a little bit of plumbing, we can get
the full XER value printed when dumping registers at the end of a
simulation.

Therefore this changes scripts/run_test.sh to remove the greps which
exclude XER from the comparison of actual and expected register
results.

Signed-off-by: Paul Mackerras <paulus@ozlabs.org>
2022-06-29 20:02:36 +10:00

35 lines
589 B
Bash
Executable File

#!/bin/bash
if [ $# -ne 1 ]; then
echo "Usage: run_test.sh <test>"
exit 1
fi
TEST=$1
TMPDIR=$(mktemp -d)
function finish {
rm -rf "$TMPDIR"
}
trap finish EXIT
MICROWATT_DIR=$PWD
cd $TMPDIR
cp ${MICROWATT_DIR}/tests/${TEST}.bin main_ram.bin
${MICROWATT_DIR}/core_tb | sed 's/.*: //' | egrep '^(GPR[0-9]|LR |CTR |XER |CR [0-9])' | sort | grep -v GPR31 > test.out || true
grep -v "^$" ${MICROWATT_DIR}/tests/${TEST}.out | sort | grep -v GPR31 > exp.out
cp test.out /tmp
cp exp.out /tmp
diff -q test.out exp.out && echo "$TEST PASS" && exit 0
echo "$TEST FAIL ********"
exit 1