From: Eddie Hung Date: Sun, 17 Feb 2019 19:44:01 +0000 (-0800) Subject: Merge https://github.com/YosysHQ/yosys into read_aiger X-Git-Tag: yosys-0.9~232^2~11 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=03a533d1022f02b042ca29120f9b93d9e324b4d1;p=yosys.git Merge https://github.com/YosysHQ/yosys into read_aiger --- 03a533d1022f02b042ca29120f9b93d9e324b4d1 diff --cc tests/tools/autotest.sh index 0ffa062e3,218edf931..2722cba19 --- a/tests/tools/autotest.sh +++ b/tests/tools/autotest.sh @@@ -22,7 -28,7 +28,7 @@@ if [ ! -f $toolsdir/cmp_tbdata -o $tool ( set -ex; ${CC:-gcc} -Wall -o $toolsdir/cmp_tbdata $toolsdir/cmp_tbdata.c; ) || exit 1 fi - while getopts xmGl:wkjvref:s:p:n:S:I:B: opt; do -while getopts xmGl:wkjvref:s:p:n:S:I:-: opt; do ++while getopts xmGl:wkjvref:s:p:n:S:I:B:-: opt; do case "$opt" in x) use_xsim=true ;; @@@ -59,10 -65,24 +65,26 @@@ include_opts="$include_opts -I $OPTARG" xinclude_opts="$xinclude_opts -i $OPTARG" minclude_opts="$minclude_opts +incdir+$OPTARG" ;; + B) + backend_opts="$backend_opts $OPTARG" ;; + -) + case "${OPTARG}" in + xfirrtl) + xfirrtl="${!OPTIND}" + OPTIND=$(( $OPTIND + 1 )) + ;; + firrtl2verilog) + firrtl2verilog="${!OPTIND}" + OPTIND=$(( $OPTIND + 1 )) + ;; + *) + if [ "$OPTERR" == 1 ] && [ "${optspec:0:1}" != ":" ]; then + echo "Unknown option --${OPTARG}" >&2 + fi + ;; + esac;; *) - echo "Usage: $0 [-x|-m] [-G] [-w] [-k] [-j] [-v] [-r] [-e] [-l libs] [-f frontend] [-s script] [-p cmdstring] [-n iters] [-S seed] [-I incdir] [-B backend_opt] verilog-files\n" >&2 - echo "Usage: $0 [-x|-m] [-G] [-w] [-k] [-j] [-v] [-r] [-e] [-l libs] [-f frontend] [-s script] [-p cmdstring] [-n iters] [-S seed] [-I incdir] [--xfirrtl FIRRTL test exclude file] [--firrtl2verilog command to generate verilog from firrtl] verilog-files\n" >&2 ++ echo "Usage: $0 [-x|-m] [-G] [-w] [-k] [-j] [-v] [-r] [-e] [-l libs] [-f frontend] [-s script] [-p cmdstring] [-n iters] [-S seed] [-I incdir] [-B backend_opt] [--xfirrtl FIRRTL test exclude file] [--firrtl2verilog command to generate verilog from firrtl] verilog-files\n" >&2 exit 1 esac done @@@ -112,12 -131,9 +134,18 @@@ d fn=$(basename $fn) bn=$(basename $bn) ++<<<<<<< HEAD + if [[ "$ext" == "v" ]]; then + egrep -v '^\s*`timescale' ../$fn > ${bn}_ref.${ext} + else + "$toolsdir"/../../yosys -f "$frontend $include_opts" -b "verilog" -o ${bn}_ref.v ../${fn} + frontend="verilog" + fi ++======= + rm -f ${bn}_ref.fir + + egrep -v '^\s*`timescale' ../$fn > ${bn}_ref.v ++>>>>>>> e45f62b0c56717a23099425f078d1e56212aa632 if [ ! -f ../${bn}_tb.v ]; then "$toolsdir"/../../yosys -f "$frontend $include_opts" -b "test_autotb $autotb_opts" -o ${bn}_tb.v ${bn}_ref.v