Commit Graph

39317 Commits

Author SHA1 Message Date
dependabot[bot]
b82b3dd289 build(deps): bump actions/setup-java from 4 to 5
Bumps [actions/setup-java](https://github.com/actions/setup-java) from 4 to 5.
- [Release notes](https://github.com/actions/setup-java/releases)
- [Commits](https://github.com/actions/setup-java/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/setup-java
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-04-15 21:08:07 +00:00
Matt Liberty
92fbeb5255 Merge pull request #10136 from The-OpenROAD-Project-staging/gha-post-merge-fixing
ci: add post-merge auto-format GitHub Actions workflow
2026-04-15 20:25:23 +00:00
Matt Liberty
cf98a1248d Merge pull request #10116 from oharboe/install-fix
bazel: fix installed binary Tcl init failure
2026-04-15 18:45:11 +00:00
Øyvind Harboe
85e0e57d85 Merge remote-tracking branch 'origin/master' into HEAD 2026-04-15 18:35:45 +02:00
Matt Liberty
d43d716d9b Merge pull request #9811 from alokkumardalei-wq/feature/bazelisk-run-tidy
Bazel: Add unified hermetic:tidy target for workspace formatting
2026-04-15 15:23:46 +00:00
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
2c25352c09 Merge pull request #10138 from The-OpenROAD-Project-staging/web-static-chart
web: filter timing paths by slack range on histogram click in static mode
2026-04-15 06:59:06 +00:00
Matt Liberty
d2fee8e0fb web: honor filtered path index in timing detail overlay
Use _originalIndex in _selectDetailRow so pin overlay requests match
the backend when paths are narrowed by histogram slack filter. Also
fuse the filter map+filter into a single pass to avoid allocating a
clone for every path in the unfiltered report.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-15 06:15:24 +00:00
Matt Liberty
89d6f8638e web: filter timing paths by slack range on histogram click in static mode
When a slack histogram column is clicked, the timing view should show only
paths whose slack falls in that bin's range. In live WebSocket mode the
server performs this filtering, but in static page mode the cache handler
returned all paths regardless of slack_min/slack_max.

Filter cached paths client-side in WebSocketManager._cacheRequest using the
half-open [slack_min, slack_max) range matching the histogram's bin
assignment. Tag each filtered path with _originalIndex so subsequent
timing_highlight overlay lookups resolve to the correct pre-rendered image.
Use _originalIndex in TimingWidget._selectPathRow when present.

Fixes #10020

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-15 05:31:18 +00:00
Matt Liberty
42e4f2506e ci: add post-merge auto-format GitHub Actions workflow
Run clang-format, buildifier, black, and tclfmt on files changed
in each push to master, committing any fixes automatically.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 23:57:07 +00:00
Matt Liberty
45a537e4a3 Merge pull request #10135 from The-OpenROAD-Project-staging/web-drc-viewer
web: add DRC viewer widget
2026-04-14 21:30:04 +00:00
Matt Liberty
1b66a59314 Merge pull request #10133 from AcKoucher/mpl-default-halo
mpl: make default halo live in HierRTLMP
2026-04-14 20:52:32 +00:00
Matt Liberty
77a9bfd542 web: add DRC viewer widget
Add a DRC (Design Rule Check) viewer to the web UI with:
- Server-side handlers for categories, markers, report loading,
  marker updates, and violation highlighting
- Client-side DRC widget with category selector, violation tree,
  load/highlight, and file upload dialog
- DRC overlay rendering in the tile generator
- C++ and JS tests for the new functionality

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 20:33:17 +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
Matt Liberty
d506f69aa9 Merge pull request #10132 from oharboe/fix-user-facing-install
bazel: add top-level aliases for install and tarfile
2026-04-14 17:29:33 +00:00
Øyvind Harboe
cca60223ed Update docs/user/Bazel.md
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-04-14 18:17:30 +02:00
Øyvind Harboe
852bd86a61 Update BUILD.bazel
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-04-14 18:17:12 +02:00
Øyvind Harboe
7d371a36ee bazel: add top-level aliases for install and tarfile
The install and tarfile targets were moved to //packaging/ to isolate
@rules_pkg loads from downstream consumers, but this broke the
user-facing //:install and //:tarfile targets. Add alias() rules at
the top level to restore the public API while keeping the implementation
in the packaging/ subdirectory.

Update documentation to use //:install and //:tarfile. Also fix
docs/user/Bazel.md which incorrectly listed rules_shell as a
dev_dependency (it is loaded in the root BUILD.bazel).

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
2026-04-14 18:12:35 +02:00
Arthur Koucher
4caddfee34 mpl: make default halo live in HierRTLMP
Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
2026-04-14 12:11:32 -03:00
Matt Liberty
0921d72d24 Merge pull request #10131 from The-OpenROAD-Project-staging/web-coverity
Some checks failed
Automatically sync branch from upstream. / Automatic sync 'master' from The-OpenROAD-Project/OpenROAD (push) Has been cancelled
Mark stale issues and pull requests / Stale (push) Has been cancelled
Lint Python / Black (push) Has been cancelled
Lint Bazel / Buildifier format (push) Has been cancelled
Lint Bazel / Buildifier lint (push) Has been cancelled
Check That ODB Files Are Generated / Are-Odb-Files-Generated (push) Has been cancelled
Format Code with pre commit trigger / Clang-Format (push) Has been cancelled
Lint Tcl code / Tclint (push) Has been cancelled
Build on macOS / Mac-Build (push) Has been cancelled
Scan Code with pre commit trigger / Security-Scan (push) Has been cancelled
Run Repo stats / repostats-for-nice-project (push) Has been cancelled
web: fix coverity COPY_INSTEAD_OF_MOVE
2026-04-14 15:02:28 +00:00
Matt Liberty
8f3b759669 web: fix coverity COPY_INSTEAD_OF_MOVE
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 13:56:02 +00:00
alokkumardalei-wq
8d652ae302 bazel: add buildifier lint/fmt/tidy targets for .bazel files
Implements #9858 (#8495). Adds three new targets mirroring the TCL
lint pattern:

  //:lint_bzl_test  - buildifier -mode=check -lint=warn  (lint check)
  //:fmt_bzl_test   - buildifier -mode=check -lint=off   (format check)
  //:tidy_bzl       - buildifier -mode=fix -lint=fix     (auto-fix)

Wires lint_bzl_test and fmt_bzl_test into //:lint_test, and
bzl_tidy.sh + bzl_lint_test.sh into //:fix_lint. Adds
buildifier_prebuilt 6.4.0 as a dev_dependency in MODULE.bazel.

Uses git ls-files for file discovery, which automatically skips
submodule paths (src/sta, third-party/abc). Explicit -mode=check
flags override the repo-root .buildifier.json default (mode: fix),
ensuring test targets remain read-only.

Updates docs/contrib/LintTargets.md: moves buildifier from "Planned
additions" to "Available targets".

Signed-off-by: alokkumardalei-wq <alokkumardalei2@gmail.com>
2026-04-14 11:30:47 +05:30
Matt Liberty
22b435b5e2 odb: clear result vector in getAntennaValues before populating
The get*() antenna accessors (getGateArea, getMaxAreaCAR, getDiffArea,
getPartialMetalArea, etc.) all delegate to getAntennaValues which
appends via emplace_back without clearing the output vector first. If
a caller reuses the same vector across multiple calls, entries from
earlier calls would be duplicated in the output.

Fix by clearing the result vector at the top of getAntennaValues so
callers always get a clean result regardless of the vector's prior
state.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:25:40 +00:00
Matt Liberty
117cf74b60 odb: clang-tidy
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:11:29 +00:00
Matt Liberty
4eac6b9b85 odb: buildifier
Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:09:37 +00:00
Matt Liberty
ff4765abc4 odb: remove stale gdsin.h include from gdsout.h
gdsout.h included odb/gdsin.h but never referenced GDSReader or
anything else from it. The shared GDS types (record_t, RecordType, etc.)
come from odb/gdsUtil.h which both gdsin.h and gdsout.h include
independently.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +00:00
Matt Liberty
5ea8cd9453 odb: remove redundant -use_header_modules feature
The per-target features = ["-use_header_modules"] was disabling a
feature that is not enabled by the LLVM toolchain in the first place.
Verified by building all 225 odb targets and running all 112 tests
without it. Only the package-level features = ["layering_check"]
remains.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +00:00
Matt Liberty
51107e35a2 odb: move SWIG/TCL targets to src/odb/src/swig/BUILD
Create a new Bazel package at src/odb/src/swig/ containing:
  - swig_common (cc_library): swig_common.cpp/.h with explicit deps on
    defin, defout, lefin, lefout instead of the entire umbrella
  - swig (tcl_wrap_cc): TCL SWIG wrapper
  - tcl (tcl_encode): TCL encoding
  - ui (cc_library): MakeOdb + SWIG/TCL glue
  - swig_imports_py (filegroup): Python .i files for the parent

The Python targets (swig-py, _odb.so, odb_py) stay in the parent
//src/odb package because the generated odb.py import path encodes
the Bazel package path (import src.odb.odb) — moving them would break
all downstream Python consumers.

Alias targets (swig, ui, tcl) are added in the parent BUILD so the
44 downstream references to //src/odb:swig etc. continue to work.

The messages_txt glob patterns are narrowed to include/odb/*.h since
all source subdirs now have their own BUILD files (making recursive
src/** globs unreachable from the parent). The messages.checked file
is empty, so no validation is lost.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +00:00
Matt Liberty
09fcd69e27 odb: eliminate :headers target, assign all public headers to :db
The //src/odb:headers cc_library existed as a shared home for the core
odb public headers (db.h, geom.h, dbTypes.h, etc.) that every subsystem
needed. Now that the db -> lefout cycle is gone and zutil has been
folded into db, there is no remaining reason for a separate headers
target — every subdir already depends on //src/odb/src/db.

Move the 30 core public headers from :headers into :db's hdrs (via
cross-package exports_files references). Add includes = ["../../include"]
to :db so the -I path resolves correctly for all consumers. Absorb the
two deps that :headers carried but :db did not (@abseil-cpp//absl/base:
core_headers, @boost.multi_array).

Replace the per-module exports_files entries with a single broad
exports_files(glob(...)) — all non-MakeOdb.h public headers are now
visible to all subpackages.

Drop //src/odb:headers from every subdir's deps (they get the headers
transitively through //src/odb/src/db).

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +00:00
Matt Liberty
4708dc7d2a odb: remove lefout methods from db classes, drop lefout_headers split
Remove the 10 lefout-dependent methods that the previous commit replaced:
  - dbMTerm::writeAntennaLef
  - dbTechLayerSpacingRule::writeLef
  - dbTechMinCutRule::writeLef
  - dbTechMinEncRule::writeLef
  - dbTechV55InfluenceEntry::writeLef
  - dbTechLayerAntennaRule::writeLef
  - dbTechAntennaPinModel::writeLef
  - dbTechLayer::printV55SpacingRules
  - dbTechLayer::printTwoWidthsSpacingRules (dead code, never called)
  - dbTechLayer::writeAntennaRulesLef
  - _dbTechAntennaAreaElement::writeLef (internal class, dead code)

Also clean up:
  - Remove `class lefout;` forward declaration from db.h.
  - Remove `#include "odb/lefout.h"` from 6 db .cpp files.
  - Remove `class lefout;` and _dbTechAntennaAreaElement::writeLef
    declaration from dbTechLayerAntennaRule.h.
  - Drop the //src/odb/src/lefout:lefout_headers Bazel sub-target that
    existed solely to break the db -> lefout header cycle. The cycle no
    longer exists since db no longer includes odb/lefout.h.
  - Drop the :lefout_headers dep from //src/odb/src/db:db.

After this commit, src/odb/src/db/ has no compile-time or link-time
dependency on lefout. The lefout -> db dependency is the only direction.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +00:00
Matt Liberty
9084d34084 odb: move LEF write methods from db classes into lefout
The db classes (dbMTerm, dbTechLayerSpacingRule, dbTechMinCutRule,
dbTechMinEncRule, dbTechV55InfluenceEntry, dbTechLayerAntennaRule,
dbTechAntennaPinModel, dbTechLayer) had member methods that took
lefout& arguments and emitted LEF text. This forced db.h to forward-
declare class lefout, and src/db/ to compile against odb/lefout.h --
an inverted dependency that required a Bazel headers-only sub-target
on lefout to avoid forming a link cycle.

Lift these emitters into private member methods of lefout itself, so
they live next to the existing writeLayer/writeMTerm/writeVia code
and access the db API only through public getters.

This commit only adds the new lefout methods and switches the call
sites (in lefout::writeLayer and lefout::writeMTerm) to use them.
The old methods on the db classes are kept temporarily so the code
remains compilable; they are removed in a follow-up commit. The
db.h forward declaration of lefout is also kept until the follow-up.

Two preparatory changes are bundled here because the new lefout
methods depend on them:

  - dbMTerm gains three public partial-area accessors
    (getPartialMetalArea, getPartialMetalSideArea, getPartialCutArea)
    following the existing getDiffArea pattern, replacing the old
    direct access to private impl fields from the writer.

  - _dbTechAntennaPinModel::getAntennaValues now takes _dbTech*
    instead of _dbDatabase*, and its callers (in dbMTerm and
    dbTechAntennaPinModel) compute the right tech via the owning
    master/lib (dbLib::getTech) rather than dbDatabase::getTech.
    The old code path called dbDatabase::getTech which errors out
    in multi-tech databases; the public getDiffArea/getGateArea/
    etc. were silently broken in that case. The 3DBlox flow
    exercises this and the LEF write would have failed there
    once the new code path went live.

LEF write tests still pass (all 112 odb tests pass).

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +00:00
Matt Liberty
4c8c22ccb5 odb: dissolve zutil module, fold sources into db
The zutil library contained only two files — util.cpp (general odb
utilities operating on dbBlock/dbNet/dbTechLayer) and poly_decomp.cpp
(polygon decomposition used by db, defin, and lefin). Both are naturally
part of db: util.cpp already required the full db API, and poly_decomp
is called from db itself. The zutil layer existed as an artificial seam
purely because of how the build was organized, and it created a circular
constraint (db linking zutil while zutil's util.cpp needed db headers).

Move src/zutil/{util,poly_decomp}.cpp into src/db/ and delete the zutil
subdirectory. Their public headers (util.h, poly_decomp.h) are now owned
by //src/odb/src/db via exports_files from the parent package.

Update both Bazel and CMake:
  - Remove //src/odb/src/zutil target and src/zutil/CMakeLists.txt
  - Add util.cpp, poly_decomp.cpp to src/db/CMakeLists.txt and drop the
    zutil dep from db's target_link_libraries
  - Drop zutil from defin, lefin, and odb test CMakeLists (they all
    transitively get it through db)
  - Drop zutil from the //src/odb umbrella and all sibling Bazel deps

Downstream consumers that depend on //src/odb continue to work unchanged
(the umbrella still republishes all public headers). Anyone who was
directly depending on the zutil target would now depend on //src/odb/src/db,
but no such direct dependents exist outside the odb tree.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +00:00
Matt Liberty
b64b18d2a3 odb: scope module-specific public headers to their subdir targets
Move 11 module-specific public headers from the shared //src/odb:headers
target into the subdir cc_library that actually implements them:
  3dblox.h     -> //src/odb/src/3dblox
  cdl.h        -> //src/odb/src/cdl
  defin.h      -> //src/odb/src/defin
  defout.h     -> //src/odb/src/defout
  gdsin.h,
  gdsUtil.h    -> //src/odb/src/gdsin
  gdsout.h     -> //src/odb/src/gdsout
  lefin.h      -> //src/odb/src/lefin
  lefout.h     -> //src/odb/src/lefout
  poly_decomp.h,
  util.h       -> //src/odb/src/zutil

The files stay physically in src/odb/include/odb/ (preserving the CMake
layout); each subdir references its header via exports_files from the
parent package. The //src/odb:headers target now contains only core
shared odb types (db.h, geom.h, dbTypes.h, set/iterator templates, etc.)
that every subsystem genuinely needs.

Introduce //src/odb/src/lefout:lefout_headers as a headers-only split of
the lefout target so //src/odb/src/db can include odb/lefout.h (it
implements writeLef() overloads that call inline methods on lefout)
without forming a link cycle: db depends on :lefout_headers, while
:lefout (the implementation) depends on :db.

The //src/odb:odb umbrella keeps its existing public hdrs glob so the
48 downstream consumers depending on //src/odb continue to work
unchanged.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +00:00
Matt Liberty
eeac0bd47c odb: split Bazel build into per-subdirectory targets
Break up the monolithic //src/odb:odb cc_library into per-subdirectory
libraries under //src/odb/src/{zutil,db,cdl,defout,lefout,gdsin,gdsout,
defin,lefin,3dblox}, plus a shared //src/odb:headers target for the
public include/odb/*.h headers.

//src/odb:odb becomes a thin umbrella that depends on every per-subdir
library and republishes the public headers so the 48 downstream BUILD
files depending on //src/odb continue to work unchanged. The umbrella
also retains swig_common.{cpp,h} since the SWIG targets reference those
files relative to the top-level package.

Each subdir now carries only the Boost/abseil dependencies it actually
uses, so e.g. lefin's Boost.Spirit/phoenix/fusion deps no longer
propagate into cdl, defout, gdsout, etc. Incremental rebuilds should
improve since touching one subdir no longer invalidates compile actions
in unrelated subdirs.

Also remove a stale #include "odb/defout.h" from dbBlock.cpp (DefOut was
never referenced); this eliminates a false db -> defout dependency edge.

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 05:00:47 +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
c1bfb6e054 Merge pull request #10128 from braydenlouie/pdk-support
ram: Coverity fixes
2026-04-14 02:36:10 +00:00
Matt Liberty
38fd25925c Merge pull request #10087 from The-OpenROAD-Project-staging/web-static
web: add self-contained static HTML timing report (web_save_report)
2026-04-14 02:33:31 +00:00
Brayden Louie
3dc947cd0f Merge branch 'The-OpenROAD-Project:master' into pdk-support 2026-04-13 21:16:23 -04:00
Matt Liberty
913ada2eaf Merge pull request #10051 from gadfort/designmetrics
ord: move report design metrics to c++
2026-04-14 01:14:44 +00:00
Matt Liberty
2a9191bc5b Merge pull request #10127 from gonsolo/fix/macos-sprintf-deprecation
Replace sprintf with fmt::format in Logger::error
2026-04-14 01:13:13 +00:00
Matt Liberty
431a16d7c3 Merge pull request #10129 from The-OpenROAD-Project-staging/rsz-update-ok-swap_pins_dont_touch
rsz: update the .ok for swap_pins_dont_touch
2026-04-14 01:12:21 +00:00
Matt Liberty
9d6f34c363 rsz: update the .ok for swap_pins_dont_touch
Added messages

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-14 00:31:20 +00:00
braydenlouie
0663982c84 Merge branch 'pdk-support' of https://github.com/braydenlouie/OpenROAD into pdk-support 2026-04-13 20:02:54 -04:00
braydenlouie
fc1271f329 ram: coverity fixes
Signed-off-by: braydenlouie <braydenl9988@gmail.com>
2026-04-13 20:00:55 -04:00
Matt Liberty
4aa5e2f927 web: uniquify temp file paths in tests to avoid PID-collision races
tempHtml/tempPng wrote to /tmp/web_test_<label>.{html,png} with no
per-process suffix. Concurrent invocations of the same gtest case
(CI parallel jobs / retries / sharding) raced on the same path:
one process's std::ofstream truncated another's in-flight write,
producing a half-written file that was missing varying substrings
depending on flush timing.

Append getpid() to the filename so each process owns a private path.
Verified by reproducing the race with 32 parallel runs of
SaveReportTest.ContainsInlinedJS (100% failure before, 0% after).

Signed-off-by: Matt Liberty <mliberty@precisioninno.com>
2026-04-13 23:12:21 +00:00
Andreas Wendleder
0b7c322146 Replace sprintf with fmt::format in Logger::error
macOS Apple SDK 14.4+ marks sprintf as deprecated, causing build
failures when -Werror=deprecated-declarations is active. Use
fmt::format instead, which is both portable and safe.

Signed-off-by: Andreas Wendleder <andreas.wendleder@gmail.com>
2026-04-14 00:35:19 +02:00