-
Notifications
You must be signed in to change notification settings - Fork 415
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
Conversation
…in macros at the start of initial placement
…n to only update PartitionRegion of head macro
…what it is used for
…gation, not just head
…member PartitionRegions
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: |
…titionRegions to reduce length of functions. Also improved error messages for constraints propagation
@vaughnbetz Do the changes on this PR look good? |
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.
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; |
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.
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, ??).
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.
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.
…eeded to convert std string to c string
@vaughnbetz Can this be merged now? |
…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.