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
#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>
do {
mode = xorshift32() % num_modes;
} while (((1 << mode) & mask) == 0);
-
- fprintf(f, "/* %d */", mode);
+ // fprintf(f, "/* %d */", mode);
budget--;
switch (mode)
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;
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
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