aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--testsuite/gna/issue1364/mwe.vhdl38
-rwxr-xr-xtestsuite/gna/issue1364/testsuite.sh9
2 files changed, 47 insertions, 0 deletions
diff --git a/testsuite/gna/issue1364/mwe.vhdl b/testsuite/gna/issue1364/mwe.vhdl
new file mode 100644
index 000000000..9657e98b5
--- /dev/null
+++ b/testsuite/gna/issue1364/mwe.vhdl
@@ -0,0 +1,38 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity mwe is
+ port(
+ n_rst_i : in std_logic;
+ clk_i : in std_logic
+ );
+end entity mwe;
+
+architecture arch of mwe is
+
+-- I declare a new type which is an array of buses
+type my_new_type is array(natural range <>) of std_logic_vector(31 downto 0);
+
+-- Then I declare a constant of that new type
+constant constant_of_my_new_type : my_new_type (0 to 7) := ((others=>(others => '0')));
+
+signal signal_of_my_new_type : my_new_type (0 to 7);
+
+begin
+
+process(clk_i)
+begin
+
+ -- if Reset low then signal_of_my_new_type = constant_of_my_new_type
+ -- else, signal_of_my_new_type is filled with one at the next clock rising edge
+
+ if n_rst_i = '0' then
+ signal_of_my_new_type <= constant_of_my_new_type;
+ elsif rising_edge(clk_i) then
+ signal_of_my_new_type <= ((others=>(others => '1')));
+ end if;
+
+end process;
+
+end architecture;
diff --git a/testsuite/gna/issue1364/testsuite.sh b/testsuite/gna/issue1364/testsuite.sh
new file mode 100755
index 000000000..141fb1837
--- /dev/null
+++ b/testsuite/gna/issue1364/testsuite.sh
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+analyze_failure mwe.vhdl
+
+clean
+
+echo "Test successful"