AR# 38231

Design Assistant for XST Help resolving "HDLCompiler:696: Part-select direction is opposite from prefix index direction" errors

Description

Refer to this Answer Record for help resolving "HDLCompiler:696: Part-select direction is opposite from prefix index direction" errors.

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 errormessageis displayedwhen you have the part-select indices in an expression in the opposite direction of what the corresponding declaration suggests.

WHAT NEXT:

Correct your part-select expression by swapping the places of the two indices used for left and right range.

EXAMPLE:

Consider the following RTL:

module top(i[3:0], j[3:0]);
input [3:0] i;
output [3:0] j;
assign j[2:0] = i[0:2];
endmodule

In the 'assign' statement, RHS is 'i[0:2]' which is incorrect. Declaration of 'i' specifies [3:0] which means the part-select expression with 'i' should
have left index greater than or equal to the right index; that is not the case with the 'assign' statement.

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# 38231
Date 12/15/2012
Status Active
Type General Article