Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Prefix of indexed name must be an array.

Status
Not open for further replies.

ihatepickingusernames

Newbie level 2
Joined
Sep 8, 2011
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,295
[Solved] Prefix of indexed name must be an array.

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');
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
Code:
MinMaxwithselect(test, test2, test3, test4, test5,test6);
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
Code:
MinMaxwithselect port map(controlOut_H(i+1),A_H(i),Maxx_H,controlOut_H(i-1),controlOut_H(i),DataOut_H(i));
oh and a label too... i was just remembering the syntax wrong..
 
Last edited:

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top