drt: explicit_wrong_dir, no_drv and pin_term/pin_net #5783
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR has some minor changes to
prepPoint_pin_checkPoint_planar
andprepPoint_pin_checkPoint_viaDir_helper
.There are essentially three changes:
vert_dir
,horz_dir
andwrong_dir
made explicitThroughout 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
andpin_net
variablesMultiple 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, iftrue
something happens usingtrue
as an argument (either setting the variable itself orap->setAccess()
), iffalse
the same happens usingfalse
.no_drv
is now used directly. There is no loss in readability sinceno_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 theno_drv
labeling makes its meaning more clear