Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
05ee3bc
use x/y attributes instead of dim and loc
soheilshahrouz Oct 8, 2025
205a663
cherry-picked device grid changes from add_interposer_wires branch
soheilshahrouz Oct 8, 2025
17d8fae
add getters for interposer cuts in device grid
soheilshahrouz Oct 8, 2025
82dbc62
draw interposer cuts
soheilshahrouz Oct 8, 2025
078423e
draw interposer cuts with respect to next loc
soheilshahrouz Oct 8, 2025
45532c5
replace float* with std::vector<float> for tile_x and tile_y
soheilshahrouz Oct 8, 2025
49a4de1
don't draw interposer lines from -inf to +inf
soheilshahrouz Oct 8, 2025
2cb2c9c
dashed and wider line for interpsoer cut
soheilshahrouz Oct 8, 2025
6fefc24
doxygen comment for draw_interposer_cuts()
soheilshahrouz Oct 8, 2025
f9d8295
updated arch reference doc
soheilshahrouz Oct 8, 2025
49ac734
Merge remote-tracking branch 'origin/master' into temp_interposer_cut…
soheilshahrouz Oct 8, 2025
61f1ade
use VERT/HORX instead of X/Y
soheilshahrouz Oct 8, 2025
b28100a
make format
soheilshahrouz Oct 8, 2025
ccd3a66
update unit tests to be compatible with DeviceGrid constructors
soheilshahrouz Oct 8, 2025
a492b43
enum class e_pic_type
soheilshahrouz Oct 8, 2025
dc85bf4
ifndef NO_GRAPHICS in draw_interposer files
soheilshahrouz Oct 8, 2025
9c23b1b
fix type in the arch reference
soheilshahrouz Oct 9, 2025
3ac8bc9
check if both x and y are specified and error out
soheilshahrouz Oct 9, 2025
1d5bf45
don't use nullptr as default value of strings
soheilshahrouz Oct 9, 2025
aa8a2e5
make get_tile_width() and get_tile_height() const methods
soheilshahrouz Oct 9, 2025
5a10ec2
apply PR comments for drawing interposer
soheilshahrouz Oct 9, 2025
8979661
add doxygen comments
soheilshahrouz Oct 10, 2025
0ee28c8
draw interposer cut lines exactly in the middle of channel/between th…
soheilshahrouz Oct 10, 2025
f256e2f
Merge branch 'master' into temp_interposer_cut_dim
soheilshahrouz Oct 10, 2025
844fe90
add tile_width/tile_height to compute the middle of channel
soheilshahrouz Oct 10, 2025
cd2381e
more detailed comments
soheilshahrouz Oct 11, 2025
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
draw interposer cut lines exactly in the middle of channel/between th…
…e last wire and next tile during placement/routing
  • Loading branch information
soheilshahrouz committed Oct 10, 2025
commit 0ee28c89ee728b4ab4cdc62ea5d87c49d54761ef
25 changes: 18 additions & 7 deletions vpr/src/draw/draw_interposer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,6 @@ void draw_interposer_cuts(ezgl::renderer* g) {
g->set_line_dash(ezgl::line_dash::asymmetric_5_3);
g->set_line_width(2);

// Offset factor used to slightly shift the interposer cut lines away from tile boundaries.
// During placement, we draw the line in the middle of a routing channel.
// During routing, we draw the line closer to the tile that does not own the channel.
const float offset_factor = draw_state->pic_on_screen == e_pic_type::PLACEMENT ? -0.5f : -0.5f / device_ctx.chan_width.max;

const std::vector<std::vector<int>>& horizontal_cuts = grid.get_horizontal_interposer_cuts();
const std::vector<std::vector<int>>& vertical_cuts = grid.get_vertical_interposer_cuts();
std::vector<std::pair<ezgl::point2d, ezgl::point2d>> lines_to_draw;
Expand All @@ -46,12 +41,28 @@ void draw_interposer_cuts(ezgl::renderer* g) {
}

for (int cut_y : horizontal_cuts[layer]) {
float y = draw_coords->tile_y[cut_y + 1] + offset_factor * draw_coords->get_tile_height();
float y;
if (draw_state->pic_on_screen == e_pic_type::PLACEMENT) {
y = (draw_coords->tile_y[cut_y + 1] + draw_coords->tile_y[cut_y]) / 2.0f;
} else if (draw_state->pic_on_screen == e_pic_type::ROUTING) {
y = draw_coords->tile_y[cut_y + 1] - 0.5f;
} else {
VTR_ASSERT(false);
}

lines_to_draw.push_back({{world.left(), y}, {world.right(), y}});
}

for (int cut_x : vertical_cuts[layer]) {
float x = draw_coords->tile_x[cut_x + 1] + offset_factor * draw_coords->get_tile_width();
float x;
if (draw_state->pic_on_screen == e_pic_type::PLACEMENT) {
x = (draw_coords->tile_x[cut_x + 1] + draw_coords->tile_x[cut_x]) / 2.0f;
} else if (draw_state->pic_on_screen == e_pic_type::ROUTING) {
x = draw_coords->tile_x[cut_x + 1] - 0.5f;
} else {
VTR_ASSERT(false);
}

lines_to_draw.push_back({{x, world.bottom()}, {x, world.top()}});
}
}
Expand Down
Loading