Skip to content

Commit

Permalink
testsuite/gna: add a test for #1814
Browse files Browse the repository at this point in the history
  • Loading branch information
tgingold committed Aug 24, 2021
1 parent f55d29b commit 165a59c
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
22 changes: 22 additions & 0 deletions testsuite/gna/issue1814/ent.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;

entity ent is
generic (
W : integer := 1
);
port (
wen : in std_logic_vector(W-1 downto 0)
);
end entity ent;

architecture rtl of ent is
begin

process begin
report "Hello world from ent." severity note;
wait;
end process;

end rtl;
11 changes: 11 additions & 0 deletions testsuite/gna/issue1814/testsuite.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#! /bin/sh

. ../../testenv.sh

export GHDL_STD_FLAGS=--std=08
analyze ent.vhdl top.vhdl
elab_simulate top

clean

echo "Test successful"
39 changes: 39 additions & 0 deletions testsuite/gna/issue1814/top.vhdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
library IEEE;
use IEEE.std_logic_1164.all;
use IEEE.numeric_std.all;

entity top is
generic (
W : integer := 1
);
end entity top;

architecture rtl of top is

signal write : std_logic;
-- workaround
signal wen : std_logic_vector(W-1 downto 0);

begin

process begin
report "Hello world from top" severity note;
wait;
end process;

write <= '0';

-- workaround
wen <= (others => write);

u_ent: entity work.ent
generic map(
W => W
)
port map(
-- workaround
wen => (others => write)
-- wen => wen
);

end rtl;

0 comments on commit 165a59c

Please sign in to comment.