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?
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.