Skip to content

Conversation

soheilshahrouz
Copy link
Contributor

This PR computes channel widths directly from the RR graph. These computed values now replace t_chan_width usages outside of the RR graph generation.

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Oct 9, 2025
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, Soheil!

@soheilshahrouz
Copy link
Contributor Author

QoR differs from master because the computed channel width for the top and right channels at the periphery of the device is zero, while on master, t_chan_width indicates their width as W. This affects the average number of tracks within a net’s bounding box, which is used by the NetCostHandler class. As a result, placement differs slightly from master, since nets with endpoints on the top or right edges of the device receive a marginally higher cost.

As discussed with @amin1377, we believe the current implementation is more accurate, since those channels actually contain no tracks. I’ll collect QoR results for this branch and update the golden results if no significant degradation is observed.

Currently, bounding box computation uses the tile location of pins. It would be more accurate to use the location of the channel the pin connects to. This would require subtracting one from the x/y coordinate of pins located on the left or bottom sides of a tile.

@soheilshahrouz soheilshahrouz changed the title [WIP] Extract channel width from RR graph Extract channel width from RR graph Oct 10, 2025
@vaughnbetz
Copy link
Contributor

Should do a QoR run on this to ensure all is well. Suggest:
VTR
Titanium/Stratix 10 (has different channel widths)
Some 3D arch.

@soheilshahrouz
Copy link
Contributor Author

For a few small circuits, routing succeeds at min_W but fails at a relaxed W.

@vaughnbetz
Copy link
Contributor

Weird, but can happen. Could change them to run at a fixed channel width if you're pretty sure all is OK.

Copy link
Contributor

@vaughnbetz vaughnbetz left a comment

Choose a reason for hiding this comment

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

LGTM

@soheilshahrouz
Copy link
Contributor Author

Weird, but can happen. Could change them to run at a fixed channel width if you're pretty sure all is OK.

I changed the seed to resolve this.

@soheilshahrouz
Copy link
Contributor Author

No QoR difference in titan_quick_qor was seen.
Updated the golden results. Waiting for CI to pass.

@soheilshahrouz
Copy link
Contributor Author

soheilshahrouz commented Oct 15, 2025

Nightly test 1, which was the only failing nightly test now passes.

@amin1377 If you don't have further comments, could you please approve this PR?

@amin1377 amin1377 merged commit 7f0839d into master Oct 15, 2025
30 checks passed
@amin1377 amin1377 deleted the temp_chan_width_rr branch October 15, 2025 19:14
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.

3 participants