aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/dispin01/tb_rec03.vhdl
blob: 7495ac1832dead8a4e38c34ca76799660f42f29c (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
38
39
entity tb_rec03 is
end tb_rec03;

library ieee;
use ieee.std_logic_1164.all;
use work.rec03_pkg.all;

architecture behav of tb_rec03 is
  signal inp : myrec;
  signal r : std_logic;
begin
  dut: entity work.rec03
    port map (inp => inp, o => r);

  process
  begin
    inp.a <= s0;
    inp.b <= '1';
    wait for 1 ns;
    assert r = '1' severity failure;

    inp.a <= s2;
    inp.b <= '1';
    wait for 1 ns;
    assert r = '1' severity failure;

    inp.a <= s2;
    inp.b <= '0';
    wait for 1 ns;
    assert r = '0' severity failure;

    inp.a <= s3;
    inp.b <= '0';
    wait for 1 ns;
    assert r = '1' severity failure;

    wait;
  end process;
end behav;