Skip to content
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

Add splitfanout pass #4741

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add splitfanout pass #4741

wants to merge 1 commit into from

Conversation

akashlevy
Copy link

@akashlevy akashlevy commented Nov 14, 2024

What are the reasons/motivation for this change?

This PR adds a splitfanout pass that splits cells with fanout > 1 into copies, each with fanout 1. It is effectively the opposite of opt_merge and is useful for (1) enabling optimizations that cannot work when there is fanout, (2) splitting high fanout cells/nets that might cause problems in PD.

The pass can operate on selections and has a -limit flag to selectively operate on cells with fanout < specified limit. It does not operate on "bit-split" cells (word-level cells where different bits of the word have different/non-contiguous destinations), so splitcells should be run first if fanout splitting is desired for such cells.

Explain how this is achieved.

The pass works by building a database of drivers and loads, then operating in reverse topological order on selected cells. It checks that each cell is not "bit-split", then makes a copy to drive each load. The original cell is used to drive the final load.

  • passes/cmds/splitfanout.cc: splitfanout pass
  • passes/cmds/Makefile.inc: Add the new source

If applicable, please suggest to reviewers how they can test the change.

  • YosysHQ to review source code and provide feedback/edits as necessary
  • YosysHQ to construct test plan of 15-20 small-medium test cases
  • Silimate to review test plan and sign off
  • YosysHQ to write test cases according to test plan and add to regression
  • YosysHQ to provide formal equivalence checking scripts with equiv_opt or FOSS eqy
  • Silimate to sign off on test case implementation
  • YosysHQ to merge PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant