aboutsummaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2023-03-12 17:30:34 +0100
committerTristan Gingold <tgingold@free.fr>2023-03-13 07:29:24 +0100
commit9e8a769c56cc3e12ae3c2d03e768c2255b3c5d76 (patch)
treec8e0f58b72ae0827efe0a676c34d2f5d44553ddf /testsuite
parent5d90b04e624713e5341439167f7b54a699ce7c6b (diff)
downloadghdl-9e8a769c56cc3e12ae3c2d03e768c2255b3c5d76.tar.gz
ghdl-9e8a769c56cc3e12ae3c2d03e768c2255b3c5d76.tar.bz2
ghdl-9e8a769c56cc3e12ae3c2d03e768c2255b3c5d76.zip
testsuite/gna: add a test for #2388
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/gna/issue2388/testsuite.sh11
-rw-r--r--testsuite/gna/issue2388/top_a.vhd7
-rw-r--r--testsuite/gna/issue2388/top_e.vhd37
3 files changed, 55 insertions, 0 deletions
diff --git a/testsuite/gna/issue2388/testsuite.sh b/testsuite/gna/issue2388/testsuite.sh
new file mode 100755
index 000000000..3f9b189f8
--- /dev/null
+++ b/testsuite/gna/issue2388/testsuite.sh
@@ -0,0 +1,11 @@
+#! /bin/sh
+
+. ../../testenv.sh
+
+run $GHDL -i top_a.vhd top_e.vhd
+run $GHDL -m unit_a
+simulate unit_a
+
+clean
+
+echo "Test successful"
diff --git a/testsuite/gna/issue2388/top_a.vhd b/testsuite/gna/issue2388/top_a.vhd
new file mode 100644
index 000000000..b259be5df
--- /dev/null
+++ b/testsuite/gna/issue2388/top_a.vhd
@@ -0,0 +1,7 @@
+
+architecture rtl of unit_b is
+begin
+
+ b <= not a;
+
+end architecture;
diff --git a/testsuite/gna/issue2388/top_e.vhd b/testsuite/gna/issue2388/top_e.vhd
new file mode 100644
index 000000000..9933cb6e6
--- /dev/null
+++ b/testsuite/gna/issue2388/top_e.vhd
@@ -0,0 +1,37 @@
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity unit_a is
+ port (
+ clk : in std_logic;
+ reset : in std_logic;
+
+ a : in std_logic;
+ b : out std_logic
+ );
+end entity;
+
+library ieee;
+use ieee.std_logic_1164.all;
+
+entity unit_b is
+ port (
+ clk : in std_logic;
+ reset : in std_logic;
+
+ a : in std_logic;
+ b : out std_logic
+ );
+end entity;
+
+architecture rtl of unit_a is
+begin
+ my_inst: entity work.unit_b
+ port map (
+ clk => clk,
+ reset => reset,
+ a => a,
+ b => b
+ );
+end architecture;