@@ -1490,26 +1490,23 @@ bool verify_rr_node_indices(const DeviceGrid& grid,
1490
1490
y,
1491
1491
describe_rr_node (rr_graph, grid, rr_indexed_data, inode, is_flat).c_str ());
1492
1492
}
1493
- } else if (rr_graph.node_type (inode) == SOURCE || rr_graph.node_type (inode) == SINK) {
1494
- // Sources have co-ordintes covering the entire block they are in -- NOT ANYMORE
1495
- // if (!rr_graph.x_in_node_range(x, inode)) {
1496
- // VPR_ERROR(VPR_ERROR_ROUTE, "RR node x positions do not agree between rr_nodes (%d <-> %d) and rr_node_indices (%d): %s",
1497
- // rr_graph.node_xlow(inode),
1498
- // rr_graph.node_xlow(inode),
1499
- // x,
1500
- // describe_rr_node(rr_graph, grid, rr_indexed_data, inode, is_flat).c_str());
1501
- // }
1502
- //
1503
- // if (!rr_graph.y_in_node_range(y, inode)) {
1504
- // VPR_ERROR(VPR_ERROR_ROUTE, "RR node y positions do not agree between rr_nodes (%d <-> %d) and rr_node_indices (%d): %s",
1505
- // rr_graph.node_ylow(inode),
1506
- // rr_graph.node_ylow(inode),
1507
- // y,
1508
- // describe_rr_node(rr_graph, grid, rr_indexed_data, inode, is_flat).c_str());
1509
- // }
1493
+ } else if (rr_graph.node_type (inode) == SOURCE) {
1494
+ if (!rr_graph.x_in_node_range (x, inode)) {
1495
+ VPR_ERROR (VPR_ERROR_ROUTE, " RR node x positions do not agree between rr_nodes (%d <-> %d) and rr_node_indices (%d): %s" ,
1496
+ rr_graph.node_xlow (inode),
1497
+ rr_graph.node_xlow (inode),
1498
+ x,
1499
+ describe_rr_node (rr_graph, grid, rr_indexed_data, inode, is_flat).c_str ());
1500
+ }
1510
1501
1511
- } else {
1512
- VTR_ASSERT (rr_graph.node_type (inode) == IPIN || rr_graph.node_type (inode) == OPIN);
1502
+ if (!rr_graph.y_in_node_range (y, inode)) {
1503
+ VPR_ERROR (VPR_ERROR_ROUTE, " RR node y positions do not agree between rr_nodes (%d <-> %d) and rr_node_indices (%d): %s" ,
1504
+ rr_graph.node_ylow (inode),
1505
+ rr_graph.node_ylow (inode),
1506
+ y,
1507
+ describe_rr_node (rr_graph, grid, rr_indexed_data, inode, is_flat).c_str ());
1508
+ }
1509
+ } else if (rr_graph.node_type (inode) == IPIN || rr_graph.node_type (inode) == OPIN) {
1513
1510
/* As we allow a pin to be indexable on multiple sides,
1514
1511
* This check code should be invalid
1515
1512
* if (rr_node.xlow() != x) {
@@ -1526,6 +1523,12 @@ bool verify_rr_node_indices(const DeviceGrid& grid,
1526
1523
* describe_rr_node(rr_graph, grid, rr_indexed_data, inode).c_str());
1527
1524
* }
1528
1525
*/
1526
+ } else {
1527
+ // Previously, SINKs had co-ordinates covering the entire block they are in. Now, their locations
1528
+ // are the average of the IPINs they are connected to, so we cannot do the same check that we did
1529
+ // for SOURCEs.
1530
+
1531
+ VTR_ASSERT (rr_graph.node_type (inode) == SINK);
1529
1532
}
1530
1533
1531
1534
if (rr_type == IPIN || rr_type == OPIN) {
@@ -1559,20 +1562,24 @@ bool verify_rr_node_indices(const DeviceGrid& grid,
1559
1562
1560
1563
auto & rr_node = rr_nodes[size_t (inode)];
1561
1564
1562
- if (rr_graph.node_type (inode) == SOURCE || rr_graph. node_type (inode) == SINK ) {
1563
- // int rr_width = (rr_graph.node_xhigh(rr_node.id()) - rr_graph.node_xlow(rr_node.id()) + 1);
1564
- // int rr_height = (rr_graph.node_yhigh(rr_node.id()) - rr_graph.node_ylow(rr_node.id()) + 1);
1565
- // int rr_area = rr_width * rr_height;
1566
- // if (count != rr_area) {
1567
- // VPR_ERROR(VPR_ERROR_ROUTE, "Mismatch between RR node size (%d) and count within rr_node_indices (%d): %s",
1568
- // rr_area,
1569
- // rr_node.length(),
1570
- // count,
1571
- // describe_rr_node(rr_graph, grid, rr_indexed_data, inode, is_flat).c_str());
1572
- // }
1573
- /* As we allow a pin to be indexable on multiple sides,
1565
+ if (rr_graph.node_type (inode) == SOURCE) {
1566
+ int rr_width = (rr_graph.node_xhigh (rr_node.id ()) - rr_graph.node_xlow (rr_node.id ()) + 1 );
1567
+ int rr_height = (rr_graph.node_yhigh (rr_node.id ()) - rr_graph.node_ylow (rr_node.id ()) + 1 );
1568
+ int rr_area = rr_width * rr_height;
1569
+ if (count != rr_area) {
1570
+ VPR_ERROR (VPR_ERROR_ROUTE, " Mismatch between RR node size (%d) and count within rr_node_indices (%d): %s" ,
1571
+ rr_area,
1572
+ rr_node.length (),
1573
+ count,
1574
+ describe_rr_node (rr_graph, grid, rr_indexed_data, inode, is_flat).c_str ());
1575
+ }
1576
+ /* As we allow a SOURCE to be indexable on multiple sides,
1574
1577
* This check code should not be applied to input and output pins
1575
1578
*/
1579
+ } else if (rr_graph.node_type (inode) == SINK) {
1580
+ // Previously, SINKs had co-ordinates covering the entire block they are in. Now, their locations
1581
+ // are the average of the IPINs they are connected to, so we cannot do the same check that we did
1582
+ // for SOURCEs.
1576
1583
} else if ((OPIN != rr_graph.node_type (inode)) && (IPIN != rr_graph.node_type (inode))) {
1577
1584
if (count != rr_node.length () + 1 ) {
1578
1585
VPR_ERROR (VPR_ERROR_ROUTE, " Mismatch between RR node length (%d) and count within rr_node_indices (%d, should be length + 1): %s" ,
@@ -1582,8 +1589,9 @@ bool verify_rr_node_indices(const DeviceGrid& grid,
1582
1589
}
1583
1590
}
1584
1591
}
1592
+ }
1585
1593
1586
- return true ;
1594
+ return true ;
1587
1595
}
1588
1596
1589
1597
int get_track_to_pins (RRGraphBuilder& rr_graph_builder,
0 commit comments