Commit Graph

458 Commits

Author SHA1 Message Date
Matt Liberty
2939447bf1 Merge pull request #9649 from alokkumardalei-wq/docs_depenency
docs: Add DependencyInstaller.sh functionalities(-local and -prefix) to Build.md
2026-04-15 15:17:19 +00:00
Matt Liberty
61932e897e Merge pull request #10130 from The-OpenROAD-Project-staging/odb-bazel-split
Odb bazel split
2026-04-14 18:49:25 +00:00
Matt Liberty
1d1582ed42 Merge pull request #10037 from titan73/master
etc: Fixes for DependencyInstaller.sh
2026-04-14 18:44:27 +00:00
Matt Liberty
6010ea5689 odb: fix messages_txt to scan sub-package sources
After the odb Bazel split, messages_txt only globbed include/odb/*.h
(8 messages) and missed ~576 logger messages in sub-package source
files. Add message_srcs filegroups to each sub-package, an extra_srcs
parameter to the messages_txt macro, and positional file-path support
in find_messages.py so that sources spanning multiple Bazel packages
are scanned correctly.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 18:05:12 +00:00
alokkumardalei-wq
5cd31076b7 docs: Update dependency install instructions to use setup.sh
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 09:19:02 +05:30
alokkumardalei-wq
8eecd0690c fix cmakeOptions eval bug and add missing help flag
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 09:09:27 +05:30
alokkumardalei-wq
f0795a1019 docs: Add DependencyInstaller help to Build.md and support -local/-prefix in Build.sh
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 09:07:45 +05:30
Matt Liberty
f821fad697 claude-docker: fix VS Code CLI URL and non-interactive docker run
The cli-linux-x64 identifier on code.visualstudio.com/sha/download
returns 404; use update.code.visualstudio.com/latest/cli-linux-x64/stable,
which delivers the glibc-linked binary that matches the Ubuntu base.

Also stop forcing -it unconditionally, which broke CI-style invocations
with "cannot attach stdin to a TTY-enabled container". Allocate a TTY
only when both stdin and stdout are terminals; otherwise pass -i so
piped input still reaches the container.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-13 15:18:57 +00:00
Matt Liberty
acdcd0f024 Add Docker container setup for running Claude Code safely
Provides claude.sh wrapper and Docker image that sandboxes
claude --dangerously-skip-permissions inside a container with
CMake and Bazel support. The repo is volume-mounted so edits
persist on the host with correct UID/GID ownership.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-13 00:03:46 +00:00
Sahil Jaiswal
73deb5fa2c add qt@5
Signed-off-by: Sahil Jaiswal <jaiswalsahil7741@gmail.com>
2026-04-12 15:51:46 +05:30
Sahil Jaiswal
5eb5617194 Update etc/Build.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Sahil Jaiswal <112881021+Sahil7741@users.noreply.github.com>
2026-04-12 15:51:46 +05:30
Sahil Jaiswal
0ab8f924da Update etc/DependencyInstaller.sh
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Sahil Jaiswal <112881021+Sahil7741@users.noreply.github.com>
2026-04-12 15:51:46 +05:30
Sahil Jaiswal
218e898f8e build: Improve macOS build and dependency installation
ref #9895

- Add macOS venv setup documentation
- Improve Build.sh with better package validation and env config
- Update DependencyInstaller.sh for macOS (threads, icu4c, tcl-tk@8)
- Use pip instead of pipx

Signed-off-by: Sahil Jaiswal <jaiswalsahil7741@gmail.com>
2026-04-12 15:51:46 +05:30
Henner Zeller
d206b37a1b Warning about different compile db: check multiple directories.
When creating a compilation db for bazel, but there is still
another compile db from cmake (e.g. from some previous build with
cmake), then tools might not choose the intended one.

There was a warning already emitted for that case, but only
for the toplevel directory not if it was in build/. Make this
for both of these.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-04-07 10:46:57 +02:00
Christian Costa
cd4bbb35d9 etc: Actually use a variable instead of an alias in deps installer.
Signed-off-by: Christian Costa <titan.costa@gmail.com>
2026-04-02 20:28:13 +02:00
Christian Costa
3716a51770 etc: Remove ... from _execute message as all _execute calls give a description with them.
Signed-off-by: Christian Costa <titan.costa@gmail.com>
2026-04-02 19:11:45 +02:00
Christian Costa
0ece531351 etc: Fix -no-cert option of deps installer.
The eval was lost in 9273cce6ef.

Signed-off-by: Christian Costa <titan.costa@gmail.com>
2026-04-02 19:06:32 +02:00
Vitor Bandeira
2464c8cb54 bazel: fix Bazel target paths in install script and docs
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
2026-03-31 18:06:38 +00:00
Sombrio
6757c015f7 Merge branch 'master' into fix-dependency-installer
Signed-off-by: Sombrio <sombrio@sombrasoft.dev>
2026-03-28 04:37:34 -03:00
Vitor Bandeira
2a4bdc6d3f Merge pull request #9871 from alokkumardalei-wq/cleanup/remove-stale-dependencies
refactor:remove stale packages from dependency list
2026-03-26 06:15:08 -03:00
alokkumardalei-wq
98710feb10 Restore lsb-release to CI dependencies per maintainer request
Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-03-26 09:41:40 +05:30
Vitor Bandeira
1d378cc347 Merge pull request #9957 from vvbandeira/drop-ninja
build: drop ninja as an option
2026-03-25 20:07:36 -03:00
Vitor Bandeira
4e494dfd64 build: drop ninja as an option
Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
2026-03-25 18:38:04 -03:00
Joao Luis Sombrio
febd90d150 Added support for Ubuntu 26.04 and Debian 13
Signed-off-by: Joao Luis Sombrio <sombrio@sombrasoft.dev>
2026-03-25 17:54:44 -03:00
Sombrio
b029c814dc Merge branch 'master' into fix-dependency-installer
Signed-off-by: Sombrio <sombrio@sombrasoft.dev>
2026-03-24 20:16:28 -03:00
Matt Liberty
5153e1bf31 Merge pull request #9733 from Pinata-Consulting/bazel-fast-doc-tests
Bazel fast doc tests
2026-03-23 23:17:32 +00:00
Matt Liberty
ba2e5c13a8 Merge pull request #9867 from Divinesoumyadip/fix/macos-dependency-installer
etc: fix macOS dependency installer for googletest and pyqt
2026-03-23 17:13:19 +00:00
Henner Zeller
c10380196d Fix uses of /bin/bash to use /usr/bin/env bash instead.
The only Posix compatible way to call bash is via `/usr/bin/env`
as bash might be installed in different locations on the system.
`/bin/bash` is not a Posix-required location for that binary
(only `/bin/sh` is).

Use `set -o noglob` instead of `bash -f` for improved readability.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-23 02:57:02 -07:00
Matt Liberty
3583d410c0 web: fix tcl path
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-03-22 23:30:50 +00:00
alokkumardalei-wq
97a25757dd remove stale dependencies
Removes `python3-click`, `qimgv`, `default-jdk`, and `lsb-release` from the
dependency scripts as requested in #9868.

Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-03-21 23:21:48 +05:30
Divinesoumyadip
ab5e710836 etc: use separate pipx install steps for click on macOS
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
2026-03-21 15:23:04 +00:00
Divinesoumyadip
d5c8a60c26 etc: fix macOS dependency installer for googletest and pyqt
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
2026-03-21 15:19:50 +00:00
Øyvind Harboe
dafcb21659 fix: use Bazel runfiles to locate find_messages.py in dup_id_test
The script used SCRIPT_DIR to find find_messages.py, which doesn't
work under Bazel's runfiles layout. Use RUNFILES_DIR instead.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-21 01:14:56 +01:00
Øyvind Harboe
a0a403135a fix: address CI lint failures and review feedback
- Buildifier format: reformat all 24 src/*/test/BUILD files
- Tclint: wrap long line in src/dpl/src/Opendp.tcl (114 > 100 chars)
- Simplify find_messages.py lookup in find_dup_ids.sh, removing
  hardcoded _main workspace name per review feedback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 23:58:12 +01:00
Øyvind Harboe
a6fbd74b8a Merge origin/master into bazel-fast-doc-tests
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-20 13:43:49 +01:00
Divinesoumyadip
4d30c4bee7 etc: Add pre-compilation dependency checks to Build.sh to improve onboarding UX
Signed-off-by: Divinesoumyadip <soumyacode7@gmail.com>
2026-03-19 06:35:28 +00:00
Øyvind Harboe
1213207698 fix: simplify find_dup_ids.sh path resolution
Use BASH_SOURCE-based SCRIPT_DIR as primary lookup for find_messages.py,
falling back to RUNFILES_DIR for Bazel sandbox context.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-17 19:45:59 +01:00
Øyvind Harboe
ebd2ac7c88 Merge remote-tracking branch 'origin/master' into bazel-fast-doc-tests
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>

# Conflicts:
#	etc/BUILD
#	src/dft/test/BUILD
#	src/drt/test/BUILD
#	src/mpl/test/BUILD
#	src/odb/test/BUILD
#	src/rmp/test/BUILD
#	src/rsz/test/BUILD
#	src/utl/test/BUILD
2026-03-17 19:32:01 +01:00
Øyvind Harboe
3c824138f3 add progress monitoring to whittle.py
Show periodic [whittle] status with phase, element counts, .odb size,
elapsed time. Display tail of step log after 5 minutes of waiting.
Print final summary with before/after .odb sizes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-13 08:56:32 +01:00
Øyvind Harboe
acd2f2e450 retire deltaDebug.py in favor of whittle.py
Remove deltaDebug.py, test_deltaDebug.py, and their Bazel targets.
Rename remaining deltaDebug_ prefixes in whittle.py to whittle_.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-13 08:54:00 +01:00
Øyvind Harboe
f3f6d86ff7 bazel: add top-level doc_test and dup_id_test suites
Add test suites that can be invoked without building OpenROAD:
  bazelisk test //:doc_test    - all documentation consistency checks
  bazelisk test //:dup_id_test - duplicate logger message ID check

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-12 00:57:17 +01:00
Øyvind Harboe
8f909aa01f bazel: add messages.txt genrule and exports_files for doc tests
Add genrule targets in all 24 module BUILD files to generate
messages.txt from source via etc/find_messages.py. Add exports_files
for README.md and *.tcl files needed by doc check tests. Export
find_messages.py from etc/BUILD.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-12 00:54:45 +01:00
Øyvind Harboe
b423f204ac etc: fix tcl lint
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-04 17:49:49 +01:00
Øyvind Harboe
dcb8ffaf06 test: add whittle.py integration test for gcd
bazelisk test test/orfs/gcd:gcd_whittle_test --test_output=streamed

