From f47d2c881d7807c73165bb42aa3880c992ed03d8 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Wed, 5 Aug 2020 18:17:38 +0200 Subject: testsuite/gna: add a test for #780 --- testsuite/gna/issue780/ent.vhdl | 27 +++++++++++++++++++++++++++ testsuite/gna/issue780/pkg.vhdl | 22 ++++++++++++++++++++++ testsuite/gna/issue780/testsuite.sh | 13 +++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 testsuite/gna/issue780/ent.vhdl create mode 100644 testsuite/gna/issue780/pkg.vhdl create mode 100755 testsuite/gna/issue780/testsuite.sh (limited to 'testsuite/gna') diff --git a/testsuite/gna/issue780/ent.vhdl b/testsuite/gna/issue780/ent.vhdl new file mode 100644 index 000000000..7d050a616 --- /dev/null +++ b/testsuite/gna/issue780/ent.vhdl @@ -0,0 +1,27 @@ +library ieee; +context ieee.ieee_std_context; + +entity dut is +end entity dut; + +architecture rtl of dut is + + type t_slv_array is array (natural range <>) of std_logic_vector; + type t_ipbus_tranaction_header is + record + protocol_version : natural range 0 to 2**4 - 1; + transaction_id : natural range 0 to 2**12 - 1; + words : natural range 0 to 2**8 - 1; + end record; + + type t_ipbus_transaction is + record + header : t_ipbus_tranaction_header; + bodyy : t_slv_array; + end record; + + signal transaction : t_ipbus_transaction(bodyy(7 downto 0)(31 downto 0)); + +begin + +end architecture rtl; diff --git a/testsuite/gna/issue780/pkg.vhdl b/testsuite/gna/issue780/pkg.vhdl new file mode 100644 index 000000000..65fca4d66 --- /dev/null +++ b/testsuite/gna/issue780/pkg.vhdl @@ -0,0 +1,22 @@ +library ieee; +use ieee.std_logic_1164.all; + +package pkg is + type t_slv_array is array (natural range <>) of std_logic_vector; + type t_ipbus_tranaction_header is + record + protocol_version : natural range 0 to 2**4 - 1; + transaction_id : natural range 0 to 2**12 - 1; + words : natural range 0 to 2**8 - 1; +-- type_id : t_ipbus_transaction_type_id; +-- info_code : t_ipbus_transaction_info_code; + end record; + + type t_ipbus_transaction is + record + header : t_ipbus_tranaction_header; + bodyy : t_slv_array; + end record; + + signal trans : t_ipbus_transaction(bodyy(7 downto 0)(31 downto 0)); +end pkg; diff --git a/testsuite/gna/issue780/testsuite.sh b/testsuite/gna/issue780/testsuite.sh new file mode 100755 index 000000000..5c46873c4 --- /dev/null +++ b/testsuite/gna/issue780/testsuite.sh @@ -0,0 +1,13 @@ +#! /bin/sh + +. ../../testenv.sh + +export GHDL_STD_FLAGS=--std=08 +analyze pkg.vhdl + +analyze ent.vhdl +elab_simulate dut + +clean + +echo "Test successful" -- cgit v1.2.3