diff options
Diffstat (limited to 'testsuite/gna/issue1125/etest.vhdl')
-rw-r--r-- | testsuite/gna/issue1125/etest.vhdl | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/gna/issue1125/etest.vhdl b/testsuite/gna/issue1125/etest.vhdl new file mode 100644 index 000000000..dd09ef250 --- /dev/null +++ b/testsuite/gna/issue1125/etest.vhdl @@ -0,0 +1,29 @@ +library IEEE; + use IEEE.std_logic_1164.all; + use IEEE.numeric_std.all; + +entity etest is +end; + +architecture atest of etest is + +function foo(a : std_logic_vector) return unsigned is +variable v : unsigned(3 downto 0):=(others=>'0') ; +begin + v := v + unsigned(a(1 downto 1)); + return v; +end; + +begin + + test : process + variable v : std_logic_vector(3 downto 0) ; + variable w : std_logic_vector(0 to 3); + variable x : unsigned(3 downto 0) ; + begin + x := foo(w); + -- x := x + unsigned(w(0 downto 0)) ; + wait; + end process ; -- test + +end; |