From 27824b89e270759419cf9854e7470388acfa7716 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Fri, 20 Mar 2020 07:44:09 +0100 Subject: testsuite/synth: add tests for #1163 --- testsuite/synth/issue1163/bug.vhdl | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 testsuite/synth/issue1163/bug.vhdl (limited to 'testsuite/synth/issue1163/bug.vhdl') diff --git a/testsuite/synth/issue1163/bug.vhdl b/testsuite/synth/issue1163/bug.vhdl new file mode 100644 index 000000000..1e50c5f93 --- /dev/null +++ b/testsuite/synth/issue1163/bug.vhdl @@ -0,0 +1,36 @@ +library IEEE; +use IEEE.std_logic_1164.all; +use IEEE.numeric_std.all; + +entity bug is + generic( + W : positive := 4; + N : positive := 4 + ); + port( + clk : in std_ulogic; + reset_n : in std_ulogic + ); +end bug; + +architecture behav of bug is + type queue_info_t is record + dummy : integer range 0 to W-1; + strb : std_ulogic_vector(W-1 downto 0); + end record; + + type queues_t is array (0 to N-1) of queue_info_t; + signal queues : queues_t; +begin + + process(clk, reset_n) + variable index : integer range 0 to N-1; + begin + if reset_n = '0' then + elsif rising_edge(clk) then + for i in 0 to W-1 loop + queues(index).strb(i) <= '0'; + end loop; + end if; + end process; +end architecture; -- cgit v1.2.3