Skip to content
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

3D Placement Constraints #2623

Merged
merged 34 commits into from
Jul 8, 2024
Merged

3D Placement Constraints #2623

merged 34 commits into from
Jul 8, 2024

Conversation

soheilshahrouz
Copy link
Contributor

This PR enhances the supoort for 3D placement constraints to allow the user to specify a layer range for each floorplanning constraint.

Related Issue

Motivation and Context

Each floorplan constraint is limited to a single layer. If the user wants to define a cubic floorplan constraint, she/he has to define multiple rectangular floorplan constraint with the same (x,y) coordinates but for different layers. This PR lets user defne a single floorplan region spanning across multiple layers.

How Has This Been Tested?

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool libarchfpga Library for handling FPGA Architecture descriptions lang-cpp C/C++ code libvtrutil labels Jun 20, 2024
@vaughnbetz
Copy link
Contributor

The FASM unit test failure seems to be due to a change in the default layers returned for placement constraints on a 2D device:
2024-06-24T20:23:40.5141020Z �[0m�[0;37m/home/runner/work/vtr-verilog-to-routing/vtr-verilog-to-routing/vpr/test/test_vpr_constraints.cpp:51: �[0m�[1;31mFAILED:
2024-06-24T20:23:40.5143053Z �[0m�[0;36m REQUIRE( def_region.get_region_bounds().get_layer_range() == std::make_pair(-1, -1) )
2024-06-24T20:23:40.5144059Z �[0mwith expansion:
2024-06-24T20:23:40.5144514Z �[1;33m {?} == {?}

Updating the REQUIRE to pair(0,0) should work.

@soheilshahrouz also tells me that if we make a custom printer class/method for std::pair catch2 will print objects instead of {?} in the failure.

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.

Half done ... getting slow.

libs/libvtrutil/src/vtr_geometry.h Outdated Show resolved Hide resolved
libs/libvtrutil/src/vtr_geometry.h Show resolved Hide resolved
vpr/src/base/partition_region.cpp Outdated Show resolved Hide resolved
vpr/src/base/partition_region.cpp Show resolved Hide resolved
vpr/src/base/partition_region.h Show resolved Hide resolved
vpr/src/base/vpr_constraints.xsd Show resolved Hide resolved
vpr/src/base/vpr_constraints_writer.cpp Outdated Show resolved Hide resolved
vpr/src/base/vpr_context.h Show resolved Hide resolved
vpr/src/draw/draw_floorplanning.cpp Outdated Show resolved Hide resolved
vpr/src/place/grid_tile_lookup.h Outdated Show resolved Hide resolved
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.

Looks good.
Should also add a region constrained case to one of our 3D architecture tests. Small design, A few different kinds of regions (multi-layer, single location, single location with subtile, etc.)

vpr/src/place/place_constraints.cpp Outdated Show resolved Hide resolved
@soheilshahrouz soheilshahrouz changed the title [WIP] 3D Placement Constraints 3D Placement Constraints Jul 3, 2024
@github-actions github-actions bot added the docs Documentation label Jul 3, 2024
@vaughnbetz vaughnbetz merged commit f37ec16 into master Jul 8, 2024
53 checks passed
@vaughnbetz vaughnbetz deleted the 3d_constraints branch July 8, 2024 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation lang-cpp C/C++ code libarchfpga Library for handling FPGA Architecture descriptions libvtrutil VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants