Skip to content

Deploy RRGraphBuilder in Regular Routing Resource Graph Building Functions to replace the use of rr_node_indices #1777

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 5 commits into from
Jun 21, 2021

Conversation

tangxifan
Copy link
Contributor

@tangxifan tangxifan commented Jun 16, 2021

Description

This PR focuses on updating the vpr/src/route/rr_graph.cpp, where we use the refactored data structure RRGraphBuilder to replace the legacy data structure rr_node_indices.
This PR aims to eliminate the use of rr_node_indices for the regular RRGraph building functions vpr/src/route/rr_graph.cpp and vpr/src/route/rr_graph2.cpp, as one step further in deprecating the legacy data structure.

Checklist:

  • Eliminate the use of rr_node_indices for the regular RRGraph building functions
  • Eliminate the use of rr_node_indices for the ClockRRGraph building functions This is due to too many code changes. Prefer to leave for the next pull request.

Related Issue

This pull request is a follow-up PR on the routing resource graph refactoring effort #1693

Motivation and Context

After the previous PR #1747 , we start reworking all the source files that use the legacy data structure rr_node_indices in a high priority, in order to deprecate the legacy data structure as soon as possible.
Current statistics on the files that use rr_node_indices (in total there are 242 lines related):

Considering the fact that some internal scratchpad data structures are still using the int rather than RRNodeId, e.g.,

struct t_opin_connections_scratchpad {
std::array<std::vector<int>, 8> scratch;
};

struct t_rr_edge_info {
t_rr_edge_info(int from, int to, short type) noexcept
: from_node(from)
, to_node(to)
, switch_type(type) {}

I try to avoid massive changes to the codes for now.
So, in this PR, I will try to limit the changes to rr_graph.cpp.

How Has This Been Tested?

Considering this is all about refactoring, this PR does not need to create new tests. Expect all the existing tests to pass.

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@tangxifan tangxifan marked this pull request as draft June 16, 2021 18:01
@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Jun 16, 2021
@tangxifan tangxifan changed the title Deploy RRGraphBuilder in rr_graph.cpp to replace the use of rr_node_indices Deploy RRGraphBuilder in Regular Routing Resource Graph Building Functions to replace the use of rr_node_indices Jun 16, 2021
@tangxifan tangxifan marked this pull request as ready for review June 16, 2021 23:07
@tangxifan
Copy link
Contributor Author

@vaughnbetz @hzeller This PR is ready for your review.

@tangxifan tangxifan requested review from vaughnbetz and hzeller June 17, 2021 17:44
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.

The changes look good. Glad to see this progressing, and I like that some of the RRNodeId casting is gone now. I don't have any suggestions from improvement; merging.

@vaughnbetz vaughnbetz merged commit 571c8eb into master Jun 21, 2021
@vaughnbetz vaughnbetz deleted the rr_spatial_lookup branch June 21, 2021 17:36
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