@@ -73,15 +73,22 @@ void draw_highlight_blocks_color(t_logical_block_type_ptr type,
73
73
ClusterBlockId blk_id) {
74
74
t_draw_state* draw_state = get_draw_state_vars ();
75
75
const ClusteringContext& cluster_ctx = g_vpr_ctx.clustering ();
76
+ const AtomLookup& atom_lookup = g_vpr_ctx.atom ().lookup ();
76
77
const auto & block_locs = draw_state->get_graphics_blk_loc_registry_ref ().block_locs ();
77
78
78
79
for (int k = 0 ; k < type->pb_type ->num_pins ; k++) { /* Each pin on a CLB */
79
- ClusterNetId net_id = cluster_ctx.clb_nlist .block_net (blk_id, k);
80
+ ClusterNetId cluster_net_id = cluster_ctx.clb_nlist .block_net (blk_id, k);
80
81
81
- if (net_id == ClusterNetId::INVALID ()) {
82
+ if (cluster_net_id == ClusterNetId::INVALID ()) {
82
83
continue ;
83
84
}
84
85
86
+ // Convert to atom net id if flat routing is enabled
87
+ ParentNetId net_id = cluster_net_id;
88
+ if (draw_state->is_flat ){
89
+ net_id = atom_lookup.atom_net (cluster_net_id);
90
+ }
91
+
85
92
t_pl_loc block_loc = block_locs[blk_id].loc ;
86
93
auto physical_tile = physical_tile_type (block_loc);
87
94
int physical_pin = get_physical_pin (physical_tile, type, k);
@@ -92,14 +99,14 @@ void draw_highlight_blocks_color(t_logical_block_type_ptr type,
92
99
if (draw_state->block_color (blk_id) == SELECTED_COLOR) {
93
100
/* If block already highlighted, de-highlight the fanout. (the deselect case)*/
94
101
draw_state->net_color [net_id] = ezgl::BLACK;
95
- for (auto pin_id : cluster_ctx.clb_nlist .net_sinks (net_id )) {
102
+ for (auto pin_id : cluster_ctx.clb_nlist .net_sinks (cluster_net_id )) {
96
103
ClusterBlockId fanblk = cluster_ctx.clb_nlist .pin_block (pin_id);
97
104
draw_reset_blk_color (fanblk);
98
105
}
99
106
} else {
100
107
/* Highlight the fanout */
101
108
draw_state->net_color [net_id] = DRIVES_IT_COLOR;
102
- for (auto pin_id : cluster_ctx.clb_nlist .net_sinks (net_id )) {
109
+ for (auto pin_id : cluster_ctx.clb_nlist .net_sinks (cluster_net_id )) {
103
110
ClusterBlockId fanblk = cluster_ctx.clb_nlist .pin_block (pin_id);
104
111
draw_state->set_block_color (fanblk, DRIVES_IT_COLOR);
105
112
}
@@ -108,12 +115,12 @@ void draw_highlight_blocks_color(t_logical_block_type_ptr type,
108
115
if (draw_state->block_color (blk_id) == SELECTED_COLOR) {
109
116
/* If block already highlighted, de-highlight the fanin. (the deselect case)*/
110
117
draw_state->net_color [net_id] = ezgl::BLACK;
111
- ClusterBlockId fanblk = cluster_ctx.clb_nlist .net_driver_block (net_id ); /* DRIVER to net */
118
+ ClusterBlockId fanblk = cluster_ctx.clb_nlist .net_driver_block (cluster_net_id ); /* DRIVER to net */
112
119
draw_reset_blk_color (fanblk);
113
120
} else {
114
121
/* Highlight the fanin */
115
122
draw_state->net_color [net_id] = DRIVEN_BY_IT_COLOR;
116
- ClusterBlockId fanblk = cluster_ctx.clb_nlist .net_driver_block (net_id ); /* DRIVER to net */
123
+ ClusterBlockId fanblk = cluster_ctx.clb_nlist .net_driver_block (cluster_net_id ); /* DRIVER to net */
117
124
draw_state->set_block_color (fanblk, DRIVEN_BY_IT_COLOR);
118
125
}
119
126
}
@@ -271,7 +278,6 @@ void deselect_all() {
271
278
for (RRNodeId inode : device_ctx.rr_graph .nodes ()) {
272
279
draw_state->draw_rr_node [inode].color = DEFAULT_RR_NODE_COLOR;
273
280
draw_state->draw_rr_node [inode].node_highlighted = false ;
274
- draw_state->draw_rr_node [inode].node_hit = false ;
275
281
}
276
282
get_selected_sub_block_info ().clear ();
277
283
}
0 commit comments