Skip to content

Commit c478c2b

Browse files
committed
Merge remote-tracking branch 'upstream/dont_leave_uninitialized_ortho_data' into master+wip
2 parents 49e0e68 + a22fb8b commit c478c2b

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

vpr/src/route/rr_graph_indexed_data.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,18 @@ void alloc_and_load_rr_indexed_data(const std::vector<t_segment_inf>& segment_in
115115
load_rr_indexed_data_T_values((CHANX_COST_INDEX_START + num_segment),
116116
num_segment, CHANY, nodes_per_chan, L_rr_node_indices);
117117

118+
for (int cost_index = CHANX_COST_INDEX_START;
119+
cost_index < CHANX_COST_INDEX_START + 2 * num_segment; cost_index++) {
120+
int ortho_cost_index = device_ctx.rr_indexed_data[cost_index].ortho_cost_index;
121+
/* If segments doesn't have data (e.g. doesn't exists), check if ortho
122+
* segment does exist. If so, copy that data. */
123+
if (device_ctx.rr_indexed_data[cost_index].T_linear == OPEN && device_ctx.rr_indexed_data[ortho_cost_index].T_linear != OPEN) {
124+
device_ctx.rr_indexed_data[cost_index].T_linear = device_ctx.rr_indexed_data[ortho_cost_index].T_linear;
125+
device_ctx.rr_indexed_data[cost_index].T_quadratic = device_ctx.rr_indexed_data[ortho_cost_index].T_quadratic;
126+
device_ctx.rr_indexed_data[cost_index].C_load = device_ctx.rr_indexed_data[ortho_cost_index].C_load;
127+
}
128+
}
129+
118130
load_rr_indexed_data_base_costs(nodes_per_chan, L_rr_node_indices,
119131
base_cost_type);
120132
}

0 commit comments

Comments
 (0)