#! /bin/csh -f # # Script to compile MTI \rm -rf ieee.lib vlib ieee.lib vmap IEEE ieee.lib set OPTIONS = "-O0 -rangecheck -2002 -no1164 -nologo -noaccel math_real -noaccel numeric_std -noaccel numeric_bit -noaccel std_logic_1164 -noaccel std_logic_textio" if ($1 == "quiet") then set OPTIONS = "$OPTIONS -nowarn 3" endif # standard_additions.vhdl \rm standard_additions_MODIFIED.vhdl cat standard_additions.vhdl | sed -f standard_additions.sed > standard_additions_MODIFIED.vhdl vcom $OPTIONS -work IEEE standard_additions_MODIFIED.vhdl # env.vhdl \rm env_MODIFIED.vhdl cat env.vhdl env_ADD.vhdl > env_MODIFIED.vhdl vcom $OPTIONS -work IEEE env_MODIFIED.vhdl # standard_textio_additions.vhdl \rm standard_textio_additions_MODIFIED.vhdl cat standard_textio_additions.vhdl | sed -f standard_textio_additions.sed > standard_textio_additions_MODIFIED.vhdl vcom $OPTIONS -work IEEE standard_textio_additions_MODIFIED.vhdl vcom $OPTIONS -work IEEE std_logic_textio.vhdl \rm std_logic_1164_MODIFIED.vhdl cat std_logic_1164.vhdl | sed -f std_logic_1164.sed > std_logic_1164_MODIFIED.vhdl vcom $OPTIONS -work IEEE std_logic_1164_MODIFIED.vhdl \rm numeric_std_MODIFIED.vhdl cat numeric_std.vhdl | sed -f numeric_std.sed > numeric_std_MODIFIED.vhdl vcom $OPTIONS -work IEEE numeric_std_MODIFIED.vhdl \rm numeric_bit_MODIFIED.vhdl cat numeric_bit.vhdl | sed -f numeric_bit.sed > numeric_bit_MODIFIED.vhdl vcom $OPTIONS -work IEEE numeric_bit_MODIFIED.vhdl \rm numeric_bit_unsigned_MODIFIED.vhdl cat numeric_bit_unsigned.vhdl | sed -f numeric_bit_unsigned.sed > numeric_bit_unsigned_MODIFIED.vhdl vcom $OPTIONS -work IEEE numeric_bit_unsigned_MODIFIED.vhdl \rm numeric_std_unsigned_MODIFIED.vhdl cat numeric_std_unsigned.vhdl | sed -f numeric_std_unsigned.sed > numeric_std_unsigned_MODIFIED.vhdl vcom $OPTIONS -work IEEE numeric_std_unsigned_MODIFIED.vhdl vcom $OPTIONS -work IEEE math_real.vhdl vcom $OPTIONS -work IEEE math_complex.vhdl vcom $OPTIONS -work IEEE math_utility_pkg.vhdl \rm fixed_generic_pkg_MODIFIED.vhdl cat fixed_generic_pkg.vhdl | sed -f fixed_generic_pkg.sed > fixed_generic_pkg_MODIFIED.vhdl vcom $OPTIONS -work IEEE fixed_generic_pkg_MODIFIED.vhdl \rm fixed_pkg_MODIFIED.vhdl cat fixed_generic_pkg_MODIFIED.vhdl | sed s/fixed_generic_pkg/fixed_pkg/ > fixed_pkg_MODIFIED.vhdl vcom $OPTIONS -work IEEE fixed_pkg_MODIFIED.vhdl \rm float_generic_pkg_MODIFIED.vhdl cat float_generic_pkg.vhdl | sed -f float_generic_pkg.sed > float_generic_pkg_MODIFIED.vhdl vcom $OPTIONS -work IEEE float_generic_pkg_MODIFIED.vhdl \rm float_pkg_MODIFIED.vhdl cat float_generic_pkg_MODIFIED.vhdl | sed s/float_generic_pkg/float_pkg/ > float_pkg_MODIFIED.vhdl vcom $OPTIONS -work IEEE float_pkg_MODIFIED.vhdl # Now start on the package bodies. \rm std_logic_1164-body_MODIFIED.vhdl cat std_logic_1164-body.vhdl | sed -f std_logic_1164-body.sed > std_logic_1164-body_MODIFIED.vhdl vcom $OPTIONS -work IEEE std_logic_1164-body_MODIFIED.vhdl \rm numeric_std-body_MODIFIED.vhdl cat numeric_std-body.vhdl | sed -f numeric_std-body.sed > numeric_std-body_MODIFIED.vhdl vcom $OPTIONS -work IEEE numeric_std-body_MODIFIED.vhdl \rm numeric_bit-body_MODIFIED.vhdl cat numeric_bit-body.vhdl | sed -f numeric_bit-body.sed > numeric_bit-body_MODIFIED.vhdl vcom $OPTIONS -work IEEE numeric_bit-body_MODIFIED.vhdl \rm numeric_bit_unsigned-body_MODIFIED.vhdl cat numeric_bit_unsigned-body.vhdl | sed -f numeric_bit_unsigned-body.sed > numeric_bit_unsigned-body_MODIFIED.vhdl vcom $OPTIONS -work IEEE numeric_bit_unsigned-body_MODIFIED.vhdl \rm numeric_std_unsigned-body_MODIFIED.vhdl cat numeric_std_unsigned-body.vhdl | sed -f numeric_std_unsigned-body.sed > numeric_std_unsigned-body_MODIFIED.vhdl vcom $OPTIONS -work IEEE numeric_std_unsigned-body_MODIFIED.vhdl vcom $OPTIONS -work IEEE math_real-body.vhdl vcom $OPTIONS -work IEEE math_complex-body.vhdl \rm fixed_generic_pkg-body_MODIFIED.vhdl cat fixed_generic_pkg-body.vhdl | sed -f fixed_generic_pkg-body.sed > fixed_generic_pkg-body_MODIFIED.vhdl vcom $OPTIONS -work IEEE fixed_generic_pkg-body_MODIFIED.vhdl #\rm fixed_generic_pkg-body_real_MODIFIED.vhdl #cat fixed_generic_pkg-body_real.vhdl | sed -f fixed_generic_pkg-body.sed > fixed_generic_pkg-body_real_MODIFIED.vhdl #vcom $OPTIONS -work IEEE fixed_generic_pkg-body_real_MODIFIED.vhdl \rm fixed_pkg_MODIFIED.vhdl cat fixed_generic_pkg_MODIFIED.vhdl fixed_generic_pkg-body_MODIFIED.vhdl | sed s/fixed_generic_pkg/fixed_pkg/ > fixed_pkg_MODIFIED.vhdl vcom $OPTIONS -work IEEE fixed_pkg_MODIFIED.vhdl \rm float_generic_pkg-body_MODIFIED.vhdl cat float_generic_pkg-body.vhdl | sed -f float_generic_pkg-body.sed > float_generic_pkg-body_MODIFIED.vhdl vcom $OPTIONS -work IEEE float_generic_pkg-body_MODIFIED.vhdl #\rm float_generic_pkg-body_real_MODIFIED.vhdl #cat float_generic_pkg-body_real.vhdl | sed -f float_generic_pkg-body.sed > float_generic_pkg-body_real_MODIFIED.vhdl #vcom $OPTIONS -work IEEE float_generic_pkg-body_real_MODIFIED.vhdl \rm float_pkg_MODIFIED.vhdl cat float_generic_pkg_MODIFIED.vhdl float_generic_pkg-body_MODIFIED.vhdl | sed s/float_generic_pkg/float_pkg/ | sed s/FLOAT_GENERIC_PKG/float_pkg/ > float_pkg_MODIFIED.vhdl vcom $OPTIONS -work IEEE float_pkg_MODIFIED.vhdl # Start compiling the testbenches #Create a "run -all" script for Modeltech echo "run -all" > runall.do echo "quit -f" >> runall.do if ($1 == "quiet") then set QUIET = "-gquiet=true" else set QUIET = "" endif \rm -rf work vlib work # Testbenches for the additions to pkg "std" \rm test_standard_additions_MODIFIED.vhdl cat test_standard_additions.vhdl | sed -f test_standard_additions.sed > test_standard_additions_MODIFIED.vhdl vcom $OPTIONS test_standard_additions_MODIFIED.vhdl vsim -novopt -do runall.do -c test_standard_additions $QUIET \rm test_std_textio_add_MODIFIED.vhdl cat test_std_textio_add.vhdl | sed -f test_std_textio_add.sed > test_std_textio_add_MODIFIED.vhdl vcom $OPTIONS test_std_textio_add_MODIFIED.vhdl vsim -novopt -do runall.do -c test_std_textio_add $QUIET \rm test_realstring_MODIFIED.vhdl cat test_realstring.vhdl | sed -f test_std_textio_add.sed > test_realstring_MODIFIED.vhdl vcom $OPTIONS test_realstring_MODIFIED.vhdl vsim -novopt -do runall.do -c test_realstring $QUIET # STD_LOGIC_1164 testbenches \rm test_logical_MODIFIED.vhdl cat test_logical.vhdl | sed -f test_logical.sed > test_logical_MODIFIED.vhdl vcom $OPTIONS test_logical_MODIFIED.vhdl vsim -novopt -do runall.do -c test_logical $QUIET vcom $OPTIONS test_shift.vhdl vsim -novopt -do runall.do -c test_shift $QUIET \rm test_reduce_MODIFIED.vhdl cat test_reduce.vhdl | sed -f test_reduce.sed > test_reduce_MODIFIED.vhdl vcom $OPTIONS test_reduce_MODIFIED.vhdl vsim -novopt -do runall.do -c test_reduce $QUIET \rm test_std_logic_textio_MODIFIED.vhdl cat test_std_logic_textio.vhdl | sed s/flush/--flush/ > test_std_logic_textio_MODIFIED.vhdl vcom $OPTIONS test_std_logic_textio_MODIFIED.vhdl vsim -novopt -do runall.do -c test_std_logic_textio $QUIET \rm test_new1164_MODIFIED.vhdl cat test_new1164.vhdl | sed -f test_new1164.sed > test_new1164_MODIFIED.vhdl vcom $OPTIONS test_new1164_MODIFIED.vhdl vsim -novopt -do runall.do -c test_new1164 $QUIET #Original (slightly modified 1076.3 testbenches) vcom $OPTIONS numeric_bit_tb1.vhdl vcom $OPTIONS numeric_bit_tb2.vhdl vcom $OPTIONS numeric_bit_tb3.vhdl vcom $OPTIONS numeric_bit_tb4.vhdl vcom $OPTIONS numeric_bit_tb5.vhdl vcom $OPTIONS numeric_std_tb1.vhdl vcom $OPTIONS numeric_std_tb2.vhdl vcom $OPTIONS numeric_std_tb3.vhdl vcom $OPTIONS numeric_std_tb4.vhdl vcom $OPTIONS numeric_std_tb5.vhdl vsim -novopt -do runall.do -c numeric_bit_tb1 $QUIET vsim -novopt -do runall.do -c numeric_bit_tb2 $QUIET vsim -novopt -do runall.do -c numeric_bit_tb3 $QUIET vsim -novopt -do runall.do -c numeric_bit_tb4 $QUIET vsim -novopt -do runall.do -c numeric_bit_tb5 $QUIET vsim -novopt -do runall.do -c numeric_std_tb1 $QUIET vsim -novopt -do runall.do -c numeric_std_tb2 $QUIET vsim -novopt -do runall.do -c numeric_std_tb3 $QUIET vsim -novopt -do runall.do -c numeric_std_tb4 $QUIET vsim -novopt -do runall.do -c numeric_std_tb5 $QUIET #Test for new NUMERIC_STD functions \rm test_minmax_MODIFIED.vhdl cat test_minmax.vhdl | sed -f test_minmax.sed > test_minmax_MODIFIED.vhdl vcom $OPTIONS test_minmax_MODIFIED.vhdl vsim -novopt -do runall.do -c test_minmax $QUIET \rm test_reduce_pack_MODIFIED.vhdl cat test_reduce_pack.vhdl | sed -f test_reduce_pack.sed > test_reduce_pack_MODIFIED.vhdl vcom $OPTIONS test_reduce_pack_MODIFIED.vhdl vsim -novopt -do runall.do -c test_reduce_pack $QUIET vcom $OPTIONS test_string.vhdl vsim -novopt -do runall.do -c test_string $QUIET #Test for new NUMERIC_BIT functions \rm test_bminmax_MODIFIED.vhdl cat test_bminmax.vhdl | sed -f test_bminmax.sed > test_bminmax_MODIFIED.vhdl vcom $OPTIONS test_bminmax_MODIFIED.vhdl vsim -novopt -do runall.do -c test_bminmax $QUIET \rm test_breduce_pack_MODIFIED.vhdl cat test_breduce_pack.vhdl | sed -f test_breduce_pack.sed > test_breduce_pack_MODIFIED.vhdl vcom $OPTIONS test_breduce_pack_MODIFIED.vhdl vsim -novopt -do runall.do -c test_breduce_pack $QUIET vcom $OPTIONS test_bstring.vhdl vsim -novopt -do runall.do -c test_bstring $QUIET #Test for NUMERIC_STD_UNSIGNED \rm test_nuns_MODIFIED.vhdl cat test_nuns.vhdl | sed -f test_nuns.sed > test_nuns_MODIFIED.vhdl vcom $OPTIONS test_nuns_MODIFIED.vhdl vsim -novopt -do runall.do -c test_nuns $QUIET \rm test_nuns_su_MODIFIED.vhdl cat test_nuns_su.vhdl | sed -f test_nuns.sed > test_nuns_su_MODIFIED.vhdl vcom $OPTIONS test_nuns_su_MODIFIED.vhdl vsim -novopt -do runall.do -c test_nuns_su $QUIET #Test for NUMERIC_BIT_UNSIGNED \rm test_nbuns_MODIFIED.vhdl cat test_nbuns.vhdl | sed -f test_nbuns.sed > test_nbuns_MODIFIED.vhdl vcom $OPTIONS test_nbuns_MODIFIED.vhdl vsim -novopt -do runall.do -c test_nbuns $QUIET #Test for the MATH_REAL package vcom $OPTIONS real_tests.vhdl vsim -novopt -do runall.do -c real_tests $QUIET #Test for the MATH_COMPLEX package vcom $OPTIONS complex_tests.vhdl vsim -novopt -do runall.do -c complex_tests $QUIET #Test for the fixed point package vcom $OPTIONS test_fixed.vhdl vsim -novopt -do runall.do -c test_fixed $QUIET \rm test_fixed2_MODIFIED.vhdl cat test_fixed2.vhdl | sed -f test_fixed2.sed > test_fixed2_MODIFIED.vhdl vcom $OPTIONS test_fixed2_MODIFIED.vhdl vsim -novopt -do runall.do -c test_fixed2 $QUIET \rm test_fixed3_MODIFIED.vhdl cat test_fixed3.vhdl | sed -f test_fixed3.sed > test_fixed3_MODIFIED.vhdl vcom $OPTIONS test_fixed3_MODIFIED.vhdl vsim -novopt -do runall.do -c test_fixed3 $QUIET \rm fixed_synth_MODIFIED.vhdl cat fixed_synth.vhdl | sed -f fixed_synth.sed > fixed_synth_MODIFIED.vhdl vcom $OPTIONS fixed_synth_MODIFIED.vhdl vcom $OPTIONS test_fixed_synth.vhdl vsim -novopt -do runall.do -c test_fixed_synth $QUIET \rm fixed_noround_pkg_MODIFIED.vhdl cat fixed_pkg_MODIFIED.vhdl | sed -f fixed_noround_pkg.sed > fixed_noround_pkg_MODIFIED.vhdl vcom $OPTIONS fixed_noround_pkg_MODIFIED.vhdl vcom $OPTIONS test_fixed_nr.vhdl vsim -novopt -do runall.do -c test_fixed_nr $QUIET #Test for the floating point package vcom $OPTIONS test_fp32.vhdl vsim -novopt -do runall.do -c test_fp32 $QUIET \rm test_fphdlbase_MODIFIED.vhdl cat test_fphdlbase.vhdl | sed -f test_fphdlbase.sed > test_fphdlbase_MODIFIED.vhdl vcom $OPTIONS test_fphdlbase_MODIFIED.vhdl vsim -novopt -do runall.do -c test_fphdlbase $QUIET vcom $OPTIONS test_fphdl64.vhdl vsim -novopt -do runall.do -c test_fphdl64 $QUIET vcom $OPTIONS test_fphdl128.vhdl vsim -novopt -do runall.do -c test_fphdl128 $QUIET vcom $OPTIONS test_fpfixed.vhdl vsim -novopt -do runall.do -c test_fpfixed $QUIET \rm float_synth_MODIFIED.vhdl cat float_synth.vhdl | sed -f float_synth.sed > float_synth_MODIFIED.vhdl vcom $OPTIONS float_synth_MODIFIED.vhdl vcom $OPTIONS test_float_synth.vhdl vsim -novopt -do runall.do -c test_float_synth $QUIET \rm float_noround_pkg_MODIFIED.vhdl cat float_pkg_MODIFIED.vhdl | sed -f float_noround_pkg.sed > float_noround_pkg_MODIFIED.vhdl vcom $OPTIONS float_noround_pkg_MODIFIED.vhdl vcom $OPTIONS test_fphdl16.vhdl vsim -novopt -do runall.do -c test_fphdl16 $QUIET \rm float_roundneg_pkg_MODIFIED.vhdl cat float_pkg_MODIFIED.vhdl | sed -f float_roundneg_pkg.sed > float_roundneg_pkg_MODIFIED.vhdl vcom $OPTIONS float_roundneg_pkg_MODIFIED.vhdl vcom $OPTIONS test_fphdl.vhdl vsim -novopt -do runall.do -c test_fphdl $QUIET \rm runall.do