diff options
author | Tristan Gingold <tgingold@free.fr> | 2021-02-27 17:20:56 +0100 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2021-02-27 17:20:56 +0100 |
commit | f5e3ef10265440a3efc95281fef295cba6aab8a9 (patch) | |
tree | fcc8d17b898ae1a2ab92c147f9fddb66414fbe66 /testsuite/synth | |
parent | e01d0227af0092db12a6e08f3b8278d860b37416 (diff) | |
download | ghdl-f5e3ef10265440a3efc95281fef295cba6aab8a9.tar.gz ghdl-f5e3ef10265440a3efc95281fef295cba6aab8a9.tar.bz2 ghdl-f5e3ef10265440a3efc95281fef295cba6aab8a9.zip |
testsuite/synth: add a test for #1665
Diffstat (limited to 'testsuite/synth')
-rw-r--r-- | testsuite/synth/issue1665/test.vhdl | 16 | ||||
-rwxr-xr-x | testsuite/synth/issue1665/testsuite.sh | 8 |
2 files changed, 24 insertions, 0 deletions
diff --git a/testsuite/synth/issue1665/test.vhdl b/testsuite/synth/issue1665/test.vhdl new file mode 100644 index 000000000..3591e23c7 --- /dev/null +++ b/testsuite/synth/issue1665/test.vhdl @@ -0,0 +1,16 @@ +library ieee; +use ieee.fixed_pkg.all; +use ieee.math_real.all; + +entity test is +end entity test; + +architecture synthesis of test is + constant test1 : real := (2.0**6); -- works + constant test2 : real := (2.0**6.0); -- unhandled predefined IEEE operator "**" + constant test3 : real := arctan(2.0); -- unhandled call to ieee function "arctan" + signal a : sfixed(7 downto 0); +begin +a <= to_sfixed(test2, a); + assert test2 = 64.0 severity failure; +end architecture synthesis; diff --git a/testsuite/synth/issue1665/testsuite.sh b/testsuite/synth/issue1665/testsuite.sh new file mode 100755 index 000000000..1bd00c114 --- /dev/null +++ b/testsuite/synth/issue1665/testsuite.sh @@ -0,0 +1,8 @@ +#! /bin/sh + +. ../../testenv.sh + +GHDL_STD_FLAGS=--std=08 +synth_only test + +echo "Test successful" |