Skip to content

Commit b03a62d

Browse files
committed
Merge remote-tracking branch 'origin/master' into gpl_remove_filler_removal_cap
2 parents 16b1859 + 299433b commit b03a62d

159 files changed

Lines changed: 3970 additions & 1733 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,3 +65,4 @@ bazel-OpenROAD
6565
projectview.bazelproject
6666
.bsp/
6767
.bazelbsp/
68+
/buildifier

Jenkinsfile

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -221,12 +221,20 @@ def bazelTest = {
221221
stage('bazelisk test ...') {
222222
withCredentials([string(credentialsId: 'bazel-auth-token-b64', variable: 'BAZEL_AUTH_TOKEN_B64')]) {
223223
timeout(time: 120, unit: 'MINUTES') {
224-
def cmd = 'bazelisk test --config=ci --show_timestamps --test_output=errors --curses=no --force_pic --remote_header="Authorization=Basic $BAZEL_AUTH_TOKEN_B64"'
224+
def cmd = 'bazelisk test --config=ci --show_timestamps --test_output=errors --curses=no --force_pic --remote_header="Authorization=Basic $BAZEL_AUTH_TOKEN_B64" --profile=build.profile'
225225
try {
226-
sh label: 'Bazel Build', script: cmd + ' ...';
226+
try {
227+
sh label: 'Test, using cached results and building a minimum of dependencies', script: cmd + ' ...';
228+
} finally {
229+
sh label: 'Analyze build times', script: 'bazelisk analyze-profile build.profile';
230+
}
227231
} catch (e) {
228232
currentBuild.result = 'FAILURE';
229-
sh label: 'Bazel Build (keep_going)', script: cmd + ' --keep_going ...';
233+
try {
234+
sh label: 'Test (keep_going)', script: cmd + ' --keep_going ...';
235+
} finally {
236+
sh label: 'Analyze build times', script: 'bazelisk analyze-profile build.profile';
237+
}
230238
}
231239
}
232240
}

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ save_flow_metrics_limits <TEST_NAME>
329329

330330
``` text
331331
openroad [-help] [-version] [-no_init] [-exit] [-gui]
332-
[-threads count|max] [-log file_name] cmd_file
332+
[-threads count|max] [-log file_name] [-db file_name] cmd_file
333333
-help show help and exit
334334
-version show version and exit
335335
-no_init do not read .openroad init file
@@ -339,6 +339,7 @@ openroad [-help] [-version] [-no_init] [-exit] [-gui]
339339
-gui start in gui mode
340340
-python start with python interpreter [limited to db operations]
341341
-log <file_name> write a log in <file_name>
342+
-db <file_name> open a .odb database at startup
342343
cmd_file source cmd_file
343344
```
344345

bazel/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
load("@openroad_rules_python//python:pip.bzl", "compile_pip_requirements")
22
load("@rules_cc//cc:cc_library.bzl", "cc_library")
33

4+
package(features = ["layering_check"])
5+
46
compile_pip_requirements(
57
name = "requirements",
68
src = "requirements.in",

bazel/openmp/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
package(
1616
default_visibility = ["//visibility:private"],
17+
features = ["layering_check"],
1718
)
1819

1920
exports_files(

docs/user/Bazel.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,3 +359,13 @@ This will:
359359
- launch the GUI opening gui_final gcd
360360

361361
`bazelisk run test/orfs/gcd:gcd_final` run alone would create the `/tmp/gcd` folder and the arguments. The arguments after `--` are forwarded to the `/tmp/gcd/make` script that invokes make with the gcd ORFS project set up in `/tmp/gcd/_main/config.mk`.
362+
363+
## Hacking ORFS with `//test/orfs/gcd:gcd_test` test case
364+
365+
First create a local work folder with all dependencies for the step that you want to work on:
366+
367+
bazelisk run //test/orfs/gcd:gcd_floorplan_deps /tmp/floorplan
368+
369+
Now run make directly with the `/tmp/floorplan/_main` work folder, but be sure to use the `do-` targets that side-step ORFS make dependency checking:
370+
371+
make --file ~/OpenROAD-flow-scripts/flow/Makefile --dir /tmp/floorplan/_main DESIGN_CONFIG=config.mk do-floorplan

etc/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
load("@openroad_rules_python//python:defs.bzl", "py_binary")
22

3+
package(features = ["layering_check"])
4+
35
py_binary(
46
name = "file_to_string",
57
srcs = [

openroad/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ load("@openroad_rules_python//python:defs.bzl", "py_library")
44
# Copyright (c) 2025-2025, The OpenROAD Authors
55
load("@openroad_rules_python//python:packaging.bzl", "py_package", "py_wheel")
66

7+
package(features = ["layering_check"])
8+
79
py_library(
810
name = "openroadpy",
911
srcs = [

src/Main.cc

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ int cmd_argc;
8888
char** cmd_argv;
8989
static const char* log_filename = nullptr;
9090
static const char* metrics_filename = nullptr;
91+
static const char* read_odb_filename = nullptr;
9192
static bool no_settings = false;
9293
static bool minimize = false;
9394

@@ -243,6 +244,7 @@ int main(int argc, char* argv[])
243244
std::filesystem::remove(metrics_filename, err_ignored);
244245
}
245246

247+
read_odb_filename = findCmdLineKey(argc, argv, "-db");
246248
no_settings = findCmdLineFlag(argc, argv, "-no_settings");
247249
minimize = findCmdLineFlag(argc, argv, "-minimize");
248250

@@ -449,6 +451,21 @@ static int tclAppInit(int& argc,
449451

450452
const bool gui_enabled = gui::Gui::enabled();
451453

454+
if (read_odb_filename) {
455+
std::string cmd = fmt::format("read_db {{{}}}", read_odb_filename);
456+
if (!gui_enabled) {
457+
if (Tcl_Eval(interp, cmd.c_str()) != TCL_OK) {
458+
fprintf(stderr,
459+
"Error: failed to read_db %s: %s\n",
460+
read_odb_filename,
461+
Tcl_GetStringResult(interp));
462+
exit(1);
463+
}
464+
} else {
465+
gui::Gui::get()->addRestoreStateCommand(cmd);
466+
}
467+
}
468+
452469
const char* home = getenv("HOME");
453470
if (!findCmdLineFlag(argc, argv, "-no_init") && home) {
454471
const char* restore_state_cmd = "include -echo -verbose {{{}}}";
@@ -525,7 +542,7 @@ static void showUsage(const char* prog, const char* init_filename)
525542
{
526543
printf("Usage: %s [-help] [-version] [-no_init] [-no_splash] [-exit] ", prog);
527544
printf("[-gui] [-threads count|max] [-log file_name] [-metrics file_name] ");
528-
printf("[-no_settings] [-minimize] cmd_file\n");
545+
printf("[-db file_name] [-no_settings] [-minimize] cmd_file\n");
529546
printf(" -help show help and exit\n");
530547
printf(" -version show version and exit\n");
531548
printf(" -no_init do not read %s init file\n", init_filename);
@@ -543,6 +560,7 @@ static void showUsage(const char* prog, const char* init_filename)
543560
printf(" -log <file_name> write a log in <file_name>\n");
544561
printf(
545562
" -metrics <file_name> write metrics in <file_name> in JSON format\n");
563+
printf(" -db <file_name> open a .odb database at startup\n");
546564
printf(" cmd_file source cmd_file\n");
547565
}
548566

src/ant/test/BUILD

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
load("//test:regression.bzl", "regression_test")
22

3+
package(features = ["layering_check"])
4+
35
# From CMakeLists.txt or_integration_tests(TESTS
46
COMPULSORY_TESTS = [
57
"ant_check",

0 commit comments

Comments
 (0)