Skip to content

Commit 3ed7791

Browse files
committed
Merge branch 'power-openroad-error' of https://github.com/Pinata-Consulting/OpenROAD into secure-fix-dbsta-for-read-vcd
2 parents ced0470 + 3ad1341 commit 3ed7791

File tree

2 files changed

+21
-3
lines changed

2 files changed

+21
-3
lines changed

test/orfs/mock-array/mock-array.bzl

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ MACROS = [
219219
]
220220

221221
POWER_TESTS = [
222+
"openroad",
222223
"power",
223224
"power_instances",
224225
"path_groups",
@@ -462,7 +463,6 @@ def mock_array(name, config):
462463
"ARRAY_COLS": str(config["cols"]),
463464
"ARRAY_ROWS": str(config["rows"]),
464465
"LOAD_POWER_TCL": "$(location :load_power.tcl)",
465-
"OPENROAD_EXE": "$(location //src/sta:opensta)",
466466
"OUTPUT": "$(location :{variant}_{power_test}_{stage}.txt)".format(
467467
variant = variant,
468468
power_test = power_test,
@@ -471,7 +471,12 @@ def mock_array(name, config):
471471
"POWER_STAGE_NAME": stage,
472472
"POWER_STAGE_STEM": POWER_STAGE_STEM[stage],
473473
"VCD_STIMULI": "$(location :vcd_{variant}_{stage})".format(variant = variant, stage = stage),
474-
},
474+
} | ({"openroad": {}}.get(
475+
power_test,
476+
{
477+
"OPENROAD_EXE": "$(location //src/sta:opensta)",
478+
},
479+
)),
475480
data = [
476481
# FIXME this is a workaround to ensure that the OpenSTA runfiles are available
477482
":opensta_runfiles",
@@ -486,7 +491,7 @@ def mock_array(name, config):
486491
variant = (name + "_base") if macro == "Element" else variant,
487492
macro = macro,
488493
) for macro in MACROS] if stage != "final" else []),
489-
script = ":{power_test}.tcl".format(power_test = power_test),
494+
script = ":{power_test}.tcl".format(power_test = power_test if power_test != "openroad" else "power"),
490495
tags = ["manual"],
491496
tools = ["//src/sta:opensta"],
492497
visibility = ["//visibility:public"],

test/orfs/mock-array/power.tcl

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
source $::env(SCRIPTS_DIR)/util.tcl
2+
3+
if { [string match "*openroad" $::env(OPENROAD_EXE)] } {
4+
puts "Reading LEF files for OpenROAD"
5+
log_cmd read_lef $::env(TECH_LEF)
6+
log_cmd read_lef $::env(SC_LEF)
7+
if { [env_var_exists_and_non_empty ADDITIONAL_LEFS] } {
8+
foreach lef $::env(ADDITIONAL_LEFS) {
9+
log_cmd read_lef $lef
10+
}
11+
}
12+
}
13+
114
source $::env(LOAD_POWER_TCL)
215

316
# OpenSTA reports reg2reg paths inside macros,

0 commit comments

Comments
 (0)