Skip to content

Add CHANZ type #3170

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
merged 30 commits into from
Jul 8, 2025
Merged

Add CHANZ type #3170

merged 30 commits into from
Jul 8, 2025

Conversation

soheilshahrouz
Copy link
Contributor

@soheilshahrouz soheilshahrouz commented Jun 27, 2025

Adds CHANZ RR node type for inter-layer connections. Previously, these connection were modeled with CHANX nodes whose ptc number started from the maximum channel width.

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Jun 27, 2025
@soheilshahrouz
Copy link
Contributor Author

The RR graph is mostly the same, except some nodes are CHANZ instead of CHANX.

The router lookahead is different from the one in the master branch. Most entries have higher delays. I compared cases where the source and sink are on the same layer, and the lookahead from this branch is more similar to the one from the 2D architecture in the master branch. I think using CHANX for inter-layer nodes may have confused the router lookahead.

@soheilshahrouz soheilshahrouz changed the title [WIP] Add CHANZ type Add CHANZ type Jul 2, 2025
@soheilshahrouz soheilshahrouz requested a review from vaughnbetz July 2, 2025 15:56
@soheilshahrouz
Copy link
Contributor Author

The problem with the router lookahead is that during RR indexed data initialization, CHANZ nodes are assigned the same RRIndexedDataId as the last CHANX segment type. Many of these CHANZ nodes (which were marked as CHANX) are disconnected from the rest of the graph (fan-in = 0), so their delay is set to zero. This lowers the average delay calculated for that CAHNX wire type.

In this branch, CHANZ nodes are excluded from the average delay calculation for RR indexed data, which makes the CHANX delay estimate more accurate. However, since CHANZ nodes still use the same RR indexed data as CHANX, their delay values are incorrect. As a result, the router lookahead gives inaccurate cost estimates when crossing layers.

@vaughnbetz
Copy link
Contributor

Should that issue (CHANZ rr_indexed_data is wrong) be fixed in this PR too?

@soheilshahrouz
Copy link
Contributor Author

Should that issue (CHANZ rr_indexed_data is wrong) be fixed in this PR too?

I think a clean fix requires fixing bugs and issues in 3d switch blocks. If the long-term plan is to replace 3d SBs with scatter-gather patterns, I think it's better to postpone fixing the rr_indexed_data until then.

@vaughnbetz
Copy link
Contributor

CI: fail (sigabrt I think) on 3d_sb on reg strong. Should run it through the sanitizers.
QoR: should run one 3D SB arch (can ask Amin) and measure QoR.

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.

Some changes suggested, plus need to fix the seg fault, plus should run a QoR run on at least one 3D SB arch.

@vaughnbetz
Copy link
Contributor

Could widen the CHANX and CHANY limits too

@soheilshahrouz
Copy link
Contributor Author

soheilshahrouz commented Jul 7, 2025

3d_sb_titan_other_auto_bb

place_time total_swaps placed_wirelength_est placed_CPD_est route_time CPD heap_pops WL
ratio 0.9863 1.0129 1.0136 1.1523 0.3736 0.9958 0.2993 0.9733

Placement CPD increased because T_linear now gives a more accurate delay for L16 wires in CHANX. Previously, delays for traveling along the x-axis were heavily underestimated.

Route time and heap pops dropped by 63% and 70%. I believe the old router lookahead misled the placement engine by making long CHANX wires seem much faster than they actually were. With a more accurate lookahead, placement timing cost is more aligned with routing timing cost.

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.

Looks good, thanks.

@vaughnbetz
Copy link
Contributor

Only failure; expected QoR failure on a 3D placement estimated delay. Update and merge!

@soheilshahrouz
Copy link
Contributor Author

I ran mcnc benchmarks to make sure that adding CHANZ does not impact 2D architectures. I get the same QoR on both branches.

@soheilshahrouz soheilshahrouz merged commit a2277d1 into master Jul 8, 2025
30 checks passed
@soheilshahrouz soheilshahrouz deleted the temp_add_chanz branch July 8, 2025 19:01
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.

2 participants