Repository navigation
Add ABC9 command &lutabsorb - #616
Open
flyingfoxyy wants to merge 2 commits into
Open
flyingfoxyy wants to merge 2 commits into
flyingfoxyy wants to merge 2 commits into
Conversation
Add &lutabsorb for LUT-mapped GIAs, mirroring the Abc-network lutabsorb: a multi-fanout LUT with 2..M LUT fanouts is absorbed into every fanout when each merged cut fits in K inputs; with a LUT library the removal must also reduce the total LUT area. The command rewrites only vMapping; the AIG is untouched, so equivalence holds by construction. Candidate LUTs driving COs or buffers are skipped. LUTs whose cuts change lose their mux trailing annotation, while unchanged LUTs keep it; a no-op run leaves the mapping and the derived data (packing, cell mapping, edges) intact. Options match lutabsorb: -K (disables the LUT library), -M, -R, -v. The library comes from Abc_FrameReadLibLut(), with default K = min(6, LutMax). Add test/gia_lutabsorb.sh and wire it into both POSIX CI workflows.
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.
Adds
&lutabsorb, the ABC9 counterpart of the Abc-networklutabsorbcommand, for LUT-mapped GIAs.
Behavior
&lutabsorbabsorbs a multi-fanout LUTu(2..M LUT fanouts) into all ofits fanout LUTs when every merged cut fits in K inputs. With a LUT library,
the removal must also reduce the total LUT area, using the same gain formula
as
lutabsorb.Options match
lutabsorb:-K num— max LUT size after absorption; giving-Kdisables the LUT library-M num— max fanout count of a candidate LUT (default 8)-R num— number of passes (default 1)-v,-hThe library comes from
Abc_FrameReadLibLut(), with defaultK = min(6, LutMax).Implementation
The command rewrites only
vMapping; the AIG is untouched, so equivalenceholds by construction. LUT-level fanouts are the LUT roots whose cut leaves
contain
u. Candidate LUTs driving COs or buffers are skipped. LUTs whosecuts change lose their mux trailing annotation, while unchanged LUTs keep
it; a no-op run leaves the mapping and derived data (packing, cell mapping,
edges) intact.
Testing
test/gia_lutabsorb.shcovers default and custom LUT libraries,-K/-M/-R, CO-driver skipping,&put+cecequivalence, theno-mapping error, an
&ifsmoke test, and no-op preservation of packingdata. It is wired into both POSIX CI workflows.
lutabsorb: on 6 designs x 7 mapping flows(
&if -K 6,&if -K 4,&if,&jf/&lf/&mf -K 6) and 3 designs x 2custom LUT libraries, the number of removed LUTs, the final network size
after
&put, and the area gain are identical to running&put; lutabsorbon the same mapped network.
&put+cecand checked with valgrind; all equivalent and clean.