Skip to content

techmap: map $alu to $fa instead of relying on extract_fa #4997

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

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

Conversation

widlarizer
Copy link
Collaborator

extract_fa is used in ASIC flows to find full and half adder cells by extracting any matching logic. It has been suggested that a better approach is to use full/half adders only when emitted from actual arithmetic. In most synthesis flows, cells that use an adder-like structure (addition, subtraction, comparison) get converted to $alu. For ASIC flows, they are then techmapped to a multi-bit $lcu in techlibs/common/techmap.v. $lcu cells need propagate (P) and generate (G) inputs which have to be generated by half adders.

Prior to this PR, techmap.v was generating these with explicit logic and relying on extract_fa to discover that it's half adders. As of this PR, half adders are instantiated directly as $fa cells with C inputs at constant 0. This is how extract_fa implements half adders already, and for example ORFS uses this constant C=0 to map directly to half adders in the PDK.

This PR is best evaluated in the context of an ASIC flow as-is or with extract_fa removed

  • add an equivalence test

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

Successfully merging this pull request may close these issues.

1 participant