Skip to content

Conversation

@amin1377
Copy link
Contributor

When reading a custom RR graph, I noticed that the routing results differed between reading an RR graph from file and generating the RR graph internally. After investigating, it became apparent that the discrepancy is caused by the router lookahead assigning different base costs for IPINs in the two cases.

When reading an RR graph, the Tdel assigned to an IPIN’s rr_indexed_data is set to the delay of the most frequent switch connected to that IPIN.
However, when the RR graph is generated, the Tdel is taken from the switch specified for IPINs in the architecture file.

This doesn't cause a problem for VPR's default RR Graph generator, but when building a custom RR graph (which I am implementing in a separate PR), the switches connected to IPIN nodes may not match those specified in the architecture file, leading to inconsistent Tdel values and therefore inconsistent routing results.

This PR updates the behavior so that reading and generating RR graphs use a consistent approach for assigning Tdel to IPINs.

@github-actions github-actions bot added the lang-cpp C/C++ code label Nov 17, 2025
@soheilshahrouz
Copy link
Contributor

How does the custom RR graph generator decide which switch to use for different IPINs?

@amin1377
Copy link
Contributor Author

How does the custom RR graph generator decide which switch to use for different IPINs?

The switch to be used is determined by the switch pattern file provided to VTR, which specifies the connection patterns and the corresponding switch delays.

@soheilshahrouz
Copy link
Contributor

There are a few things I can't understand:

Why don't we compute the average IPIN switch delay just like wire switches? I think this would give us a more accurate CPD estimate in placement. If a path goes through multiple IPINs, an average would a better representative than mode.

It seems that default RR graph generation doesn't allow the switch used for IPINs to have fanin-dependent delay specification. Why? How IPIN switches in custom RR graph generator differ from each other? Are they intrinsically different, or they only have different delays based on their fanin?

@amin1377
Copy link
Contributor Author

Regarding the first point, we can modify the algorithm to use the average, similar to how it is done for CHANX/CHANY. I didn’t do that because I wanted to remain consistent with the approach used when reading the RR graph.

As for the second point, in a custom RR graph we do not take the switch delay from the architecture file. Instead, we obtain it from another file, where different delays can be specified for each connection to an IPIN.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lang-cpp C/C++ code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants