Skip to content

Commit

Permalink
Merge pull request The-OpenROAD-Project#1864 from Pinata-Consulting/f…
Browse files Browse the repository at this point in the history
…low-skip-metrics

metrics: add SKIP_METRICS=1 variable to speed up builds
  • Loading branch information
maliberty authored Mar 20, 2024
2 parents a3ec9b4 + 9d29bf2 commit af59d9e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ platform, design and tool specific variables to allow finer control and
user overrides at various flow stages. These are defined in the
`config.mk` file located in the platform and design specific directories.

### General variables for all stages

| Variable | Description |
|------------------|------------------------------------------------------------------------------------|
| `SKIP_REPORT_METRICS` | If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds. |

## Platform

Expand Down
3 changes: 3 additions & 0 deletions flow/scripts/report_metrics.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ proc report_puts { out } {
}

proc report_metrics { stage when {include_erc true} {include_clock_skew true} } {
if {[info exists ::env(SKIP_REPORT_METRICS)] && $::env(SKIP_REPORT_METRICS) == 1} {
return
}
set filename $::env(REPORTS_DIR)/${stage}_[string map {" " "_"} $when].rpt
set fileId [open $filename w]
close $fileId
Expand Down

0 comments on commit af59d9e

Please sign in to comment.