diff options
Diffstat (limited to 'testsuite')
-rw-r--r-- | testsuite/synth/issue1413/fixed_point_example.vhdl | 16 | ||||
-rw-r--r-- | testsuite/synth/issue1413/repro1.vhdl | 15 | ||||
-rwxr-xr-x | testsuite/synth/issue1413/testsuite.sh | 10 |
3 files changed, 41 insertions, 0 deletions
diff --git a/testsuite/synth/issue1413/fixed_point_example.vhdl b/testsuite/synth/issue1413/fixed_point_example.vhdl new file mode 100644 index 000000000..d5dc35601 --- /dev/null +++ b/testsuite/synth/issue1413/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 +end fixed_point_example; + +architecture behavioral of fixed_point_example is + constant C_SIGNED_VALUE : sfixed(7 downto 0) := (others => '1'); + constant C_RECIPROCAL_SIGNED_VALUE : sfixed(0 downto -8) := reciprocal(C_SIGNED_VALUE); + + constant C_UNSIGNED_VALUE : ufixed(7 downto 0) := (others => '1'); + constant C_RECIPROCAL_UNSIGNED_VALUE : ufixed(1 downto -7) := reciprocal(C_UNSIGNED_VALUE); +begin +end behavioral; diff --git a/testsuite/synth/issue1413/repro1.vhdl b/testsuite/synth/issue1413/repro1.vhdl new file mode 100644 index 000000000..9f3d3336f --- /dev/null +++ b/testsuite/synth/issue1413/repro1.vhdl @@ -0,0 +1,15 @@ +library ieee; + use ieee.std_logic_1164.all; + use ieee.numeric_Std.all; + +entity repro1 is + port (res : out unsigned(7 downto 0)); +end; + +architecture behav of repro1 is + constant left : unsigned := x"71"; + constant right : unsigned := x"03"; + constant r : unsigned := left / right; +begin + res <= r; +end behav; diff --git a/testsuite/synth/issue1413/testsuite.sh b/testsuite/synth/issue1413/testsuite.sh new file mode 100755 index 000000000..2fce0f56b --- /dev/null +++ b/testsuite/synth/issue1413/testsuite.sh @@ -0,0 +1,10 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +synth_analyze repro1 +synth_analyze fixed_point_example +clean + +echo "Test successful" |