diff options
Diffstat (limited to 'testsuite/synth/var01/var05.vhdl')
-rw-r--r-- | testsuite/synth/var01/var05.vhdl | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/synth/var01/var05.vhdl b/testsuite/synth/var01/var05.vhdl new file mode 100644 index 000000000..2965e3c1a --- /dev/null +++ b/testsuite/synth/var01/var05.vhdl @@ -0,0 +1,21 @@ +library ieee; +use ieee.std_logic_1164.all; + +entity var05 is + port (sel : std_logic; + a, b : std_logic_vector (1 downto 0); + res : out std_logic_vector (1 downto 0)); +end var05; + +architecture behav of var05 is +begin + process (all) + variable idx : integer; + begin + res <= a; + if sel = '1' then + idx := 1; + res <= b; + end if; + end process; +end behav; |