Progress in xsthammer
authorClifford Wolf <clifford@clifford.at>
Wed, 3 Jul 2013 09:19:18 +0000 (11:19 +0200)
committerClifford Wolf <clifford@clifford.at>
Wed, 3 Jul 2013 09:19:18 +0000 (11:19 +0200)
tests/xsthammer/Makefile
tests/xsthammer/generate.cc
tests/xsthammer/run-check.sh
tests/xsthammer/run-vivado.sh
tests/xsthammer/run-xst.sh

index 55d94d4566ab2e67290457dd11106bd0e7e963bf..83edcccea410dd491912c59202e58a3cec3d4ff9 100644 (file)
@@ -31,6 +31,15 @@ clean:
 mrproper: clean
        rm -rf rtl xst check
 
-.PHONY: test vivado check_xl_cells clean mrproper
-.PRECIOUS: check/%.log xst/%.v rtl/%.v generate.lst
+backup:
+       mkdir -p ~/.yosys/xhammer
+       tar cvzf ~/.yosys/xhammer/xst_files.tar.gz xst
+       tar cvzf ~/.yosys/xhammer/vivado_files.tar.gz vivado
+
+restore:
+       tar xvzf ~/.yosys/xhammer/xst_files.tar.gz
+       tar xvzf ~/.yosys/xhammer/vivado_files.tar.gz
+
+.PHONY: test vivado check_xl_cells clean mrproper backup restore
+.PRECIOUS: check/%.log xst/%.v vivado/%.v rtl/%.v generate.lst
 
index 672ad86a1a31f08e929cef95461c5744277e0a0c..6efd4c97d87636882c68af5f7bbde0bdf7ee5d74 100644 (file)
@@ -4,7 +4,7 @@
 #define GENERATE_TERNARY_OPS
 #define GENERATE_CONCAT_OPS
 #undef  GENERATE_REPEAT_OPS  // disabled because of XST bug
-#undef  GENERATE_EXPRESSIONS
+#define GENERATE_EXPRESSIONS
 
 #include <sys/stat.h>
 #include <sys/types.h>
@@ -109,8 +109,7 @@ void print_expression(FILE *f, int budget, uint32_t mask = 0)
        do {
                mode = xorshift32() % num_modes;
        } while (((1 << mode) & mask) == 0);
-
-       fprintf(f, "/* %d */", mode);
+       // fprintf(f, "/* %d */", mode);
 
        budget--;
        switch (mode)
@@ -123,7 +122,13 @@ void print_expression(FILE *f, int budget, uint32_t mask = 0)
        case 1:
                fprintf(f, "(");
                print_expression(f, budget/2, mask);
+       #if 1
+               // FIXME: relational operators disabled because there is an xst bug..
+               do k = xorshift32() % num_binary_ops; while ((k >= 9 && k <= 12) || (k >= 3 && k <= 6));
+               fprintf(f, "%s", binary_ops[k]);
+       #else
                fprintf(f, "%s", binary_ops[xorshift32() % num_binary_ops]);
+       #endif
                print_expression(f, budget/2, mask);
                fprintf(f, ")");
                break;
index 17e7d9382eb4b873693127c403bfa33dd76df308..64f0da6d7393b662c56c6fc1a13a7369d2f7131f 100644 (file)
@@ -75,10 +75,10 @@ done
 if ../../../../yosys -l ${job}.log ${job}_cmp.ys; then
        mv ${job}.log ../../$checkdir/${job}.log
        rm -f ../../$checkdir/${job}.err
+       touch ../../$checkdir/${job}.log
 else
        mv ${job}.log ../../$checkdir/${job}.err
        rm -f ../../$checkdir/${job}.log
-       exit 1
 fi
 
 exit 0
index 87ee53cb4d80a20aedf7b86e670d5d8035e81ee0..e8f574858f686fc366f2bd0a36510486a1b436d6 100644 (file)
@@ -18,9 +18,8 @@ cat > $job.tcl <<- EOT
        write_verilog ../../vivado/$job.v
 EOT
 
-. /opt/Xilinx/14.5/ISE_DS/settings64.sh
-
-vivado -mode batch -source $job.tcl
+/opt/Xilinx/Vivado/2013.2/bin/vivado -mode batch -source $job.tcl
 
+sync
 exit 0
 
index b421e29540a8bb4c766a6353fc481ee27b5f4551..dfa0d55baacafe2cce3538bddc2a36019098f288 100644 (file)
@@ -29,5 +29,6 @@ xst -ifn $job.xst
 netgen -w -ofmt verilog $job.ngc $job
 cp $job.v ../../xst/$job.v
 
+sync
 exit 0