diff options
author | Tristan Gingold <tgingold@free.fr> | 2022-04-26 10:54:46 +0200 |
---|---|---|
committer | Tristan Gingold <tgingold@free.fr> | 2022-04-27 05:07:35 +0200 |
commit | d3953518b0f819040941303939ac48fac3d4b06f (patch) | |
tree | 5ac92f68645e80d246fe02edecbaffb9f1f133fd /testsuite/gna/bug0131/to_str1.vhdl | |
parent | 966e54b26cafee87071539c81503918ed893cb5d (diff) | |
download | ghdl-d3953518b0f819040941303939ac48fac3d4b06f.tar.gz ghdl-d3953518b0f819040941303939ac48fac3d4b06f.tar.bz2 ghdl-d3953518b0f819040941303939ac48fac3d4b06f.zip |
testsuite/gna: add a test for 2008 static ieee operations
Diffstat (limited to 'testsuite/gna/bug0131/to_str1.vhdl')
-rw-r--r-- | testsuite/gna/bug0131/to_str1.vhdl | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/testsuite/gna/bug0131/to_str1.vhdl b/testsuite/gna/bug0131/to_str1.vhdl new file mode 100644 index 000000000..c1c2c1579 --- /dev/null +++ b/testsuite/gna/bug0131/to_str1.vhdl @@ -0,0 +1,23 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity to_str1 is +end; + +architecture behav of to_str1 is + constant v : std_logic_vector (15 downto 0) := x"ab02"; + constant v_1 : std_logic_vector (15 downto 0) := v and x"cfff"; + constant v1_str : string (1 to 4) := to_hstring (v_1); + constant t : boolean := v1_str = "8b02"; +begin + process + begin + case true is + when t => + report "Test OK"; + when false => + assert false severity failure; + end case; + wait; + end process; +end behav; |