-
Notifications
You must be signed in to change notification settings - Fork 426
Cleanups in RR graph generation #3264
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
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.
Thanks for the PR Soheil! Great changes. Had some small nitpicks here and there.
vpr/src/route/router_lookahead/router_lookahead_compressed_map.cpp
Outdated
Show resolved
Hide resolved
LGTM |
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.
LGTM
I like this change. Adding an iterator like this is a neat way to make iteration easier.
Whenever we want to iterate over all tile locations, we use a nested loop with three variables for x, y, and layer. This causes three levels of indentation. In RR graph generation code, additional conditional statements and loops incease indentation level to as high as 6-7, making some lines really long. This PR adds a new function to DeviceGrid to allow iterating over all tile location using a single loop.
In addition, the root location of tiles are passed in deep function call hierarchies using three separate arguments for x, y, and layer. I replaces these three arguments with a
t_physical_tile_loc
argument to make function calls more concise.I also changed the return type of
DeviceGrid::get_num_layers()
tosize_t
to be consistent withwidth()
andheight()
methods.