aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2018-11-29 19:02:49 +0100
committerTristan Gingold <tgingold@free.fr>2018-11-29 20:55:18 +0100
commitb1cbde6fceb6353dab0042a402a186247b5e7f39 (patch)
tree8b7b590466c6b75bbd340fe338ae45cbc84950f0
parent00e936db3909875d17512543d2573c635bc2a38a (diff)
downloadghdl-b1cbde6fceb6353dab0042a402a186247b5e7f39.tar.gz
ghdl-b1cbde6fceb6353dab0042a402a186247b5e7f39.tar.bz2
ghdl-b1cbde6fceb6353dab0042a402a186247b5e7f39.zip
Adjust testcase #202
-rw-r--r--testsuite/gna/issue202/repro.vhdl2
-rw-r--r--testsuite/gna/issue202/repro_err.vhdl48
-rwxr-xr-xtestsuite/gna/issue202/testsuite.sh1
3 files changed, 50 insertions, 1 deletions
diff --git a/testsuite/gna/issue202/repro.vhdl b/testsuite/gna/issue202/repro.vhdl
index 2f2e532f5..fbca59ecf 100644
--- a/testsuite/gna/issue202/repro.vhdl
+++ b/testsuite/gna/issue202/repro.vhdl
@@ -35,7 +35,7 @@ architecture a of e is
expected_to_string => to_string,
actual_to_string => to_string
);
- alias T_SCOREBOARD is P_Scoreboard.ScoreBoardPType
+ alias T_SCOREBOARD is P_Scoreboard.ScoreBoardPType;
shared variable ScoreBoard : T_SCOREBOARD; -- this causes the error message
begin
diff --git a/testsuite/gna/issue202/repro_err.vhdl b/testsuite/gna/issue202/repro_err.vhdl
new file mode 100644
index 000000000..2f2e532f5
--- /dev/null
+++ b/testsuite/gna/issue202/repro_err.vhdl
@@ -0,0 +1,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;
diff --git a/testsuite/gna/issue202/testsuite.sh b/testsuite/gna/issue202/testsuite.sh
index 4d6404f90..a72b36013 100755
--- a/testsuite/gna/issue202/testsuite.sh
+++ b/testsuite/gna/issue202/testsuite.sh
@@ -5,6 +5,7 @@
export GHDL_STD_FLAGS=--std=08
analyze --work=osvvm ScoreboardGenericPkg.vhd
+analyze_failure repro_err.vhdl
analyze repro.vhdl
elab_simulate e