-
Notifications
You must be signed in to change notification settings - Fork 415
Fix rr_graph direct link #2146
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
Fix rr_graph direct link #2146
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2962,12 +2962,24 @@ static int get_opin_direct_connections(RRGraphBuilder& rr_graph_builder, | |
} | ||
} | ||
|
||
int target_sub_tile = z + directs[i].sub_tile_offset; | ||
if (relative_ipin >= target_type->sub_tiles[target_sub_tile].num_phy_pins) continue; | ||
//directs[i].sub_tile_offset is added to from_capacity(z) to get the | ||
// target_capacity | ||
int target_cap = z + directs[i].sub_tile_offset; | ||
|
||
// Iterate over all sub_tiles to get the sub_tile which the target_cap belongs to. | ||
const t_sub_tile* target_sub_tile = nullptr; | ||
for (const auto& sub_tile : target_type->sub_tiles) { | ||
if (sub_tile.capacity.is_in_range(target_cap)) { | ||
target_sub_tile = &sub_tile; | ||
break; | ||
} | ||
} | ||
VTR_ASSERT(target_sub_tile != nullptr); | ||
if (relative_ipin >= target_sub_tile->num_phy_pins) continue; | ||
|
||
//If this block has capacity > 1 then the pins of z position > 0 are offset | ||
//by the number of pins per capacity instance | ||
int ipin = get_physical_pin_from_capacity_location(target_type, relative_ipin, target_sub_tile); | ||
int ipin = get_physical_pin_from_capacity_location(target_type, relative_ipin, target_cap); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is the comment above still correct? I'm not seeing the logic of how the pins wrap around (pins of z position > 0 offset by number of pins per capacity instance). There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. "relative_pin" shows the pin number in its capacity. So, to get the number of the pin at tile-level, "relative_ipin" should be added by the number of pins on prior sub_tiles and capacities. |
||
|
||
/* Add new ipin edge to list of edges */ | ||
std::vector<RRNodeId> inodes; | ||
|
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 comment what the logic is 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.
Done