Skip to content

Fix inconsistent buffering #1568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions vpr/src/place/analytic_placer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
# include "vtr_log.h"
# include "cut_spreader.h"
# include "vpr_utils.h"
# include "place_util.h"

// Templated struct for constructing and solving matrix equations in analytic placer
template<typename T>
Expand Down
19 changes: 14 additions & 5 deletions vpr/src/route/rr_graph_indexed_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -387,8 +387,13 @@ static void load_rr_indexed_data_T_values(int index_start,
switches_buffered[cost_index] = buffered;
} else {
if (switches_buffered[cost_index] != buffered) {
VPR_FATAL_ERROR(VPR_ERROR_ARCH,
"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);
// If a previous buffering state is inconsistent with the current one,
// the node should be treated as buffered, as there are only two possible
// values for the buffering state (except for the UNDEFINED case).
//
// This means that at least one edge of this node has a buffered switch,
// which prevails over unbuffered ones.
switches_buffered[cost_index] = 1;
}
}
}
Expand Down Expand Up @@ -497,9 +502,13 @@ static void calculate_average_switch(int inode, double& avg_switch_R, double& av
buffered = 0;
}
} else if (buffered != device_ctx.rr_switch_inf[switch_index].buffered()) {
VTR_LOG_WARN("Inconsitent buffering of children of rr node %s (%s)\n",
rr_node_arch_name(inode).c_str(),
describe_rr_node(inode).c_str());
// If a previous buffering state is inconsistent with the current one,
// the node should be treated as buffered, as there are only two possible
// values for the buffering state (except for the UNDEFINED case).
//
// This means that at least one edge of this node has a buffered switch,
// which prevails over unbuffered ones.
buffered = 1;
}

num_switches++;
Expand Down