aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue257/minimum_tb2.vhdl
blob: 4b0a6420eda85ab22e79bd2232c91fe7d0ee80ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
entity minimum_tb2 is
end minimum_tb2;

architecture tb of minimum_tb2 is
begin
  process
    type natural_vector is array(natural range<>) of natural;
    constant A : natural_vector(1 downto 0) := (4, 6);
    variable b : natural_vector (0 to 1);
  begin
    -- Using the two-argument MINIMUM function -> analyzes, elaborates and runs
    report "MIN(a,b): "&integer'image(MINIMUM(a(1), a(0)));

    -- Using a MINIMUM over an array argument -> analyzes but crashes elaboration
    report "MIN(arr): "&integer'image(MINIMUM(a));

    b := a;
    report "MIN(arr): "&integer'image(MINIMUM(b));
  
    wait;  -- forever
  end process;
end tb;