Skip to content

Commit

Permalink
Merge pull request #2468 from verilog-to-routing/net_max_fanout_issue
Browse files Browse the repository at this point in the history
Net max fanout issue in Net Settings graphics
  • Loading branch information
vaughnbetz committed Jan 22, 2024
2 parents c8bd8b1 + a72a5f4 commit 9c0e910
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 7 deletions.
4 changes: 2 additions & 2 deletions vpr/src/draw/draw.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ static void set_block_outline(GtkWidget* widget, gint /*response_id*/, gpointer
static void set_block_text(GtkWidget* widget, gint /*response_id*/, gpointer /*data*/);
static void set_draw_partitions(GtkWidget* widget, gint /*response_id*/, gpointer /*data*/);
static void clip_routing_util(GtkWidget* widget, gint /*response_id*/, gpointer /*data*/);
static void run_graphics_commands(std::string commands);
static void run_graphics_commands(const std::string& commands);

/************************** File Scope Variables ****************************/

Expand Down Expand Up @@ -1245,7 +1245,7 @@ static void set_force_pause(GtkWidget* /*widget*/, gint /*response_id*/, gpointe
draw_state->forced_pause = true;
}

static void run_graphics_commands(std::string commands) {
static void run_graphics_commands(const std::string& commands) {
//A very simmple command interpreter for scripting graphics
t_draw_state* draw_state = get_draw_state_vars();

Expand Down
9 changes: 7 additions & 2 deletions vpr/src/draw/draw_basic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -245,16 +245,21 @@ void drawnets(ezgl::renderer* g) {
* blocks (or sub blocks in the case of IOs). */

for (auto net_id : cluster_ctx.clb_nlist.nets()) {
if (cluster_ctx.clb_nlist.net_is_ignored(net_id))
if (cluster_ctx.clb_nlist.net_is_ignored(net_id)) {
continue; /* Don't draw */
}

if ((int)cluster_ctx.clb_nlist.net_pins(net_id).size() - 1 > draw_state->draw_net_max_fanout) {
continue;
}

b1 = cluster_ctx.clb_nlist.net_driver_block(net_id);

//The layer of the net driver block
driver_block_layer_num = place_ctx.block_locs[b1].loc.layer;

//To only show nets that are connected to currently active layers on the screen
if (draw_state->draw_layer_display[driver_block_layer_num].visible == false) {
if (!draw_state->draw_layer_display[driver_block_layer_num].visible) {
continue; /* Don't draw */
}

Expand Down
4 changes: 2 additions & 2 deletions vpr/src/draw/intra_logic_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,7 @@ void draw_logical_connections(ezgl::renderer* g) {

// iterate over all the atom nets
for (auto net_id : atom_ctx.nlist.nets()) {
if ((int)atom_ctx.nlist.net_pins(net_id).size() > draw_state->draw_net_max_fanout) {
if ((int)atom_ctx.nlist.net_pins(net_id).size() - 1 > draw_state->draw_net_max_fanout) {
continue;
}

Expand Down Expand Up @@ -919,7 +919,7 @@ bool t_selected_sub_block_info::gnode_clb_pair::operator==(const gnode_clb_pair&
* @param pb current node to be examined
* @return t_pb* t_pb ptr of block w. name "name". Returns nullptr if nothing found
*/
t_pb* find_atom_block_in_pb(std::string name, t_pb* pb) {
t_pb* find_atom_block_in_pb(const std::string& name, t_pb* pb) {
//Checking if block is one being searched for
std::string pbName(pb->name);
if (pbName == name)
Expand Down
2 changes: 1 addition & 1 deletion vpr/src/draw/intra_logic_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ void draw_logical_connections(ezgl::renderer* g);
void find_pin_index_at_model_scope(const AtomPinId the_pin, const AtomBlockId lblk, int* pin_index, int* total_pins);

//Returns pb ptr of given atom block name, given the pb of its containing block. Returns null if nothing found
t_pb* find_atom_block_in_pb(std::string name, t_pb* pb);
t_pb* find_atom_block_in_pb(const std::string& name, t_pb* pb);

#endif /* NO_GRAPHICS */

Expand Down

0 comments on commit 9c0e910

Please sign in to comment.