Skip to content

odb: Add support for LEF58_MUSTJOINALLPORTS#10060

Open
QuantamHD wants to merge 5 commits intoThe-OpenROAD-Project:masterfrom
QuantamHD:lef58_celledgespacing
Open

odb: Add support for LEF58_MUSTJOINALLPORTS#10060
QuantamHD wants to merge 5 commits intoThe-OpenROAD-Project:masterfrom
QuantamHD:lef58_celledgespacing

Conversation

@QuantamHD
Copy link
Copy Markdown
Collaborator

Summary

Adds support for parsing LEF58_MUSTJOINALLPORTS.

Returns true if all shapes of this terminal must be connected electrically. For example if there's two shapes that make up the 'A' terminal, they must both be connected to the net that drives A.

Without MUSTJOINALLPORTS (Default behavior):
--------------------------------------------
Connecting to ANY shape of ANY port is sufficient to connect to the PIN.
        +------------------------------------------+
        | PIN A                                    |
        |                                          |
        |  +----------------+  +----------------+  |
        |  | PORT 1         |  | PORT 2         |  |
        |  |  +---------+   |  |  +---------+   |  |
        |  |  | Shape 1 |   |  |  | Shape 3 |   |  |
        |  |  +---------+   |  |  +---------+   |  |
        |  |       OR       |  |                |  |
        |  |  +---------+   |  |                |  |
        |  |  | Shape 2 |   |  |                |  |
        |  |  +---------+   |  |                |  |
        |  +----------------+  +----------------+  |
        +------------------------------------------+
                 |                     |
                 +----------OR---------+
                            |
                            v
                   Router connects to ANY ONE
                   of {Shape 1, Shape 2, Shape 3}

With MUSTJOINALLPORTS:
----------------------
The router MUST connect to AT LEAST ONE shape of EACH port.
Ports are treated as independent connection requirements.
        +------------------------------------------+
        | PIN A (MUSTJOINALLPORTS)                 |
        |                                          |
        |  +----------------+      +----------------+
        |  | PORT 1         |      | PORT 2         |
        |  |  +---------+   |      |  +---------+   |
        |  |  | Shape 1 |   |      |  | Shape 3 |   |
        |  |  +---------+   |      |  +---------+   |
        |  |       OR       |      |                |
        |  |  +---------+   |      |                |
        |  |  | Shape 2 |   |      |                |
        |  |  +---------+   |      |                |
        |  +--------|-------+      +--------|-------+
        +-----------|-----------------------|------+
                    |                       |
                    v                       v
             MUST CONNECT TO         MUST CONNECT TO
          (Shape 1 OR Shape 2)   AND    (Shape 3)

Type of Change

  • New feature

Impact

No behavior change just odb change

Verification

  • I have verified that the local build succeeds (./etc/Build.sh).
  • I have run the relevant tests and they pass.
  • My code follows the repository's formatting guidelines.
  • I have signed my commits (DCO).

Adds support for parsing this property.

Returns true if all shapes of this terminal must be connected electrically.
For example if there's two shapes that make up the 'A' terminal, they must
both be connected to the net that drives A.

```
Without MUSTJOINALLPORTS (Default behavior):
--------------------------------------------
Connecting to ANY shape of ANY port is sufficient to connect to the PIN.
        +------------------------------------------+
        | PIN A                                    |
        |                                          |
        |  +----------------+  +----------------+  |
        |  | PORT 1         |  | PORT 2         |  |
        |  |  +---------+   |  |  +---------+   |  |
        |  |  | Shape 1 |   |  |  | Shape 3 |   |  |
        |  |  +---------+   |  |  +---------+   |  |
        |  |       OR       |  |                |  |
        |  |  +---------+   |  |                |  |
        |  |  | Shape 2 |   |  |                |  |
        |  |  +---------+   |  |                |  |
        |  +----------------+  +----------------+  |
        +------------------------------------------+
                 |                     |
                 +----------OR---------+
                            |
                            v
                   Router connects to ANY ONE
                   of {Shape 1, Shape 2, Shape 3}

With MUSTJOINALLPORTS:
----------------------
The router MUST connect to AT LEAST ONE shape of EACH port.
Ports are treated as independent connection requirements.
        +------------------------------------------+
        | PIN A (MUSTJOINALLPORTS)                 |
        |                                          |
        |  +----------------+      +----------------+
        |  | PORT 1         |      | PORT 2         |
        |  |  +---------+   |      |  +---------+   |
        |  |  | Shape 1 |   |      |  | Shape 3 |   |
        |  |  +---------+   |      |  +---------+   |
        |  |       OR       |      |                |
        |  |  +---------+   |      |                |
        |  |  | Shape 2 |   |      |                |
        |  |  +---------+   |      |                |
        |  +--------|-------+      +--------|-------+
        +-----------|-----------------------|------+
                    |                       |
                    v                       v
             MUST CONNECT TO         MUST CONNECT TO
          (Shape 1 OR Shape 2)   AND    (Shape 3)

```

Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for the LEF58_MUSTJOINALLPORTS property within the dbMTerm class, encompassing database schema updates, flag management, and LEF file parsing. The review feedback suggests improving the robustness of the property parsing logic in lefin.cpp to avoid false positives, clarifying the API documentation regarding port connection requirements, and simplifying redundant boolean comparisons in the getter implementation.

Copy link
Copy Markdown
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clang-tidy made some suggestions

Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
Signed-off-by: Ethan Mahintorabi <ethanmoon@google.com>
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

clang-tidy review says "All clean, LGTM! 👍"

1 similar comment
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

clang-tidy review says "All clean, LGTM! 👍"

@QuantamHD
Copy link
Copy Markdown
Collaborator Author

@maliberty It looks like both of the failing tests are flakes. How would you like me to proceed?

05:41:18  //src/rmp/test:aes_genetic-tcl_test                                     TIMEOUT in 300.0s
05:41:18    /home/user/.cache/bazel/_bazel_user/f7a3ccd2cecf62bbb14e4908f7bb79fd/execroot/_main/bazel-out/k8-opt/testlogs/src/rmp/test/aes_genetic-tcl_test/test.log
05:41:18  //src/web/test:request_handler_test                                      FAILED in 0.7s
05:41:18    /home/user/.cache/bazel/_bazel_user/f7a3ccd2cecf62bbb14e4908f7bb79fd/execroot/_main/bazel-out/k8-opt/testlogs/src/web/test/request_handler_test/test.log

inline constexpr uint32_t kSchemaInitial = 57;

inline constexpr uint32_t kSchemaMinor = 128; // Current revision number
inline constexpr uint32_t kSchemaMinor = 130; // Current revision number
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should be kSchemaMinor = 129;

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants