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

Fix rr_graph direct link #2146

merged 2 commits into from
Aug 29, 2022

Conversation

amin1377
Copy link
Contributor

This PR is created to fix issue #2145
@vaughnbetz

@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Aug 27, 2022
Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

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

Nice job finding this! Can you update the comments in the code to explain the logic though and make sure the existing comment is still correct?

@@ -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


//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.

@vaughnbetz vaughnbetz merged commit 7da51f7 into master Aug 29, 2022
@vaughnbetz vaughnbetz deleted the fix_rr_graph_direct_link branch August 29, 2022 04:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants