aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/gna/issue1420
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-08-04 18:46:57 +0200
committerTristan Gingold <tgingold@free.fr>2020-08-04 18:46:57 +0200
commitb623f87a6143ea71277969d79de7bd6a92443b93 (patch)
tree9973fcc44f4b98dafbaee706bfb254fce18cd19d /testsuite/gna/issue1420
parentc1f5f40de1a580ff708122b8f1a5e2f8d9e7cdc3 (diff)
downloadghdl-b623f87a6143ea71277969d79de7bd6a92443b93.tar.gz
ghdl-b623f87a6143ea71277969d79de7bd6a92443b93.tar.bz2
ghdl-b623f87a6143ea71277969d79de7bd6a92443b93.zip
testsuite/gna: add a test for #1420
Diffstat (limited to 'testsuite/gna/issue1420')
-rw-r--r--testsuite/gna/issue1420/repro1.vhdl25
-rwxr-xr-xtestsuite/gna/issue1420/testsuite.sh14
2 files changed, 39 insertions, 0 deletions
diff --git a/testsuite/gna/issue1420/repro1.vhdl b/testsuite/gna/issue1420/repro1.vhdl
new file mode 100644
index 000000000..f661f1e4d
--- /dev/null
+++ b/testsuite/gna/issue1420/repro1.vhdl
@@ -0,0 +1,25 @@
+entity repro1 is
+end entity;
+
+architecture tb of repro1 is
+
+ type t_av_st is record
+ data : bit_vector; -- src -> sink
+ valid : bit; -- src -> sink
+ empty : bit_vector; -- src -> sink
+ chnnl : bit_vector; -- src -> sink
+ end record t_av_st;
+ type t_arr_av_st is array (NATURAL range <>) of t_av_st;
+
+ constant C_VC_SOURCES : positive := 3;
+ constant C_VC_SINKS : positive := 3;
+ subtype vc_sources_range is natural range C_VC_SOURCES downto 1;
+ subtype vc_sinks_range is natural range C_VC_SINKS downto 1;
+ signal avst_snk : t_arr_av_st(vc_sinks_range)(data(8 downto 0), empty(0 downto 0), chnnl(0 downto 0));
+ signal avst_src : t_arr_av_st(vc_sources_range)(data(8 downto 0), empty(0 downto 0), chnnl(0 downto 0));
+ signal sink_sel : bit_vector(C_VC_SOURCES downto 1);
+ signal source_sel : bit_vector(C_VC_SINKS downto 1);
+
+begin
+
+end architecture tb;
diff --git a/testsuite/gna/issue1420/testsuite.sh b/testsuite/gna/issue1420/testsuite.sh
new file mode 100755
index 000000000..5cfa1ed62
--- /dev/null
+++ b/testsuite/gna/issue1420/testsuite.sh
@@ -0,0 +1,14 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+GHDL_STD_FLAGS=--std=08
+
+analyze repro1.vhdl
+if ghdl_has_feature repro1 dump-rti; then
+ elab_simulate repro1 --dump-rti
+fi
+
+clean
+
+echo "Test successful"