aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1241/tb_top.vhdl
blob: 65342012298736af4779b15730e87268da70a090 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
entity tb_top is
end tb_top;

library ieee;
use ieee.std_logic_1164.all;
use ieee.numeric_std.all;

architecture behav of tb_top is
  signal sel : unsigned(1 downto 0);
  signal data : std_logic_vector(3 downto 0);
  signal q : std_logic;
begin
  dut: entity work.top
    port map (sel, data, q);

  process
  begin
    data <= "1001";
    sel <= "10";
    wait for 1 ns;
    assert q = '0' severity failure;

    sel <= "11";
    wait for 1 ns;
    assert q = '1' severity failure;

    sel <= "00";
    wait for 1 ns;
    assert q = '1' severity failure;

    sel <= "01";
    wait for 1 ns;
    assert q = '0' severity failure;

    wait;
  end process;
end behav;