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

4.1i XST - "ERROR:Xst:918 - <file>, Line xx Unsupported string constant."

Description

Keywords: XST, 918, unsupported, string, constant

Urgency: Standard

General Description:
During the analysis stage of synthesis, XST reports the following error:

"ERROR:Xst:918 - <file>, Line xx Unsupported string constant."

Solution

XST does not support the use of strings to assign values within Verilog. In the following example, the ASCII value of "a" (01100001) is intended to be assigned to DOUT:

<code>
module string (CLK, RESET, DIN, DOUT);
input CLK, RESET;
input [7:0] DIN;
output [7:0] DOUT;
reg [7:0] DOUT;

always @(posedge CLK or posedge RESET)
begin
if (RESET)
DOUT = "a"; //This is not allowed in XST.
else
DOUT = DIN;
end

endmodule
</code>

Instead, the value of "a" should be specified via a parameter; that parameter should then be used during the signal assignment as follows:

<code>
module string (CLK, RESET, DIN, DOUT);
input CLK, RESET;
input [7:0] DIN;
output [7:0] DOUT;
reg [7:0] DOUT;

parameter a = 8'b01100001; //Define the constant here.

always @(posedge CLK or posedge RESET)
begin
if (RESET)
DOUT = a; //this is allowed in XST
else
DOUT = DIN;
end

endmodule
</code>
AR# 14295
Date Created 03/22/2002
Last Updated 08/06/2003
Status Archive
Type General Article