Skip to content

Add constraints propagation to update the PartitionRegions of blocks … #1751

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 13 commits into from
Jun 15, 2021

Conversation

sfkhalid
Copy link
Contributor

@sfkhalid sfkhalid commented Jun 1, 2021

…in macros at the start of initial placement

This code does constraint propagation at the start of initial placement. It goes through all the macros, and checks for floorplanning constraints on each one. For the macros that have floorplan constraints, it calculates the smallest possible floorplan region for the entire macro, based on the floorplan constraints of each block within the macro. This is all done before initial placement starts so that during initial placement, when macros are being placed, the floorplan legality can easily be checked by seeing whether the head member of the macro is in the floorplan region that was calculated earlier.

Related Issue

This pull request is related to adding floorplanning placement constraints to VPR, as described in this issue #932

Motivation and Context

This change makes it easier to check floorplan legality for macros during initial placement.

@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Jun 1, 2021
@sfkhalid sfkhalid changed the title Add constraints propogation to update the PartitionRegions of blocks … Add constraints propagation to update the PartitionRegions of blocks … Jun 2, 2021
@sfkhalid
Copy link
Contributor Author

sfkhalid commented Jun 6, 2021

To check that the code in this pull request did not increase the place time, I ran vtr_reg_qor_chain on this branch and master and compared the results. The comparison can be seen here:
constraints_prop_qor_comparison.xlsx
The results show that the overall run time and place time did not increase.
Furthermore, the place time decreased a bit for bigger circuits such as mcml, LU32, and stereovision2.

…titionRegions to reduce length of functions. Also improved error messages for constraints propagation
@sfkhalid
Copy link
Contributor Author

@vaughnbetz Do the changes on this PR look good?

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.

Two minor comments on the unit test and the error message. I can merge when CI goes green, but I'd like you to incorporate those two comments as well.

@@ -425,6 +426,34 @@ TEST_CASE("RegionLocked", "[vpr]") {
REQUIRE(is_r2_locked == false);
}

//Test calculation of macro constraints
TEST_CASE("MacroConstraints", "[vpr]") {
t_pl_macro pl_macro;
Copy link
Contributor

Choose a reason for hiding this comment

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

What is pl_macro initialized to? Maybe you're relying on the default constructor? Better to initialize it I think, and describe what the test does (macro of size 1, macro of size 2, ??).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The pl_macro wasn't initialized to anything. It is only passed in to update_macro_member_pr so that if there is an error the error message can be printed with the macro. This won't happen in the case of this unit test, since the test is just checking that the PartRegion is updated properly for a particular case. I can initialize it to something though, and yes, I'll add some comments about what the test is doing.

@sfkhalid
Copy link
Contributor Author

@vaughnbetz Can this be merged now?

@vaughnbetz vaughnbetz merged commit 6e442d1 into master Jun 15, 2021
@vaughnbetz vaughnbetz deleted the constraints_propagation branch June 15, 2021 19:19
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