^

AR# 39136 Design Assistant for XST Reasons why a latch is inferred

This answer record will describe why a latch can be inferred.

Note: This Answer Record is a part of the Xilinx Solution Center for XST (Xilinx Answer 38927). The Xilinx Solution Center for XST is available to address all questions related to XST. Whether you are starting a new design or troubleshooting a problem, use the Solution Center for XST to guide you to the right information.
Xilinx generally does not recommend inferring latches in a design. This is especially true if the logic is intended to be combinatorial logic. A latch will break the synchronous path and make it difficult for the Xilinx Timing Engine to analyze the path appropriately.

It is always recommend to look through the HDL Synthesis section of the XST report to see if there is a latch inferred. Below is the Warning that a design will have if there are latches inferred:

WARNING:Xst:737 - Found 1-bit latch for signal <signal name>

Once this warning is found, please analyze the logic that created the latch and make sure that this is what was intended. If this was not intended, there are several things to check:
  • Ensure if-else if-else statements assign the net to a value under all conditions.
  • Ensure case statement assign a value all signals in all conditions.
  • If you are intending to infer a register, make sure to include a clock in the process or always block
For more information on why a latch may be inferred, please see (Xilinx Answer 38931) for the XST Documentation.

Master Answer Records

Answer Number Answer Title Version Found Version Resolved
38927 Xilinx Solution Center for XST N/A N/A

Associated Answer Records

Answer Number Answer Title Version Found Version Resolved
39079 Design Assistant for XST - Help with inference issues N/A N/A
AR# 39136
Date Created 03/15/2011
Last Updated 02/14/2013
Status Active
Type General Article
Feed Back