Skip to content

Commit bfd9e20

Browse files
committed
Re-commit changes
1 parent b1f21e8 commit bfd9e20

File tree

17 files changed

+2604
-0
lines changed

17 files changed

+2604
-0
lines changed

doc/src/api/vprinternals/vpr_router.rst

+4
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,9 @@ VPR Router
77
.. toctree::
88
:maxdepth: 1
99

10+
<<<<<<< HEAD
1011
router_heap
1112
router_lookahead
13+
=======
14+
router_heap
15+
>>>>>>> a0e4a8d19 (Re-commit changes)

libs/libvtrutil/src/vtr_geometry.h

+17
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class Point {
9292
///@brief Swap x and y values
9393
void swap();
9494

95+
<<<<<<< HEAD
9596
/// @brief + operator
9697
Point<T> operator+(const Point<T>& rhs);
9798

@@ -103,12 +104,20 @@ class Point {
103104

104105
/// @brief -= operator
105106
Point<T>& operator-=(const Point<T>& rhs);
107+
=======
108+
/// @brief += operator
109+
Point<T>& operator+= (const Point<T>& rhs);
110+
111+
/// @brief += operator
112+
Point<T>& operator-= (const Point<T>& rhs);
113+
>>>>>>> a0e4a8d19 (Re-commit changes)
106114

107115
private:
108116
T x_;
109117
T y_;
110118
};
111119

120+
112121
/**
113122
* @brief A 2D rectangle
114123
*
@@ -208,11 +217,19 @@ class Rect {
208217
///@brief set ymax to a point
209218
void set_ymax(T ymax_val);
210219

220+
<<<<<<< HEAD
211221
/// @brief += operator; translates all corners of the rectangle by rhs
212222
Rect<T>& operator+=(const Point<T>& rhs);
213223

214224
/// @brief -= operator; translates all corners of the rectangle by -rhs
215225
Rect<T>& operator-=(const Point<T>& rhs);
226+
=======
227+
/// @brief += operator
228+
Rect<T>& operator+= (const Point<T>& rhs);
229+
230+
/// @brief -= operator
231+
Rect<T>& operator-= (const Point<T>& rhs);
232+
>>>>>>> a0e4a8d19 (Re-commit changes)
216233

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

libs/libvtrutil/src/vtr_geometry.tpp

+3
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ void Point<T>::swap() {
5959
}
6060

6161
template<class T>
62+
<<<<<<< HEAD
6263
Point<T> Point<T>::operator+(const Point<T>& rhs) {
6364
return {x_ + rhs.x_, y_ + rhs.y_};
6465
}
@@ -69,6 +70,8 @@ Point<T> Point<T>::operator-(const Point<T>& rhs) {
6970
}
7071

7172
template<class T>
73+
=======
74+
>>>>>>> a0e4a8d19 (Re-commit changes)
7275
Point<T>& Point<T>::operator+=(const Point<T>& rhs) {
7376
x_ += rhs.x_;
7477
y_ += rhs.y_;

vpr/src/base/ShowSetup.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,10 @@ static void ShowRouterOpts(const t_router_opts& RouterOpts) {
382382

383383
if (TIMING_DRIVEN == RouterOpts.router_algorithm) {
384384
VTR_LOG("RouterOpts.astar_fac: %f\n", RouterOpts.astar_fac);
385+
<<<<<<< HEAD
385386
VTR_LOG("RouterOpts.astar_offset: %f\n", RouterOpts.astar_offset);
387+
=======
388+
>>>>>>> a0e4a8d19 (Re-commit changes)
386389
VTR_LOG("RouterOpts.router_profiler_astar_fac: %f\n", RouterOpts.router_profiler_astar_fac);
387390
VTR_LOG("RouterOpts.criticality_exp: %f\n", RouterOpts.criticality_exp);
388391
VTR_LOG("RouterOpts.max_criticality: %f\n", RouterOpts.max_criticality);

vpr/src/place/move_transactions.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,11 @@ void t_pl_blocks_to_be_moved::clear_move_blocks() {
161161

162162
//For run-time, we just reset size of blocks_affected.moved_blocks to zero, but do not free the blocks_affected
163163
//array to avoid memory allocation
164+
<<<<<<< HEAD
165+
=======
166+
167+
blocks_affected.num_moved_blocks = 0;
168+
>>>>>>> a0e4a8d19 (Re-commit changes)
164169

165170
moved_blocks.resize(0);
166171

vpr/src/place/move_transactions.h

+45
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,51 @@
33
#include "vpr_types.h"
44
#include "clustered_netlist_utils.h"
55

6+
<<<<<<< HEAD
7+
=======
8+
/* Stores the information of the move for a block that is *
9+
* moved during placement *
10+
* block_num: the index of the moved block *
11+
* old_loc: the location the block is moved from *
12+
* new_loc: the location the block is moved to */
13+
struct t_pl_moved_block {
14+
t_pl_moved_block() = default;
15+
t_pl_moved_block(ClusterBlockId block_num_, const t_pl_loc& old_loc_, const t_pl_loc& new_loc_)
16+
: block_num(block_num_)
17+
, old_loc(old_loc_)
18+
, new_loc(new_loc_) {}
19+
ClusterBlockId block_num;
20+
t_pl_loc old_loc;
21+
t_pl_loc new_loc;
22+
};
23+
24+
/* Stores the list of cluster blocks to be moved in a swap during *
25+
* placement. *
26+
* Store the information on the blocks to be moved in a swap during *
27+
* placement, in the form of array of structs instead of struct with *
28+
* arrays for cache effifiency *
29+
*
30+
* num_moved_blocks: total number of blocks moved when *
31+
* swapping two blocks. *
32+
* moved blocks: a list of moved blocks data structure with *
33+
* information on the move. *
34+
* [0...max_blocks-1] *
35+
* affected_pins: pins affected by this move (used to *
36+
* incrementally invalidate parts of the timing *
37+
* graph. */
38+
struct t_pl_blocks_to_be_moved {
39+
explicit t_pl_blocks_to_be_moved(size_t max_blocks)
40+
: moved_blocks(max_blocks) {}
41+
42+
int num_moved_blocks = 0;
43+
std::vector<t_pl_moved_block> moved_blocks;
44+
std::unordered_set<t_pl_loc> moved_from;
45+
std::unordered_set<t_pl_loc> moved_to;
46+
47+
std::vector<ClusterPinId> affected_pins;
48+
};
49+
50+
>>>>>>> a0e4a8d19 (Re-commit changes)
651
enum class e_block_move_result {
752
VALID, //Move successful
853
ABORT, //Unable to perform move

vpr/src/place/move_utils.cpp

+24
Original file line numberDiff line numberDiff line change
@@ -484,6 +484,30 @@ bool is_legal_swap_to_location(ClusterBlockId blk, t_pl_loc to) {
484484
return true;
485485
}
486486

487+
<<<<<<< HEAD
488+
=======
489+
//Examines the currently proposed move and determine any empty locations
490+
std::set<t_pl_loc> determine_locations_emptied_by_move(t_pl_blocks_to_be_moved& blocks_affected) {
491+
std::set<t_pl_loc> moved_from;
492+
std::set<t_pl_loc> moved_to;
493+
494+
for (int iblk = 0; iblk < blocks_affected.num_moved_blocks; ++iblk) {
495+
//When a block is moved its old location becomes free
496+
moved_from.emplace(blocks_affected.moved_blocks[iblk].old_loc);
497+
498+
//But any block later moved to a position fills it
499+
moved_to.emplace(blocks_affected.moved_blocks[iblk].new_loc);
500+
}
501+
502+
std::set<t_pl_loc> empty_locs;
503+
std::set_difference(moved_from.begin(), moved_from.end(),
504+
moved_to.begin(), moved_to.end(),
505+
std::inserter(empty_locs, empty_locs.begin()));
506+
507+
return empty_locs;
508+
}
509+
510+
>>>>>>> a0e4a8d19 (Re-commit changes)
487511
#ifdef VTR_ENABLE_DEBUG_LOGGING
488512
void enable_placer_debug(const t_placer_opts& placer_opts,
489513
ClusterBlockId blk_id) {

0 commit comments

Comments
 (0)