aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2017-11-05 07:49:12 +0100
committerTristan Gingold <tgingold@free.fr>2017-11-05 07:53:13 +0100
commiteb461d9a6f010d9cb77a0cee6e9850b1aee0dcf7 (patch)
treed3108e17f244f78f75690b4c357d5eb1ecf6e529 /testsuite
parentf18b2d8c37f0b7a469b89de30fe964c5db580c64 (diff)
downloadghdl-eb461d9a6f010d9cb77a0cee6e9850b1aee0dcf7.tar.gz
ghdl-eb461d9a6f010d9cb77a0cee6e9850b1aee0dcf7.tar.bz2
ghdl-eb461d9a6f010d9cb77a0cee6e9850b1aee0dcf7.zip
Handle complex subtype in unbounded records.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/gna/issue418/repro3.vhdl37
-rwxr-xr-xtestsuite/gna/issue418/testsuite.sh3
2 files changed, 40 insertions, 0 deletions
diff --git a/testsuite/gna/issue418/repro3.vhdl b/testsuite/gna/issue418/repro3.vhdl
new file mode 100644
index 000000000..b9f2182e9
--- /dev/null
+++ b/testsuite/gna/issue418/repro3.vhdl
@@ -0,0 +1,37 @@
+entity repro3 is
+ generic (blen : natural := 8);
+end;
+
+architecture behav of repro3 is
+ -- AXI-Lite Interface signals
+ type address_channel is record
+ --DUT inputs
+ awaddr : bit_vector;
+ awvalid : bit;
+ end record;
+
+
+ type t_if is record
+ write_channel : address_channel;
+ data : bit_vector (blen - 1 downto 0);
+ end record;
+
+ subtype ST_IF_32 is t_if (
+ write_channel (
+ awaddr(31 downto 0) )
+ );
+
+ signal s : st_if_32;
+begin
+ s.write_channel.awaddr <= x"0000_1000", x"1000_ffff" after 2 ns;
+ s.data <= (others => '1');
+ process
+ begin
+ wait for 1 ns;
+ assert s.write_channel.awvalid = '0';
+ assert s.write_channel.awaddr(12) = '1';
+ wait for 2 ns;
+ assert s.write_channel.awaddr(14) = '1';
+ wait;
+ end process;
+end;
diff --git a/testsuite/gna/issue418/testsuite.sh b/testsuite/gna/issue418/testsuite.sh
index 111e0e6d6..ffbba4d1c 100755
--- a/testsuite/gna/issue418/testsuite.sh
+++ b/testsuite/gna/issue418/testsuite.sh
@@ -19,6 +19,9 @@ if ghdl_has_feature repro2 ghw; then
# How to test the ghw ? Use ghwdump ?
fi
+analyze repro3.vhdl
+elab_simulate repro3
+
clean
rm -f repro.ghw repro2.ghw tc749.ghw