2 use ieee.std_logic_1164.all;
6 din : in std_logic_vector(3 downto 0);
7 dout : out std_logic_vector(1 downto 0)
11 architecture behavior of testcase is
12 signal testidx : natural range 3 downto 2;
15 --------------------------------------------------------------
16 -- tc0 does not cause an overflow error
19 -- if (din(3)='1') then
20 -- dout <= din(2 downto 1);
22 -- dout <= din(1 downto 0);
25 --------------------------------------------------------------
27 --------------------------------------------------------------
28 -- tc1 with the dout assignment does cause an overflow error
38 dout <= din(testidx-1 downto testidx-dout'length);
39 --------------------------------------------------------------