Repository navigation
Add lutresyn for post-mapping LUT-count reduction - #618
Open
flyingfoxyy wants to merge 3 commits into
Open
flyingfoxyy wants to merge 3 commits into
flyingfoxyy wants to merge 3 commits into
Conversation
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.
What this adds
lutresynis a post-mapping LUT-count optimizer for LUT-mapped networks. For each LUT root it-Qallows absorbing a bounded number of nodes whose fanouts leave the cone),-L.The command is a post-mapping optimizer complementary to
lutpack: it keeps the LUT size fixed, performs a bounded resynthesis of each cone, and does not require a LUT library.Verification
test/lutresyn.shcovers five scenarios: the-Mbound, the strict LUT-count reduction rule, the global-Llevel budget, alternative cuts being accepted, and-Qabsorption. It is wired intotest/CMakeLists.txtand both POSIX CI workflows.cec -n(Networks are equivalent).Benchmark comparison with
lutpackFlow:
read X.aig; st; resyn; resyn2; if -K 6; <command>; cec -n.lutpackwas run with a 6-input LUT library installed viaread_lut(with ABC's default 4-input library it warns and is effectively inert on 6-LUT networks). Time is the transform stage only, measured withtime -p(eight single-threaded benchmarks run concurrently on a 16-core machine, under identical conditions for every command); the baseline (st; resyn; resyn2; if -K 6) is excluded from the reported time.51 complete cases from the standard EPFL/ISCAS/ITC'99 AIG benchmarks:
lutpack -S 3: 150,430 LUTs vs 155,982 baseline (-5,552, -3.56%; geomean -3.64%), 165.64 s total.lutresyn -R 3: 152,533 LUTs vs 155,982 baseline (-3,449, -2.21%; geomean -2.66%), 2.61 s total.Key result:
lutresynis ~37x faster thanlutpackon these benchmarks (geomean of per-circuit transform-time ratios; total-time ratio 63x), while the geomean LUT-count difference between the two is only ~1% per circuit.lutresynis faster on all 51 circuits.lutpack's remaining LUT-count advantage is concentrated in a few memory-like designs (wb_conmax-992,mem_ctrl-577,DMA-366), whilelutresyndoes better onaes_core(-151),log2(-126),div(-94),usb_funct(-33),sqrt(-28), andsin(-21).Full 51-case table (LUT count / level, and transform time)
Seven large industrial designs are not included in the table because equivalence checking or the run did not complete within the time cap: on
hyp(44,338 -> 44,320 withlutpack, 44,303 withlutresyn),netcard(168,728 -> 165,775 / 166,177), andleon3_opt(367,392 -> 366,582 / 366,424) the transforms finished butcec -ndid not;leon3,leon2,leon3mp, andvga_lcddid not complete.