Skip to content

Commit

Permalink
[vpr] fixing some bugs in rr gsb
Browse files Browse the repository at this point in the history
  • Loading branch information
tangxifan committed Jul 4, 2024
1 parent fbbf53d commit 19fa43c
Showing 1 changed file with 4 additions and 22 deletions.
26 changes: 4 additions & 22 deletions vpr/src/tileable_rr_graph/rr_gsb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -597,40 +597,22 @@ vtr::Point<size_t> RRGSB::get_sb_coordinate() const {

/* get the x coordinate of this X/Y-direction block */
size_t RRGSB::get_cb_x(const t_rr_type& cb_type) const {
VTR_ASSERT(validate_cb_type(cb_type));
switch (cb_type) {
case CHANX:
return get_side_block_coordinate(LEFT).x();
case CHANY:
return get_side_block_coordinate(TOP).x();
default:
VTR_LOG("Invalid type of connection block!\n");
exit(1);
}
return get_cb_coordinate(cb_type).x();
}

/* get the y coordinate of this X/Y-direction block */
size_t RRGSB::get_cb_y(const t_rr_type& cb_type) const {
VTR_ASSERT(validate_cb_type(cb_type));
switch (cb_type) {
case CHANX:
return get_side_block_coordinate(LEFT).y();
case CHANY:
return get_side_block_coordinate(TOP).y();
default:
VTR_LOG("Invalid type of connection block!\n");
exit(1);
}
return get_cb_coordinate(cb_type).y();
}

/* Get the coordinate of the X/Y-direction CB */
vtr::Point<size_t> RRGSB::get_cb_coordinate(const t_rr_type& cb_type) const {
VTR_ASSERT(validate_cb_type(cb_type));
switch (cb_type) {
case CHANX:
return get_side_block_coordinate(LEFT);
return get_side_block_coordinate(BOTTOM);
case CHANY:
return get_side_block_coordinate(TOP);
return get_side_block_coordinate(RIGHT);
default:
VTR_LOG("Invalid type of connection block!\n");
exit(1);
Expand Down

0 comments on commit 19fa43c

Please sign in to comment.