From 9e8a769c56cc3e12ae3c2d03e768c2255b3c5d76 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sun, 12 Mar 2023 17:30:34 +0100 Subject: testsuite/gna: add a test for #2388 --- testsuite/gna/issue2388/testsuite.sh | 11 +++++++++++ testsuite/gna/issue2388/top_a.vhd | 7 +++++++ testsuite/gna/issue2388/top_e.vhd | 37 ++++++++++++++++++++++++++++++++++++ 3 files changed, 55 insertions(+) create mode 100755 testsuite/gna/issue2388/testsuite.sh create mode 100644 testsuite/gna/issue2388/top_a.vhd create mode 100644 testsuite/gna/issue2388/top_e.vhd 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; -- cgit v1.2.3