Skip to content

[AP][FullLegalizer] Basic Min. Disturbance Full Legalizer #2921

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 7 commits into from
Mar 10, 2025

Conversation

haydar-c
Copy link
Contributor

@haydar-c haydar-c commented Mar 3, 2025

Added the "basic_min_disturbance" command line options into the AP Flow. Ideally, this will be another Full Legalizer method when implemented on top of the ones here (https://docs.verilogtorouting.org/en/latest/vpr/command_line_usage/#cmdoption-vpr-ap_full_legalizer).

I also added the reading from flat placement and writing to flat placement into AP Flow. If the read option is provided, Global Placement is skipped and Partial Placement is constructed with provided flat placement information. If the write option is provided, flat placement is written at the end of AP Flow.

Added read flat placement to AP flow and
and command line option for Basic Min. Disturbance FL.
@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Mar 3, 2025
Copy link
Contributor

@AlexandreSinger AlexandreSinger left a comment

Choose a reason for hiding this comment

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

Hi @haydar-c , this PR is looking good. Just some comments.

@@ -15,6 +15,7 @@
*/
enum class e_ap_full_legalizer {
Naive, ///< The Naive Full Legalizer, which clusters atoms placed in the same tile and tries to place them in that tile according to the flat placement.
APPack ///< The APPack Full Legalizer, which uses the flat placement to improve the Packer and Placer.
APPack, ///< The APPack Full Legalizer, which uses the flat placement to improve the Packer and Placer.
Basic_Min_Disturbance ///< The Basic Min. Disturbance Full Legalizer, which uses flat placement and tries to reconstruct clusters identically. The method for handling orphan clusters has not yet been determined.
Copy link
Contributor

Choose a reason for hiding this comment

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

I would say something like "which tries to reconstruct a clustered placement as close to the incoming flat placement as it can". I would leave off the orphan cluster sentence for now. It is very easy to forget to remove that sentence. I recommend writing this sentence as if you finished the min disturbance full legalizer.

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.

A few nits -- otherwise good!

Changes based on review (VtrError and commenting)
Copy link
Contributor

@AlexandreSinger AlexandreSinger left a comment

Choose a reason for hiding this comment

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

Hi @haydar-c , last few comments.

The most major one is the use of t_pl_loc in the AP context. We have to be careful when using structs designed for clustered placement. This struct, for example, stores position as integers; however, in AP we store positions as floats.

haydar-c and others added 3 commits March 10, 2025 00:42
Using floats for location in flat and partial
palcement. Also error handling.
Using floats for location in flat and partial
placement. Changed error handling.
Copy link
Contributor

@AlexandreSinger AlexandreSinger left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexandreSinger AlexandreSinger merged commit 039785b into master Mar 10, 2025
36 checks passed
@AlexandreSinger AlexandreSinger deleted the basic_min_disturbance_full_legalizer branch March 10, 2025 14:52
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.

3 participants