VHDL has a mechanism to association an alternate name with a named object.
See IEEE Std 1076-2008 6.6 Alias declarations, General 6.6.1 para 1:
An alias declaration declares an alternate name for an existing named entity.
The rules for an object alias are found in 6.6.2 Object aliases. The idea here is to provide a name that can be indexed (8.4 Index names) for the generate statement assignment statement target.
The issue is A0_i is an identifier (15.4) and indivisible lexical element (15.3).
entity fff is
port (
a: in bit_vector(0 to 3);
b: in bit_vector(0 to 3)
);
end entity;
architecture sss of fff is
-- signal A0_0 : bit ; -- REPLACED
-- signal A0_1 : bit ;
-- signal A0_2 : bit ;
-- signal A0_3 : bit ;
signal A0: bit_vector ( 0 to 3); -- ADDED
-- IEEE Std 1076-2008 6.6 Alias declarations
-- 6.6.1 General
-- An alias declaration declares an alternate name for an existing named entity.
alias A0_0: bit is A0(0);
alias A0_1: bit is A0(1);
alias A0_2: bit is A0(2);
alias A0_3: bit is A0(3);
begin
U0:
for i in 0 to 3 generate
U1: A0(i) <= a(i) and b(i);
end generate;
end architecture sss;
Because an object alias can't be created for an unnamed aggregate comprised of named signals the above shows declaring a signal array and the original names aliased to elements of the array.
This modified example with an added entity analyzes and elaborates and will allow use of both an indexed name and an alias name (e.g. A0(0) and A0_0).