Skip to content

Commit ace45ec

Browse files
committed
rr_graph: treat nodes with at least one buffered switch as buffered
Signed-off-by: Alessandro Comodi <[email protected]>
1 parent fed8d94 commit ace45ec

File tree

1 file changed

+19
-2
lines changed

1 file changed

+19
-2
lines changed

vpr/src/route/rr_graph_indexed_data.cpp

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,8 +387,17 @@ static void load_rr_indexed_data_T_values(int index_start,
387387
switches_buffered[cost_index] = buffered;
388388
} else {
389389
if (switches_buffered[cost_index] != buffered) {
390-
VPR_FATAL_ERROR(VPR_ERROR_ARCH,
391-
"Expecting all wire-to-wire switches of wire segments with cost index (%d) to have same 'buffered' value (%d), but found segment switch with different 'buffered' value (%d)\n", cost_index, switches_buffered[cost_index], buffered);
390+
// If a previous buffering state is inconsistent with the current one,
391+
// the node should be treated as buffered, as there are only two possible
392+
// values for the buffering state (except for the UNDEFINED case).
393+
//
394+
// This means that at least one edge of this node has a buffered switch,
395+
// which prevails over unbuffered ones.
396+
switches_buffered[cost_index] = 1;
397+
398+
VTR_LOG_WARN("Inconsistency in the buffering state of all wire-to-wire switches of wire segments "
399+
"with cost index (%d) to have same 'buffered' value (%d), "
400+
"but found segment switch with different 'buffered' value (%d)\n", cost_index, switches_buffered[cost_index], buffered);
392401
}
393402
}
394403
}
@@ -497,6 +506,14 @@ static void calculate_average_switch(int inode, double& avg_switch_R, double& av
497506
buffered = 0;
498507
}
499508
} else if (buffered != device_ctx.rr_switch_inf[switch_index].buffered()) {
509+
// If a previous buffering state is inconsistent with the current one,
510+
// the node should be treated as buffered, as there are only two possible
511+
// values for the buffering state (except for the UNDEFINED case).
512+
//
513+
// This means that at least one edge of this node has a buffered switch,
514+
// which prevails over unbuffered ones.
515+
buffered = 1;
516+
500517
VTR_LOG_WARN("Inconsitent buffering of children of rr node %s (%s)\n",
501518
rr_node_arch_name(inode).c_str(),
502519
describe_rr_node(inode).c_str());

0 commit comments

Comments
 (0)