Skip to content

Vpr viewer and flat routing on #3070

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

w0lek
Copy link
Contributor

@w0lek w0lek commented May 21, 2025

Related Issue

#3064

How Has This Been Tested?

manual test:

  • run vpr viewer with following command
    ./vpr test_post_verilog_arch.xml unconnected.eblif --device auto --timing_analysis on --constant_net_method route --clock_modeling ideal --exit_before_pack off --circuit_format eblif --absorb_buffer_luts off --route_chan_width 180 --flat_routing on --gen_post_synthesis_netlist on --timing_report_npaths 100 --timing_report_detail netlist --allow_dangling_combinational_nodes on --analysis --disp on
  • select different Node Id or Node name based on unconnected.route in search bar, observe visual.
    check that visual nodes representation corresponds to nodes listed in unconnected.route file.

Types of changes

  • Bug fix (change which fixes an issue)
  • New feature (change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My change requires a change to the documentation
  • I have updated the documentation accordingly
  • I have added tests to cover my changes
  • All new and existing tests passed

Sorry, something went wrong.

w0lek added 5 commits May 20, 2025 17:20

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@w0lek w0lek requested a review from amin1377 May 21, 2025 15:03
@w0lek w0lek marked this pull request as ready for review May 21, 2025 15:07

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels May 21, 2025
@w0lek w0lek marked this pull request as draft May 21, 2025 18:18
@w0lek w0lek marked this pull request as ready for review May 21, 2025 19:06
w0lek and others added 3 commits May 21, 2025 22:06
…-verilog-to-routing into vpr_viewer_and_flat_routing_on
Copy link
Contributor

@amin1377 amin1377 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Alex, for fixing the issues with the GUI when flat router is used. In the PR description, it would be helpful if you could explain the specific case you tested that was previously incorrect and is now working properly. That would be useful for future reference.

@@ -17,6 +17,9 @@

#include "ezgl/application.hpp"

bool is_net_unrouted(AtomNetId atomic_net_id);
bool is_net_fully_absorbed(AtomNetId atomic_net_id);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding Doxygen comments for these two functions would be better.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a bit of digging through the codebase and found that the routing context includes a data structure called net_status, which has a method called is_routed. I think it would be better to use that instead of writing a custom function to determine whether a net is routed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality of is_net_fully_absorbed isn't specific to drawing, so I think it would be better to move it to the route_utils file rather than defining it here.

Copy link
Contributor Author

@w0lek w0lek May 27, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a bit of digging through the codebase and found that the routing context includes a data structure called net_status, which has a method called is_routed. I think it would be better to use that instead of writing a custom function to determine whether a net is routed.

I just tested this approach, and it's not robust. It seems the net_status structure is filled only on --route stage, and never is filled with, let's say if we run vpr viewer in --analysis only stage. Due to this, if we run vpr viewer in analysis mode, the each net id will be reported as not routed if we attempt to use net_status structure.
With respect of this information, could i continue use

route_ctx.route_trees[net_id].has_value()

? I also may add TODO and comment explaining this.
Or we should think how to fix filling net_stats structure for all possible cases? About fixing net_status filling case, i think it more looks like separate issue.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The functionality of is_net_fully_absorbed isn't specific to drawing, so I think it would be better to move it to the route_utils file rather than defining it here.

done 80675e3

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think adding Doxygen comments for these two functions would be better.

added 2e9a2d6

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems the net_status structure is filled only on --route stage

If you can file an issue on it, that would be good. Thanks!

@w0lek w0lek marked this pull request as draft May 26, 2025 15:21
w0lek and others added 5 commits May 26, 2025 22:13
…not robust for stage except the route. add doxygen doc for is_net_routed and is_net_fully_absorbed
@w0lek
Copy link
Contributor Author

w0lek commented May 27, 2025

Thanks, Alex, for fixing the issues with the GUI when flat router is used. In the PR description, it would be helpful if you could explain the specific case you tested that was previously incorrect and is now working properly. That would be useful for future reference.

Thanks for review @amin1377! I updated associated issue description with current and proposed behavior. is it ok? If not i may duplicate this information also in the header of this PR.

@w0lek w0lek marked this pull request as ready for review May 27, 2025 13:32
@amin1377
Copy link
Contributor

Looks good. Thanks!

@amin1377 amin1377 merged commit c654d16 into verilog-to-routing:master May 27, 2025
32 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lang-cpp C/C++ code VPR VPR FPGA Placement & Routing Tool
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants