Use the DONT_TOUCH attribute in place
of KEEP or KEEP_HIERARCHY . The DONT_TOUCH works in
the same way as KEEP or KEEP_HIERARCHY attributes; however, unlike KEEP and KEEP_HIERARCHY , DONT_TOUCH is forward-annotated to place and route to
prevent logic optimization.
KEEP and KEEP_HIERARCHY , be careful when
using DONT_TOUCH . In cases where other attributes
conflict with DONT_TOUCH , the DONT_TOUCH attribute takes precedence.The values for DONT_TOUCH are TRUE/FALSE or
yes/no . You can place this attribute on any signal, module,
entity, or component.
DONT_TOUCH
attribute is not supported on the port of a module or entity. If specific ports are
needed to be kept, either use the -flatten_hierarchy none setting or put a DONT_TOUCH on the module/entity itself.In general, the DONT_TOUCH attribute
should be set in RTL only. Signals that need to be kept can often be optimized before
the XDC file is read. Therefore, setting this attribute in the RTL ensures that it is
used. There is one use case where it is recommended that DONT_TOUCH is set in the XDC file. This would be when DONT_TOUCH is set to yes
in the RTL, and it is desired to be taken out without having to change the RTL. In this
case, setting DONT_TOUCH to no in XDC when that same signal has DONT_TOUCH set to yes in RTL effectively
removes that attribute without having to change the RTL.
DONT_TOUCH that is set in RTL, you can end up getting warnings after
synthesis when the implementation flow reads the same XDC but the signal in question has
been optimized out. These warnings can be ignored. However, you can also bypass them by
putting the DONT_TOUCH attributes in an XDC file marked
as for synthesis only.