aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/if01/if02.vhdl
blob: 53fee68645fe5191cad5a042f9ed6e8f8e19b694 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
library ieee;
use ieee.std_logic_1164.all;

entity if02 is
  port (c : std_logic_vector(7 downto 0);
        s : std_logic;
        r : out std_logic_vector(7 downto 0));
end if02;

architecture behav of if02 is
begin
  process (c, s)
  begin
    if s = '0' then
      r (6 downto 0) <= c (7 downto 1);
      r (7) <= c (0);
    else
      r (0) <= c (7);
      r (7 downto 1) <= c (6 downto 0);
    end if;
  end process;
end behav;