aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite/synth/issue1113
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2020-01-25 08:25:43 +0100
committerTristan Gingold <tgingold@free.fr>2020-01-25 08:25:43 +0100
commit52a9954e29fe72ed5c90f696bc8a600b22089dea (patch)
tree55e4980c8fae19337a5b83fa4b54c00d01e8cd27 /testsuite/synth/issue1113
parentc2168c679ca3d634d7bdb7b1ca2fcb198d100b6d (diff)
downloadghdl-52a9954e29fe72ed5c90f696bc8a600b22089dea.tar.gz
ghdl-52a9954e29fe72ed5c90f696bc8a600b22089dea.tar.bz2
ghdl-52a9954e29fe72ed5c90f696bc8a600b22089dea.zip
testsuite/synth: add test for #1113
Diffstat (limited to 'testsuite/synth/issue1113')
-rw-r--r--testsuite/synth/issue1113/memory_depth_one.vhdl16
-rwxr-xr-xtestsuite/synth/issue1113/testsuite.sh11
2 files changed, 27 insertions, 0 deletions
diff --git a/testsuite/synth/issue1113/memory_depth_one.vhdl b/testsuite/synth/issue1113/memory_depth_one.vhdl
new file mode 100644
index 000000000..36152c63a
--- /dev/null
+++ b/testsuite/synth/issue1113/memory_depth_one.vhdl
@@ -0,0 +1,16 @@
+library ieee;
+use ieee.std_logic_1164.all;
+use ieee.numeric_std.all;
+
+entity memory_depth_one is
+ port (
+ address: in unsigned(0 downto 0);
+ output: out std_logic
+ );
+end entity;
+
+architecture arch of memory_depth_one is
+ constant store: std_logic_vector(0 downto 0) := "0";
+begin
+ output <= store(to_integer(address));
+end arch;
diff --git a/testsuite/synth/issue1113/testsuite.sh b/testsuite/synth/issue1113/testsuite.sh
new file mode 100755
index 000000000..4bcac5d87
--- /dev/null
+++ b/testsuite/synth/issue1113/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+for t in memory_depth_one; do
+ synth $t.vhdl -e $t > syn_$t.vhdl
+ analyze syn_$t.vhdl
+ clean
+done
+
+echo "Test successful"