aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/int01/tb_prio02.vhdl
blob: cc1fa40b61931e6c6358efb1935c4bfddf9b2813 (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
entity tb_prio02 is
end tb_prio02;

library ieee;
use ieee.std_logic_1164.all;

architecture behav of tb_prio02 is
  signal d : std_logic_vector(15 downto 0);
  signal p : natural;
begin
  dut: entity work.prio02
    port map (d, p);

  process
  begin
    d <= x"0004";
    wait for 1 ns;
    assert p = 2 severity failure;

    d <= x"8000";
    wait for 1 ns;
    assert p = 15 severity failure;

    d <= x"0024";
    wait for 1 ns;
    assert p = 5 severity failure;

    wait;
  end process;
end behav;