diff options
author | Tristan Gingold <tgingold@free.fr> | 2020-03-24 18:13:10 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2020-03-24 18:13:10 +0100 |
commit | ae9f2c7c46b38e096dd542dc2d1395b4ef3b8b09 (patch) | |
tree | b2faecb5daca827ef0ef0d8cafecc4b87f8b413d | |
parent | 371ac66310d68b72a83718891e04921a73d1d4ea (diff) | |
download | ghdl-ae9f2c7c46b38e096dd542dc2d1395b4ef3b8b09.tar.gz ghdl-ae9f2c7c46b38e096dd542dc2d1395b4ef3b8b09.tar.bz2 ghdl-ae9f2c7c46b38e096dd542dc2d1395b4ef3b8b09.zip |
testsuite/synth: add a test for #1159
-rw-r--r-- | testsuite/synth/issue1159/fixed_point_example.vhdl | 16 | ||||
-rwxr-xr-x | testsuite/synth/issue1159/testsuite.sh | 10 |
2 files changed, 26 insertions, 0 deletions
diff --git a/testsuite/synth/issue1159/fixed_point_example.vhdl b/testsuite/synth/issue1159/fixed_point_example.vhdl new file mode 100644 index 000000000..d44580873 --- /dev/null +++ b/testsuite/synth/issue1159/fixed_point_example.vhdl @@ -0,0 +1,16 @@ +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); + data_out : out std_logic_vector(7 downto 0) + ); +end fixed_point_example; + +architecture behavioral of fixed_point_example is +begin + data_out <= to_slv(to_sfixed(data_in, 7, 0)); +end behavioral; diff --git a/testsuite/synth/issue1159/testsuite.sh b/testsuite/synth/issue1159/testsuite.sh new file mode 100755 index 000000000..274c4005c --- /dev/null +++ b/testsuite/synth/issue1159/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +synth_analyze fixed_point_example + +clean + +echo "Test successful" |