Skip to content

Improve region intersect function #1778

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 3 commits into from
Jun 18, 2021
Merged

Conversation

sfkhalid
Copy link
Contributor

The intersection function belonging to the Region class was modified to also consider cases where one region has no subtile specified and the other region has a subtile specified.

Description

Previously, the region intersection function would only calculate the intersection when the two regions passed in both had no subtiles specified, or both had the same subtiles specified. However, this meant that the routine would miss out on some cases.

For example, if region r1 was constrained from region (0,0) to (10,10) with subtile 0 specified, and region r2 was constrained from region (0,0) to (10,10) with no subtile specified, the previous intersection function would say that there is no intersection between these two regions. The new intersection function would return (0,0) to (10,10) with subtile 0 as the intersection between r1 and r2.

Related Issue

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

Motivation and Context

The missing of some intersecting regions becomes an issue especially when trying to intersect a region with the grid dimensions, to ensure that the region does not fall outside of the grid dimensions. If a PartitionRegion is created to match grid dimensions, it does not have a subtile specified since different areas of the grid can have different subtile dimensions. If a region with subtile specified is intersected with the grid PartitionRegion, the old Region intersection will return no intersection, even when the region is within the grid dimensions. The new Region intersection function solves this problem.

Another thing that should be considered is whether there is a way to check that the subtile dimensions of the region are within the subtile dimensions of the grid at the specified x, y values.

@github-actions github-actions bot added the VPR VPR FPGA Placement & Routing Tool label Jun 16, 2021
@sfkhalid
Copy link
Contributor Author

@vaughnbetz Does this look good to merge?

@vaughnbetz
Copy link
Contributor

Looks good.

@vaughnbetz vaughnbetz merged commit e529249 into master Jun 18, 2021
@vaughnbetz vaughnbetz deleted the improve_region_intersect branch June 18, 2021 16:09
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