( 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