Skip to content

[Pack] Pack Pattern Root IPIN #3007

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 16 commits into from
May 6, 2025
Merged

Conversation

amin1377
Copy link
Contributor

@amin1377 amin1377 commented Apr 28, 2025

To identify the root block of a chain, VPR iterates over all cluster-level IPINs associated with the pack pattern and considers all blocks connected to those pins (via get_all_connected_primitive_pins) as potential starting points.

This approach typically works well. However, issues arise when the pack pattern spans blocks that support multiple modes, for example, in a shift register pattern where registers have different modes. In such cases, a separate pattern must be defined for each mode. As a result, the same cluster-level IPIN may be connected to multiple blocks (e.g., registers in various modes), not all of which belong to the specific pack pattern being considered.

To address this, I added filtering to get_all_connected_primitive_pins so it only returns blocks that already belong to the current pattern, avoiding invalid starting points.

Without this fix, in an architecture where a flip-flop has multiple modes, the chain is only correctly formed if the first mode defined in the architecture file corresponds to the one used in the netlist. This is because the root block is currently retrieved using list_of_pack_patterns->chain_root_pins[0][0].

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

@AmirhosseinPoolad AmirhosseinPoolad left a comment

Choose a reason for hiding this comment

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

Thanks for the changes Amin! I'll let Vaughn comment on the actual functionality changes, but meanwhile I had a couple of style related comments and nitpicks.

@amin1377
Copy link
Contributor Author

amin1377 commented May 1, 2025

@AmirhosseinPoolad Thanks for reviewing the code! I’ve addressed your comments. Please resolve the conversations if you think they’ve been properly handled. Let me know if you have any further suggestions.

Copy link
Contributor

@AlexandreSinger AlexandreSinger left a comment

Choose a reason for hiding this comment

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

LGTM

@AlexandreSinger AlexandreSinger merged commit 576c5c3 into master May 6, 2025
36 checks passed
@AlexandreSinger AlexandreSinger deleted the pack_pattern_root_block branch May 6, 2025 12:40
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.

4 participants