Skip to content

Commit f1f0e03

Browse files
Apply change requests for PR.
A more detailed comment explains why we need to re-compute NoC costs from scratch. Two member function in xy_routing are now normal functions rather than static ones.
1 parent ad4e287 commit f1f0e03

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

vpr/src/noc/xy_routing.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ class XYRouting : public NocRouting {
140140
* that is currently being visited on the FPGA
141141
* @return RouteDirection The direction to travel next
142142
*/
143-
static RouteDirection get_direction_to_travel(int sink_router_x_position, int sink_router_y_position, int curr_router_x_position, int curr_router_y_position);
143+
RouteDirection get_direction_to_travel(int sink_router_x_position, int sink_router_y_position, int curr_router_x_position, int curr_router_y_position);
144144

145145
/**
146146
* @brief Given the direction to travel next, this function determines
@@ -166,7 +166,7 @@ class XYRouting : public NocRouting {
166166
* @return true A suitable link was found that we can traverse next
167167
* @return false No suitable link was found that could be traversed
168168
*/
169-
static bool move_to_next_router(NocRouterId& curr_router_id, int curr_router_x_position, int curr_router_y_position, RouteDirection next_step_direction, std::vector<NocLinkId>& flow_route, std::unordered_set<NocRouterId>& visited_routers, const NocStorage& noc_model);
169+
bool move_to_next_router(NocRouterId& curr_router_id, int curr_router_x_position, int curr_router_y_position, RouteDirection next_step_direction, std::vector<NocLinkId>& flow_route, std::unordered_set<NocRouterId>& visited_routers, const NocStorage& noc_model);
170170
};
171171

172172
#endif

vpr/src/place/place_checkpoint.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,11 @@ void restore_best_placement(t_placement_checkpoint& placement_checkpoint, std::s
4444
timing_info.get(),
4545
&costs);
4646

47-
// If NoC is enabled, re-compute NoC costs and re-initialize NoC internal data structures
47+
/* If NoC is enabled, re-compute NoC costs and re-initialize NoC internal data structures.
48+
* If some routers have different locations than the last placement, NoC-related costs and
49+
* internal data structures that are used to keep track of each flow's cost are no longer valid,
50+
* and need to be re-computed from scratch.
51+
*/
4852
if (noc_opts.noc) {
4953
reinitialize_noc_routing(noc_opts, costs);
5054
}

0 commit comments

Comments
 (0)