Skip to content

Commit 844fe90

Browse files
add tile_width/tile_height to compute the middle of channel
1 parent f256e2f commit 844fe90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

vpr/src/draw/draw_interposer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ void draw_interposer_cuts(ezgl::renderer* g) {
4343
for (int cut_y : horizontal_cuts[layer]) {
4444
float y;
4545
if (draw_state->pic_on_screen == e_pic_type::PLACEMENT) {
46-
y = (draw_coords->tile_y[cut_y + 1] + draw_coords->tile_y[cut_y]) / 2.0f;
46+
y = (draw_coords->tile_y[cut_y + 1] + draw_coords->tile_y[cut_y] + draw_coords->get_tile_height()) / 2.0f;
4747
} else if (draw_state->pic_on_screen == e_pic_type::ROUTING) {
4848
y = draw_coords->tile_y[cut_y + 1] - 0.5f;
4949
} else {
@@ -56,7 +56,7 @@ void draw_interposer_cuts(ezgl::renderer* g) {
5656
for (int cut_x : vertical_cuts[layer]) {
5757
float x;
5858
if (draw_state->pic_on_screen == e_pic_type::PLACEMENT) {
59-
x = (draw_coords->tile_x[cut_x + 1] + draw_coords->tile_x[cut_x]) / 2.0f;
59+
x = (draw_coords->tile_x[cut_x + 1] + draw_coords->tile_x[cut_x] + draw_coords->get_tile_width()) / 2.0f;
6060
} else if (draw_state->pic_on_screen == e_pic_type::ROUTING) {
6161
x = draw_coords->tile_x[cut_x + 1] - 0.5f;
6262
} else {

0 commit comments

Comments
 (0)