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# 13041

5.1i XST - "ERROR:Xst:678 - "file_name.v", line ##: Cannot evaluate constant"


Keywords: XST, Verilog, constant, add, subtract, parameter

Urgency: Standard

General Description:
When my code contains the following type of Verilog statement, it causes an XST error:

if ((signal == (constant_value + 4 ))

In my code, "constant_value" is defined as:

parameter constant_value = 32'ha800_0000;

XST reports the following error:

"ERROR:Xst:678 - "file_name.v", line ##: Cannot evaluate constant. "


To work around this problem, create another parameter that performs the addition, and insert this new parameter into the conflicting statement:

parameter constant_value_04 = constant_value + 4;

if ((signal == (constant_value_04))
AR# 13041
Date Created 10/30/2001
Last Updated 10/20/2005
Status Archive
Type General Article