bug fix in packable mode support

This commit is contained in:
tangxifan 2020-05-20 18:49:21 -06:00
parent e089b0ef22
commit 6f133bd009
1 changed files with 9 additions and 4 deletions

View File

@ -208,6 +208,15 @@ static bool check_edge_for_route_conflicts(std::unordered_map<const t_pb_graph_n
auto* mode = &pb_graph_node->pb_type->modes[mode_of_edge];
auto result = mode_map->insert(std::make_pair(pb_graph_node, mode));
/* Xifan Tang: Insert unpackable mode to the illegal mode list */
if (false == mode->packable) {
if (std::find(pb_graph_node->illegal_modes.begin(), pb_graph_node->illegal_modes.end(), mode->index) == pb_graph_node->illegal_modes.end()) {
pb_graph_node->illegal_modes.push_back(mode->index);
}
return true;
}
if (!result.second) {
if (result.first->second != mode) {
std::cout << vtr::string_fmt("Differing modes for block. Got %s mode, while previously was %s for interconnect %s.",
@ -1173,10 +1182,6 @@ static void expand_node_all_modes(t_lb_router_data* router_data, t_expansion_nod
if (cur_mode != -1 && mode != cur_mode) {
continue;
}
/* Xifan Tang: Do not expand in unpackable modes */
if (false == pin->parent_node->pb_type->parent_mode->packable) {
continue;
}
/* Check whether a mode is illegal. If it is then the node will not be expanded */
bool is_illegal = false;