summaryrefslogtreecommitdiff
path: root/testsuite/vests/vhdl-93/clifton-labs/compliant/functional/functions/unconstrained_parameter.vhdl
blob: 38a9f9a9bdcbc85c4744a53541c16b81f17f52a0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
entity test is
end test;

architecture only of test is
begin  -- onlty
  doit: process
    function returns_last( p : bit_vector )
      return bit is
    begin
      return p( p'length - 1 );
    end function;
  begin  -- process doit
    assert returns_last( "00" ) = '0' report "TEST FAILED" severity failure;
    assert returns_last( "11" ) = '1' report "TEST FAILED" severity failure;
    report "TEST PASSED";
    wait;
  end process doit;
end only;