Various improvements in xsthammer report generator
authorClifford Wolf <clifford@clifford.at>
Fri, 5 Jul 2013 14:04:02 +0000 (16:04 +0200)
committerClifford Wolf <clifford@clifford.at>
Fri, 5 Jul 2013 14:04:02 +0000 (16:04 +0200)
tests/xsthammer/report.sh

index 561943d59bbd3099024ccbba94eee43b9232d6f7..868239078b44ebfcfc7fe239c430731b8452fdc8 100644 (file)
@@ -45,11 +45,15 @@ for q in syn_vivado syn_quartus syn_xst syn_yosys rtl; do
                echo "hierarchy -check -top ${job}_test"
 
                echo "! touch test.$p.$q.input_ok"
-               echo "sat -timeout 60 -verify-no-timeout -show a,b,y1,y2 -prove y1 y2 ${job}_test"
+               echo "sat -timeout 10 -verify-no-timeout -show a,b,y1,y2 -prove y1 y2 ${job}_test"
        } > test.$p.$q.ys
 
        if yosys -l test.$p.$q.log test.$p.$q.ys; then
-               echo PASS > result.${p}.${q}.txt
+               if grep TIMEOUT test.$p.$q.log; then
+                       echo TIMEOUT > result.${p}.${q}.txt
+               else
+                       echo PASS > result.${p}.${q}.txt
+               fi
        else
                echo $( grep '^ *\\[ab] ' test.$p.$q.log | gawk '{ print $4; }' | tr -d '\n' ) >> fail_patterns.txt
                echo FAIL > result.${p}.${q}.txt
@@ -69,8 +73,12 @@ done; done
        done
 
        echo "initial begin"
+       extra_patterns=""
        bits=$( echo $( grep '^input' rtl.v | cut -f2 -d'[' | cut -f1 -d: | tr '\n' '+' )2 | bc; )
-       for pattern in $bits\'b0 ~$bits\'b0 $( sed "s/^/$bits'b/;" < fail_patterns.txt ); do
+       for x in 1 2 3 4 5 6 7 8 9 0; do
+               extra_patterns="$extra_patterns $( echo $job$x | sha1sum | gawk "{ print \"160'h\" \$1; }" )"
+       done
+       for pattern in $bits\'b0 ~$bits\'b0 $( sed "s/^/$bits'b/;" < fail_patterns.txt ) $extra_patterns; do
                echo "  { a, b } <= $pattern; #1;"
                for p in syn_vivado syn_quartus syn_xst syn_yosys rtl; do
                        echo "  \$display(\"++RPT++ %b $p\", ${p}_y);"
@@ -106,6 +114,12 @@ done; done
 echo "#00ff00" > color_PASS.txt
 echo "#ff0000" > color_FAIL.txt
 
+if cmp result.rtl.isim.txt result.rtl.modelsim.txt; then
+       echo "#00ff00" > color_$( cat result.rtl.isim.txt ).txt
+else
+       echo "#00ff00" > color_NO_SIM_COMMON.txt
+fi
+
 {
        echo "<h3>Hammer Report: $job</h3>"
        echo "<table border>"
@@ -120,9 +134,9 @@ echo "#ff0000" > color_FAIL.txt
                        read result < result.${p}.${q}.txt
                        if ! test -f color_$result.txt; then
                                case $( ls color_*.txt | wc -l ) in
-                                       2) echo "#ffff00" > color_$result.txt ;;
-                                       3) echo "#ff00ff" > color_$result.txt ;;
-                                       4) echo "#00ffff" > color_$result.txt ;;
+                                       3) echo "#ffff00" > color_$result.txt ;;
+                                       4) echo "#ff00ff" > color_$result.txt ;;
+                                       5) echo "#00ffff" > color_$result.txt ;;
                                        *) echo "#888888" > color_$result.txt ;;
                                esac
                        fi
@@ -136,3 +150,6 @@ echo "#ff0000" > color_FAIL.txt
        echo "</table>"
 } > ../../report/$job.html
 
+sync
+echo READY.
+