-
Notifications
You must be signed in to change notification settings - Fork 415
Deploy RRGraphBuilder
in RRGraph Reader and Writer to replace the use of rr_node_indices
#1800
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
Conversation
…f rr_node_indices and deploy RRSpatialLookup API
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.
Generally looks fine, except it makes the case even more that we should have a utility function for adding a node to all the locations in the spatial lookup it touches, in the proper way for each type.
for (size_t inode = 0; inode < rr_nodes_->size(); inode++) { | ||
auto node = (*rr_nodes_)[inode]; | ||
if (rr_graph.node_type(node.id()) == CHANX) { | ||
for (int ix = node.xlow(); ix <= node.xhigh(); ix++) { |
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 all this be made a utility function in RRGraphBuilder (or a global utility function) and called in multiple places? This code would handle the 3 call sites with 2D loop nests in the clock rr-graph builder too. It seems like making this a general utility would be a good idea. Would be a function like: add_node_to_all_locs () or some such.
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.
Agree. The node addition is very generic and applicable to all kinds of nodes. I think it should be an API of the RRGraphBuilder because it should be the only way to add an existing rr_node
to RRSpatialLookup data structure.
Note: single CI failure is unrelated/spurious. |
@@ -37,6 +37,15 @@ class RRGraphBuilder { | |||
t_rr_graph_storage& node_storage(); | |||
/* Return a writable object for update the fast look-up of rr_node */ | |||
RRSpatialLookup& node_lookup(); | |||
/* Add an existing rr_node in the node storage to the node look-up |
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 think this comment should also say that the node will be added to the lookup for every side it is on (for OPINs and IPINs) and for every (x,y) location at which it exists (for wires that span more than one (x,y).
The changes all look good; just suggesting one more comment addition. Merging this, but if you can add the comment in another PR that would be great. |
Thanks @vaughnbetz I start working on the next PR. The comment will be first one to be applied in that PR. |
Description
This PR focuses on updating RRGraph reader and writer functions, where we use the refactored data structure
RRGraphBuilder
to replace the legacy data structurerr_node_indices
.This PR aims to eliminate the use of
rr_node_indices
in the RRGraph reader and writer, as one step further in deprecating the legacy data structure.Checklist:
rr_node_indices
for RRGraph readerrr_node_indices
for RRGraph writerRelated Issue
Motivation and Context
This pull request is a follow-up PR on the routing resource graph refactoring effort #1779
After the previous PR #1779 , 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 143 lines related):This PR will remove the use in
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
Checklist: