UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor udizam
Visitor
5,206 Views
Registered: ‎02-04-2010

Error Xst:1535 index line is not in the range of array

Jump to solution

Hi there,

 

Surprisingly, there is another similar thread on the Old ISE Board, that was read 3,000 times but no answer nor other appearances of the Xst:1535 error.

 

Well i've just got it: ERROR:Xst:1535 - "<file_name>.v" line 628: Index value is not in Range of array.

 

 I'll be more specific and attach all relevant code ( error msg points to the line marked with @@@@@@):

 

 

     parameter NUM_OF_CHANS = 14;
    

     wire [NUM_OF_CHANS-1:0] PSelChan;

 

     generate

 

     for (k=0 ; k<MAX_NUM_OF_CHANS ; k=k+1)
        begin : channel

        assign PSelChan[k] = PSel && (PAddr[15:6] == {6'h 1,k[3:0]});                              // @@@@@@@@@

      

     channel channel (

     ...

     ...

     ...);

    

i tried to change the PSelChan array to:

 

     wire  PSelChan [MAX_NUM_OF_CHANS-1:0];

  

but then i got an error HDLCompilers:149 Illegal operand of unary operator '|'error on the following statement:


     assign PSelChans = |PSelChan;

 

Any Ideas?

Tags (5)
0 Kudos
1 Solution

Accepted Solutions
Visitor udizam
Visitor
6,287 Views
Registered: ‎02-04-2010

Re: Error Xst:1535 index line is not in the range of array

Jump to solution

Yo Ho ! You realy nailed it.

 

After several trials, and discovering that this genvar k doesn't like to help anyone (i.e. cannot assign a wire to it) i replaced the rebellious line and it worked:

 

     assign PSelChan[k] = PSel && (PAddr[15:10] == 6'h 1) && (PAddr[9:6] == k);

Thanks a lot.

0 Kudos
3 Replies
Instructor
Instructor
5,191 Views
Registered: ‎08-14-2007

Re: Error Xst:1535 index line is not in the range of array

Jump to solution

The index I think it's referring to is k[3:0]

 

I don't see a declaration of k

 

Perhaps this should be declared as a genvar?

-- Gabor
0 Kudos
Visitor udizam
Visitor
5,188 Views
Registered: ‎02-04-2010

Re: Error Xst:1535 index line is not in the range of array

Jump to solution

Ouch, forgot to mention that I have this declaration, however as global (in the module where all other parameters, regs and wires are declared) and not inside the generate block. I tried to put it inside genertae block but same result (i.e. same error).

i will try to mitigate the k[3:0]. maybe indeed it's there....

Thanks.

 

genvar          k;

0 Kudos
Visitor udizam
Visitor
6,288 Views
Registered: ‎02-04-2010

Re: Error Xst:1535 index line is not in the range of array

Jump to solution

Yo Ho ! You realy nailed it.

 

After several trials, and discovering that this genvar k doesn't like to help anyone (i.e. cannot assign a wire to it) i replaced the rebellious line and it worked:

 

     assign PSelChan[k] = PSel && (PAddr[15:10] == 6'h 1) && (PAddr[9:6] == k);

Thanks a lot.

0 Kudos