DONT_TOUCH - 2025.2 English - UG901

Vivado Design Suite User Guide: Synthesis (UG901)

Document ID
UG901
Release Date
2025-12-05
Version
2025.2 English

Use the DONT_TOUCH attribute in place of KEEP or KEEP_HIERARCHY. 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.

CAUTION:
Like 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.

Note: On a module or entity, the DONT_TOUCH attribute is not supported. Specifically, keep needed ports using either flatten_hierarchy none setting.

DONT_TOUCH is most commonly assigned to HDL objects using attributes to prevent them from being optimized away during elaboration.

DONT_TOUCH as an XDC constraint is often used to override DONT_TOUCH set on the same object as an attribute. This allows selectively optimizing or preserving the object without modifying the RTL, useful for logic analysis and debug.

Note: When using the XDC to remove a DONT_TOUCH that is set in RTL, you can see warnings after synthesis. This happens when the implementation flow reads the same XDC but the signal in question is 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.