Skip to content

Commit b65a8e2

Browse files
Update check_route.cpp
1 parent 9e0ae28 commit b65a8e2

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

vpr/src/route/check_route.cpp

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static bool check_adjacent(RRNodeId from_node, RRNodeId to_node, bool is_flat) {
328328

329329
case OPIN:
330330
from_grid_type = device_ctx.grid.get_physical_type({from_xlow, from_ylow, from_layer});
331-
if (to_type == CHANX || to_type == CHANY) {
331+
if (to_type == CHANX || to_type == CHANY || to_type == MEDIUM) {
332332
num_adj += 1; //adjacent
333333
} else if (is_flat) {
334334
VTR_ASSERT(to_type == OPIN || to_type == IPIN); // If pin is located inside a cluster
@@ -403,6 +403,8 @@ static bool check_adjacent(RRNodeId from_node, RRNodeId to_node, bool is_flat) {
403403
}
404404
} else if (to_type == CHANY) {
405405
num_adj += chanx_chany_adjacent(from_node, to_node);
406+
} else if (to_type == MEDIUM) {
407+
num_adj += 1;
406408
} else {
407409
VPR_FATAL_ERROR(VPR_ERROR_ROUTE,
408410
"in check_adjacent: %d and %d are not adjacent", from_node, to_node);
@@ -435,12 +437,28 @@ static bool check_adjacent(RRNodeId from_node, RRNodeId to_node, bool is_flat) {
435437
}
436438
} else if (to_type == CHANX) {
437439
num_adj += chanx_chany_adjacent(to_node, from_node);
440+
} else if (to_type == MEDIUM) {
441+
num_adj += 1;
438442
} else {
439443
VPR_FATAL_ERROR(VPR_ERROR_ROUTE,
440444
"in check_adjacent: %d and %d are not adjacent", from_node, to_node);
441445
}
442446
break;
443447

448+
case MEDIUM:
449+
//from_grid_type = device_ctx.grid.get_physical_type({from_xlow, from_ylow, from_layer});
450+
if (to_type == CHANX || to_type == CHANY || to_type == MEDIUM) {
451+
num_adj += 1; //adjacent
452+
} else if (is_flat) {
453+
VTR_ASSERT(to_type == OPIN || to_type == IPIN); // If pin is located inside a cluster
454+
return true;
455+
} else {
456+
VTR_ASSERT(to_type == IPIN);
457+
num_adj += 1;
458+
}
459+
460+
break;
461+
444462
default:
445463
break;
446464
}

0 commit comments

Comments
 (0)