Add a bazel sh_test that exercises whittle.py against the gcd floorplan
.odb using global placement as the step command. The test verifies that
whittle can iteratively cut instances/nets while the error (reaching 100
placement iterations) is still reproducible.

- Make whittle.py and TCL scripts publicly visible from etc/BUILD
- Add gcd_floorplan_odb filegroup to extract just the .odb output
- Add gcd_whittle_test sh_test tagged "orfs" so it runs with
  `bazelisk test test/orfs/gcd/...`
- Document the test in test/orfs/gcd/README.md

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-04 17:39:36 +01:00
Øyvind Harboe
1982c314a5 etc: use ord API and fix loop bug in whittle scripts
Use read_db/write_db and ord::get_db_block instead of manually creating
a database. Fix cut loop to use lrange+foreach instead of indexing into
a list while deleting elements. Remove redundant block re-fetch.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-04 17:39:33 +01:00
Øyvind Harboe
69bb3d22df etc: add whittle.py for delta-debugging .odb files
An alternative implementation of deltaDebug.py with a
standalone Python script (whittle.py) that delegates ODB manipulation
to small TCL scripts via `openroad -exit`. This works with any OpenROAD
build, even without Python compiled in.

deltaDebug.py is kept as-is during the transition period, but the
plan is to delete it once we're happy with whittle.py

Run with stock python3 — no extra packages needed beyond the standard
library.

Quick test using bazel-orfs gcd targets:

    bazelisk run //test/orfs/gcd:gcd_place_deps -- do-place ISSUE_TAG=test global_place_issue print-PWD
    mkdir whittle && cd whittle
    tar --strip-components=1 -xzf ../tmp/test/orfs/gcd/gcd_place_deps/_main/test/orfs/gcd/global_place_test.tar.gz
    sed -i 's/openroad -no_init/openroad -exit -no_init/g' \
            run-me-gcd-asap7-base.sh
    export PATH=$(pwd)/../../install/OpenROAD/bin:$PATH
    python3 ../etc/whittle.py \
            --persistence 2 --use_stdout \
            --error_string "      100 | " \
            --timeout 120 \
            --base_db_path \
                ../tmp/test/orfs/gcd/gcd_place_deps/_main/test/orfs/gcd/results/asap7/gcd/base/2_floorplan.odb \
            --step ./run-me-gcd-asap7-base.sh

After a minute or two:

```
Step 19, Nets level debugging, Insts 0, Nets 1, cut elements 1, timeout 2 minutes
[C]
Error Code found:       100 |
Removed 212 unused masters.
___________________________________
Resultant file is ../tmp/test/orfs/gcd/gcd_place_deps/_main/test/orfs/gcd/results/asap7/gcd/base/deltaDebug_base_result_2_floorplan.odb
Delta Debugging Done!
```

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-03-04 08:09:14 +01:00
Henner Zeller
dde683ab61 Use @rules_python directly, don't rename.
Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-03-03 09:31:26 +01:00
Henner Zeller
9760cb03e1 Tell compilation db where to find the Python.h includes.
There was one diagnostic error when running clang-tidy that
was due to not finding Python.h. Add it to the `-I` paths.

Signed-off-by: Henner Zeller <h.zeller@acm.org>
2026-02-20 05:30:46 -08:00
Vitor Bandeira
95c86928ff etc: allow yosys version overwrite
Needed to use in ORFS to use matching versions

Signed-off-by: Vitor Bandeira <vvbandeira@precisioninno.com>
2026-02-18 20:40:48 +00:00
Matt Liberty
13b63a4358 Various spots where the conversion to the new licensing header was missed.
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-02-17 05:47:38 +00:00