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!

AR# 38216

Design Assistant for XST Help resolving "HDLCompiler:1007:element index %d into %s is out of bounds" warnings

Description

Refer to this Answer Record for help resolving "HDLCompiler:1007:element index %d into %s is out of bounds." warnings.

Note: This Answer Record is a part of the Xilinx Solution Center for XST (Xilinx Answer 38927). The Xilinx Solution Center for XST is available to address all questions related to XST. Whether you are starting a new design or troubleshooting a problem, use the Solution Center for XST to guide you to the right information.

Solution

This message is displayed when there is an out-of-bounds access to a bit slice in Verilog. For example, if there is access to bit 9 of wire w[7:0]. Note that the access can be either read-only or write-only. Both types of access are shown in the EXAMPLE section.

Section 4.2.1 of the Verilog LRM discusses this in detail.

WHAT NEXT:

Identify and fix the index which goes out of bounds.

EXAMPLE:


reg [8:1] mult_out;
...

always @(*) begin
assign b = mult_out[9];
$display("%b", mult_out[0]);

...

The RTL snippet above is an example of read-only accesses which have out-of-bounds indices. Index values of 9 and 0 are both outside the legal range which is beween 8 and 1.

The snippet below is an example of out of bounds write-only access:

...
reg [8:1] mult_out;
wire in;
...

always @(*) begin
mult_out[0] = in;

Linked Answer Records

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
38927 Xilinx Solution Center for XST N/A N/A

Associated Answer Records

Answer Number Answer Title Version Found Version Resolved
40379 Design Assistant for XST Help understanding the XST report to resolve errors\warnings N/A N/A
AR# 38216
Date Created 09/24/2010
Last Updated 12/15/2012
Status Active
Type General Article