Description
Naming a component instance inside a generate clause with the same name as an instance outside the clause causes a warning, even though the generate label should be part of the hierarchical path of the instance(?), making the names distinct.
Expected behaviour
Silent compilation
How to reproduce?
A simple ghdl -a gen_bug.vhd should show the issue. For example:
library IEEE;
use IEEE.std_logic_1164.all;
entity naming is
generic (
do_sub : boolean := FALSE
);
port (
din : in std_logic;
clk : in std_logic;
dout : out std_logic
);
end entity;
architecture bug of naming is
component ff is
port (
din : in std_logic;
clk : in std_logic;
dout : out std_logic
);
end component;
signal sub : std_logic := '0';
signal res : std_logic := '0';
begin
g_sub: if do_sub generate
inst : ff
port map (
din => din,
clk => clk,
dout => sub
);
end generate;
inst : ff
port map (
din => din,
clk => clk,
dout => res
);
dout <= res xor sub;
end architecture;
Context
Please, provide the following information:
- OS: Ubuntu 24.04.4 LTS
- Origin:
Additional context
none.
Description
Naming a component instance inside a generate clause with the same name as an instance outside the clause causes a warning, even though the generate label should be part of the hierarchical path of the instance(?), making the names distinct.
Expected behaviour
Silent compilation
How to reproduce?
A simple
ghdl -a gen_bug.vhdshould show the issue. For example:Context
Please, provide the following information:
versiontarball_urlAdditional context
none.