Intel® Quartus® Prime Software
Intel® Quartus® Prime Design Software, Design Entry, Synthesis, Simulation, Verification, Timing Analysis, System Design (Platform Designer, formerly Qsys)
16614 Discussions

Latches in Compilation Report

Altera_Forum
Honored Contributor II
2,822 Views

Hi,  

 

I am currently experiencing some timing issues in my design, and I suspect it might be due to inferred latches. Therefore, I would like some way of checking the compilation report to see if there are any latches (inferred or not). So far I see that the report talks about the number of registers, but I take those as flip flops rather than latches. Therefore, other than going through the synthesized schematic manually, does the compilation report provide an easier way of identifying latches? 

 

Please let me know. 

 

Thanks.
0 Kudos
3 Replies
Altera_Forum
Honored Contributor II
1,480 Views

I am no expert, but for me it always displays that information in the processing messages during compilation. It will give a warning stating that it is inferring a latch for a specific signal. 

 

Latches are easy to get rid of as long as you provide a default case for all signals.
0 Kudos
Altera_Forum
Honored Contributor II
1,480 Views

Look in the Analysis & Synthesis report under "Optimization Results --> Register Statistics". 

 

This section of the Analysis & Synthesis report has a table of combinational feedback loops that synthesis recognized as latches and implemented with a latch representation internal to Quartus. This table, called "User-Specified and Inferred Latches", indicates whether each latch has an implementation that is at risk of timing hazards like glitches. Even if all latches are marked as free of timing hazards, it is recommended to avoid them in your design unless they are used for something where neither setup nor hold timing matters (like latching data off a processor bus with the data not changing during the time the latch outputs are being used). The timing analysis of latches is approximate, and you probably got a warning about that in the timing analyzer if you have combinational feedback loops in the design. 

 

This section of the Analysis & Synthesis report has another table of combinational loops that were not implemented with the internal latch representation. This table is called "Logic Cells Representing Combinational Loops". All loops in this table could be trouble. 

 

These tables are produced only when needed. If you have no combinational loops at all, you won't get either table.
0 Kudos
Altera_Forum
Honored Contributor II
1,480 Views

I have been searching for a meaningful explanation of the warning message "Warning: Timing Analysis does not support the analysis of latches as synchronous elements for the currently selected device family". I was not sure whether or not it meant that I actually had latches in my design, or if it was just a generic warning.  

 

Thanks to Brad, I at least know where to check for latches in the synthesized output.
0 Kudos
Reply