Skip to content

Conversation

tangxifan
Copy link
Contributor

@tangxifan tangxifan commented Oct 15, 2025

Description

The tileable routing resource graph generator provides limited supports on direct connections.
It does not support subtiles and z_offset when direction connections are defined.

Related Issue

Motivation and Context

  • Updated the direct connection builder in the tileable rr_graph builder. Now the subtile pins and z_offset are supported.

Here is a quick example on what is now supported.

    <!-- Direct connect from MULT to RAM --> 
    <direct name="direct_mult2ram0_0" from_pin="mult_memory.dataout[9:0]" to_pin="mult_memory.data[9:0]" x_offset="0" y_offset="0" z_offset="1"/>
    <direct name="direct_mult2ram0_1" from_pin="mult_memory.dataout[19:10]" to_pin="mult_memory.data[19:10]" x_offset="0" y_offset="0" z_offset="1"/>
    <direct name="direct_mult2ram0_2" from_pin="mult_memory.dataout[29:20]" to_pin="mult_memory.data[29:20]" x_offset="0" y_offset="0" z_offset="1"/>
    <direct name="direct_mult2ram0_3" from_pin="mult_memory.dataout[39:30]" to_pin="mult_memory.data[39:30]" x_offset="0" y_offset="0" z_offset="1"/>
    <direct name="direct_mult2ram1_0" from_pin="mult_memory.dataout[9:0]" to_pin="mult_memory.data[9:0]" x_offset="0" y_offset="0" z_offset="2"/>
    <direct name="direct_mult2ram1_1" from_pin="mult_memory.dataout[19:10]" to_pin="mult_memory.data[19:10]" x_offset="0" y_offset="0" z_offset="2"/>
    <direct name="direct_mult2ram1_2" from_pin="mult_memory.dataout[29:20]" to_pin="mult_memory.data[29:20]" x_offset="0" y_offset="0" z_offset="2"/>
    <direct name="direct_mult2ram1_3" from_pin="mult_memory.dataout[39:30]" to_pin="mult_memory.data[39:30]" x_offset="0" y_offset="0" z_offset="2"/>

How Has This Been Tested?

  • Added a new testcase to the strong regression test, which validates the carry chain connections. This fills the hole where the rudimentary direct connections was not validated in VTR on the tileable rr_graph generator.
  • Added a new testcase to the strong regression test, which validates the direct connections between subtiles with a z_offset.

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

@github-actions github-actions bot added VPR VPR FPGA Placement & Routing Tool lang-cpp C/C++ code labels Oct 15, 2025
@tangxifan tangxifan changed the title Now tileable rr_graph generator supports subtile pins and z_offset Now tileable rr_graph generator supports subtile pins and z_offset in direct connections Oct 15, 2025
@amin1377
Copy link
Contributor

@tangxifan: Is this PR ready for review?

@tangxifan
Copy link
Contributor Author

@tangxifan: Is this PR ready for review?

Yes. Feel free to comment. We also discuss it in the upcoming weekly meeting.

@amin1377 amin1377 self-requested a review October 16, 2025 17:03
@tangxifan
Copy link
Contributor Author

@amin1377 Minor patches applied to resolve CI failures and throw errors when sanity checks failed. It is ready for your review.

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.

The code looks good to me.
Is there any documentation that needs to be updated to go along with this enhancement (@tangxifan @amin1377 )

@tangxifan
Copy link
Contributor Author

@vaughnbetz There is no changes required on documentation, as the tileable rr_graph generator supports all the syntax at https://docs.verilogtorouting.org/en/latest/arch/reference/#direct-inter-block-connections

Since tileable rr_graph targets physical modelling of FPGA fabrics, the restrictions (tighter than the regular rr_graph generator) are

  • from_pin should appear on only one side of a tile
  • to_pin should appear on only one side of a tile
  • tileable rr_graph will find the automatically side for both from_pin and to_pin, saving users the effort to specify.

In the code changes of this PR, it will error out with a message if the sanity checks failed.

If you see a must to update the documentation, I will be happy to.

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, Xifan! It looks good to me.

@amin1377 amin1377 merged commit 82c0e54 into master Oct 17, 2025
30 checks passed
@amin1377 amin1377 deleted the xt_tileable_direct_fixup branch October 17, 2025 22:42
@vaughnbetz
Copy link
Contributor

Thanks @tangxifan. Sounds good.

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