OpenCores
URL https://opencores.org/ocsvn/steelcore/steelcore/trunk

Subversion Repositories steelcore

[/] [compliance/] [verify.sh] - Blame information for rev 11

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 11 rafaelcalc
#!/bin/bash
2
 
3
printf "\n\nCompare to reference files ... \n\n";
4
FAIL=0
5
RUN=0
6
 
7
SUITEDIR=$(pwd)
8
 
9
for ref in ${SUITEDIR}/*.reference_output;
10
do
11
    base=$(basename ${ref})
12
    stub=${base//".reference_output"/}
13
    sig=${SUITEDIR}/${stub}.signature.output
14
 
15
    RUN=$((${RUN} + 1))
16
 
17
    #
18
    # Ensure both files exist
19
    #
20
    if [ -f ${ref} ] && [ -f ${sig} ]; then
21
        echo -n "Check $(printf %24s ${stub})"
22
    else
23
        echo    "Check $(printf %24s ${stub}) ... IGNORE"
24
        continue
25
    fi
26
    diff --ignore-case --strip-trailing-cr ${ref} ${sig} #&> /dev/null
27
    if [ $? == 0 ]
28
    then
29
        echo " ... OK"
30
    else
31
        echo " ... FAIL"
32
        FAIL=$((${FAIL} + 1))
33
    fi
34
done
35
 
36
# warn on missing reverse reference
37
for sig in ${SUITEDIR}/*.signature.output;
38
do
39
    base=$(basename ${sig})
40
    stub=${base//".signature.output"/}
41
    ref=${SUITEDIR}/${stub}.reference_output
42
 
43
    if [ -f $sig ] && [ ! -f ${ref} ]; then
44
        echo "Error: sig ${sig} no corresponding ${ref}"
45
        FAIL=$((${FAIL} + 1))
46
    fi
47
done
48
 
49
declare -i status=0
50
if [ ${FAIL} == 0 ]; then
51
    echo "--------------------------------"
52
    echo -n "OK: ${RUN}/${RUN} "
53
    status=0
54
else
55
    echo "--------------------------------"
56
    echo -n "FAIL: ${FAIL}/${RUN} "
57
    status=1
58
fi
59
echo "RISCV_TARGET=XSim RISCV_DEVICE=Steel RISCV_ISA=RV32IZicsr"
60
echo
61
exit ${status}

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.