bug fix in packable mode support
@@ -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;
