Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drt: explicit_wrong_dir, no_drv and pin_term/pin_net #5783

Merged

Conversation

bnmfw
Copy link
Contributor

@bnmfw bnmfw commented Sep 20, 2024

This PR has some minor changes to prepPoint_pin_checkPoint_planar and prepPoint_pin_checkPoint_viaDir_helper.
There are essentially three changes:

vert_dir, horz_dir and wrong_dir made explicit

Throughout both functions an at least on if statement has to check whether the given dir is in the preferred direction of the layer. This check is verbose and makes it difficult to follow the part of the code where those checks exists. wrong_dir was created to facilitate legibility.

pin_term and pin_net variables

Multiple getters for this variables though the code make it more bloated. Accessing them once and using them further make the code smaller.

no_drv

Both no_drv changes are very simple. In both cases the variable is checked, if true something happens using true as an argument (either setting the variable itself or ap->setAccess()), if false the same happens using false. no_drv is now used directly. There is no loss in readability since no_drv is defined right before both cases.
One could argue that no_drv is unnecessary, and its condition could be used in its place, but I'd argue that the no_drv labeling makes its meaning more clear

Copy link
Contributor

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

src/drt/src/pa/FlexPA_prep.cpp Outdated Show resolved Hide resolved
src/drt/src/pa/FlexPA_prep.cpp Show resolved Hide resolved
src/drt/src/pa/FlexPA_prep.cpp Show resolved Hide resolved
Signed-off-by: bernardo <[email protected]>
@bnmfw bnmfw added the drt Detailed Routing label Sep 21, 2024
Copy link
Contributor

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

@maliberty maliberty merged commit 8fa1a33 into The-OpenROAD-Project:master Sep 22, 2024
10 checks passed
@bnmfw bnmfw deleted the drt_explicit_dir_variables branch September 22, 2024 15:28
@bnmfw bnmfw mentioned this pull request Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
drt Detailed Routing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants