aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/synth/issue1159/fixed_point_example.vhdl16
-rwxr-xr-xtestsuite/synth/issue1159/testsuite.sh10
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"