Skip to content

odb: rename RSeg capacitance getters and remove unused code#9835

Merged
eder-matheus merged 1 commit intoThe-OpenROAD-Project:masterfrom
AcKoucher:odb-renaming
Mar 19, 2026
Merged

odb: rename RSeg capacitance getters and remove unused code#9835
eder-matheus merged 1 commit intoThe-OpenROAD-Project:masterfrom
AcKoucher:odb-renaming

Conversation

@AcKoucher
Copy link
Contributor

Related to The-OpenROAD-Project/OpenROAD-flow-scripts#3969.

Context

Among other capacitance related APIs, dbRSeg had two getCapacitance methods for retrieving capacitance - one overloading the other. In order for us to know if we were using only ground or total (ground + coupling) capacitance, we'd need to rely on the parameters which makes our life harder i.e., the naming didn't help at all.

Changes

Instead of overloading, having two distinct method names (one for ground, other for total capacitance) so that we can easily know what type of capacitance is being retrieved.

Note that I kept the getCapacitance(corner, miller_mult) method to maintain the possibility of retrieving a capacitance with a custom coupling scaling - see what is being called inside getTotalCapacitance for better understanding.

I also removed a function that wasn't being used and seemed somewhat incomplete.

Signed-off-by: Arthur Koucher <arthurkoucher@precisioninno.com>
@AcKoucher AcKoucher requested a review from eder-matheus March 19, 2026 16:12
Copy link
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 improves the clarity of the dbRSeg API by renaming capacitance getters. The ambiguous getCapacitance method is replaced with getGroundCapacitance and a new getTotalCapacitance method, making the distinction between ground and total capacitance explicit. An unused method, getSourceCapacitance, has also been removed. All call sites have been updated accordingly. These changes enhance code readability and maintainability without altering functionality. The refactoring is well-executed and I have no further suggestions.

@github-actions
Copy link
Contributor

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

@eder-matheus eder-matheus enabled auto-merge March 19, 2026 16:33
@eder-matheus eder-matheus merged commit b2e990c into The-OpenROAD-Project:master Mar 19, 2026
15 checks passed
@AcKoucher AcKoucher deleted the odb-renaming branch March 19, 2026 22:27
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