Skip to content

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

Merged
merged 2 commits into from
Aug 29, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions vpr/src/route/rr_graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2962,12 +2962,20 @@ 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;
int target_cap = z + directs[i].sub_tile_offset;
Copy link
Contributor

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

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);
Copy link
Contributor

Choose a reason for hiding this comment

The 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).

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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;
Expand Down