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

9.1i XST - "ERROR:Xst - CheckCondition - Xst_HdlConst_Utility::ConvertIntegerToType : unable to adjust constant <'S'> (type char) to type enum (0, R, W, S, )."

Description

XST errors out with the following error message when synthesizing constants as shown below. Why?

"ERROR:Xst - CheckCondition - Xst_HdlConst_Utility::ConvertIntegerToType : unable to adjust constant <'S'> (type char) to type enum (0, R, W, S, )."

CONSTANT my_testA : Register_Definition := ( 16#00# /2 , "SSSSSSSSSSSSSSSS", "0000000000000001");

CONSTANT my_testB : Register_Definition := ( 16#02# /2 , "SSSSSSSSSSSSSSSS", "0000000000000010");

CONSTANT my_testC : Register_Definition := ( 16#04# /2 , "SSSSSSSSSSSSSSSS", "0000000000000000");

with

subtype MCU_Bus_Add_Type is std_logic_vector(15 downto 0);

type Register_Bit is ('0','R','W','S'); -- '0' -> Reserved , 'R' -> Read Only , 'W' -> Write Only, 'S' -> Standard (Read/Write)

type Register_Bit_Vector is array (NATURAL range <>) of Register_Bit;

type Register_Definition is record

Address : Integer;

Access_Type : Register_Bit_Vector(MCU_Bus_Data_Type'Range);

Reset : MCU_Bus_Data_Type;

end record;

Solution

This issue is fixed in the 9.2i Service Pack, available at:

http://www.xilinx.com/xlnx/xil_sw_updates_home.jsp
The first service pack containing the fix is 9.2i Service Pack 2.

To work around the problem, use the syntax below:

CONSTANT my_testA : Register_Definition := ( 16#00# /2 , 'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S'&'S', "0000000000000001");

CONSTANT my_testB : Register_Definition := ( 16#02# /2 , (others => 'S'), "0000000000000010");

CONSTANT my_testC : Register_Definition := ( 16#04# /2 ,('S','S','S','S','S','S','S','S','S','S','S','S','S','S','S','S') , "0000000000000000")

AR# 25289
Date Created 09/04/2007
Last Updated 12/15/2012
Status Active
Type General Article