Skip to content

Commit db7829d

Browse files
committed
variables: INFER_CLKGATES is read in every stage
asap7's config.mk keeps ICG* in DONT_USE_CELLS unless INFER_CLKGATES=1, and floorplan, place, cts and grt apply DONT_USE_CELLS. With stages listing only synth, a flow that passes each stage its own variables, such as bazel-orfs, gave those stages no INFER_CLKGATES, so ICG* went back into dont-use there. List it under All stages, as ASAP7_USE_VT. variables.json is left alone, #4805 deletes it. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent d648e89 commit db7829d

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

‎docs/user/FlowVariables.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ configuration file.
170170
| <a name="GRT_SEED"></a>GRT_SEED| Specifies a random seed for global routing. Useful for perturbation studies.| |
171171
| <a name="GUI_TIMING"></a>GUI_TIMING| Load timing information when opening GUI. For large designs, this can be quite time consuming. Useful to disable when investigating non-timing aspects like floorplan, placement, routing, etc.| 1|
172172
| <a name="HOLD_SLACK_MARGIN"></a>HOLD_SLACK_MARGIN| Specifies a time margin for the slack when fixing hold violations. This option allows you to overfix or underfix (negative value, terminate retiming before 0 or positive slack). floorplan.tcl uses min of HOLD_SLACK_MARGIN and 0 (default hold slack margin). This avoids overrepair in floorplan for hold by default, but allows skipping hold repair using a negative HOLD_SLACK_MARGIN. Exiting timing repair early is useful in exploration where the .sdc has a fixed clock period at the design's target clock period and where HOLD/SETUP_SLACK_MARGIN is used to avoid overrepair (extremely long running times) when exploring different parameter settings. When an ideal clock is used, that is before CTS, a clock insertion delay of 0 is used in timing paths. This creates a mismatch between macros that have a .lib file from after CTS, when the clock is propagated. To mitigate this, OpenSTA will use subtract the clock insertion delay of macros when calculating timing with ideal clock. Provided that min_clock_tree_path and max_clock_tree_path are in the .lib file, which is the case for macros built with OpenROAD. This is less accurate than if OpenROAD had created a placeholder clock tree for timing estimation purposes prior to CTS. There will inevitably be inaccuracies in the timing calculation prior to CTS. Use a slack margin that is low enough, even negative, to avoid overrepair. Inaccuracies in the timing prior to CTS can also lead to underrepair, but there no obvious and simple way to avoid underrapir in these cases. Overrepair can lead to excessive runtimes in repair or too much buffering being added, which can present itself as congestion of hold cells or buffer cells. Another use of SETUP/HOLD_SLACK_MARGIN is design parameter exploration when trying to find the minimum clock period for a design. The SDC_FILE for a design can be quite complicated and instead of modifying the clock period in the SDC_FILE, which can be non-trivial, the clock period can be fixed at the target frequency and the SETUP/HOLD_SLACK_MARGIN can be swept to find a plausible current minimum clock period.| 0|
173-
| <a name="INFER_CLKGATES"></a>INFER_CLKGATES| Enables Yosys clock gate inference. By default, it uses the Liberty cell definitions to determine clock gating cell. The selection can be overridden using the POS_CLKGATE_AND_PORTS and/or NEG_CLKGATE_AND_PORTS variables.| 0|
173+
| <a name="INFER_CLKGATES"></a>INFER_CLKGATES| Enables Yosys clock gate inference. By default, it uses the Liberty cell definitions to determine clock gating cell. The selection can be overridden using the POS_CLKGATE_AND_PORTS and/or NEG_CLKGATE_AND_PORTS variables. Every stage reads it: a platform may make the clock gating cells it inserts usable for OpenROAD through DONT_USE_CELLS, as asap7 does.| 0|
174174
| <a name="INFER_CLKGATES_EXCLUDE"></a>INFER_CLKGATES_EXCLUDE| Space-separated Yosys module name patterns whose flip-flops INFER_CLKGATES leaves ungated, e.g. a module whose enable logic is timing-critical. Only modules that still exist at clock gate inference can be excluded, see SYNTH_HIERARCHICAL and SYNTH_KEEP_MODULES.| |
175175
| <a name="INFER_CLKGATES_MIN_NET_SIZE"></a>INFER_CLKGATES_MIN_NET_SIZE| Minimum number of flip-flops sharing a clock and enable for INFER_CLKGATES to replace their enable with a clock gating cell. Smaller groups keep their enable flip-flops. Unset gates every group.| |
176176
| <a name="IO_CONSTRAINTS"></a>IO_CONSTRAINTS| File path to the IO constraints .tcl file. Also used for manual placement.| |
@@ -363,7 +363,6 @@ configuration file.
363363
- [CLKGATE_MAP_FILE](#CLKGATE_MAP_FILE)
364364
- [DFF_LIB_FILE](#DFF_LIB_FILE)
365365
- [DFF_MAP_FILE](#DFF_MAP_FILE)
366-
- [INFER_CLKGATES](#INFER_CLKGATES)
367366
- [INFER_CLKGATES_EXCLUDE](#INFER_CLKGATES_EXCLUDE)
368367
- [INFER_CLKGATES_MIN_NET_SIZE](#INFER_CLKGATES_MIN_NET_SIZE)
369368
- [LATCH_MAP_FILE](#LATCH_MAP_FILE)
@@ -656,6 +655,7 @@ configuration file.
656655

657656
- [ASAP7_USE_VT](#ASAP7_USE_VT)
658657
- [CORNERS](#CORNERS)
658+
- [INFER_CLKGATES](#INFER_CLKGATES)
659659
- [KEEP_VARS](#KEEP_VARS)
660660
- [NUM_CORES](#NUM_CORES)
661661
- [OPENROAD_HIERARCHICAL](#OPENROAD_HIERARCHICAL)

‎flow/scripts/variables.yaml‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -453,9 +453,11 @@ INFER_CLKGATES:
453453
Enables Yosys clock gate inference. By default, it uses the Liberty cell
454454
definitions to determine clock gating cell. The selection can be overridden
455455
using the POS_CLKGATE_AND_PORTS and/or NEG_CLKGATE_AND_PORTS variables.
456+
Every stage reads it: a platform may make the clock gating cells it
457+
inserts usable for OpenROAD through DONT_USE_CELLS, as asap7 does.
456458
default: 0
457459
stages:
458-
- synth
460+
- All stages
459461
INFER_CLKGATES_EXCLUDE:
460462
description: >
461463
Space-separated Yosys module name patterns whose flip-flops

0 commit comments

Comments
 (0)