Merge https://github.com/YosysHQ/yosys into read_aiger
authorEddie Hung <eddieh@ece.ubc.ca>
Sun, 17 Feb 2019 19:44:01 +0000 (11:44 -0800)
committerEddie Hung <eddieh@ece.ubc.ca>
Sun, 17 Feb 2019 19:44:01 +0000 (11:44 -0800)
1  2 
backends/verilog/verilog_backend.cc
tests/tools/autotest.sh

Simple merge
index 0ffa062e3b70958718c9640f7e41de6a9c40d030,218edf931786f71fa4157308c1f902550a640f24..2722cba19f53e102c40b075170afcd8dd46d740b
@@@ -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 ;;
                        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
                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