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

XST - XST does not support ifdefs in meta comments

Description

XST does not support ifdefs in meta comments.

The following example will not work in XST:

wire DebugWire;

assign DebugWire = 0;

`ifdef DebugMode

//synthesis attribute KEEP of DebugWire is TRUE;

`endif

How can I get this to work?

Solution

To work around this issue, rewrite the code using Verilog-2001 attributes as shown below:

`ifdef DebugMode

(* KEEP="TRUE" *) wire DebugWire;

`else

wire DebugWire;

`endif

assign DebugWire = 0;

There is no plan to support the meta comment style in XST, as the general direction for XST is toward using Verilog-2001 constructs.

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