diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-07-30 19:28:31 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-07-30 19:28:31 +0200 |
commit | 39d5d4ee51c0a655b862f52b9d1edba25bf8eed8 (patch) | |
tree | fa6937bf0fbd2bf70bc291d93e6572e59a33f5cd /testsuite | |
parent | c5a1561aaca4e7af5b8cafa40022cafa913cd007 (diff) | |
download | ghdl-39d5d4ee51c0a655b862f52b9d1edba25bf8eed8.tar.gz ghdl-39d5d4ee51c0a655b862f52b9d1edba25bf8eed8.tar.bz2 ghdl-39d5d4ee51c0a655b862f52b9d1edba25bf8eed8.zip |
testsuite/synth: add a test for #1417
Diffstat (limited to 'testsuite')
-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" |