-
Notifications
You must be signed in to change notification settings - Fork 581
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: PA minor refactoring #5744
drt: PA minor refactoring #5744
Conversation
Signed-off-by: bernardo <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
src/drt/src/pa/FlexPA_prep.cpp
Outdated
bool use_center_line = false; | ||
if (is_macro_cell_pin) { | ||
auto rect_dir = gtl::guess_orientation(rect); | ||
if ((rect_dir == gtl::HORIZONTAL && is_layer1_horz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like this would benefit from a helper that said LayerMatchesRectOrentation(layer, rect)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm noting this for the subsequent PR. For this one as it became pretty big I do not intend to create new functions
src/drt/src/pa/FlexPA.h
Outdated
* | ||
* @param pin pin object which will have figures merged by layer | ||
* @param inst_term instance terminal from which to get xfrom | ||
* @param is_shrink if polygons will be shrinked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* @param is_shrink if polygons will be shrinked | |
* @param is_shrink if polygons will be shrunk |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also describe further how it will be shrunk? Something like "if True, pin's polygons will be shrunk by ...."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not completely sure why there is shrinking. Is is_shrink == True then the input rectangle will have the side in the non preferred direction of the layer reduced by half the layer width. I'm not sure why this is the case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have only looked at FlexPA.h and FlexPA.cpp
src/drt/src/pa/FlexPA.h
Outdated
* | ||
* @param pin pin object which will have figures merged by layer | ||
* @param inst_term instance terminal from which to get xfrom | ||
* @param is_shrink if polygons will be shrinked |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you also describe further how it will be shrunk? Something like "if True, pin's polygons will be shrunk by ...."
Signed-off-by: bernardo <[email protected]>
…ROAD into drt_minor_refactoring
Signed-off-by: bernardo <[email protected]>
33aa9f4
to
e69adc2
Compare
clang-tidy review says "All clean, LGTM! 👍" |
2 similar comments
clang-tidy review says "All clean, LGTM! 👍" |
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: bernardo <[email protected]>
203ff42
to
6c40d86
Compare
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: bernardo <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: bernardo <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: bernardo <[email protected]>
clang-tidy review says "All clean, LGTM! 👍" |
3367a9b
to
e563552
Compare
clang-tidy review says "All clean, LGTM! 👍" |
Signed-off-by: bernardo <[email protected]>
e563552
to
ba0b104
Compare
clang-tidy review says "All clean, LGTM! 👍" |
1 similar comment
clang-tidy review says "All clean, LGTM! 👍" |
layerWidths.resize(getDesign()->getTech()->getLayers().size(), 0); | ||
for (int i = 0; i < int(layerWidths.size()); i++) { | ||
layerWidths[i] = getDesign()->getTech()->getLayer(i)->getWidth(); | ||
frTechObject* tech = getDesign()->getTech(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
better if we have a getTech function in FlexPA. not needed in this PR. just a note
void FlexPA::genAPEnclosedBoundary(std::map<frCoord, frAccessPointEnum>& coords, | ||
const gtl::rectangle_data<frCoord>& rect, | ||
const frLayerNum layer_num, | ||
const bool is_curr_layer_horz) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move to the same place so that the changes can be seen? (after gen_initializeAccessPoints)
unless there is a reason for moving it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are no changes in genAPEnclosedBoundary
, but it is one of the three functions that generate access points coordinates for a given type (genAPOnTrack
, genAPCentered
, genAPEnclosedBoundary
). I just moved it to be right after the other two instead of being far down.
clang-tidy review says "All clean, LGTM! 👍" |
bc67868
to
4f92caf
Compare
clang-tidy review says "All clean, LGTM! 👍" |
[Context] This used to be a huge, overwhelming PR, Its contents were splits in PRs #5760 #5770 #5778 #5783 and #5788. As those were merged this PR was updated to not included their changes ('drt: master merge' commits). What remains can be reviewed as a single PR.
This PR contains minor refactoring changes do the PA module
Straight Forward Refactoring Decisions:
genAPEnclosedBoundary
was moved to be closer togenAPCentered
andgenAPOnTrack
which are very similar functionsmergePinShapes
and auxilary variabletech
was created to replacegetDesign()->getTech()
which was called some timesOther Refactoring Decisions:
Some minor parts of code were changed for a less verbose equivalent, here are they:
Initialize a vector with set size:
changed to
Using find directly in if statement:
changed to
Cutting unnecessary if statement
changed to