Skip to content

3D Placement Constraints #2623

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 34 commits into from
Jul 8, 2024
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
fb3beca
updated Region and RegionRectCoord to support layer range
soheilshahrouz Jun 17, 2024
0907fcf
add layer_low and layer_high to vpr_contstraints.xsd
soheilshahrouz Jun 18, 2024
875a238
add layer_low and layer_high to vpr_constraints_writer
soheilshahrouz Jun 18, 2024
448aa85
update grid_tile_lookup to support layer range
soheilshahrouz Jun 18, 2024
a67c8c2
updated initial placement to support layer range
soheilshahrouz Jun 19, 2024
25e5145
Merge branch 'update_search_range_with_floorplan_constraint' into 3d_…
soheilshahrouz Jun 19, 2024
e97bfff
update place_constraints.cpp to support layer range
soheilshahrouz Jun 20, 2024
cd75e21
early check to see if a block can be placed in a layer
soheilshahrouz Jun 20, 2024
423f975
replace initial rect coordinates with numeric_limits functions
soheilshahrouz Jun 21, 2024
686011b
fix compilation errors in test_vpr_constraints.cpp
soheilshahrouz Jun 21, 2024
d73139d
add unit tests for 3d floorplan regions
soheilshahrouz Jun 21, 2024
e998e82
add StringMaker<vtr::Rect<T>>
soheilshahrouz Jun 21, 2024
54bf518
fix false empty region intersection bug
soheilshahrouz Jun 21, 2024
0fcae3a
fix empty region check bug
soheilshahrouz Jun 21, 2024
32e6900
update test_vpr_constraints with cases that have regions spanning mul…
soheilshahrouz Jun 21, 2024
aeb4612
bugfix: consider the last layer in exhaustive initial placement of a …
soheilshahrouz Jun 24, 2024
e32f037
bugfix: consider the last layer when constructing GridTileLookup
soheilshahrouz Jun 24, 2024
56691b5
default layer range when the layer is not specified
soheilshahrouz Jun 24, 2024
24449d3
remove RegionRectCoord class
soheilshahrouz Jun 25, 2024
fa40fc3
remove calls to get_region_bounds() and set_region_bounds()
soheilshahrouz Jun 25, 2024
3d6941f
add CI test for 3d placement constraints
soheilshahrouz Jun 25, 2024
2d1de0c
draw floorplan regions for 3d architectures
soheilshahrouz Jun 26, 2024
8d41358
add hash function for PartitionRegion
soheilshahrouz Jun 30, 2024
9fd7389
add == operator for PartitionRegion
soheilshahrouz Jun 30, 2024
571cede
changed floorplan_constraints_regions_overfull() to check whether who…
soheilshahrouz Jun 30, 2024
c74ca63
check the legality of region when parsing it
soheilshahrouz Jun 30, 2024
ea6464e
add comments
soheilshahrouz Jul 1, 2024
00e5b65
fix the failing unit test
soheilshahrouz Jul 3, 2024
9849395
updated docs with layer_low and layer_high
soheilshahrouz Jul 3, 2024
2d959d8
add a 3D constraint file where are atoms are locked down
soheilshahrouz Jul 3, 2024
ba78649
Merge remote-tracking branch 'origin/master' into 3d_constraints
soheilshahrouz Jul 3, 2024
a446074
add vpr_tight_floorplan_3d to task list
soheilshahrouz Jul 5, 2024
a24e8ab
bugfix: consider the last layer in region_with_subtile_count()
soheilshahrouz Jul 5, 2024
224c8ac
fixbug: print block type name and the number of tiles for overfull prs
soheilshahrouz Jul 5, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions libs/libarchfpga/src/echo_arch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,11 +236,11 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
}

fprintf(Echo, "\tInput Connect Block Switch Name Within a Same Die: %s\n", arch->ipin_cblock_switch_name[ipin_cblock_switch_index_within_die].c_str());

