Skip to content

Commit 9a1a3c4

Browse files
committed
fixed function which calculates max depth
1 parent c6f7d0d commit 9a1a3c4

File tree

4 files changed

+10
-28
lines changed

4 files changed

+10
-28
lines changed

vpr/src/draw/draw_basic.cpp

Lines changed: 7 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -613,29 +613,17 @@ void draw_partial_route(const std::vector<RRNodeId>& rr_nodes_to_draw, ezgl::ren
613613
auto& device_ctx = g_vpr_ctx.device();
614614
const auto& rr_graph = device_ctx.rr_graph;
615615

616-
static vtr::OffsetMatrix<int> chanx_track; /* [1..device_ctx.grid.width() - 2][0..device_ctx.grid.height() - 2] */
617-
static vtr::OffsetMatrix<int> chany_track; /* [0..device_ctx.grid.width() - 2][1..device_ctx.grid.height() - 2] */
618-
if (draw_state->draw_route_type == GLOBAL) {
619-
/* Allocate some temporary storage if it's not already available. */
620-
int width = (int)device_ctx.grid.width();
621-
int height = (int)device_ctx.grid.height();
622-
if (chanx_track.empty()) {
623-
chanx_track = vtr::OffsetMatrix<int>({{{1, width - 1}, {0, height - 1}}});
624-
}
625-
626-
if (chany_track.empty()) {
627-
chany_track = vtr::OffsetMatrix<int>({{{0, width - 1}, {1, height - 1}}});
628-
}
616+
// Draw Pins
617+
for (RRNodeId inode : rr_nodes_to_draw) {
618+
619+
bool is_inode_inter_cluster = is_inter_cluster_node(rr_graph, inode);
629620

630-
for (int i = 1; i < width - 1; i++)
631-
for (int j = 0; j < height - 1; j++)
632-
chanx_track[i][j] = (-1);
633621

634-
for (int i = 0; i < width - 1; i++)
635-
for (int j = 1; j < height - 1; j++)
636-
chany_track[i][j] = (-1);
637622
}
638623

624+
625+
626+
// Draw Edges
639627
for (size_t i = 1; i < rr_nodes_to_draw.size(); ++i) {
640628
RRNodeId inode = rr_nodes_to_draw[i];
641629
auto rr_type = rr_graph.node_type(inode);
@@ -724,9 +712,6 @@ void draw_partial_route(const std::vector<RRNodeId>& rr_nodes_to_draw, ezgl::ren
724712
break;
725713
}
726714
case e_rr_type::CHANX: {
727-
if (draw_state->draw_route_type == GLOBAL)
728-
chanx_track[rr_graph.node_xlow(inode)][rr_graph.node_ylow(inode)]++;
729-
730715
draw_rr_chan(inode, color, g);
731716
if (edge_visibility.visible) {
732717
g->set_color(color, edge_visibility.alpha);
@@ -754,9 +739,6 @@ void draw_partial_route(const std::vector<RRNodeId>& rr_nodes_to_draw, ezgl::ren
754739
break;
755740
}
756741
case e_rr_type::CHANY: {
757-
if (draw_state->draw_route_type == GLOBAL)
758-
chany_track[rr_graph.node_xlow(inode)][rr_graph.node_ylow(inode)]++;
759-
760742
draw_rr_chan(inode, color, g);
761743

762744
if (edge_visibility.visible) {

vpr/src/draw/draw_toggle_functions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ void toggle_blk_internal_cbk(GtkSpinButton* self, ezgl::application* app) {
235235
if (new_value < 0)
236236
draw_state->show_blk_internal = 0;
237237
else if (new_value >= draw_state->max_sub_blk_lvl)
238-
draw_state->show_blk_internal = draw_state->max_sub_blk_lvl - 1;
238+
draw_state->show_blk_internal = draw_state->max_sub_blk_lvl;
239239
else
240240
draw_state->show_blk_internal = new_value;
241241
app->refresh_drawing();

vpr/src/draw/intra_logic_block.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void draw_internal_draw_subblk(ezgl::renderer* g) {
198198
static int draw_internal_find_max_lvl(const t_pb_type& pb_type) {
199199
int i, j;
200200
t_mode mode;
201-
int max_levels = 1;
201+
int max_levels = 0;
202202

203203
/* If pb_type is a primitive, we have reached the end of pb_graph */
204204
if (pb_type.is_primitive())

vpr/src/draw/ui_setup.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ void block_button_setup(ezgl::application* app) {
8282
GtkSpinButton* blk_internals_button = GTK_SPIN_BUTTON(app->get_object("ToggleBlkInternals"));
8383
g_signal_connect(blk_internals_button, "value-changed", G_CALLBACK(toggle_blk_internal_cbk), app);
8484
gtk_spin_button_set_increments(blk_internals_button, 1, 1);
85-
gtk_spin_button_set_range(blk_internals_button, 0., (double)(draw_state->max_sub_blk_lvl - 1));
85+
gtk_spin_button_set_range(blk_internals_button, 0., (double)(draw_state->max_sub_blk_lvl));
8686

8787
//Toggle Block Pin Util
8888
GtkComboBoxText* blk_pin_util = GTK_COMBO_BOX_TEXT(app->get_object("ToggleBlkPinUtil"));

0 commit comments

Comments
 (0)