summaryrefslogtreecommitdiff
path: root/testsuite/gna
diff options
context:
space:
mode:
authorTristan Gingold2013-12-29 03:43:00 +0100
committerTristan Gingold2013-12-29 03:43:00 +0100
commit368f0c5ee747bdbc347217b0b866f05d5e02187d (patch)
treecbb9300bf97134daddf20ec0d75f87a0bf0b9167 /testsuite/gna
parentefd7628a8a7bfd079d2fd2ebd61c754dffb26178 (diff)
downloadghdl-368f0c5ee747bdbc347217b0b866f05d5e02187d.tar.gz
ghdl-368f0c5ee747bdbc347217b0b866f05d5e02187d.tar.bz2
ghdl-368f0c5ee747bdbc347217b0b866f05d5e02187d.zip
Add bug16287
Diffstat (limited to 'testsuite/gna')
-rw-r--r--testsuite/gna/bug16287/16287.vhd27
-rwxr-xr-xtestsuite/gna/bug16287/testsuite.sh10
2 files changed, 37 insertions, 0 deletions
diff --git a/testsuite/gna/bug16287/16287.vhd b/testsuite/gna/bug16287/16287.vhd
new file mode 100644
index 0000000..abf64a8
--- /dev/null
+++ b/testsuite/gna/bug16287/16287.vhd
@@ -0,0 +1,27 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity test is
+end test;
+
+architecture a of test is
+
+signal bt_addr : unsigned(6 downto 0) := "1010101";
+alias dw_addr : unsigned(4 downto 0) is bt_addr(6 downto 2 ) ;
+
+signal s64 : std_logic_vector(63 downto 0) := (others => '0');
+alias a32 : std_logic_vector(31 downto 0) is s64(31 downto 0);
+
+begin
+ s64 <= X"fedcba9876543210";
+
+ dw_addr <= "00000", "01010" after 1 ns, "11111" after 2 ns;
+
+ process(a32, bt_addr) is
+ begin
+ report "A32 = " & integer'image(to_integer(unsigned(a32))) severity note;
+ report "bt_addr = " & integer'image(to_integer(bt_addr)) severity note;
+ end process;
+
+end a;
diff --git a/testsuite/gna/bug16287/testsuite.sh b/testsuite/gna/bug16287/testsuite.sh
new file mode 100755
index 0000000..d3464d1
--- /dev/null
+++ b/testsuite/gna/bug16287/testsuite.sh
@@ -0,0 +1,10 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze 16287.vhd
+elab_simulate test
+
+clean
+
+echo "Test successful"