Skip to content

Commit 19fa43c

Browse files
committed
[vpr] fixing some bugs in rr gsb
1 parent fbbf53d commit 19fa43c

File tree

1 file changed

+4
-22
lines changed

1 file changed

+4
-22
lines changed

vpr/src/tileable_rr_graph/rr_gsb.cpp

Lines changed: 4 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -597,40 +597,22 @@ vtr::Point<size_t> RRGSB::get_sb_coordinate() const {
597597

598598
/* get the x coordinate of this X/Y-direction block */
599599
size_t RRGSB::get_cb_x(const t_rr_type& cb_type) const {
600-
VTR_ASSERT(validate_cb_type(cb_type));
601-
switch (cb_type) {
602-
case CHANX:
603-
return get_side_block_coordinate(LEFT).x();
604-
case CHANY:
605-
return get_side_block_coordinate(TOP).x();
606-
default:
607-
VTR_LOG("Invalid type of connection block!\n");
608-
exit(1);
609-
}
600+
return get_cb_coordinate(cb_type).x();
610601
}
611602

612603
/* get the y coordinate of this X/Y-direction block */
613604
size_t RRGSB::get_cb_y(const t_rr_type& cb_type) const {
614-
VTR_ASSERT(validate_cb_type(cb_type));
615-
switch (cb_type) {
616-
case CHANX:
617-
return get_side_block_coordinate(LEFT).y();
618-
case CHANY:
619-
return get_side_block_coordinate(TOP).y();
620-
default:
621-
VTR_LOG("Invalid type of connection block!\n");
622-
exit(1);
623-
}
605+
return get_cb_coordinate(cb_type).y();
624606
}
625607

626608
/* Get the coordinate of the X/Y-direction CB */
627609
vtr::Point<size_t> RRGSB::get_cb_coordinate(const t_rr_type& cb_type) const {
628610
VTR_ASSERT(validate_cb_type(cb_type));
629611
switch (cb_type) {
630612
case CHANX:
631-
return get_side_block_coordinate(LEFT);
613+
return get_side_block_coordinate(BOTTOM);
632614
case CHANY:
633-
return get_side_block_coordinate(TOP);
615+
return get_side_block_coordinate(RIGHT);
634616
default:
635617
VTR_LOG("Invalid type of connection block!\n");
636618
exit(1);

0 commit comments

Comments
 (0)