Throughout the design cycle, you must verify that the logic level distribution fits the clock frequency goals for the target AMD device family and device speed grade.
Using the retiming option globally is usually runtime intensive and can negatively impact power. Therefore, AMD recommends that you identify a specific hierarchy with violations on paths with a high number of logic levels after synthesis or with optimal placement. When the paths in the fanin or fanout of the longest paths have fewer logic levels and are contained within a small or medium hierarchical module, you can use the BLOCK_SYNTH.RETIMING block-level synthesis strategy.
The following figure shows a critical paths with five LUTs, constrained by a 600 MHz clock. The REG2 destination flop drives a timing path with a single LUT that is included one hierarchy up from REG2.
In addition to using the Schematic window in the Vivado IDE, you can use the report_design_analysis
-logic_level_distribution
command to review the
distribution of logic levels for specific paths. This allows you to
determine how many paths need to be rebalanced to improve the timing
QoR.
You can use the retiming_forward
and retiming_backward
attributes available
in Vivado synthesis to control the
optimization on a specific register or a path. Using these attributes
applies retiming optimization on a specific set of paths rather than on the
top module or submodules, which reduces the area overhead. You can apply
these attributes in the RTL or in the XDC file. For more information,
including usage and restrictions, see the
Vivado
Design Suite User Guide: Synthesis (UG901).
The following figure shows 58 paths with five logic levels within the inst1/inst2 hierarchy constrained with the 600 MHz clock and 32 paths with only one logic level.
Vivado synthesis can rebalance the logic levels by moving the registers in the low logic level paths into the high logic level paths. In this example, you can add the following constraint to the synthesis XDC file to perform retiming on the inst1/inst2 hierarchy:
set_property BLOCK_SYNTH.RETIMING 1 [get_cells inst1/inst2]
After rerunning synthesis with the same global settings and the
updated XDC file, you can run regular timing analysis on the inst1/inst2
timing paths or rerun the report_design_analysis
command to verify that the longest
paths have fewer logic levels, as shown in the following figure. The
critical path is now (backward retimed), and the path from REG2 to REG4 has three
logic levels.