$(P) cp abc/abc-$(ABCREV) yosys-abc
test: $(TARGETS) $(EXTRA_TARGETS)
- cd tests/simple && bash run-test.sh
- cd tests/hana && bash run-test.sh
- cd tests/asicworld && bash run-test.sh
- cd tests/realmath && bash run-test.sh
- cd tests/share && bash run-test.sh
- cd tests/techmap && bash run-test.sh
- cd tests/memories && bash run-test.sh
- cd tests/various && bash run-test.sh
- cd tests/sat && bash run-test.sh
+ +cd tests/simple && bash run-test.sh
+ +cd tests/hana && bash run-test.sh
+ +cd tests/asicworld && bash run-test.sh
+ +cd tests/realmath && bash run-test.sh
+ +cd tests/share && bash run-test.sh
+ +cd tests/techmap && bash run-test.sh
+ +cd tests/memories && bash run-test.sh
+ +cd tests/various && bash run-test.sh
+ +cd tests/sat && bash run-test.sh
@echo ""
@echo " Passed \"make test\"."
@echo ""
@echo ""
vloghtb: $(TARGETS) $(EXTRA_TARGETS)
- cd tests/vloghtb && bash run-test.sh
+ +cd tests/vloghtb && bash run-test.sh
@echo ""
@echo " Passed \"make vloghtb\"."
@echo ""
#!/bin/bash
-exec bash ../tools/autotest.sh -G *.v
+exec ${MAKE:-make} -f ../tools/autotest.mk *.v
#!/bin/bash
-exec bash ../tools/autotest.sh -G -l hana_vlib.v test_*.v
+exec ${MAKE:-make} -f ../tools/autotest.mk EXTRA_FLAGS="-l hana_vlib.v" test_*.v
exit 1
fi
-exec bash ../tools/autotest.sh -G *.v
+exec ${MAKE:-make} -f ../tools/autotest.mk *.v
--- /dev/null
+
+EXTRA_FLAGS=
+
+$(MAKECMDGOALS):
+ @$(basename $(MAKEFILE_LIST)).sh -G -j $(EXTRA_FLAGS) $@
+
+.PHONY: $(MAKECMDGOALS)
+
use_modelsim=false
verbose=false
keeprunning=false
+makejmode=false
frontend="verilog"
backend_opts="-noattr -noexpr"
scriptfiles=""
( set -ex; gcc -Wall -o $toolsdir/cmp_tbdata $toolsdir/cmp_tbdata.c; ) || exit 1
fi
-while getopts xmGl:wkvrf:s:p: opt; do
+while getopts xmGl:wkjvrf:s:p: opt; do
case "$opt" in
x)
use_xsim=true ;;
genvcd=true ;;
k)
keeprunning=true ;;
+ j)
+ makejmode=true ;;
v)
verbose=true ;;
r)
p)
scriptopt="$OPTARG" ;;
*)
- echo "Usage: $0 [-x|-m] [-w] [-k] [-v] [-r] [-l libs] [-f frontend] [-s script] [-p cmdstring] verilog-files\n" >&2
+ echo "Usage: $0 [-x|-m] [-w] [-k] [-j] [-v] [-r] [-l libs] [-f frontend] [-s script] [-p cmdstring] verilog-files\n" >&2
exit 1
esac
done
exit 1
fi
[[ "$bn" == *_tb ]] && continue
- echo -n "Test: $bn "
+
+ if $makejmode; then
+ status_prefix="Test: $bn "
+ else
+ status_prefix=""
+ echo -n "Test: $bn "
+ fi
rm -f ${bn}.{err,log,sikp}
mkdir -p ${bn}.out
if [ -f ${bn}.log ]; then
mv ${bn}.err ${bn}.log
- echo "-> ok"
+ echo "${status_prefix}-> ok"
elif [ -f ${bn}.skip ]; then
mv ${bn}.err ${bn}.skip
- echo "-> skip"
+ echo "${status_prefix}-> skip"
else
- echo "-> ERROR!"
+ echo "${status_prefix}-> ERROR!"
if $warn_iverilog_git; then
echo "Note: Make sure that 'iverilog' is an up-to-date git checkout of icarus verilog."
fi
make clean
rm -rf log_test_*
-make -j4 EXIT_ON_ERROR=1 YOSYS_BIN=$PWD/../../yosys YOSYS_SCRIPT="proc;;" check_yosys
-make -j4 -f test_makefile MODE=share
-make -j4 -f test_makefile MODE=mapopt
+${MAKE:-make} EXIT_ON_ERROR=1 YOSYS_BIN=$PWD/../../yosys YOSYS_SCRIPT="proc;;" check_yosys
+${MAKE:-make} -f test_makefile MODE=share
+${MAKE:-make} -f test_makefile MODE=mapopt