aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/dispin01/tb_rec01.vhdl
blob: fbfda0a7e515f2cf9f742dafb141c1134126bdbe (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
entity tb_rec01 is
end tb_rec01;

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

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

  process
    constant av : std_logic_vector := b"11001";
    constant bv : std_logic_vector := b"01011";
    constant rv : std_logic_vector := b"11011";
  begin
    for i in av'range loop
      inp.a <= av (i);
      inp.b <= bv (i);
      wait for 1 ns;
      assert r = rv(i) severity failure;
    end loop;
    wait;
  end process;
end behav;