Skip to content

Commit 01c8019

Browse files
committed
rr_graph: use inv_length during the delay_normalization calculation
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent c5b9a96 commit 01c8019

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

vpr/src/route/rr_graph_indexed_data.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,13 +253,15 @@ static std::vector<size_t> count_rr_segment_types() {
253253
static float get_delay_normalization_fac() {
254254
/* Returns the average delay to go 1 CLB distance along a wire. */
255255

256+
const int clb_dist = 3; /* Number of CLBs I think the average conn. goes. */
256257
auto& device_ctx = g_vpr_ctx.device();
257258
auto& rr_indexed_data = device_ctx.rr_indexed_data;
258259

259260
float Tdel_sum = 0.0;
260261
int Tdel_num = 0;
261262
for (size_t cost_index = CHANX_COST_INDEX_START; cost_index < rr_indexed_data.size(); cost_index++) {
262-
float T_value = rr_indexed_data[cost_index].T_linear + rr_indexed_data[cost_index].T_quadratic;
263+
float frac_num_seg = device_ctx.rr_indexed_data[cost_index].inv_length * clb_dist;
264+
float T_value = rr_indexed_data[cost_index].T_linear * frac_num_seg + rr_indexed_data[cost_index].T_quadratic * std::pow(frac_num_seg, 2);
263265

264266
if (T_value == 0.0) continue;
265267

0 commit comments

Comments
 (0)