@@ -625,30 +625,6 @@ RRGSB build_one_tileable_rr_gsb(const DeviceGrid& grids,
625
625
const size_t & layer,
626
626
const vtr::Point <size_t >& gsb_coordinate,
627
627
const bool & perimeter_cb) {
628
- /* Bounding box for GSB ranges on routing tracks.
629
- * Note that when perimeter connection blocks are not allowed,
630
- * - top side routing tracks for any GSB exist on y = [0, H-2)
631
- * - right side routing tracks for any GSB exist on x = [0, W-2)
632
- * - bottom side routing tracks for any GSB exist on y = [1, H-1)
633
- * - left side routing tracks for any GSB exist on x = [1, W-1)
634
- * Note that when perimeter connection blocks are allowed,
635
- * - top side routing tracks for any GSB exist on y = [0, H-1)
636
- * - right side routing tracks for any GSB exist on x = [0, W-1)
637
- * - bottom side routing tracks for any GSB exist on y = [0, H)
638
- * - left side routing tracks for any GSB exist on x = [0, W)
639
- */
640
- std::map<e_side, vtr::Point <size_t >> track_range;
641
- track_range[TOP] = vtr::Point <size_t >(0 , grids.height () - 2 );
642
- track_range[RIGHT] = vtr::Point <size_t >(0 , grids.width () - 2 );
643
- track_range[BOTTOM] = vtr::Point <size_t >(0 , grids.height () - 2 );
644
- track_range[LEFT] = vtr::Point <size_t >(0 , grids.width () - 2 );
645
- if (perimeter_cb) {
646
- track_range[TOP] = vtr::Point <size_t >(0 , grids.height () - 1 );
647
- track_range[RIGHT] = vtr::Point <size_t >(0 , grids.width () - 1 );
648
- track_range[BOTTOM] = vtr::Point <size_t >(0 , grids.height () - 1 );
649
- track_range[LEFT] = vtr::Point <size_t >(0 , grids.width () - 1 );
650
- }
651
-
652
628
/* Create an object to return */
653
629
RRGSB rr_gsb;
654
630
@@ -683,8 +659,8 @@ RRGSB build_one_tileable_rr_gsb(const DeviceGrid& grids,
683
659
684
660
switch (side) {
685
661
case TOP: /* TOP = 0 */
686
- /* For the border, we should take special care. The top column (H-1) does not have any top side routing channel. Any lower column may have (<= H-2) */
687
- if (track_range[side_manager. get_side ()]. x () > gsb_coordinate.y () || gsb_coordinate. y () > track_range[side_manager. get_side ()]. y () ) {
662
+ /* For the border, we should take special care. */
663
+ if (gsb_coordinate.y () == grids. height () - 1 ) {
688
664
rr_gsb.clear_one_side (side_manager.get_side ());
689
665
break ;
690
666
}
@@ -714,7 +690,7 @@ RRGSB build_one_tileable_rr_gsb(const DeviceGrid& grids,
714
690
break ;
715
691
case RIGHT: /* RIGHT = 1 */
716
692
/* For the border, we should take special care. The rightmost column (W-1) does not have any right side routing channel. If perimeter connection block is not enabled, even the last second rightmost column (W-2) does not have any right side routing channel */
717
- if (track_range[side_manager. get_side ()]. x () > gsb_coordinate.x () || gsb_coordinate. x () > track_range[side_manager. get_side ()]. y () ) {
693
+ if (gsb_coordinate.x () == grids. width () - 1 ) {
718
694
rr_gsb.clear_one_side (side_manager.get_side ());
719
695
break ;
720
696
}
@@ -743,8 +719,7 @@ RRGSB build_one_tileable_rr_gsb(const DeviceGrid& grids,
743
719
OPIN, opin_grid_side[1 ]);
744
720
break ;
745
721
case BOTTOM: /* BOTTOM = 2*/
746
- /* For the border, we should take special care */
747
- if (track_range[side_manager.get_side ()].x () > gsb_coordinate.y () || gsb_coordinate.y () > track_range[side_manager.get_side ()].y ()) {
722
+ if (!perimeter_cb && gsb_coordinate.y () == 0 ) {
748
723
rr_gsb.clear_one_side (side_manager.get_side ());
749
724
break ;
750
725
}
@@ -773,8 +748,7 @@ RRGSB build_one_tileable_rr_gsb(const DeviceGrid& grids,
773
748
OPIN, opin_grid_side[1 ]);
774
749
break ;
775
750
case LEFT: /* LEFT = 3 */
776
- /* For the border, we should take special care */
777
- if (track_range[side_manager.get_side ()].x () > gsb_coordinate.x () || gsb_coordinate.x () > track_range[side_manager.get_side ()].y ()) {
751
+ if (!perimeter_cb && gsb_coordinate.x () == 0 ) {
778
752
rr_gsb.clear_one_side (side_manager.get_side ());
779
753
break ;
780
754
}
0 commit comments