AR# 38216

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

描述

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.

解决方案

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;

链接问答记录

主要问答记录

Answer Number 问答标题 问题版本 已解决问题的版本
38927 面向 XST 的 Xilinx 解决方案中心 N/A N/A

相关答复记录

Answer Number 问答标题 问题版本 已解决问题的版本
40379 Design Assistant for XST Help understanding the XST report to resolve errors\warnings N/A N/A
AR# 38216
日期 12/15/2012
状态 Active
Type 综合文章