//if there is more than one layer available, print the connection block switch name that is used for connection between two dice
for(const auto& layout : arch->grid_layouts){
for (const auto& layout : arch->grid_layouts) {
int num_layers = (int)layout.layers.size();
if(num_layers > 1){
if (num_layers > 1) {
fprintf(Echo, "\tInput Connect Block Switch Name Between Two Dice: %s\n", arch->ipin_cblock_switch_name[ipin_cblock_switch_index_between_dice].c_str());
}
}
Expand Down Expand Up @@ -295,11 +295,11 @@ void PrintArchInfo(FILE* Echo, const t_arch* arch) {
fprintf(Echo, "\t\t\t\ttype unidir mux_name for within die connections: %s\n",
arch->Switches[seg.arch_wire_switch].name.c_str());
//if there is more than one layer available, print the segment switch name that is used for connection between two dice
for(const auto& layout : arch->grid_layouts){
for (const auto& layout : arch->grid_layouts) {
int num_layers = (int)layout.layers.size();
if(num_layers > 1){
if (num_layers > 1) {
fprintf(Echo, "\t\t\t\ttype unidir mux_name for between two dice connections: %s\n",
arch->Switches[seg.arch_opin_between_dice_switch].name.c_str());
arch->Switches[seg.arch_opin_between_dice_switch].name.c_str());
}
}
} else { //Should be bidir
Expand Down
19 changes: 17 additions & 2 deletions libs/libvtrutil/src/vtr_geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

/**
* @file
* @brief This file include differents different geometry classes
* @brief This file includes different geometry classes
*/

namespace vtr {
Expand Down Expand Up @@ -92,11 +92,18 @@ class Point {
///@brief Swap x and y values
void swap();

/// @brief += operator
Point<T>& operator+= (const Point<T>& rhs);

/// @brief += operator
Point<T>& operator-= (const Point<T>& rhs);

private:
T x_;
T y_;
};


/**
* @brief A 2D rectangle
*
Expand Down Expand Up @@ -144,6 +151,9 @@ class Rect {
///@brief Return the top right point
Point<T> top_right() const;

///@brief Return the bottom left and top right coordinates
std::tuple<T, T, T, T> coordinates() const;

///@brief Return the rectangle width
T width() const;

Expand Down Expand Up @@ -190,6 +200,11 @@ class Rect {
///@brief set ymax to a point
void set_ymax(T ymax_val);

/// @brief += operator
Rect<T>& operator+= (const Point<T>& rhs);

Rect<T>& operator-= (const Point<T>& rhs);

///@brief Equivalent to `*this = bounding_box(*this, other)`
Rect<T>& expand_bounding_box(const Rect<T>& other);

Expand Down Expand Up @@ -302,7 +317,7 @@ class RectUnion {
friend bool operator!= <>(const RectUnion<T>& lhs, const RectUnion<T>& rhs);

private:
// Note that a union of rectanges may have holes and may not be contiguous
// Note that a union of rectangles may have holes and may not be contiguous
std::vector<Rect<T>> rects_;
};

Expand Down
33 changes: 33 additions & 0 deletions libs/libvtrutil/src/vtr_geometry.tpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,20 @@ void Point<T>::swap() {
std::swap(x_, y_);
}

template<class T>
Point<T>& Point<T>::operator+=(const Point<T>& rhs) {
x_ += rhs.x_;
y_ += rhs.y_;
return *this;
}

template<class T>
Point<T>& Point<T>::operator-=(const Point<T>& rhs) {
x_ -= rhs.x_;
y_ -= rhs.y_;
return *this;
}

/*
* Rect
*/
Expand Down Expand Up @@ -120,6 +134,11 @@ Point<T> Rect<T>::top_right() const {
return top_right_;
}

template<class T>
std::tuple<T, T, T, T> Rect<T>::coordinates() const {
return {xmin(), ymin(), xmax(), ymax()};
}

template<class T>
T Rect<T>::width() const {
return xmax() - xmin();
Expand Down Expand Up @@ -224,6 +243,20 @@ void Rect<T>::set_ymax(T ymax_val) {
top_right_.set_y(ymax_val);
}

template<class T>
Rect<T>& Rect<T>::operator+=(const Point<T>& rhs) {
bottom_left_ += rhs;
top_right_ += rhs;
return *this;
}

template<class T>
Rect<T>& Rect<T>::operator-=(const Point<T>& rhs) {
bottom_left_ -= rhs;
top_right_ -= rhs;
return *this;
}

template<class T>
Rect<T>& Rect<T>::expand_bounding_box(const Rect<T>& other) {
*this = bounding_box(*this, other);
Expand Down
Loading
Loading