Repository navigation
lutabsorb: use the LUT library for K limits and area gain - #592
Open
flyingfoxyy wants to merge 1 commit into
Open
flyingfoxyy wants to merge 1 commit into
flyingfoxyy wants to merge 1 commit into
Conversation
Rename the fabsorb command, API, and source file to lutabsorb, and use the installed LUT library when deciding what to absorb: - Default K is min(6, LutMax); an explicit -K above LutMax is truncated to LutMax with a warning. - Absorb a multi-fanout LUT only when the removal reduces total LUT area computed from the library's area table, and report the area gain. - Skip candidates involving nodes with more fanins than LutMax, where the area table cannot be queried. The default 4-input library has unit areas, so its gain equals the number of removed LUTs.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fabsorbremoved a multi-fanout LUT whenever every fanout still fit in K inputs, implicitly assuming that removing one LUT always saves one LUT. When a LUT library is installed, LUT area depends on its input count, so that assumption can increase area.This PR renames the command to
lutabsorband makes it library-aware:LutMax. The default ismin(6, LutMax); an explicit-KaboveLutMaxis truncated with a warning.area(u) + sum(area(v_old)) - sum(area(v_new)) > 0, usingpLutAreas[fanin_count]from the installed library. The total area gain is reported.LutMaxare skipped, since the library cannot price them.The rename covers the command, the
Abc_NtkLutAbsorbAPI, the source file, and the build lists. With the default 4-input library (unit areas) the gain equals the number of removed LUTs, so existing behavior is preserved.Tests
make -j$(nproc)succeeds.min(6, LutMax).r i10.aig; if -K 4; lutabsorb; cecandread_lut (6-input area lib); r i10.aig; if; lutabsorb; cecboth remain equivalent.test/mf_maprefs_overflow.shpass.