aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/lit01/tb_aggr02.vhdl
blob: d864557ad17a3de15df0d9bf86310b5b9068c49e (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_aggr02 is
end tb_aggr02;

library ieee;
use ieee.std_logic_1164.all;

architecture behav of tb_aggr02 is
  signal i0 : natural range 0 to 5;
  signal o : std_logic_vector(7 downto 0);
begin
  dut: entity work.aggr02
    port map (i0, o);

  process
  begin
    i0 <= 0;
    wait for 1 ns;
    assert o = x"00" severity failure;

    i0 <= 1;
    wait for 1 ns;
    assert o = x"81" severity failure;

    i0 <= 2;
    wait for 1 ns;
    assert o = x"02" severity failure;

    wait;
  end process;
end behav;