diff options
-rw-r--r-- | testsuite/synth/issue1417/fixed_point_example.vhdl | 21 | ||||
-rwxr-xr-x | testsuite/synth/issue1417/testsuite.sh | 9 |
2 files changed, 30 insertions, 0 deletions
diff --git a/testsuite/synth/issue1417/fixed_point_example.vhdl b/testsuite/synth/issue1417/fixed_point_example.vhdl new file mode 100644 index 000000000..bd64da3a3 --- /dev/null +++ b/testsuite/synth/issue1417/fixed_point_example.vhdl @@ -0,0 +1,21 @@ +library ieee; + use ieee.std_logic_1164.all; + use ieee.fixed_pkg.all; + use ieee.fixed_float_types.all; + +entity fixed_point_example is + port ( + data_in : in std_logic_vector(7 downto 0) + ); +end fixed_point_example; + +architecture behavioral of fixed_point_example is + signal data_tmp : sfixed(1 downto -3); +begin + data_tmp <= resize( + to_sfixed(data_in, 3, -4), + data_tmp, + fixed_saturate, + fixed_round + ); +end behavioral; diff --git a/testsuite/synth/issue1417/testsuite.sh b/testsuite/synth/issue1417/testsuite.sh new file mode 100755 index 000000000..3690ae8a4 --- /dev/null +++ b/testsuite/synth/issue1417/testsuite.sh @@ -0,0 +1,9 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +synth_analyze fixed_point_example +clean + +echo "Test successful" |