ihatepickingusernames
Newbie level 2
[Solved] Prefix of indexed name must be an array.
hey guys, I am having a problem with the error "Prefix of indexed name must be an array." for the lines
and i don't understand why... my understanding from this error is that for some reason controlOut_H and DataOut_H is not been seen as vectors...
from what i remember using signals for this purpose which are vectors shouldn't be causing this error.. and i have double checked each signal used they are all set up as vectors...
i have also go onto try,
and this is also returning the same error...I thought maybe I am not using all the ports in each component or something but nop thats not the problem either...
also now tried
giving same error
any insight into this will be much appreciated, thank you in advance
guys i realized what the mistake was the code should have been
oh and a label too... i was just remembering the syntax wrong..
Code:
LIBRARY ieee;
USE ieee.std_logic_1164.all;
USE ieee.std_logic_arith.all;
ENTITY minmaxcomplete IS
port(
A_H : in std_logic_vector(0 to 255);
Maxx_H: in std_logic;
QQ_H: out std_logic_vector(7 downto 0)
);
END ENTITY minmaxcomplete;
--
ARCHITECTURE RTL OF minmaxcomplete IS
component MinMaxwithselect
port(
ConMax_H : in std_logic;
DataIn_H : in std_logic;
Max_H : in std_logic;
conMin_H : in std_logic;
ControlOut_H : out std_logic;
DataOut_H : out std_logic
);
end component;
component MinMaxLoopupT
port(
D_H : in std_logic_vector(0 to 255);
Q_H : out std_logic_vector(7 downto 0)
);
end component;
signal controlOut_H : std_logic_vector(0 to 255);
signal DataOut_H : std_logic_vector(0 to 255);
BEGIN
lkupjoin: for i in 0 to 255 generate
initial:if(i = 0) generate
MinMaxwithselect(controlOut_H(i+1), A_H(i), Maxx_H, '1', controlOut_H(i),DataOut_H(i));
end generate initial;
mid: if (i > 0 and i < 255)generate
MinMaxwithselect(controlOut_H(i+1),A_H(i),Maxx_H,controlOut_H(i-1),controlOut_H(i),DataOut_H(i));
end generate mid;
final: if (i = 255) generate
MinMaxwithselect('1',A_H(i),Maxx_H, controlOut_H(i-1), controlOut_H(i),DataOut_H(i));
end generate final;
-- lookup:if(i <= 7) generate
-- MinMaxLookupT(,QQ_H(i));
-- end generate lookup;
--
-- lookuprest: MinMaxLookupT(DataOut_H(i),);
end generate lkupjoin;
END ARCHITECTURE RTL;
hey guys, I am having a problem with the error "Prefix of indexed name must be an array." for the lines
Code:
initial:if(i = 0) generate
MinMaxwithselect(controlOut_H(i+1), A_H(i), Maxx_H, '1', controlOut_H(i),DataOut_H(i));
end generate initial;
mid: if (i > 0 and i < 255)generate
MinMaxwithselect(controlOut_H(i+1),A_H(i),Maxx_H,controlOut_H(i-1),controlOut_H(i),DataOut_H(i));
end generate mid;
final: if (i = 255) generate
MinMaxwithselect('1',A_H(i),Maxx_H, controlOut_H(i-1), controlOut_H(i),DataOut_H(i));
end generate final;
and i don't understand why... my understanding from this error is that for some reason controlOut_H and DataOut_H is not been seen as vectors...
from what i remember using signals for this purpose which are vectors shouldn't be causing this error.. and i have double checked each signal used they are all set up as vectors...
i have also go onto try,
Code:
MinMaxwithselect('1', '1', '1', '1', '0','0');
also now tried
Code:
MinMaxwithselect(test, test2, test3, test4, test5,test6);
any insight into this will be much appreciated, thank you in advance
guys i realized what the mistake was the code should have been
Code:
MinMaxwithselect port map(controlOut_H(i+1),A_H(i),Maxx_H,controlOut_H(i-1),controlOut_H(i),DataOut_H(i));
Last edited: