Skip to content

[Place] Fix y_range Calculation for Placement #2958

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

Closed
wants to merge 1 commit into from
Closed

Conversation

amin1377
Copy link
Contributor

@amin1377 amin1377 commented Apr 1, 2025

y_range determines the range on the y-axis (in the compressed grid) to search for a compatible location. Within this search range, a compatible location is chosen randomly by generating a random number (dy) and adding it to search_range.ymin. rng.irand is used to generate this number, and its documentation (Link) indicates that the range is inclusive. Therefore, I believe we should pass y_range to this function, not y_range - 1. This is particularly problematic for IO blocks when the chosen x is located in the middle of the device, where y_range would be 1, resulting in dy always being zero and preventing the changing of IO block rows.

@amin1377 amin1377 changed the title [place] Fix y_range Calculation for Placement [Place] Fix y_range Calculation for Placement Apr 1, 2025
@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Apr 1, 2025
@amin1377 amin1377 closed this Apr 1, 2025
@vaughnbetz
Copy link
Contributor

I think this is closed since range-1 is the right value, correct?
I think it would be good to add doxygen comments to the vtr random number generator and build it into the vtrUtil docs on the web.
@amin1377

@amin1377
Copy link
Contributor Author

amin1377 commented Apr 1, 2025

Yes, that's correct. upper_bound is used to find the upper end of the range, and it returns the first element that is greater than the specified value.

Sure, I'll add the documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants