Skip to content

Commit

Permalink
updated draw_check_rr_node_hit to ensure that only nodes on currently…
Browse files Browse the repository at this point in the history
… visible layers are checked for hits to ensure that we only highlight nodes that are on visible layers.
  • Loading branch information
Meet-Patel2580 committed Sep 3, 2023
1 parent 21e1568 commit f6b519e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion vpr/src/draw/draw_rr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -691,16 +691,20 @@ RRNodeId draw_check_rr_node_hit(float click_x, float click_y) {
ezgl::rectangle bound_box;

t_draw_coords* draw_coords = get_draw_coords_vars();
t_draw_state* draw_state = get_draw_state_vars();
auto& device_ctx = g_vpr_ctx.device();
const auto& rr_graph = device_ctx.rr_graph;

for (const RRNodeId& inode : device_ctx.rr_graph.nodes()) {
int layer_num = rr_graph.node_layer(inode);
if(!draw_state->draw_layer_display[layer_num].visible){
continue; /* Don't check RR nodes on currently invisible layers*/
}
switch (rr_graph.node_type(inode)) {
case IPIN:
case OPIN: {
int i = rr_graph.node_xlow(inode);
int j = rr_graph.node_ylow(inode);
int layer_num = rr_graph.node_layer(inode);
t_physical_tile_type_ptr type = device_ctx.grid.get_physical_type({i, j, layer_num});
int width_offset = device_ctx.grid.get_width_offset({i, j, layer_num});
int height_offset = device_ctx.grid.get_height_offset({i, j, layer_num});
Expand Down

0 comments on commit f6b519e

Please sign in to comment.