aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue202/repro_err.vhdl
blob: 2f2e532f58e613b877ab6e495e307c3e2f6bd002 (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
40
41
42
43
44
45
46
47
48
library ieee;
use     ieee.std_logic_1164.all;
use     ieee.numeric_std.all;

library OSVVM;

entity e is
end entity;

architecture a of e is
  subtype T_DATA		is std_logic_vector(31 downto 0);
  type T_DATA_VECTOR		is array(natural range <>) of T_DATA;

  type T_SCOREBOARD_DATA is record
    IsKey : std_logic;
    Meta  : std_logic_vector(31 downto 0);
    Data  : T_DATA_VECTOR(15 downto 0);
  end record;

  function match(expected : T_SCOREBOARD_DATA; actual : T_SCOREBOARD_DATA) return boolean is
  begin
    return TRUE;
  end function;
	
  function to_string(vector : T_SCOREBOARD_DATA) return string is
  begin
    return "to_string";
  end function;

  package P_Scoreboard is new OSVVM.ScoreboardGenericPkg
    generic map (
      ExpectedType        => T_SCOREBOARD_DATA,
      ActualType          => T_SCOREBOARD_DATA,
      Match               => match,
      expected_to_string  => to_string,
      actual_to_string    => to_string
    );
  alias T_SCOREBOARD is P_Scoreboard.ScoreBoardPType

  shared variable ScoreBoard : T_SCOREBOARD;  -- this causes the error message
begin
  process
    variable v : t_scoreboard_data;
  begin
    ScoreBoard.Push(v);
    wait;
  end process;
end architecture;