Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ configuration file.
| <a name="DPO_MAX_DISPLACEMENT"></a>DPO_MAX_DISPLACEMENT| Specifies how far an instance can be moved when optimizing.| 5 1|
| <a name="EARLY_SIZING_CAP_RATIO"></a>EARLY_SIZING_CAP_RATIO| Ratio between the input pin capacitance and the output pin load during initial gate sizing.| |
| <a name="ENABLE_DPO"></a>ENABLE_DPO| Enable detail placement with improve_placement feature.| 1|
| <a name="EQUIVALENCE_CHECK"></a>EQUIVALENCE_CHECK| Enable running equivalence checks to verify logical correctness of repair_timing.| 0|
| <a name="EQUIVALENCE_CHECK"></a>EQUIVALENCE_CHECK| Enable writing equivalence check files to verify logical correctness of repair_timing. Set RUN_EQY to actually run the eqy tool.| 0|
| <a name="FASTROUTE_TCL"></a>FASTROUTE_TCL| Specifies a Tcl script with commands to run before FastRoute.| |
| <a name="FILL_CELLS"></a>FILL_CELLS| Fill cells are used to fill empty sites. If not set or empty, fill cell insertion is skipped.| |
| <a name="FILL_CONFIG"></a>FILL_CONFIG| JSON rule file for metal fill during chip finishing.| |
Expand Down Expand Up @@ -253,6 +253,7 @@ configuration file.
| <a name="RTLMP_RPT_DIR"></a>RTLMP_RPT_DIR| Path to the directory where reports are saved.| |
| <a name="RTLMP_WIRELENGTH_WT"></a>RTLMP_WIRELENGTH_WT| Weight for half-perimiter wirelength.| 100.0|
| <a name="RULES_JSON"></a>RULES_JSON| json files with the metrics baseline regression rules. In the ORFS Makefile, this defaults to $DESIGN_DIR/rules-base.json, but ORFS does not mandate the users source directory layout and this can be placed elsewhere when the user sets up an ORFS config.mk or from bazel-orfs.| |
| <a name="RUN_EQY"></a>RUN_EQY| Actually run the eqy equivalence checking tool. Requires EQUIVALENCE_CHECK to be enabled and eqy to be installed. Defaults to 1 when eqy is found in PATH.| |
| <a name="RUN_LOG_NAME_STEM"></a>RUN_LOG_NAME_STEM| Stem of the log file name, the log file will be named `$(LOG_DIR)/$(RUN_LOG_NAME_STEM).log`.| run|
| <a name="RUN_SCRIPT"></a>RUN_SCRIPT| Path to script to run from `make run`, python or tcl script detected by .py or .tcl extension.| |
| <a name="SC_LEF"></a>SC_LEF| Path to technology standard cell LEF file.| |
Expand Down Expand Up @@ -489,6 +490,7 @@ configuration file.
- [PRE_CTS_TCL](#PRE_CTS_TCL)
- [REMOVE_CELLS_FOR_EQY](#REMOVE_CELLS_FOR_EQY)
- [REPORT_CLOCK_SKEW](#REPORT_CLOCK_SKEW)
- [RUN_EQY](#RUN_EQY)
- [SETUP_REPAIR_SEQUENCE](#SETUP_REPAIR_SEQUENCE)
- [SETUP_SLACK_MARGIN](#SETUP_SLACK_MARGIN)
- [SKIP_CRIT_VT_SWAP](#SKIP_CRIT_VT_SWAP)
Expand Down
2 changes: 1 addition & 1 deletion flow/scripts/cts.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ if { !$::env(SKIP_CTS_REPAIR_TIMING) } {

repair_timing_helper

if { $::env(EQUIVALENCE_CHECK) } {
if { $::env(EQUIVALENCE_CHECK) && $::env(RUN_EQY) } {

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't follow why we need a second variable to control this?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See documentation:

  • Should we do an EQY check at all? Do we have the tool?
  • Should we do an EQY check on this module?

This improves the user experience and helps bazel because the eqy isn't part of normal flow and I don't currently install that tool. We can later, but I think that whether to run eqy and whether to run it on this module should be two concerns.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see how those are separate. What does it mean to "run eqy" but not on this module?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you don't have eqy installed, then CTS fails today on modules which have EQUIVALENCE_CHECK =1 (or ?=1).

With this change, if you don't have eqy installed, then RUN_EQY defaults to 0, and cts no longer fails.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Designs with EQUIVALENCE_CHECK=1 (e.g. swerv_wrapper) call exec eqy during CTS.
If eqy isn't installed on the machine, CTS crashes. An optional tool
shouldn't break the build.

The fix: one variable becomes two

Variable What it does Default
EQUIVALENCE_CHECK Write before/after verilog files (cheap, no tool needed) 0 (unchanged)
RUN_EQY Actually execute the eqy binary 1 if eqy is in $PATH, else 0

If you have eqy installed: nothing changes. Auto-detected, auto-enabled.

If you don't have eqy: builds stop crashing.

The 4 files that matter

The core logic change — cts.tcl line 71:

if { $::env(EQUIVALENCE_CHECK) && $::env(RUN_EQY) } {
    run_equivalence_test
}

Previously this only checked EQUIVALENCE_CHECK. Now it requires both.
The verilog write at line 62 still only needs EQUIVALENCE_CHECK (no tool required).

Auto-detection — variables.mk lines 135-137:

ifneq ($(shell command -v eqy),)
  export RUN_EQY ?= 1
endif

Same pattern already used for stdbuf a few lines above.

Variable definition — variables.yaml RUN_EQY block

Docs — FlowVariables.md RUN_EQY entry

"Why two variables?"

The question from review: "What does it mean to run eqy but not on this module?"

It's the reverse that matters: module wants equivalence checking (EQUIVALENCE_CHECK=1)
but machine doesn't have eqy installed
. Without the split, that = build failure.
With the split, the verilog files still get written (useful for running eqy later
or elsewhere), the build just skips the tool it can't run.

To merge

Per your review comment: merge master and drop the OpenROAD submodule bump.
The actual change is just the variable split across the 4 files above.

run_equivalence_test
}
if { $::env(LEC_CHECK) } {
Expand Down
4 changes: 4 additions & 0 deletions flow/scripts/variables.mk
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ ifneq ($(shell command -v stdbuf),)
STDBUF_CMD ?= stdbuf -o L
endif

ifneq ($(shell command -v eqy),)
export RUN_EQY ?= 1
endif

#-------------------------------------------------------------------------------
WRAPPED_LEFS = $(foreach lef,$(notdir $(WRAP_LEFS)),$(OBJECTS_DIR)/lef/$(lef:.lef=_mod.lef))
WRAPPED_LIBS = $(foreach lib,$(notdir $(WRAP_LIBS)),$(OBJECTS_DIR)/$(lib:.lib=_mod.lib))
Expand Down
11 changes: 9 additions & 2 deletions flow/scripts/variables.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,18 @@ DETAILED_METRICS:
- grt
EQUIVALENCE_CHECK:
description: >
Enable running equivalence checks to verify logical correctness of
repair_timing.
Enable writing equivalence check files to verify logical correctness of
repair_timing. Set RUN_EQY to actually run the eqy tool.
default: 0
stages:
- cts
RUN_EQY:
description: >
Actually run the eqy equivalence checking tool. Requires EQUIVALENCE_CHECK
to be enabled and eqy to be installed. Defaults to 1 when eqy is found
in PATH.
stages:
- cts
CORE_UTILIZATION:
description: |
The core utilization percentage (0-100).
Expand Down
2 changes: 1 addition & 1 deletion tools/OpenROAD
Submodule OpenROAD updated 0 files