@@ -328,7 +328,7 @@ static bool check_adjacent(RRNodeId from_node, RRNodeId to_node, bool is_flat) {
328
328
329
329
case OPIN:
330
330
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 ) {
332
332
num_adj += 1 ; // adjacent
333
333
} else if (is_flat) {
334
334
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) {
403
403
}
404
404
} else if (to_type == CHANY) {
405
405
num_adj += chanx_chany_adjacent (from_node, to_node);
406
+ } else if (to_type == MEDIUM) {
407
+ num_adj += 1 ;
406
408
} else {
407
409
VPR_FATAL_ERROR (VPR_ERROR_ROUTE,
408
410
" 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) {
435
437
}
436
438
} else if (to_type == CHANX) {
437
439
num_adj += chanx_chany_adjacent (to_node, from_node);
440
+ } else if (to_type == MEDIUM) {
441
+ num_adj += 1 ;
438
442
} else {
439
443
VPR_FATAL_ERROR (VPR_ERROR_ROUTE,
440
444
" in check_adjacent: %d and %d are not adjacent" , from_node, to_node);
441
445
}
442
446
break ;
443
447
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
+
444
462
default :
445
463
break ;
446
464
}
0 commit comments