Skip to content

mbff: expose visibility of some idempotent helper functions#10548

Open
mikesinouye wants to merge 6 commits into
The-OpenROAD-Project:masterfrom
mikesinouye:mbff
Open

mbff: expose visibility of some idempotent helper functions#10548
mikesinouye wants to merge 6 commits into
The-OpenROAD-Project:masterfrom
mikesinouye:mbff

Conversation

@mikesinouye
Copy link
Copy Markdown
Contributor

Summary

These functions are useful for MBFF utilities in wrapper code that use OpenROAD as a library.

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).

Signed-off-by: Mike Inouye <mikeinouye@google.com>
@mikesinouye mikesinouye requested a review from a team as a code owner May 28, 2026 23:05
@mikesinouye mikesinouye requested a review from LucasYuki May 28, 2026 23:05
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 updates the MBFF class in src/gpl/src/mbff.h by explicitly adding public: and private: access specifiers to organize its member functions. Specifically, the clock pin functions are now marked as public, while the (MB)FF utility functions are marked as private. There are no review comments, and I have no feedback to provide.

@maliberty
Copy link
Copy Markdown
Member

I prefer not to have interleaved public and private sections, as in https://google.github.io/styleguide/cppguide.html#Declaration_Order

Group similar declarations together, placing public parts earlier.

Just move the method declarations to the existing public segment

Signed-off-by: Mike Inouye <mikeinouye@google.com>
@github-actions github-actions Bot added size/S and removed size/XS labels May 29, 2026
@mikesinouye
Copy link
Copy Markdown
Contributor Author

I prefer not to have interleaved public and private sections, as in https://google.github.io/styleguide/cppguide.html#Declaration_Order

Group similar declarations together, placing public parts earlier.

Just move the method declarations to the existing public segment

Done.

@maliberty
Copy link
Copy Markdown
Member

This is ok but at the same time I wonder if these shouldn't move to dbNetwork as they have little to do with mbff clustering so it seems strange to require an MBFF object to call them. What do you think of moving them?

@mikesinouye
Copy link
Copy Markdown
Contributor Author

In our usage we already have the MBFF object but I agree with your general point. My only concern would be that I haven't validated their usage outside of the mbff context. If you want me to move them I can.

@maliberty
Copy link
Copy Markdown
Member

If you don't mind I think it would be cleaner to move them.

@mikesinouye mikesinouye requested review from a team as code owners June 1, 2026 23:18
@github-actions github-actions Bot added size/XL and removed size/S labels Jun 1, 2026
Signed-off-by: Mike Inouye <mikeinouye@google.com>
@mikesinouye
Copy link
Copy Markdown
Contributor Author

I moved them and getLibertyScanX() functions from dbSta -> dbNetwork as the new helpers need them but dbNetwork is a dependency of dbSta. Updated callsites to use dbNetwork object in a few different locations.

Comment on lines -263 to -265
sta::LibertyPort* getLibertyScanEnable(const LibertyCell* lib_cell);
sta::LibertyPort* getLibertyScanIn(const LibertyCell* lib_cell);
sta::LibertyPort* getLibertyScanOut(const LibertyCell* lib_cell);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why did these become member functions? It seems unrelated to the mbff change.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I moved the getLibertyScanX() functions from dbSta -> dbNetwork as the mbff helpers need them but dbNetwork is a dependency of dbSta. The moved mbff functions cannot include the dbSta functions or this will result in a dep loop. To avoid this I moved them to dbNetwork.

Signed-off-by: Mike Inouye <mikeinouye@google.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants