ruby_abc 0.0.3 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -5
- data/.yardopts +7 -0
- data/LICENSE +51 -52
- data/README.md +96 -37
- data/bin/ruby_abc +103 -0
- data/ext/ruby_abc/extconf.rb +58 -0
- data/ext/{ruby_abc.c → ruby_abc/ruby_abc.c} +45 -72
- data/ext/ruby_abc/ruby_abc.map +6 -0
- data/ext/{ruby_abc_wrapper.c → ruby_abc/ruby_abc_wrapper.c} +0 -0
- data/ext/ruby_abc/ruby_abc_wrapper.h +39 -0
- data/lib/ruby_abc/version.rb +4 -0
- data/lib/ruby_abc.rb +247 -225
- data/share/bash_completion/ruby_abc.bash-completion.sh +24 -0
- data/share/osu018.genlib +66 -0
- data/share/simple.genlib +25 -0
- data/test/test_ruby_abc.rb +1 -1
- metadata +19 -1727
- data/Rakefile +0 -83
- data/bin/rubyabc_synthesis +0 -71
- data/ext/abc/CMakeLists.txt +0 -103
- data/ext/abc/Makefile +0 -213
- data/ext/abc/abc.rc +0 -146
- data/ext/abc/abcexe.dsp +0 -103
- data/ext/abc/abclib.dsp +0 -5948
- data/ext/abc/abcspace.dsw +0 -44
- data/ext/abc/arch_flags.c +0 -17
- data/ext/abc/copyright.txt +0 -23
- data/ext/abc/depends.sh +0 -13
- data/ext/abc/i10.aig +0 -752
- data/ext/abc/lib/pthread.h +0 -1369
- data/ext/abc/lib/sched.h +0 -178
- data/ext/abc/lib/semaphore.h +0 -166
- data/ext/abc/lib/x64/pthreadVC2.dll +0 -0
- data/ext/abc/lib/x64/pthreadVC2.lib +0 -0
- data/ext/abc/lib/x86/pthreadVC2.dll +0 -0
- data/ext/abc/lib/x86/pthreadVC2.lib +0 -0
- data/ext/abc/readme.md +0 -111
- data/ext/abc/readmeaig +0 -47
- data/ext/abc/src/aig/aig/aig.h +0 -713
- data/ext/abc/src/aig/aig/aigCanon.c +0 -701
- data/ext/abc/src/aig/aig/aigCheck.c +0 -168
- data/ext/abc/src/aig/aig/aigCuts.c +0 -673
- data/ext/abc/src/aig/aig/aigDfs.c +0 -1136
- data/ext/abc/src/aig/aig/aigDoms.c +0 -1154
- data/ext/abc/src/aig/aig/aigDup.c +0 -1335
- data/ext/abc/src/aig/aig/aigFact.c +0 -734
- data/ext/abc/src/aig/aig/aigFanout.c +0 -194
- data/ext/abc/src/aig/aig/aigFrames.c +0 -140
- data/ext/abc/src/aig/aig/aigInter.c +0 -301
- data/ext/abc/src/aig/aig/aigJust.c +0 -316
- data/ext/abc/src/aig/aig/aigMan.c +0 -486
- data/ext/abc/src/aig/aig/aigMem.c +0 -610
- data/ext/abc/src/aig/aig/aigMffc.c +0 -316
- data/ext/abc/src/aig/aig/aigObj.c +0 -536
- data/ext/abc/src/aig/aig/aigOper.c +0 -606
- data/ext/abc/src/aig/aig/aigOrder.c +0 -176
- data/ext/abc/src/aig/aig/aigPack.c +0 -404
- data/ext/abc/src/aig/aig/aigPart.c +0 -1613
- data/ext/abc/src/aig/aig/aigPartReg.c +0 -629
- data/ext/abc/src/aig/aig/aigPartSat.c +0 -618
- data/ext/abc/src/aig/aig/aigRepar.c +0 -403
- data/ext/abc/src/aig/aig/aigRepr.c +0 -559
- data/ext/abc/src/aig/aig/aigRet.c +0 -975
- data/ext/abc/src/aig/aig/aigRetF.c +0 -214
- data/ext/abc/src/aig/aig/aigScl.c +0 -708
- data/ext/abc/src/aig/aig/aigShow.c +0 -368
- data/ext/abc/src/aig/aig/aigSplit.c +0 -330
- data/ext/abc/src/aig/aig/aigTable.c +0 -277
- data/ext/abc/src/aig/aig/aigTest.c +0 -39
- data/ext/abc/src/aig/aig/aigTiming.c +0 -356
- data/ext/abc/src/aig/aig/aigTruth.c +0 -103
- data/ext/abc/src/aig/aig/aigTsim.c +0 -526
- data/ext/abc/src/aig/aig/aigUtil.c +0 -1575
- data/ext/abc/src/aig/aig/aigWin.c +0 -189
- data/ext/abc/src/aig/aig/aig_.c +0 -53
- data/ext/abc/src/aig/aig/module.make +0 -31
- data/ext/abc/src/aig/gia/gia.c +0 -52
- data/ext/abc/src/aig/gia/gia.h +0 -1667
- data/ext/abc/src/aig/gia/giaAgi.c +0 -238
- data/ext/abc/src/aig/gia/giaAig.c +0 -676
- data/ext/abc/src/aig/gia/giaAig.h +0 -78
- data/ext/abc/src/aig/gia/giaAiger.c +0 -1479
- data/ext/abc/src/aig/gia/giaAigerExt.c +0 -326
- data/ext/abc/src/aig/gia/giaBalAig.c +0 -1095
- data/ext/abc/src/aig/gia/giaBalLut.c +0 -982
- data/ext/abc/src/aig/gia/giaBalMap.c +0 -326
- data/ext/abc/src/aig/gia/giaBidec.c +0 -305
- data/ext/abc/src/aig/gia/giaCCof.c +0 -349
- data/ext/abc/src/aig/gia/giaCSat.c +0 -1105
- data/ext/abc/src/aig/gia/giaCSatOld.c +0 -804
- data/ext/abc/src/aig/gia/giaCTas.c +0 -1790
- data/ext/abc/src/aig/gia/giaCTas2.c +0 -208
- data/ext/abc/src/aig/gia/giaCex.c +0 -392
- data/ext/abc/src/aig/gia/giaClp.c +0 -422
- data/ext/abc/src/aig/gia/giaCof.c +0 -1002
- data/ext/abc/src/aig/gia/giaCone.c +0 -590
- data/ext/abc/src/aig/gia/giaConstr.c +0 -52
- data/ext/abc/src/aig/gia/giaCut.c +0 -646
- data/ext/abc/src/aig/gia/giaDfs.c +0 -582
- data/ext/abc/src/aig/gia/giaDup.c +0 -4791
- data/ext/abc/src/aig/gia/giaEdge.c +0 -1000
- data/ext/abc/src/aig/gia/giaEmbed.c +0 -1876
- data/ext/abc/src/aig/gia/giaEnable.c +0 -650
- data/ext/abc/src/aig/gia/giaEquiv.c +0 -2416
- data/ext/abc/src/aig/gia/giaEra.c +0 -602
- data/ext/abc/src/aig/gia/giaEra2.c +0 -1963
- data/ext/abc/src/aig/gia/giaEsop.c +0 -541
- data/ext/abc/src/aig/gia/giaFalse.c +0 -552
- data/ext/abc/src/aig/gia/giaFanout.c +0 -338
- data/ext/abc/src/aig/gia/giaForce.c +0 -1106
- data/ext/abc/src/aig/gia/giaFrames.c +0 -996
- data/ext/abc/src/aig/gia/giaFront.c +0 -295
- data/ext/abc/src/aig/gia/giaFx.c +0 -487
- data/ext/abc/src/aig/gia/giaGiarf.c +0 -1079
- data/ext/abc/src/aig/gia/giaGig.c +0 -506
- data/ext/abc/src/aig/gia/giaGlitch.c +0 -786
- data/ext/abc/src/aig/gia/giaHash.c +0 -816
- data/ext/abc/src/aig/gia/giaHcd.c +0 -689
- data/ext/abc/src/aig/gia/giaIf.c +0 -2536
- data/ext/abc/src/aig/gia/giaIff.c +0 -444
- data/ext/abc/src/aig/gia/giaIiff.c +0 -62
- data/ext/abc/src/aig/gia/giaIiff.h +0 -54
- data/ext/abc/src/aig/gia/giaIso.c +0 -1331
- data/ext/abc/src/aig/gia/giaIso2.c +0 -776
- data/ext/abc/src/aig/gia/giaIso3.c +0 -167
- data/ext/abc/src/aig/gia/giaJf.c +0 -1805
- data/ext/abc/src/aig/gia/giaKf.c +0 -1341
- data/ext/abc/src/aig/gia/giaLf.c +0 -2301
- data/ext/abc/src/aig/gia/giaMan.c +0 -1126
- data/ext/abc/src/aig/gia/giaMem.c +0 -598
- data/ext/abc/src/aig/gia/giaMf.c +0 -1741
- data/ext/abc/src/aig/gia/giaMffc.c +0 -313
- data/ext/abc/src/aig/gia/giaMfs.c +0 -477
- data/ext/abc/src/aig/gia/giaMini.c +0 -574
- data/ext/abc/src/aig/gia/giaMuxes.c +0 -915
- data/ext/abc/src/aig/gia/giaNf.c +0 -2420
- data/ext/abc/src/aig/gia/giaOf.c +0 -1866
- data/ext/abc/src/aig/gia/giaPack.c +0 -207
- data/ext/abc/src/aig/gia/giaPat.c +0 -135
- data/ext/abc/src/aig/gia/giaPf.c +0 -1354
- data/ext/abc/src/aig/gia/giaProp.c +0 -176
- data/ext/abc/src/aig/gia/giaQbf.c +0 -701
- data/ext/abc/src/aig/gia/giaResub.c +0 -292
- data/ext/abc/src/aig/gia/giaRetime.c +0 -304
- data/ext/abc/src/aig/gia/giaRex.c +0 -545
- data/ext/abc/src/aig/gia/giaSat.c +0 -427
- data/ext/abc/src/aig/gia/giaSat3.c +0 -136
- data/ext/abc/src/aig/gia/giaSatEdge.c +0 -537
- data/ext/abc/src/aig/gia/giaSatLE.c +0 -1083
- data/ext/abc/src/aig/gia/giaSatLut.c +0 -1225
- data/ext/abc/src/aig/gia/giaSatMap.c +0 -554
- data/ext/abc/src/aig/gia/giaSatoko.c +0 -274
- data/ext/abc/src/aig/gia/giaScl.c +0 -300
- data/ext/abc/src/aig/gia/giaScript.c +0 -783
- data/ext/abc/src/aig/gia/giaShow.c +0 -1164
- data/ext/abc/src/aig/gia/giaShrink.c +0 -154
- data/ext/abc/src/aig/gia/giaShrink6.c +0 -492
- data/ext/abc/src/aig/gia/giaShrink7.c +0 -373
- data/ext/abc/src/aig/gia/giaSim.c +0 -905
- data/ext/abc/src/aig/gia/giaSim2.c +0 -706
- data/ext/abc/src/aig/gia/giaSort.c +0 -273
- data/ext/abc/src/aig/gia/giaSpeedup.c +0 -805
- data/ext/abc/src/aig/gia/giaSplit.c +0 -578
- data/ext/abc/src/aig/gia/giaStg.c +0 -528
- data/ext/abc/src/aig/gia/giaStr.c +0 -1865
- data/ext/abc/src/aig/gia/giaSupMin.c +0 -165
- data/ext/abc/src/aig/gia/giaSupp.c +0 -886
- data/ext/abc/src/aig/gia/giaSweep.c +0 -777
- data/ext/abc/src/aig/gia/giaSweeper.c +0 -1185
- data/ext/abc/src/aig/gia/giaSwitch.c +0 -829
- data/ext/abc/src/aig/gia/giaTim.c +0 -1017
- data/ext/abc/src/aig/gia/giaTis.c +0 -213
- data/ext/abc/src/aig/gia/giaTruth.c +0 -639
- data/ext/abc/src/aig/gia/giaTsim.c +0 -757
- data/ext/abc/src/aig/gia/giaUnate.c +0 -255
- data/ext/abc/src/aig/gia/giaUtil.c +0 -2136
- data/ext/abc/src/aig/gia/module.make +0 -89
- data/ext/abc/src/aig/hop/cudd2.c +0 -360
- data/ext/abc/src/aig/hop/cudd2.h +0 -86
- data/ext/abc/src/aig/hop/hop.h +0 -356
- data/ext/abc/src/aig/hop/hopBalance.c +0 -401
- data/ext/abc/src/aig/hop/hopCheck.c +0 -115
- data/ext/abc/src/aig/hop/hopDfs.c +0 -591
- data/ext/abc/src/aig/hop/hopMan.c +0 -169
- data/ext/abc/src/aig/hop/hopMem.c +0 -120
- data/ext/abc/src/aig/hop/hopObj.c +0 -277
- data/ext/abc/src/aig/hop/hopOper.c +0 -378
- data/ext/abc/src/aig/hop/hopTable.c +0 -232
- data/ext/abc/src/aig/hop/hopTruth.c +0 -274
- data/ext/abc/src/aig/hop/hopUtil.c +0 -578
- data/ext/abc/src/aig/hop/hop_.c +0 -53
- data/ext/abc/src/aig/hop/module.make +0 -10
- data/ext/abc/src/aig/ioa/ioa.h +0 -87
- data/ext/abc/src/aig/ioa/ioaReadAig.c +0 -465
- data/ext/abc/src/aig/ioa/ioaUtil.c +0 -146
- data/ext/abc/src/aig/ioa/ioaWriteAig.c +0 -599
- data/ext/abc/src/aig/ioa/module.make +0 -3
- data/ext/abc/src/aig/ivy/attr.h +0 -418
- data/ext/abc/src/aig/ivy/ivy.h +0 -562
- data/ext/abc/src/aig/ivy/ivyBalance.c +0 -414
- data/ext/abc/src/aig/ivy/ivyCanon.c +0 -149
- data/ext/abc/src/aig/ivy/ivyCheck.c +0 -278
- data/ext/abc/src/aig/ivy/ivyCut.c +0 -995
- data/ext/abc/src/aig/ivy/ivyCutTrav.c +0 -478
- data/ext/abc/src/aig/ivy/ivyDfs.c +0 -498
- data/ext/abc/src/aig/ivy/ivyDsd.c +0 -831
- data/ext/abc/src/aig/ivy/ivyFanout.c +0 -314
- data/ext/abc/src/aig/ivy/ivyFastMap.c +0 -1569
- data/ext/abc/src/aig/ivy/ivyFraig.c +0 -2972
- data/ext/abc/src/aig/ivy/ivyHaig.c +0 -535
- data/ext/abc/src/aig/ivy/ivyMan.c +0 -552
- data/ext/abc/src/aig/ivy/ivyMem.c +0 -121
- data/ext/abc/src/aig/ivy/ivyMulti.c +0 -312
- data/ext/abc/src/aig/ivy/ivyMulti8.c +0 -432
- data/ext/abc/src/aig/ivy/ivyObj.c +0 -481
- data/ext/abc/src/aig/ivy/ivyOper.c +0 -298
- data/ext/abc/src/aig/ivy/ivyResyn.c +0 -201
- data/ext/abc/src/aig/ivy/ivyRwr.c +0 -618
- data/ext/abc/src/aig/ivy/ivyRwrAlg.c +0 -413
- data/ext/abc/src/aig/ivy/ivySeq.c +0 -1142
- data/ext/abc/src/aig/ivy/ivyShow.c +0 -343
- data/ext/abc/src/aig/ivy/ivyTable.c +0 -272
- data/ext/abc/src/aig/ivy/ivyUtil.c +0 -824
- data/ext/abc/src/aig/ivy/ivy_.c +0 -53
- data/ext/abc/src/aig/ivy/module.make +0 -22
- data/ext/abc/src/aig/miniaig/abcOper.h +0 -249
- data/ext/abc/src/aig/miniaig/miniaig.h +0 -346
- data/ext/abc/src/aig/miniaig/minilut.h +0 -288
- data/ext/abc/src/aig/miniaig/module.make +0 -1
- data/ext/abc/src/aig/miniaig/ndr.h +0 -521
- data/ext/abc/src/aig/saig/module.make +0 -26
- data/ext/abc/src/aig/saig/saig.h +0 -200
- data/ext/abc/src/aig/saig/saigCone.c +0 -181
- data/ext/abc/src/aig/saig/saigConstr.c +0 -484
- data/ext/abc/src/aig/saig/saigConstr2.c +0 -1013
- data/ext/abc/src/aig/saig/saigDual.c +0 -240
- data/ext/abc/src/aig/saig/saigDup.c +0 -600
- data/ext/abc/src/aig/saig/saigGlaCba.c +0 -840
- data/ext/abc/src/aig/saig/saigGlaPba.c +0 -589
- data/ext/abc/src/aig/saig/saigGlaPba2.c +0 -558
- data/ext/abc/src/aig/saig/saigInd.c +0 -409
- data/ext/abc/src/aig/saig/saigIoa.c +0 -405
- data/ext/abc/src/aig/saig/saigIso.c +0 -628
- data/ext/abc/src/aig/saig/saigIsoFast.c +0 -353
- data/ext/abc/src/aig/saig/saigIsoSlow.c +0 -1224
- data/ext/abc/src/aig/saig/saigMiter.c +0 -1317
- data/ext/abc/src/aig/saig/saigOutDec.c +0 -205
- data/ext/abc/src/aig/saig/saigPhase.c +0 -1081
- data/ext/abc/src/aig/saig/saigRefSat.c +0 -986
- data/ext/abc/src/aig/saig/saigRetFwd.c +0 -248
- data/ext/abc/src/aig/saig/saigRetMin.c +0 -705
- data/ext/abc/src/aig/saig/saigRetStep.c +0 -236
- data/ext/abc/src/aig/saig/saigScl.c +0 -115
- data/ext/abc/src/aig/saig/saigSimFast.c +0 -451
- data/ext/abc/src/aig/saig/saigSimMv.c +0 -956
- data/ext/abc/src/aig/saig/saigSimSeq.c +0 -518
- data/ext/abc/src/aig/saig/saigStrSim.c +0 -976
- data/ext/abc/src/aig/saig/saigSwitch.c +0 -573
- data/ext/abc/src/aig/saig/saigSynch.c +0 -665
- data/ext/abc/src/aig/saig/saigTempor.c +0 -256
- data/ext/abc/src/aig/saig/saigTrans.c +0 -428
- data/ext/abc/src/aig/saig/saigUnfold2.c +0 -497
- data/ext/abc/src/aig/saig/saigWnd.c +0 -816
- data/ext/abc/src/aig/saig/saig_.c +0 -52
- data/ext/abc/src/base/abc/abc.h +0 -1064
- data/ext/abc/src/base/abc/abcAig.c +0 -1505
- data/ext/abc/src/base/abc/abcBarBuf.c +0 -513
- data/ext/abc/src/base/abc/abcBlifMv.c +0 -1167
- data/ext/abc/src/base/abc/abcCheck.c +0 -953
- data/ext/abc/src/base/abc/abcDfs.c +0 -1910
- data/ext/abc/src/base/abc/abcFanOrder.c +0 -652
- data/ext/abc/src/base/abc/abcFanio.c +0 -366
- data/ext/abc/src/base/abc/abcFunc.c +0 -1273
- data/ext/abc/src/base/abc/abcHie.c +0 -843
- data/ext/abc/src/base/abc/abcHieCec.c +0 -764
- data/ext/abc/src/base/abc/abcHieGia.c +0 -582
- data/ext/abc/src/base/abc/abcHieNew.c +0 -1635
- data/ext/abc/src/base/abc/abcInt.h +0 -60
- data/ext/abc/src/base/abc/abcLatch.c +0 -778
- data/ext/abc/src/base/abc/abcLib.c +0 -400
- data/ext/abc/src/base/abc/abcMinBase.c +0 -841
- data/ext/abc/src/base/abc/abcNames.c +0 -802
- data/ext/abc/src/base/abc/abcNetlist.c +0 -511
- data/ext/abc/src/base/abc/abcNtk.c +0 -2298
- data/ext/abc/src/base/abc/abcObj.c +0 -1075
- data/ext/abc/src/base/abc/abcRefs.c +0 -457
- data/ext/abc/src/base/abc/abcShow.c +0 -458
- data/ext/abc/src/base/abc/abcSop.c +0 -1356
- data/ext/abc/src/base/abc/abcUtil.c +0 -3269
- data/ext/abc/src/base/abc/abc_.c +0 -52
- data/ext/abc/src/base/abc/module.make +0 -23
- data/ext/abc/src/base/abci/abc.c +0 -44490
- data/ext/abc/src/base/abci/abcAttach.c +0 -409
- data/ext/abc/src/base/abci/abcAuto.c +0 -256
- data/ext/abc/src/base/abci/abcBalance.c +0 -629
- data/ext/abc/src/base/abci/abcBidec.c +0 -156
- data/ext/abc/src/base/abci/abcBm.c +0 -2050
- data/ext/abc/src/base/abci/abcBmc.c +0 -122
- data/ext/abc/src/base/abci/abcCas.c +0 -128
- data/ext/abc/src/base/abci/abcCascade.c +0 -1062
- data/ext/abc/src/base/abci/abcCollapse.c +0 -957
- data/ext/abc/src/base/abci/abcCut.c +0 -700
- data/ext/abc/src/base/abci/abcDar.c +0 -4807
- data/ext/abc/src/base/abci/abcDarUnfold2.c +0 -69
- data/ext/abc/src/base/abci/abcDebug.c +0 -213
- data/ext/abc/src/base/abci/abcDec.c +0 -666
- data/ext/abc/src/base/abci/abcDetect.c +0 -1264
- data/ext/abc/src/base/abci/abcDress.c +0 -214
- data/ext/abc/src/base/abci/abcDress2.c +0 -500
- data/ext/abc/src/base/abci/abcDress3.c +0 -320
- data/ext/abc/src/base/abci/abcDsd.c +0 -710
- data/ext/abc/src/base/abci/abcEco.c +0 -58
- data/ext/abc/src/base/abci/abcEspresso.c +0 -255
- data/ext/abc/src/base/abci/abcExact.c +0 -3024
- data/ext/abc/src/base/abci/abcExtract.c +0 -752
- data/ext/abc/src/base/abci/abcFlop.c +0 -40
- data/ext/abc/src/base/abci/abcFpga.c +0 -288
- data/ext/abc/src/base/abci/abcFpgaFast.c +0 -195
- data/ext/abc/src/base/abci/abcFraig.c +0 -816
- data/ext/abc/src/base/abci/abcFx.c +0 -1207
- data/ext/abc/src/base/abci/abcFxu.c +0 -292
- data/ext/abc/src/base/abci/abcGen.c +0 -830
- data/ext/abc/src/base/abci/abcHaig.c +0 -557
- data/ext/abc/src/base/abci/abcIf.c +0 -830
- data/ext/abc/src/base/abci/abcIfMux.c +0 -422
- data/ext/abc/src/base/abci/abcIfif.c +0 -349
- data/ext/abc/src/base/abci/abcIvy.c +0 -1149
- data/ext/abc/src/base/abci/abcLog.c +0 -242
- data/ext/abc/src/base/abci/abcLut.c +0 -793
- data/ext/abc/src/base/abci/abcLutmin.c +0 -785
- data/ext/abc/src/base/abci/abcMap.c +0 -1064
- data/ext/abc/src/base/abci/abcMeasure.c +0 -483
- data/ext/abc/src/base/abci/abcMerge.c +0 -358
- data/ext/abc/src/base/abci/abcMffc.c +0 -1252
- data/ext/abc/src/base/abci/abcMfs.c +0 -469
- data/ext/abc/src/base/abci/abcMini.c +0 -237
- data/ext/abc/src/base/abci/abcMiter.c +0 -1196
- data/ext/abc/src/base/abci/abcMulti.c +0 -660
- data/ext/abc/src/base/abci/abcMv.c +0 -381
- data/ext/abc/src/base/abci/abcNpn.c +0 -392
- data/ext/abc/src/base/abci/abcNpnSave.c +0 -740
- data/ext/abc/src/base/abci/abcNtbdd.c +0 -619
- data/ext/abc/src/base/abci/abcOdc.c +0 -1132
- data/ext/abc/src/base/abci/abcOrder.c +0 -136
- data/ext/abc/src/base/abci/abcPart.c +0 -1206
- data/ext/abc/src/base/abci/abcPlace.c +0 -260
- data/ext/abc/src/base/abci/abcPrint.c +0 -2008
- data/ext/abc/src/base/abci/abcProve.c +0 -354
- data/ext/abc/src/base/abci/abcQbf.c +0 -319
- data/ext/abc/src/base/abci/abcQuant.c +0 -436
- data/ext/abc/src/base/abci/abcReach.c +0 -327
- data/ext/abc/src/base/abci/abcRec3.c +0 -1433
- data/ext/abc/src/base/abci/abcReconv.c +0 -776
- data/ext/abc/src/base/abci/abcRefactor.c +0 -418
- data/ext/abc/src/base/abci/abcRenode.c +0 -326
- data/ext/abc/src/base/abci/abcReorder.c +0 -117
- data/ext/abc/src/base/abci/abcRestruct.c +0 -1511
- data/ext/abc/src/base/abci/abcResub.c +0 -1957
- data/ext/abc/src/base/abci/abcRewrite.c +0 -420
- data/ext/abc/src/base/abci/abcRpo.c +0 -442
- data/ext/abc/src/base/abci/abcRr.c +0 -1005
- data/ext/abc/src/base/abci/abcSat.c +0 -1020
- data/ext/abc/src/base/abci/abcSaucy.c +0 -3346
- data/ext/abc/src/base/abci/abcScorr.c +0 -454
- data/ext/abc/src/base/abci/abcSense.c +0 -216
- data/ext/abc/src/base/abci/abcSpeedup.c +0 -965
- data/ext/abc/src/base/abci/abcStrash.c +0 -848
- data/ext/abc/src/base/abci/abcSweep.c +0 -1030
- data/ext/abc/src/base/abci/abcSymm.c +0 -246
- data/ext/abc/src/base/abci/abcTim.c +0 -637
- data/ext/abc/src/base/abci/abcTiming.c +0 -1398
- data/ext/abc/src/base/abci/abcUnate.c +0 -178
- data/ext/abc/src/base/abci/abcUnreach.c +0 -366
- data/ext/abc/src/base/abci/abcVerify.c +0 -1109
- data/ext/abc/src/base/abci/abcXsim.c +0 -231
- data/ext/abc/src/base/abci/abciUnfold2.c +0 -186
- data/ext/abc/src/base/abci/fahout_cut.c +0 -358
- data/ext/abc/src/base/abci/module.make +0 -75
- data/ext/abc/src/base/acb/acb.c +0 -52
- data/ext/abc/src/base/acb/acb.h +0 -1038
- data/ext/abc/src/base/acb/acbAbc.c +0 -302
- data/ext/abc/src/base/acb/acbAig.c +0 -52
- data/ext/abc/src/base/acb/acbCom.c +0 -735
- data/ext/abc/src/base/acb/acbFunc.c +0 -56
- data/ext/abc/src/base/acb/acbMfs.c +0 -1644
- data/ext/abc/src/base/acb/acbPar.h +0 -70
- data/ext/abc/src/base/acb/acbPush.c +0 -372
- data/ext/abc/src/base/acb/acbSets.c +0 -54
- data/ext/abc/src/base/acb/acbSets.h +0 -61
- data/ext/abc/src/base/acb/acbUtil.c +0 -479
- data/ext/abc/src/base/acb/module.make +0 -8
- data/ext/abc/src/base/bac/bac.c +0 -52
- data/ext/abc/src/base/bac/bac.h +0 -1017
- data/ext/abc/src/base/bac/bacBac.c +0 -298
- data/ext/abc/src/base/bac/bacBlast.c +0 -587
- data/ext/abc/src/base/bac/bacCom.c +0 -728
- data/ext/abc/src/base/bac/bacLib.c +0 -52
- data/ext/abc/src/base/bac/bacNtk.c +0 -603
- data/ext/abc/src/base/bac/bacOper.c +0 -365
- data/ext/abc/src/base/bac/bacPrs.h +0 -363
- data/ext/abc/src/base/bac/bacPrsBuild.c +0 -356
- data/ext/abc/src/base/bac/bacPrsTrans.c +0 -211
- data/ext/abc/src/base/bac/bacPtr.c +0 -470
- data/ext/abc/src/base/bac/bacPtrAbc.c +0 -486
- data/ext/abc/src/base/bac/bacReadBlif.c +0 -453
- data/ext/abc/src/base/bac/bacReadSmt.c +0 -42
- data/ext/abc/src/base/bac/bacReadVer.c +0 -875
- data/ext/abc/src/base/bac/bacWriteBlif.c +0 -236
- data/ext/abc/src/base/bac/bacWriteSmt.c +0 -52
- data/ext/abc/src/base/bac/bacWriteVer.c +0 -703
- data/ext/abc/src/base/bac/module.make +0 -15
- data/ext/abc/src/base/cba/cba.c +0 -52
- data/ext/abc/src/base/cba/cba.h +0 -1024
- data/ext/abc/src/base/cba/cbaBlast.c +0 -1069
- data/ext/abc/src/base/cba/cbaCba.c +0 -58
- data/ext/abc/src/base/cba/cbaCom.c +0 -731
- data/ext/abc/src/base/cba/cbaNtk.c +0 -1183
- data/ext/abc/src/base/cba/cbaPrs.h +0 -520
- data/ext/abc/src/base/cba/cbaReadBlif.c +0 -646
- data/ext/abc/src/base/cba/cbaReadVer.c +0 -2182
- data/ext/abc/src/base/cba/cbaTypes.h +0 -169
- data/ext/abc/src/base/cba/cbaWriteBlif.c +0 -218
- data/ext/abc/src/base/cba/cbaWriteVer.c +0 -1016
- data/ext/abc/src/base/cba/module.make +0 -8
- data/ext/abc/src/base/cmd/cmd.c +0 -2611
- data/ext/abc/src/base/cmd/cmd.h +0 -81
- data/ext/abc/src/base/cmd/cmdAlias.c +0 -126
- data/ext/abc/src/base/cmd/cmdApi.c +0 -127
- data/ext/abc/src/base/cmd/cmdAuto.c +0 -684
- data/ext/abc/src/base/cmd/cmdFlag.c +0 -110
- data/ext/abc/src/base/cmd/cmdHist.c +0 -180
- data/ext/abc/src/base/cmd/cmdInt.h +0 -92
- data/ext/abc/src/base/cmd/cmdLoad.c +0 -209
- data/ext/abc/src/base/cmd/cmdPlugin.c +0 -773
- data/ext/abc/src/base/cmd/cmdStarter.c +0 -259
- data/ext/abc/src/base/cmd/cmdUtils.c +0 -756
- data/ext/abc/src/base/cmd/module.make +0 -10
- data/ext/abc/src/base/exor/exor.c +0 -958
- data/ext/abc/src/base/exor/exor.h +0 -189
- data/ext/abc/src/base/exor/exorBits.c +0 -425
- data/ext/abc/src/base/exor/exorCubes.c +0 -190
- data/ext/abc/src/base/exor/exorLink.c +0 -749
- data/ext/abc/src/base/exor/exorList.c +0 -1156
- data/ext/abc/src/base/exor/exorUtil.c +0 -228
- data/ext/abc/src/base/exor/module.make +0 -6
- data/ext/abc/src/base/io/io.c +0 -3157
- data/ext/abc/src/base/io/ioAbc.h +0 -172
- data/ext/abc/src/base/io/ioInt.h +0 -57
- data/ext/abc/src/base/io/ioJson.c +0 -270
- data/ext/abc/src/base/io/ioReadAiger.c +0 -599
- data/ext/abc/src/base/io/ioReadBaf.c +0 -177
- data/ext/abc/src/base/io/ioReadBblif.c +0 -348
- data/ext/abc/src/base/io/ioReadBench.c +0 -391
- data/ext/abc/src/base/io/ioReadBlif.c +0 -1707
- data/ext/abc/src/base/io/ioReadBlifAig.c +0 -1019
- data/ext/abc/src/base/io/ioReadBlifMv.c +0 -2363
- data/ext/abc/src/base/io/ioReadDsd.c +0 -313
- data/ext/abc/src/base/io/ioReadEdif.c +0 -240
- data/ext/abc/src/base/io/ioReadEqn.c +0 -244
- data/ext/abc/src/base/io/ioReadPla.c +0 -600
- data/ext/abc/src/base/io/ioReadPlaMo.c +0 -813
- data/ext/abc/src/base/io/ioReadVerilog.c +0 -102
- data/ext/abc/src/base/io/ioUtil.c +0 -871
- data/ext/abc/src/base/io/ioWriteAiger.c +0 -956
- data/ext/abc/src/base/io/ioWriteBaf.c +0 -173
- data/ext/abc/src/base/io/ioWriteBblif.c +0 -116
- data/ext/abc/src/base/io/ioWriteBench.c +0 -340
- data/ext/abc/src/base/io/ioWriteBlif.c +0 -1410
- data/ext/abc/src/base/io/ioWriteBlifMv.c +0 -476
- data/ext/abc/src/base/io/ioWriteBook.c +0 -998
- data/ext/abc/src/base/io/ioWriteCnf.c +0 -120
- data/ext/abc/src/base/io/ioWriteDot.c +0 -854
- data/ext/abc/src/base/io/ioWriteEqn.c +0 -257
- data/ext/abc/src/base/io/ioWriteGml.c +0 -121
- data/ext/abc/src/base/io/ioWriteList.c +0 -293
- data/ext/abc/src/base/io/ioWritePla.c +0 -460
- data/ext/abc/src/base/io/ioWriteSmv.c +0 -265
- data/ext/abc/src/base/io/ioWriteVerilog.c +0 -662
- data/ext/abc/src/base/io/module.make +0 -31
- data/ext/abc/src/base/main/abcapis.h +0 -106
- data/ext/abc/src/base/main/abcapis_old.h +0 -84
- data/ext/abc/src/base/main/libSupport.c +0 -211
- data/ext/abc/src/base/main/main.c +0 -12
- data/ext/abc/src/base/main/main.h +0 -171
- data/ext/abc/src/base/main/mainFrame.c +0 -742
- data/ext/abc/src/base/main/mainInit.c +0 -168
- data/ext/abc/src/base/main/mainInt.h +0 -207
- data/ext/abc/src/base/main/mainLib.c +0 -93
- data/ext/abc/src/base/main/mainMC.c +0 -203
- data/ext/abc/src/base/main/mainReal.c +0 -386
- data/ext/abc/src/base/main/mainUtils.c +0 -294
- data/ext/abc/src/base/main/module.make +0 -7
- data/ext/abc/src/base/pla/module.make +0 -7
- data/ext/abc/src/base/pla/pla.c +0 -52
- data/ext/abc/src/base/pla/pla.h +0 -297
- data/ext/abc/src/base/pla/plaCom.c +0 -507
- data/ext/abc/src/base/pla/plaFxch.c +0 -854
- data/ext/abc/src/base/pla/plaHash.c +0 -347
- data/ext/abc/src/base/pla/plaMan.c +0 -300
- data/ext/abc/src/base/pla/plaMerge.c +0 -55
- data/ext/abc/src/base/pla/plaRead.c +0 -224
- data/ext/abc/src/base/pla/plaSimple.c +0 -339
- data/ext/abc/src/base/pla/plaWrite.c +0 -112
- data/ext/abc/src/base/test/module.make +0 -1
- data/ext/abc/src/base/test/test.c +0 -70
- data/ext/abc/src/base/ver/module.make +0 -4
- data/ext/abc/src/base/ver/ver.h +0 -122
- data/ext/abc/src/base/ver/verCore.c +0 -3037
- data/ext/abc/src/base/ver/verFormula.c +0 -479
- data/ext/abc/src/base/ver/verParse.c +0 -131
- data/ext/abc/src/base/ver/verStream.c +0 -450
- data/ext/abc/src/base/ver/verWords.c +0 -53
- data/ext/abc/src/base/ver/ver_.c +0 -53
- data/ext/abc/src/base/wlc/module.make +0 -17
- data/ext/abc/src/base/wlc/wlc.c +0 -274
- data/ext/abc/src/base/wlc/wlc.h +0 -392
- data/ext/abc/src/base/wlc/wlcAbc.c +0 -275
- data/ext/abc/src/base/wlc/wlcAbs.c +0 -1912
- data/ext/abc/src/base/wlc/wlcAbs2.c +0 -410
- data/ext/abc/src/base/wlc/wlcBlast.c +0 -1692
- data/ext/abc/src/base/wlc/wlcCom.c +0 -1559
- data/ext/abc/src/base/wlc/wlcGraft.c +0 -573
- data/ext/abc/src/base/wlc/wlcJson.c +0 -54
- data/ext/abc/src/base/wlc/wlcNtk.c +0 -1268
- data/ext/abc/src/base/wlc/wlcPth.c +0 -173
- data/ext/abc/src/base/wlc/wlcReadSmt.c +0 -1784
- data/ext/abc/src/base/wlc/wlcReadVer.c +0 -1308
- data/ext/abc/src/base/wlc/wlcShow.c +0 -337
- data/ext/abc/src/base/wlc/wlcSim.c +0 -251
- data/ext/abc/src/base/wlc/wlcStdin.c +0 -255
- data/ext/abc/src/base/wlc/wlcUif.c +0 -290
- data/ext/abc/src/base/wlc/wlcWin.c +0 -166
- data/ext/abc/src/base/wlc/wlcWriteVer.c +0 -450
- data/ext/abc/src/bdd/bbr/bbr.h +0 -93
- data/ext/abc/src/bdd/bbr/bbrCex.c +0 -172
- data/ext/abc/src/bdd/bbr/bbrImage.c +0 -1327
- data/ext/abc/src/bdd/bbr/bbrNtbdd.c +0 -218
- data/ext/abc/src/bdd/bbr/bbrReach.c +0 -615
- data/ext/abc/src/bdd/bbr/bbr_.c +0 -52
- data/ext/abc/src/bdd/bbr/module.make +0 -4
- data/ext/abc/src/bdd/cas/cas.h +0 -66
- data/ext/abc/src/bdd/cas/casCore.c +0 -1265
- data/ext/abc/src/bdd/cas/casDec.c +0 -512
- data/ext/abc/src/bdd/cas/module.make +0 -3
- data/ext/abc/src/bdd/cudd/Makefile +0 -124
- data/ext/abc/src/bdd/cudd/cuBdd.make +0 -41
- data/ext/abc/src/bdd/cudd/cudd.h +0 -1054
- data/ext/abc/src/bdd/cudd/cudd.make +0 -42
- data/ext/abc/src/bdd/cudd/cuddAPI.c +0 -4444
- data/ext/abc/src/bdd/cudd/cuddAddAbs.c +0 -588
- data/ext/abc/src/bdd/cudd/cuddAddApply.c +0 -949
- data/ext/abc/src/bdd/cudd/cuddAddFind.c +0 -316
- data/ext/abc/src/bdd/cudd/cuddAddInv.c +0 -209
- data/ext/abc/src/bdd/cudd/cuddAddIte.c +0 -647
- data/ext/abc/src/bdd/cudd/cuddAddNeg.c +0 -296
- data/ext/abc/src/bdd/cudd/cuddAddWalsh.c +0 -399
- data/ext/abc/src/bdd/cudd/cuddAndAbs.c +0 -384
- data/ext/abc/src/bdd/cudd/cuddAnneal.c +0 -822
- data/ext/abc/src/bdd/cudd/cuddApa.c +0 -979
- data/ext/abc/src/bdd/cudd/cuddApprox.c +0 -2213
- data/ext/abc/src/bdd/cudd/cuddBddAbs.c +0 -725
- data/ext/abc/src/bdd/cudd/cuddBddCorr.c +0 -515
- data/ext/abc/src/bdd/cudd/cuddBddIte.c +0 -1328
- data/ext/abc/src/bdd/cudd/cuddBridge.c +0 -1021
- data/ext/abc/src/bdd/cudd/cuddCache.c +0 -1100
- data/ext/abc/src/bdd/cudd/cuddCheck.c +0 -887
- data/ext/abc/src/bdd/cudd/cuddClip.c +0 -566
- data/ext/abc/src/bdd/cudd/cuddCof.c +0 -335
- data/ext/abc/src/bdd/cudd/cuddCompose.c +0 -1760
- data/ext/abc/src/bdd/cudd/cuddDecomp.c +0 -2185
- data/ext/abc/src/bdd/cudd/cuddEssent.c +0 -1475
- data/ext/abc/src/bdd/cudd/cuddExact.c +0 -1028
- data/ext/abc/src/bdd/cudd/cuddExport.c +0 -1384
- data/ext/abc/src/bdd/cudd/cuddGenCof.c +0 -2175
- data/ext/abc/src/bdd/cudd/cuddGenetic.c +0 -957
- data/ext/abc/src/bdd/cudd/cuddGroup.c +0 -2173
- data/ext/abc/src/bdd/cudd/cuddHarwell.c +0 -576
- data/ext/abc/src/bdd/cudd/cuddInit.c +0 -319
- data/ext/abc/src/bdd/cudd/cuddInt.h +0 -1232
- data/ext/abc/src/bdd/cudd/cuddInteract.c +0 -437
- data/ext/abc/src/bdd/cudd/cuddLCache.c +0 -1465
- data/ext/abc/src/bdd/cudd/cuddLevelQ.c +0 -569
- data/ext/abc/src/bdd/cudd/cuddLinear.c +0 -1373
- data/ext/abc/src/bdd/cudd/cuddLiteral.c +0 -272
- data/ext/abc/src/bdd/cudd/cuddMatMult.c +0 -715
- data/ext/abc/src/bdd/cudd/cuddPriority.c +0 -2035
- data/ext/abc/src/bdd/cudd/cuddRead.c +0 -525
- data/ext/abc/src/bdd/cudd/cuddRef.c +0 -816
- data/ext/abc/src/bdd/cudd/cuddReorder.c +0 -2143
- data/ext/abc/src/bdd/cudd/cuddSat.c +0 -1338
- data/ext/abc/src/bdd/cudd/cuddSign.c +0 -326
- data/ext/abc/src/bdd/cudd/cuddSolve.c +0 -374
- data/ext/abc/src/bdd/cudd/cuddSplit.c +0 -694
- data/ext/abc/src/bdd/cudd/cuddSubsetHB.c +0 -1337
- data/ext/abc/src/bdd/cudd/cuddSubsetSP.c +0 -1657
- data/ext/abc/src/bdd/cudd/cuddSymmetry.c +0 -1706
- data/ext/abc/src/bdd/cudd/cuddTable.c +0 -3179
- data/ext/abc/src/bdd/cudd/cuddUtil.c +0 -3929
- data/ext/abc/src/bdd/cudd/cuddWindow.c +0 -1031
- data/ext/abc/src/bdd/cudd/cuddZddCount.c +0 -357
- data/ext/abc/src/bdd/cudd/cuddZddFuncs.c +0 -1638
- data/ext/abc/src/bdd/cudd/cuddZddGroup.c +0 -1344
- data/ext/abc/src/bdd/cudd/cuddZddIsop.c +0 -919
- data/ext/abc/src/bdd/cudd/cuddZddLin.c +0 -975
- data/ext/abc/src/bdd/cudd/cuddZddMisc.c +0 -286
- data/ext/abc/src/bdd/cudd/cuddZddPort.c +0 -389
- data/ext/abc/src/bdd/cudd/cuddZddReord.c +0 -1668
- data/ext/abc/src/bdd/cudd/cuddZddSetop.c +0 -1166
- data/ext/abc/src/bdd/cudd/cuddZddSymm.c +0 -1707
- data/ext/abc/src/bdd/cudd/cuddZddUtil.c +0 -1071
- data/ext/abc/src/bdd/cudd/license +0 -32
- data/ext/abc/src/bdd/cudd/module.make +0 -61
- data/ext/abc/src/bdd/cudd/r7x8.1.mat +0 -53
- data/ext/abc/src/bdd/cudd/r7x8.1.out +0 -377
- data/ext/abc/src/bdd/cudd/testcudd.c +0 -1073
- data/ext/abc/src/bdd/dsd/dsd.h +0 -134
- data/ext/abc/src/bdd/dsd/dsdApi.c +0 -102
- data/ext/abc/src/bdd/dsd/dsdCheck.c +0 -319
- data/ext/abc/src/bdd/dsd/dsdInt.h +0 -99
- data/ext/abc/src/bdd/dsd/dsdLocal.c +0 -342
- data/ext/abc/src/bdd/dsd/dsdMan.c +0 -119
- data/ext/abc/src/bdd/dsd/dsdProc.c +0 -1613
- data/ext/abc/src/bdd/dsd/dsdTree.c +0 -1181
- data/ext/abc/src/bdd/dsd/module.make +0 -6
- data/ext/abc/src/bdd/epd/epd.c +0 -1347
- data/ext/abc/src/bdd/epd/epd.h +0 -196
- data/ext/abc/src/bdd/epd/module.make +0 -1
- data/ext/abc/src/bdd/extrab/extraBdd.h +0 -317
- data/ext/abc/src/bdd/extrab/extraBddAuto.c +0 -1563
- data/ext/abc/src/bdd/extrab/extraBddCas.c +0 -1235
- data/ext/abc/src/bdd/extrab/extraBddImage.c +0 -1162
- data/ext/abc/src/bdd/extrab/extraBddKmap.c +0 -876
- data/ext/abc/src/bdd/extrab/extraBddMisc.c +0 -2591
- data/ext/abc/src/bdd/extrab/extraBddSymm.c +0 -1474
- data/ext/abc/src/bdd/extrab/extraBddThresh.c +0 -693
- data/ext/abc/src/bdd/extrab/extraBddTime.c +0 -660
- data/ext/abc/src/bdd/extrab/extraBddUnate.c +0 -646
- data/ext/abc/src/bdd/extrab/module.make +0 -9
- data/ext/abc/src/bdd/llb/llb.c +0 -52
- data/ext/abc/src/bdd/llb/llb.h +0 -96
- data/ext/abc/src/bdd/llb/llb1Cluster.c +0 -356
- data/ext/abc/src/bdd/llb/llb1Constr.c +0 -313
- data/ext/abc/src/bdd/llb/llb1Core.c +0 -222
- data/ext/abc/src/bdd/llb/llb1Group.c +0 -474
- data/ext/abc/src/bdd/llb/llb1Hint.c +0 -226
- data/ext/abc/src/bdd/llb/llb1Man.c +0 -218
- data/ext/abc/src/bdd/llb/llb1Matrix.c +0 -430
- data/ext/abc/src/bdd/llb/llb1Pivot.c +0 -254
- data/ext/abc/src/bdd/llb/llb1Reach.c +0 -904
- data/ext/abc/src/bdd/llb/llb1Sched.c +0 -257
- data/ext/abc/src/bdd/llb/llb2Bad.c +0 -138
- data/ext/abc/src/bdd/llb/llb2Core.c +0 -777
- data/ext/abc/src/bdd/llb/llb2Driver.c +0 -222
- data/ext/abc/src/bdd/llb/llb2Dump.c +0 -104
- data/ext/abc/src/bdd/llb/llb2Flow.c +0 -1376
- data/ext/abc/src/bdd/llb/llb2Image.c +0 -482
- data/ext/abc/src/bdd/llb/llb3Image.c +0 -1095
- data/ext/abc/src/bdd/llb/llb3Nonlin.c +0 -872
- data/ext/abc/src/bdd/llb/llb4Cex.c +0 -320
- data/ext/abc/src/bdd/llb/llb4Cluster.c +0 -452
- data/ext/abc/src/bdd/llb/llb4Image.c +0 -863
- data/ext/abc/src/bdd/llb/llb4Map.c +0 -123
- data/ext/abc/src/bdd/llb/llb4Nonlin.c +0 -1185
- data/ext/abc/src/bdd/llb/llb4Sweep.c +0 -589
- data/ext/abc/src/bdd/llb/llbInt.h +0 -212
- data/ext/abc/src/bdd/llb/module.make +0 -22
- data/ext/abc/src/bdd/mtr/module.make +0 -2
- data/ext/abc/src/bdd/mtr/mtr.h +0 -187
- data/ext/abc/src/bdd/mtr/mtrBasic.c +0 -453
- data/ext/abc/src/bdd/mtr/mtrGroup.c +0 -734
- data/ext/abc/src/bdd/mtr/mtrInt.h +0 -94
- data/ext/abc/src/bdd/reo/module.make +0 -8
- data/ext/abc/src/bdd/reo/reo.h +0 -234
- data/ext/abc/src/bdd/reo/reoApi.c +0 -294
- data/ext/abc/src/bdd/reo/reoCore.c +0 -441
- data/ext/abc/src/bdd/reo/reoProfile.c +0 -370
- data/ext/abc/src/bdd/reo/reoShuffle.c +0 -230
- data/ext/abc/src/bdd/reo/reoSift.c +0 -346
- data/ext/abc/src/bdd/reo/reoSwap.c +0 -905
- data/ext/abc/src/bdd/reo/reoTest.c +0 -256
- data/ext/abc/src/bdd/reo/reoTransfer.c +0 -206
- data/ext/abc/src/bdd/reo/reoUnits.c +0 -190
- data/ext/abc/src/bool/bdc/bdc.h +0 -98
- data/ext/abc/src/bool/bdc/bdcCore.c +0 -374
- data/ext/abc/src/bool/bdc/bdcDec.c +0 -751
- data/ext/abc/src/bool/bdc/bdcInt.h +0 -165
- data/ext/abc/src/bool/bdc/bdcSpfd.c +0 -1184
- data/ext/abc/src/bool/bdc/bdcTable.c +0 -134
- data/ext/abc/src/bool/bdc/bdc_.c +0 -54
- data/ext/abc/src/bool/bdc/module.make +0 -5
- data/ext/abc/src/bool/dec/dec.h +0 -725
- data/ext/abc/src/bool/dec/decAbc.c +0 -358
- data/ext/abc/src/bool/dec/decFactor.c +0 -403
- data/ext/abc/src/bool/dec/decMan.c +0 -88
- data/ext/abc/src/bool/dec/decPrint.c +0 -289
- data/ext/abc/src/bool/dec/decUtil.c +0 -148
- data/ext/abc/src/bool/dec/module.make +0 -5
- data/ext/abc/src/bool/deco/deco.h +0 -714
- data/ext/abc/src/bool/deco/module.make +0 -1
- data/ext/abc/src/bool/kit/cloud.c +0 -993
- data/ext/abc/src/bool/kit/cloud.h +0 -254
- data/ext/abc/src/bool/kit/kit.h +0 -655
- data/ext/abc/src/bool/kit/kitAig.c +0 -126
- data/ext/abc/src/bool/kit/kitBdd.c +0 -243
- data/ext/abc/src/bool/kit/kitCloud.c +0 -378
- data/ext/abc/src/bool/kit/kitDec.c +0 -343
- data/ext/abc/src/bool/kit/kitDsd.c +0 -3285
- data/ext/abc/src/bool/kit/kitFactor.c +0 -344
- data/ext/abc/src/bool/kit/kitGraph.c +0 -402
- data/ext/abc/src/bool/kit/kitHop.c +0 -200
- data/ext/abc/src/bool/kit/kitIsop.c +0 -365
- data/ext/abc/src/bool/kit/kitPerm.c +0 -357
- data/ext/abc/src/bool/kit/kitPla.c +0 -535
- data/ext/abc/src/bool/kit/kitSop.c +0 -579
- data/ext/abc/src/bool/kit/kitTruth.c +0 -2224
- data/ext/abc/src/bool/kit/kit_.c +0 -53
- data/ext/abc/src/bool/kit/module.make +0 -11
- data/ext/abc/src/bool/lucky/lucky.c +0 -705
- data/ext/abc/src/bool/lucky/lucky.h +0 -44
- data/ext/abc/src/bool/lucky/luckyFast16.c +0 -872
- data/ext/abc/src/bool/lucky/luckyFast6.c +0 -285
- data/ext/abc/src/bool/lucky/luckyInt.h +0 -136
- data/ext/abc/src/bool/lucky/luckyRead.c +0 -333
- data/ext/abc/src/bool/lucky/luckySimple.c +0 -307
- data/ext/abc/src/bool/lucky/luckySwap.c +0 -402
- data/ext/abc/src/bool/lucky/luckySwapIJ.c +0 -102
- data/ext/abc/src/bool/lucky/module.make +0 -7
- data/ext/abc/src/bool/rpo/literal.h +0 -297
- data/ext/abc/src/bool/rpo/module.make +0 -1
- data/ext/abc/src/bool/rpo/rpo.c +0 -383
- data/ext/abc/src/bool/rpo/rpo.h +0 -61
- data/ext/abc/src/bool/rsb/module.make +0 -2
- data/ext/abc/src/bool/rsb/rsb.h +0 -65
- data/ext/abc/src/bool/rsb/rsbDec6.c +0 -770
- data/ext/abc/src/bool/rsb/rsbInt.h +0 -84
- data/ext/abc/src/bool/rsb/rsbMan.c +0 -99
- data/ext/abc/src/demo.c +0 -181
- data/ext/abc/src/generic.c +0 -52
- data/ext/abc/src/generic.h +0 -63
- data/ext/abc/src/map/amap/amap.h +0 -97
- data/ext/abc/src/map/amap/amapCore.c +0 -110
- data/ext/abc/src/map/amap/amapGraph.c +0 -399
- data/ext/abc/src/map/amap/amapInt.h +0 -376
- data/ext/abc/src/map/amap/amapLib.c +0 -374
- data/ext/abc/src/map/amap/amapLiberty.c +0 -1103
- data/ext/abc/src/map/amap/amapMan.c +0 -104
- data/ext/abc/src/map/amap/amapMatch.c +0 -622
- data/ext/abc/src/map/amap/amapMerge.c +0 -541
- data/ext/abc/src/map/amap/amapOutput.c +0 -186
- data/ext/abc/src/map/amap/amapParse.c +0 -480
- data/ext/abc/src/map/amap/amapPerm.c +0 -380
- data/ext/abc/src/map/amap/amapRead.c +0 -494
- data/ext/abc/src/map/amap/amapRule.c +0 -462
- data/ext/abc/src/map/amap/amapUniq.c +0 -317
- data/ext/abc/src/map/amap/module.make +0 -13
- data/ext/abc/src/map/cov/cov.h +0 -109
- data/ext/abc/src/map/cov/covBuild.c +0 -544
- data/ext/abc/src/map/cov/covCore.c +0 -1030
- data/ext/abc/src/map/cov/covInt.h +0 -654
- data/ext/abc/src/map/cov/covMan.c +0 -149
- data/ext/abc/src/map/cov/covMinEsop.c +0 -304
- data/ext/abc/src/map/cov/covMinMan.c +0 -118
- data/ext/abc/src/map/cov/covMinSop.c +0 -620
- data/ext/abc/src/map/cov/covMinUtil.c +0 -343
- data/ext/abc/src/map/cov/covTest.c +0 -422
- data/ext/abc/src/map/cov/module.make +0 -7
- data/ext/abc/src/map/fpga/fpga.c +0 -288
- data/ext/abc/src/map/fpga/fpga.h +0 -175
- data/ext/abc/src/map/fpga/fpgaCore.c +0 -194
- data/ext/abc/src/map/fpga/fpgaCreate.c +0 -584
- data/ext/abc/src/map/fpga/fpgaCut.c +0 -1186
- data/ext/abc/src/map/fpga/fpgaCutUtils.c +0 -476
- data/ext/abc/src/map/fpga/fpgaFanout.c +0 -146
- data/ext/abc/src/map/fpga/fpgaGENERIC.c +0 -51
- data/ext/abc/src/map/fpga/fpgaInt.h +0 -389
- data/ext/abc/src/map/fpga/fpgaLib.c +0 -255
- data/ext/abc/src/map/fpga/fpgaMatch.c +0 -800
- data/ext/abc/src/map/fpga/fpgaSwitch.c +0 -156
- data/ext/abc/src/map/fpga/fpgaTime.c +0 -267
- data/ext/abc/src/map/fpga/fpgaTruth.c +0 -171
- data/ext/abc/src/map/fpga/fpgaUtils.c +0 -990
- data/ext/abc/src/map/fpga/fpgaVec.c +0 -413
- data/ext/abc/src/map/fpga/module.make +0 -13
- data/ext/abc/src/map/if/if.h +0 -689
- data/ext/abc/src/map/if/ifCache.c +0 -100
- data/ext/abc/src/map/if/ifCheck.c +0 -204
- data/ext/abc/src/map/if/ifCom.c +0 -372
- data/ext/abc/src/map/if/ifCore.c +0 -200
- data/ext/abc/src/map/if/ifCount.h +0 -521
- data/ext/abc/src/map/if/ifCut.c +0 -1479
- data/ext/abc/src/map/if/ifData2.c +0 -52
- data/ext/abc/src/map/if/ifDec07.c +0 -1125
- data/ext/abc/src/map/if/ifDec08.c +0 -507
- data/ext/abc/src/map/if/ifDec10.c +0 -506
- data/ext/abc/src/map/if/ifDec16.c +0 -2374
- data/ext/abc/src/map/if/ifDec75.c +0 -341
- data/ext/abc/src/map/if/ifDelay.c +0 -447
- data/ext/abc/src/map/if/ifDsd.c +0 -2838
- data/ext/abc/src/map/if/ifLibBox.c +0 -401
- data/ext/abc/src/map/if/ifLibLut.c +0 -505
- data/ext/abc/src/map/if/ifMan.c +0 -720
- data/ext/abc/src/map/if/ifMap.c +0 -680
- data/ext/abc/src/map/if/ifMatch2.c +0 -62
- data/ext/abc/src/map/if/ifReduce.c +0 -466
- data/ext/abc/src/map/if/ifSat.c +0 -548
- data/ext/abc/src/map/if/ifSelect.c +0 -601
- data/ext/abc/src/map/if/ifSeq.c +0 -397
- data/ext/abc/src/map/if/ifTest.c +0 -352
- data/ext/abc/src/map/if/ifTime.c +0 -525
- data/ext/abc/src/map/if/ifTruth.c +0 -339
- data/ext/abc/src/map/if/ifTune.c +0 -1452
- data/ext/abc/src/map/if/ifUtil.c +0 -632
- data/ext/abc/src/map/if/if_.c +0 -52
- data/ext/abc/src/map/if/module.make +0 -26
- data/ext/abc/src/map/mapper/mapper.c +0 -185
- data/ext/abc/src/map/mapper/mapper.h +0 -201
- data/ext/abc/src/map/mapper/mapperCanon.c +0 -277
- data/ext/abc/src/map/mapper/mapperCore.c +0 -231
- data/ext/abc/src/map/mapper/mapperCreate.c +0 -587
- data/ext/abc/src/map/mapper/mapperCut.c +0 -1178
- data/ext/abc/src/map/mapper/mapperCutUtils.c +0 -279
- data/ext/abc/src/map/mapper/mapperFanout.c +0 -146
- data/ext/abc/src/map/mapper/mapperInt.h +0 -469
- data/ext/abc/src/map/mapper/mapperLib.c +0 -258
- data/ext/abc/src/map/mapper/mapperMatch.c +0 -664
- data/ext/abc/src/map/mapper/mapperRefs.c +0 -540
- data/ext/abc/src/map/mapper/mapperSuper.c +0 -456
- data/ext/abc/src/map/mapper/mapperSwitch.c +0 -229
- data/ext/abc/src/map/mapper/mapperTable.c +0 -407
- data/ext/abc/src/map/mapper/mapperTime.c +0 -459
- data/ext/abc/src/map/mapper/mapperTree.c +0 -1042
- data/ext/abc/src/map/mapper/mapperTruth.c +0 -315
- data/ext/abc/src/map/mapper/mapperUtils.c +0 -898
- data/ext/abc/src/map/mapper/mapperVec.c +0 -344
- data/ext/abc/src/map/mapper/module.make +0 -17
- data/ext/abc/src/map/mio/exp.h +0 -343
- data/ext/abc/src/map/mio/mio.c +0 -728
- data/ext/abc/src/map/mio/mio.h +0 -242
- data/ext/abc/src/map/mio/mioApi.c +0 -254
- data/ext/abc/src/map/mio/mioForm.c +0 -307
- data/ext/abc/src/map/mio/mioFunc.c +0 -327
- data/ext/abc/src/map/mio/mioInt.h +0 -160
- data/ext/abc/src/map/mio/mioParse.c +0 -504
- data/ext/abc/src/map/mio/mioRead.c +0 -780
- data/ext/abc/src/map/mio/mioSop.c +0 -333
- data/ext/abc/src/map/mio/mioUtils.c +0 -1752
- data/ext/abc/src/map/mio/module.make +0 -7
- data/ext/abc/src/map/mpm/module.make +0 -11
- data/ext/abc/src/map/mpm/mpm.c +0 -55
- data/ext/abc/src/map/mpm/mpm.h +0 -98
- data/ext/abc/src/map/mpm/mpmAbc.c +0 -350
- data/ext/abc/src/map/mpm/mpmCore.c +0 -115
- data/ext/abc/src/map/mpm/mpmDsd.c +0 -1055
- data/ext/abc/src/map/mpm/mpmGates.c +0 -307
- data/ext/abc/src/map/mpm/mpmInt.h +0 -265
- data/ext/abc/src/map/mpm/mpmLib.c +0 -74
- data/ext/abc/src/map/mpm/mpmMan.c +0 -207
- data/ext/abc/src/map/mpm/mpmMap.c +0 -872
- data/ext/abc/src/map/mpm/mpmMig.c +0 -204
- data/ext/abc/src/map/mpm/mpmMig.h +0 -358
- data/ext/abc/src/map/mpm/mpmPre.c +0 -1029
- data/ext/abc/src/map/mpm/mpmTruth.c +0 -239
- data/ext/abc/src/map/mpm/mpmUtil.c +0 -52
- data/ext/abc/src/map/scl/module.make +0 -11
- data/ext/abc/src/map/scl/scl.c +0 -2042
- data/ext/abc/src/map/scl/scl.h +0 -58
- data/ext/abc/src/map/scl/sclBufSize.c +0 -518
- data/ext/abc/src/map/scl/sclBuffer.c +0 -1010
- data/ext/abc/src/map/scl/sclCon.h +0 -293
- data/ext/abc/src/map/scl/sclDnsize.c +0 -378
- data/ext/abc/src/map/scl/sclLib.h +0 -770
- data/ext/abc/src/map/scl/sclLibScl.c +0 -848
- data/ext/abc/src/map/scl/sclLibUtil.c +0 -1078
- data/ext/abc/src/map/scl/sclLiberty.c +0 -1697
- data/ext/abc/src/map/scl/sclLoad.c +0 -238
- data/ext/abc/src/map/scl/sclSize.c +0 -915
- data/ext/abc/src/map/scl/sclSize.h +0 -594
- data/ext/abc/src/map/scl/sclTime.h +0 -234
- data/ext/abc/src/map/scl/sclUpsize.c +0 -1045
- data/ext/abc/src/map/scl/sclUtil.c +0 -320
- data/ext/abc/src/map/super/module.make +0 -3
- data/ext/abc/src/map/super/super.c +0 -333
- data/ext/abc/src/map/super/super.h +0 -62
- data/ext/abc/src/map/super/superAnd.c +0 -701
- data/ext/abc/src/map/super/superGENERIC.c +0 -51
- data/ext/abc/src/map/super/superGate.c +0 -1473
- data/ext/abc/src/map/super/superInt.h +0 -64
- data/ext/abc/src/map/super/superWrite.c +0 -81
- data/ext/abc/src/misc/avl/avl.c +0 -621
- data/ext/abc/src/misc/avl/avl.doc +0 -166
- data/ext/abc/src/misc/avl/avl.h +0 -91
- data/ext/abc/src/misc/bar/bar.c +0 -193
- data/ext/abc/src/misc/bar/bar.h +0 -78
- data/ext/abc/src/misc/bar/module.make +0 -1
- data/ext/abc/src/misc/bbl/bblif.c +0 -1518
- data/ext/abc/src/misc/bbl/bblif.h +0 -285
- data/ext/abc/src/misc/bbl/module.make +0 -1
- data/ext/abc/src/misc/bzlib/CHANGES +0 -319
- data/ext/abc/src/misc/bzlib/LICENSE +0 -42
- data/ext/abc/src/misc/bzlib/blocksort.c +0 -1098
- data/ext/abc/src/misc/bzlib/bzip2.txt +0 -391
- data/ext/abc/src/misc/bzlib/bzlib.c +0 -1588
- data/ext/abc/src/misc/bzlib/bzlib.h +0 -287
- data/ext/abc/src/misc/bzlib/bzlib_private.h +0 -513
- data/ext/abc/src/misc/bzlib/compress.c +0 -677
- data/ext/abc/src/misc/bzlib/crctable.c +0 -109
- data/ext/abc/src/misc/bzlib/decompress.c +0 -631
- data/ext/abc/src/misc/bzlib/huffman.c +0 -210
- data/ext/abc/src/misc/bzlib/link.txt +0 -2
- data/ext/abc/src/misc/bzlib/manual.html +0 -2540
- data/ext/abc/src/misc/bzlib/module.make +0 -7
- data/ext/abc/src/misc/bzlib/randtable.c +0 -89
- data/ext/abc/src/misc/espresso/cofactor.c +0 -389
- data/ext/abc/src/misc/espresso/cols.c +0 -319
- data/ext/abc/src/misc/espresso/compl.c +0 -685
- data/ext/abc/src/misc/espresso/contain.c +0 -450
- data/ext/abc/src/misc/espresso/cubehack.c +0 -143
- data/ext/abc/src/misc/espresso/cubestr.c +0 -157
- data/ext/abc/src/misc/espresso/cvrin.c +0 -816
- data/ext/abc/src/misc/espresso/cvrm.c +0 -544
- data/ext/abc/src/misc/espresso/cvrmisc.c +0 -147
- data/ext/abc/src/misc/espresso/cvrout.c +0 -614
- data/ext/abc/src/misc/espresso/dominate.c +0 -103
- data/ext/abc/src/misc/espresso/equiv.c +0 -99
- data/ext/abc/src/misc/espresso/espresso.c +0 -144
- data/ext/abc/src/misc/espresso/espresso.h +0 -786
- data/ext/abc/src/misc/espresso/essen.c +0 -184
- data/ext/abc/src/misc/espresso/exact.c +0 -186
- data/ext/abc/src/misc/espresso/expand.c +0 -700
- data/ext/abc/src/misc/espresso/gasp.c +0 -233
- data/ext/abc/src/misc/espresso/gimpel.c +0 -112
- data/ext/abc/src/misc/espresso/globals.c +0 -81
- data/ext/abc/src/misc/espresso/hack.c +0 -646
- data/ext/abc/src/misc/espresso/indep.c +0 -139
- data/ext/abc/src/misc/espresso/irred.c +0 -445
- data/ext/abc/src/misc/espresso/main.c +0 -751
- data/ext/abc/src/misc/espresso/main.h +0 -122
- data/ext/abc/src/misc/espresso/map.c +0 -122
- data/ext/abc/src/misc/espresso/matrix.c +0 -579
- data/ext/abc/src/misc/espresso/mincov.c +0 -383
- data/ext/abc/src/misc/espresso/mincov.h +0 -11
- data/ext/abc/src/misc/espresso/mincov_int.h +0 -55
- data/ext/abc/src/misc/espresso/module.make +0 -39
- data/ext/abc/src/misc/espresso/opo.c +0 -629
- data/ext/abc/src/misc/espresso/pair.c +0 -685
- data/ext/abc/src/misc/espresso/part.c +0 -127
- data/ext/abc/src/misc/espresso/primes.c +0 -175
- data/ext/abc/src/misc/espresso/reduce.c +0 -263
- data/ext/abc/src/misc/espresso/rows.c +0 -319
- data/ext/abc/src/misc/espresso/set.c +0 -825
- data/ext/abc/src/misc/espresso/setc.c +0 -488
- data/ext/abc/src/misc/espresso/sharp.c +0 -252
- data/ext/abc/src/misc/espresso/sminterf.c +0 -49
- data/ext/abc/src/misc/espresso/solution.c +0 -119
- data/ext/abc/src/misc/espresso/sparse.c +0 -151
- data/ext/abc/src/misc/espresso/sparse.h +0 -143
- data/ext/abc/src/misc/espresso/sparse_int.h +0 -121
- data/ext/abc/src/misc/espresso/unate.c +0 -446
- data/ext/abc/src/misc/espresso/util_old.h +0 -309
- data/ext/abc/src/misc/espresso/verify.c +0 -198
- data/ext/abc/src/misc/extra/extra.h +0 -417
- data/ext/abc/src/misc/extra/extraUtilBitMatrix.c +0 -420
- data/ext/abc/src/misc/extra/extraUtilCanon.c +0 -691
- data/ext/abc/src/misc/extra/extraUtilCube.c +0 -279
- data/ext/abc/src/misc/extra/extraUtilDsd.c +0 -1271
- data/ext/abc/src/misc/extra/extraUtilEnum.c +0 -680
- data/ext/abc/src/misc/extra/extraUtilFile.c +0 -887
- data/ext/abc/src/misc/extra/extraUtilMemory.c +0 -628
- data/ext/abc/src/misc/extra/extraUtilMisc.c +0 -2580
- data/ext/abc/src/misc/extra/extraUtilPerm.c +0 -933
- data/ext/abc/src/misc/extra/extraUtilPrime.c +0 -602
- data/ext/abc/src/misc/extra/extraUtilProgress.c +0 -185
- data/ext/abc/src/misc/extra/extraUtilReader.c +0 -390
- data/ext/abc/src/misc/extra/extraUtilSupp.c +0 -532
- data/ext/abc/src/misc/extra/extraUtilTruth.c +0 -1153
- data/ext/abc/src/misc/extra/extraUtilUtil.c +0 -421
- data/ext/abc/src/misc/extra/extraZddTrunc.c +0 -338
- data/ext/abc/src/misc/extra/module.make +0 -14
- data/ext/abc/src/misc/hash/hash.h +0 -70
- data/ext/abc/src/misc/hash/hashFlt.h +0 -339
- data/ext/abc/src/misc/hash/hashGen.h +0 -367
- data/ext/abc/src/misc/hash/hashInt.h +0 -302
- data/ext/abc/src/misc/hash/hashPtr.h +0 -339
- data/ext/abc/src/misc/hash/module.make +0 -1
- data/ext/abc/src/misc/mem/mem.c +0 -605
- data/ext/abc/src/misc/mem/mem.h +0 -75
- data/ext/abc/src/misc/mem/mem2.h +0 -271
- data/ext/abc/src/misc/mem/module.make +0 -1
- data/ext/abc/src/misc/mvc/module.make +0 -15
- data/ext/abc/src/misc/mvc/mvc.c +0 -51
- data/ext/abc/src/misc/mvc/mvc.h +0 -739
- data/ext/abc/src/misc/mvc/mvcApi.c +0 -238
- data/ext/abc/src/misc/mvc/mvcCompare.c +0 -374
- data/ext/abc/src/misc/mvc/mvcContain.c +0 -178
- data/ext/abc/src/misc/mvc/mvcCover.c +0 -256
- data/ext/abc/src/misc/mvc/mvcCube.c +0 -180
- data/ext/abc/src/misc/mvc/mvcDivide.c +0 -442
- data/ext/abc/src/misc/mvc/mvcDivisor.c +0 -95
- data/ext/abc/src/misc/mvc/mvcList.c +0 -367
- data/ext/abc/src/misc/mvc/mvcLits.c +0 -350
- data/ext/abc/src/misc/mvc/mvcMan.c +0 -82
- data/ext/abc/src/misc/mvc/mvcOpAlg.c +0 -168
- data/ext/abc/src/misc/mvc/mvcOpBool.c +0 -156
- data/ext/abc/src/misc/mvc/mvcPrint.c +0 -225
- data/ext/abc/src/misc/mvc/mvcSort.c +0 -146
- data/ext/abc/src/misc/mvc/mvcUtils.c +0 -873
- data/ext/abc/src/misc/nm/module.make +0 -2
- data/ext/abc/src/misc/nm/nm.h +0 -96
- data/ext/abc/src/misc/nm/nmApi.c +0 -278
- data/ext/abc/src/misc/nm/nmInt.h +0 -94
- data/ext/abc/src/misc/nm/nmTable.c +0 -310
- data/ext/abc/src/misc/parse/module.make +0 -2
- data/ext/abc/src/misc/parse/parse.h +0 -62
- data/ext/abc/src/misc/parse/parseCore.c +0 -536
- data/ext/abc/src/misc/parse/parseEqn.c +0 -362
- data/ext/abc/src/misc/parse/parseInt.h +0 -77
- data/ext/abc/src/misc/parse/parseStack.c +0 -248
- data/ext/abc/src/misc/st/module.make +0 -2
- data/ext/abc/src/misc/st/st.c +0 -561
- data/ext/abc/src/misc/st/st.h +0 -121
- data/ext/abc/src/misc/st/stmm.c +0 -627
- data/ext/abc/src/misc/st/stmm.h +0 -147
- data/ext/abc/src/misc/tim/module.make +0 -5
- data/ext/abc/src/misc/tim/tim.c +0 -39
- data/ext/abc/src/misc/tim/tim.h +0 -184
- data/ext/abc/src/misc/tim/timBox.c +0 -326
- data/ext/abc/src/misc/tim/timDump.c +0 -201
- data/ext/abc/src/misc/tim/timInt.h +0 -148
- data/ext/abc/src/misc/tim/timMan.c +0 -807
- data/ext/abc/src/misc/tim/timTime.c +0 -267
- data/ext/abc/src/misc/tim/timTrav.c +0 -185
- data/ext/abc/src/misc/util/abc_global.h +0 -416
- data/ext/abc/src/misc/util/abc_namespaces.h +0 -58
- data/ext/abc/src/misc/util/module.make +0 -8
- data/ext/abc/src/misc/util/utilBridge.c +0 -564
- data/ext/abc/src/misc/util/utilCex.c +0 -574
- data/ext/abc/src/misc/util/utilCex.h +0 -84
- data/ext/abc/src/misc/util/utilColor.c +0 -124
- data/ext/abc/src/misc/util/utilDouble.h +0 -222
- data/ext/abc/src/misc/util/utilFile.c +0 -221
- data/ext/abc/src/misc/util/utilFloat.h +0 -226
- data/ext/abc/src/misc/util/utilIsop.c +0 -1139
- data/ext/abc/src/misc/util/utilMem.c +0 -341
- data/ext/abc/src/misc/util/utilMem.h +0 -73
- data/ext/abc/src/misc/util/utilNam.c +0 -622
- data/ext/abc/src/misc/util/utilNam.h +0 -80
- data/ext/abc/src/misc/util/utilSignal.c +0 -68
- data/ext/abc/src/misc/util/utilSignal.h +0 -58
- data/ext/abc/src/misc/util/utilSort.c +0 -789
- data/ext/abc/src/misc/util/utilTruth.h +0 -3076
- data/ext/abc/src/misc/util/util_hack.h +0 -46
- data/ext/abc/src/misc/vec/module.make +0 -1
- data/ext/abc/src/misc/vec/vec.h +0 -74
- data/ext/abc/src/misc/vec/vecAtt.h +0 -298
- data/ext/abc/src/misc/vec/vecBit.h +0 -636
- data/ext/abc/src/misc/vec/vecFlt.h +0 -826
- data/ext/abc/src/misc/vec/vecHash.h +0 -280
- data/ext/abc/src/misc/vec/vecHsh.h +0 -590
- data/ext/abc/src/misc/vec/vecInt.h +0 -2078
- data/ext/abc/src/misc/vec/vecMem.h +0 -431
- data/ext/abc/src/misc/vec/vecPtr.h +0 -1160
- data/ext/abc/src/misc/vec/vecQue.h +0 -374
- data/ext/abc/src/misc/vec/vecSet.h +0 -299
- data/ext/abc/src/misc/vec/vecStr.h +0 -1072
- data/ext/abc/src/misc/vec/vecVec.h +0 -646
- data/ext/abc/src/misc/vec/vecWec.h +0 -738
- data/ext/abc/src/misc/vec/vecWrd.h +0 -1205
- data/ext/abc/src/misc/zlib/README +0 -115
- data/ext/abc/src/misc/zlib/adler32.c +0 -168
- data/ext/abc/src/misc/zlib/algorithm.txt +0 -209
- data/ext/abc/src/misc/zlib/compress_.c +0 -76
- data/ext/abc/src/misc/zlib/crc32.c +0 -433
- data/ext/abc/src/misc/zlib/crc32.h +0 -445
- data/ext/abc/src/misc/zlib/deflate.c +0 -1784
- data/ext/abc/src/misc/zlib/deflate.h +0 -346
- data/ext/abc/src/misc/zlib/gzclose.c +0 -33
- data/ext/abc/src/misc/zlib/gzguts.h +0 -147
- data/ext/abc/src/misc/zlib/gzlib.c +0 -517
- data/ext/abc/src/misc/zlib/gzread.c +0 -641
- data/ext/abc/src/misc/zlib/gzwrite.c +0 -520
- data/ext/abc/src/misc/zlib/infback.c +0 -631
- data/ext/abc/src/misc/zlib/inffast.c +0 -351
- data/ext/abc/src/misc/zlib/inffast.h +0 -15
- data/ext/abc/src/misc/zlib/inffixed.h +0 -98
- data/ext/abc/src/misc/zlib/inflate.c +0 -1457
- data/ext/abc/src/misc/zlib/inflate.h +0 -126
- data/ext/abc/src/misc/zlib/inftrees.c +0 -337
- data/ext/abc/src/misc/zlib/inftrees.h +0 -66
- data/ext/abc/src/misc/zlib/license +0 -31
- data/ext/abc/src/misc/zlib/link.txt +0 -1
- data/ext/abc/src/misc/zlib/module.make +0 -15
- data/ext/abc/src/misc/zlib/trees.c +0 -1216
- data/ext/abc/src/misc/zlib/trees.h +0 -132
- data/ext/abc/src/misc/zlib/uncompr.c +0 -67
- data/ext/abc/src/misc/zlib/zconf.h +0 -432
- data/ext/abc/src/misc/zlib/zlib.h +0 -1619
- data/ext/abc/src/misc/zlib/zutil.c +0 -318
- data/ext/abc/src/misc/zlib/zutil.h +0 -288
- data/ext/abc/src/opt/cgt/cgt.h +0 -87
- data/ext/abc/src/opt/cgt/cgtAig.c +0 -601
- data/ext/abc/src/opt/cgt/cgtCore.c +0 -328
- data/ext/abc/src/opt/cgt/cgtDecide.c +0 -300
- data/ext/abc/src/opt/cgt/cgtInt.h +0 -123
- data/ext/abc/src/opt/cgt/cgtMan.c +0 -179
- data/ext/abc/src/opt/cgt/cgtSat.c +0 -98
- data/ext/abc/src/opt/cgt/module.make +0 -5
- data/ext/abc/src/opt/csw/csw.h +0 -69
- data/ext/abc/src/opt/csw/cswCore.c +0 -100
- data/ext/abc/src/opt/csw/cswCut.c +0 -608
- data/ext/abc/src/opt/csw/cswInt.h +0 -160
- data/ext/abc/src/opt/csw/cswMan.c +0 -130
- data/ext/abc/src/opt/csw/cswTable.c +0 -166
- data/ext/abc/src/opt/csw/csw_.c +0 -53
- data/ext/abc/src/opt/csw/module.make +0 -4
- data/ext/abc/src/opt/cut/abcCut.c +0 -498
- data/ext/abc/src/opt/cut/cut.h +0 -172
- data/ext/abc/src/opt/cut/cutApi.c +0 -202
- data/ext/abc/src/opt/cut/cutCut.c +0 -364
- data/ext/abc/src/opt/cut/cutExpand.c +0 -189
- data/ext/abc/src/opt/cut/cutInt.h +0 -165
- data/ext/abc/src/opt/cut/cutList.h +0 -215
- data/ext/abc/src/opt/cut/cutMan.c +0 -320
- data/ext/abc/src/opt/cut/cutMerge.c +0 -662
- data/ext/abc/src/opt/cut/cutNode.c +0 -1004
- data/ext/abc/src/opt/cut/cutOracle.c +0 -424
- data/ext/abc/src/opt/cut/cutPre22.c +0 -994
- data/ext/abc/src/opt/cut/cutSeq.c +0 -232
- data/ext/abc/src/opt/cut/cutTruth.c +0 -232
- data/ext/abc/src/opt/cut/module.make +0 -9
- data/ext/abc/src/opt/dar/dar.h +0 -116
- data/ext/abc/src/opt/dar/darBalance.c +0 -761
- data/ext/abc/src/opt/dar/darCore.c +0 -348
- data/ext/abc/src/opt/dar/darCut.c +0 -837
- data/ext/abc/src/opt/dar/darData.c +0 -11294
- data/ext/abc/src/opt/dar/darInt.h +0 -169
- data/ext/abc/src/opt/dar/darLib.c +0 -1341
- data/ext/abc/src/opt/dar/darMan.c +0 -174
- data/ext/abc/src/opt/dar/darPrec.c +0 -394
- data/ext/abc/src/opt/dar/darRefact.c +0 -639
- data/ext/abc/src/opt/dar/darResub.c +0 -53
- data/ext/abc/src/opt/dar/darScript.c +0 -911
- data/ext/abc/src/opt/dar/dar_.c +0 -53
- data/ext/abc/src/opt/dar/module.make +0 -9
- data/ext/abc/src/opt/dau/dau.c +0 -53
- data/ext/abc/src/opt/dau/dau.h +0 -125
- data/ext/abc/src/opt/dau/dauArray.c +0 -257
- data/ext/abc/src/opt/dau/dauCanon.c +0 -1202
- data/ext/abc/src/opt/dau/dauCore.c +0 -112
- data/ext/abc/src/opt/dau/dauDivs.c +0 -111
- data/ext/abc/src/opt/dau/dauDsd.c +0 -2098
- data/ext/abc/src/opt/dau/dauDsd2.c +0 -660
- data/ext/abc/src/opt/dau/dauEnum.c +0 -253
- data/ext/abc/src/opt/dau/dauGia.c +0 -573
- data/ext/abc/src/opt/dau/dauInt.h +0 -70
- data/ext/abc/src/opt/dau/dauMerge.c +0 -824
- data/ext/abc/src/opt/dau/dauNonDsd.c +0 -903
- data/ext/abc/src/opt/dau/dauTree.c +0 -2022
- data/ext/abc/src/opt/dau/module.make +0 -9
- data/ext/abc/src/opt/dsc/dsc.c +0 -525
- data/ext/abc/src/opt/dsc/dsc.h +0 -91
- data/ext/abc/src/opt/dsc/module.make +0 -1
- data/ext/abc/src/opt/fret/fretFlow.c +0 -700
- data/ext/abc/src/opt/fret/fretInit.c +0 -1343
- data/ext/abc/src/opt/fret/fretMain.c +0 -1383
- data/ext/abc/src/opt/fret/fretTime.c +0 -766
- data/ext/abc/src/opt/fret/fretime.h +0 -212
- data/ext/abc/src/opt/fret/module.make +0 -5
- data/ext/abc/src/opt/fsim/fsim.h +0 -101
- data/ext/abc/src/opt/fsim/fsimCore.c +0 -88
- data/ext/abc/src/opt/fsim/fsimFront.c +0 -369
- data/ext/abc/src/opt/fsim/fsimInt.h +0 -138
- data/ext/abc/src/opt/fsim/fsimMan.c +0 -212
- data/ext/abc/src/opt/fsim/fsimSim.c +0 -569
- data/ext/abc/src/opt/fsim/fsimSwitch.c +0 -40
- data/ext/abc/src/opt/fsim/fsimTsim.c +0 -416
- data/ext/abc/src/opt/fsim/module.make +0 -6
- data/ext/abc/src/opt/fxch/Fxch.c +0 -266
- data/ext/abc/src/opt/fxch/Fxch.h +0 -229
- data/ext/abc/src/opt/fxch/FxchDiv.c +0 -485
- data/ext/abc/src/opt/fxch/FxchMan.c +0 -785
- data/ext/abc/src/opt/fxch/FxchSCHashTable.c +0 -382
- data/ext/abc/src/opt/fxch/module.make +0 -4
- data/ext/abc/src/opt/fxu/fxu.c +0 -260
- data/ext/abc/src/opt/fxu/fxu.h +0 -97
- data/ext/abc/src/opt/fxu/fxuCreate.c +0 -447
- data/ext/abc/src/opt/fxu/fxuHeapD.c +0 -450
- data/ext/abc/src/opt/fxu/fxuHeapS.c +0 -449
- data/ext/abc/src/opt/fxu/fxuInt.h +0 -545
- data/ext/abc/src/opt/fxu/fxuList.c +0 -527
- data/ext/abc/src/opt/fxu/fxuMatrix.c +0 -377
- data/ext/abc/src/opt/fxu/fxuPair.c +0 -560
- data/ext/abc/src/opt/fxu/fxuPrint.c +0 -202
- data/ext/abc/src/opt/fxu/fxuReduce.c +0 -213
- data/ext/abc/src/opt/fxu/fxuSelect.c +0 -608
- data/ext/abc/src/opt/fxu/fxuSingle.c +0 -289
- data/ext/abc/src/opt/fxu/fxuUpdate.c +0 -811
- data/ext/abc/src/opt/fxu/module.make +0 -12
- data/ext/abc/src/opt/lpk/lpk.h +0 -88
- data/ext/abc/src/opt/lpk/lpkAbcDec.c +0 -294
- data/ext/abc/src/opt/lpk/lpkAbcDsd.c +0 -617
- data/ext/abc/src/opt/lpk/lpkAbcMux.c +0 -240
- data/ext/abc/src/opt/lpk/lpkAbcUtil.c +0 -249
- data/ext/abc/src/opt/lpk/lpkCore.c +0 -694
- data/ext/abc/src/opt/lpk/lpkCut.c +0 -689
- data/ext/abc/src/opt/lpk/lpkInt.h +0 -250
- data/ext/abc/src/opt/lpk/lpkMan.c +0 -127
- data/ext/abc/src/opt/lpk/lpkMap.c +0 -210
- data/ext/abc/src/opt/lpk/lpkMulti.c +0 -513
- data/ext/abc/src/opt/lpk/lpkMux.c +0 -252
- data/ext/abc/src/opt/lpk/lpkSets.c +0 -445
- data/ext/abc/src/opt/lpk/lpk_.c +0 -53
- data/ext/abc/src/opt/lpk/module.make +0 -11
- data/ext/abc/src/opt/mfs/mfs.h +0 -89
- data/ext/abc/src/opt/mfs/mfsCore.c +0 -596
- data/ext/abc/src/opt/mfs/mfsCore_.c +0 -394
- data/ext/abc/src/opt/mfs/mfsDiv.c +0 -309
- data/ext/abc/src/opt/mfs/mfsGia.c +0 -301
- data/ext/abc/src/opt/mfs/mfsInt.h +0 -192
- data/ext/abc/src/opt/mfs/mfsInter.c +0 -398
- data/ext/abc/src/opt/mfs/mfsMan.c +0 -202
- data/ext/abc/src/opt/mfs/mfsResub.c +0 -622
- data/ext/abc/src/opt/mfs/mfsResub_.c +0 -567
- data/ext/abc/src/opt/mfs/mfsSat.c +0 -182
- data/ext/abc/src/opt/mfs/mfsStrash.c +0 -406
- data/ext/abc/src/opt/mfs/mfsWin.c +0 -117
- data/ext/abc/src/opt/mfs/mfs_.c +0 -52
- data/ext/abc/src/opt/mfs/module.make +0 -8
- data/ext/abc/src/opt/nwk/module.make +0 -14
- data/ext/abc/src/opt/nwk/ntlnwk.h +0 -113
- data/ext/abc/src/opt/nwk/nwk.h +0 -307
- data/ext/abc/src/opt/nwk/nwkAig.c +0 -299
- data/ext/abc/src/opt/nwk/nwkBidec.c +0 -177
- data/ext/abc/src/opt/nwk/nwkCheck.c +0 -76
- data/ext/abc/src/opt/nwk/nwkDfs.c +0 -664
- data/ext/abc/src/opt/nwk/nwkFanio.c +0 -320
- data/ext/abc/src/opt/nwk/nwkFlow.c +0 -606
- data/ext/abc/src/opt/nwk/nwkFlow_depth.c +0 -631
- data/ext/abc/src/opt/nwk/nwkMan.c +0 -278
- data/ext/abc/src/opt/nwk/nwkMap.c +0 -396
- data/ext/abc/src/opt/nwk/nwkMerge.c +0 -1046
- data/ext/abc/src/opt/nwk/nwkMerge.h +0 -153
- data/ext/abc/src/opt/nwk/nwkObj.c +0 -204
- data/ext/abc/src/opt/nwk/nwkSpeedup.c +0 -382
- data/ext/abc/src/opt/nwk/nwkStrash.c +0 -149
- data/ext/abc/src/opt/nwk/nwkTiming.c +0 -894
- data/ext/abc/src/opt/nwk/nwkUtil.c +0 -644
- data/ext/abc/src/opt/nwk/nwk_.c +0 -52
- data/ext/abc/src/opt/res/module.make +0 -7
- data/ext/abc/src/opt/res/res.h +0 -79
- data/ext/abc/src/opt/res/resCore.c +0 -427
- data/ext/abc/src/opt/res/resDivs.c +0 -290
- data/ext/abc/src/opt/res/resFilter.c +0 -439
- data/ext/abc/src/opt/res/resInt.h +0 -141
- data/ext/abc/src/opt/res/resSat.c +0 -414
- data/ext/abc/src/opt/res/resSim.c +0 -795
- data/ext/abc/src/opt/res/resSim_old.c +0 -526
- data/ext/abc/src/opt/res/resStrash.c +0 -122
- data/ext/abc/src/opt/res/resWin.c +0 -490
- data/ext/abc/src/opt/res/res_.c +0 -55
- data/ext/abc/src/opt/ret/module.make +0 -8
- data/ext/abc/src/opt/ret/retArea.c +0 -554
- data/ext/abc/src/opt/ret/retCore.c +0 -138
- data/ext/abc/src/opt/ret/retDelay.c +0 -315
- data/ext/abc/src/opt/ret/retFlow.c +0 -789
- data/ext/abc/src/opt/ret/retIncrem.c +0 -480
- data/ext/abc/src/opt/ret/retInit.c +0 -355
- data/ext/abc/src/opt/ret/retInt.h +0 -88
- data/ext/abc/src/opt/ret/retLvalue.c +0 -402
- data/ext/abc/src/opt/ret/ret_.c +0 -53
- data/ext/abc/src/opt/rwr/module.make +0 -7
- data/ext/abc/src/opt/rwr/rwr.h +0 -173
- data/ext/abc/src/opt/rwr/rwrDec.c +0 -155
- data/ext/abc/src/opt/rwr/rwrEva.c +0 -599
- data/ext/abc/src/opt/rwr/rwrExp.c +0 -336
- data/ext/abc/src/opt/rwr/rwrLib.c +0 -367
- data/ext/abc/src/opt/rwr/rwrMan.c +0 -323
- data/ext/abc/src/opt/rwr/rwrPrint.c +0 -271
- data/ext/abc/src/opt/rwr/rwrTemp.c +0 -126
- data/ext/abc/src/opt/rwr/rwrUtil.c +0 -661
- data/ext/abc/src/opt/rwt/module.make +0 -3
- data/ext/abc/src/opt/rwt/rwt.h +0 -165
- data/ext/abc/src/opt/rwt/rwtDec.c +0 -155
- data/ext/abc/src/opt/rwt/rwtMan.c +0 -363
- data/ext/abc/src/opt/rwt/rwtUtil.c +0 -663
- data/ext/abc/src/opt/sbd/module.make +0 -9
- data/ext/abc/src/opt/sbd/sbd.c +0 -122
- data/ext/abc/src/opt/sbd/sbd.h +0 -82
- data/ext/abc/src/opt/sbd/sbdCnf.c +0 -147
- data/ext/abc/src/opt/sbd/sbdCore.c +0 -2229
- data/ext/abc/src/opt/sbd/sbdCut.c +0 -872
- data/ext/abc/src/opt/sbd/sbdCut2.c +0 -431
- data/ext/abc/src/opt/sbd/sbdInt.h +0 -125
- data/ext/abc/src/opt/sbd/sbdLut.c +0 -311
- data/ext/abc/src/opt/sbd/sbdPath.c +0 -197
- data/ext/abc/src/opt/sbd/sbdSat.c +0 -793
- data/ext/abc/src/opt/sbd/sbdSim.c +0 -310
- data/ext/abc/src/opt/sbd/sbdWin.c +0 -464
- data/ext/abc/src/opt/sfm/module.make +0 -10
- data/ext/abc/src/opt/sfm/sfm.h +0 -107
- data/ext/abc/src/opt/sfm/sfmArea.c +0 -380
- data/ext/abc/src/opt/sfm/sfmCnf.c +0 -179
- data/ext/abc/src/opt/sfm/sfmCore.c +0 -306
- data/ext/abc/src/opt/sfm/sfmDec.c +0 -2168
- data/ext/abc/src/opt/sfm/sfmInt.h +0 -254
- data/ext/abc/src/opt/sfm/sfmLib.c +0 -766
- data/ext/abc/src/opt/sfm/sfmMit.c +0 -73
- data/ext/abc/src/opt/sfm/sfmNtk.c +0 -381
- data/ext/abc/src/opt/sfm/sfmSat.c +0 -273
- data/ext/abc/src/opt/sfm/sfmTim.c +0 -458
- data/ext/abc/src/opt/sfm/sfmWin.c +0 -481
- data/ext/abc/src/opt/sim/module.make +0 -9
- data/ext/abc/src/opt/sim/sim.h +0 -237
- data/ext/abc/src/opt/sim/simMan.c +0 -293
- data/ext/abc/src/opt/sim/simSat.c +0 -53
- data/ext/abc/src/opt/sim/simSeq.c +0 -176
- data/ext/abc/src/opt/sim/simSupp.c +0 -603
- data/ext/abc/src/opt/sim/simSwitch.c +0 -112
- data/ext/abc/src/opt/sim/simSym.c +0 -148
- data/ext/abc/src/opt/sim/simSymSat.c +0 -205
- data/ext/abc/src/opt/sim/simSymSim.c +0 -178
- data/ext/abc/src/opt/sim/simSymStr.c +0 -493
- data/ext/abc/src/opt/sim/simUtils.c +0 -718
- data/ext/abc/src/phys/place/Makefile +0 -30
- data/ext/abc/src/phys/place/README +0 -50
- data/ext/abc/src/phys/place/hpwl +0 -57
- data/ext/abc/src/phys/place/libhmetis.h +0 -39
- data/ext/abc/src/phys/place/module.make +0 -10
- data/ext/abc/src/phys/place/place_base.c +0 -350
- data/ext/abc/src/phys/place/place_base.h +0 -145
- data/ext/abc/src/phys/place/place_bin.c +0 -282
- data/ext/abc/src/phys/place/place_genqp.c +0 -314
- data/ext/abc/src/phys/place/place_gordian.c +0 -165
- data/ext/abc/src/phys/place/place_gordian.h +0 -86
- data/ext/abc/src/phys/place/place_inc.c +0 -111
- data/ext/abc/src/phys/place/place_io.c +0 -99
- data/ext/abc/src/phys/place/place_legalize.c +0 -28
- data/ext/abc/src/phys/place/place_pads.c +0 -146
- data/ext/abc/src/phys/place/place_partition.c +0 -1140
- data/ext/abc/src/phys/place/place_qpsolver.c +0 -1275
- data/ext/abc/src/phys/place/place_qpsolver.h +0 -139
- data/ext/abc/src/phys/place/place_test.c +0 -365
- data/ext/abc/src/proof/abs/abs.c +0 -52
- data/ext/abc/src/proof/abs/abs.h +0 -177
- data/ext/abc/src/proof/abs/absDup.c +0 -445
- data/ext/abc/src/proof/abs/absGla.c +0 -1901
- data/ext/abc/src/proof/abs/absGlaOld.c +0 -1956
- data/ext/abc/src/proof/abs/absIter.c +0 -148
- data/ext/abc/src/proof/abs/absOldCex.c +0 -873
- data/ext/abc/src/proof/abs/absOldRef.c +0 -474
- data/ext/abc/src/proof/abs/absOldSat.c +0 -986
- data/ext/abc/src/proof/abs/absOldSim.c +0 -477
- data/ext/abc/src/proof/abs/absOut.c +0 -458
- data/ext/abc/src/proof/abs/absPth.c +0 -205
- data/ext/abc/src/proof/abs/absRef.c +0 -751
- data/ext/abc/src/proof/abs/absRef.h +0 -129
- data/ext/abc/src/proof/abs/absRefJ.c +0 -916
- data/ext/abc/src/proof/abs/absRefJ.h +0 -67
- data/ext/abc/src/proof/abs/absRefSelect.c +0 -309
- data/ext/abc/src/proof/abs/absRpm.c +0 -874
- data/ext/abc/src/proof/abs/absRpmOld.c +0 -201
- data/ext/abc/src/proof/abs/absUtil.c +0 -257
- data/ext/abc/src/proof/abs/absVta.c +0 -1764
- data/ext/abc/src/proof/abs/module.make +0 -16
- data/ext/abc/src/proof/acec/acec.c +0 -52
- data/ext/abc/src/proof/acec/acec.h +0 -98
- data/ext/abc/src/proof/acec/acec2Mult.c +0 -1211
- data/ext/abc/src/proof/acec/acecBo.c +0 -216
- data/ext/abc/src/proof/acec/acecCl.c +0 -445
- data/ext/abc/src/proof/acec/acecCo.c +0 -429
- data/ext/abc/src/proof/acec/acecCore.c +0 -553
- data/ext/abc/src/proof/acec/acecCover.c +0 -263
- data/ext/abc/src/proof/acec/acecFadds.c +0 -1247
- data/ext/abc/src/proof/acec/acecInt.h +0 -105
- data/ext/abc/src/proof/acec/acecMult.c +0 -623
- data/ext/abc/src/proof/acec/acecNorm.c +0 -226
- data/ext/abc/src/proof/acec/acecOrder.c +0 -254
- data/ext/abc/src/proof/acec/acecPa.c +0 -277
- data/ext/abc/src/proof/acec/acecPo.c +0 -655
- data/ext/abc/src/proof/acec/acecPolyn.c +0 -445
- data/ext/abc/src/proof/acec/acecPool.c +0 -428
- data/ext/abc/src/proof/acec/acecRe.c +0 -602
- data/ext/abc/src/proof/acec/acecSt.c +0 -422
- data/ext/abc/src/proof/acec/acecStruct.c +0 -271
- data/ext/abc/src/proof/acec/acecTree.c +0 -783
- data/ext/abc/src/proof/acec/acecUtil.c +0 -122
- data/ext/abc/src/proof/acec/acecXor.c +0 -434
- data/ext/abc/src/proof/acec/module.make +0 -19
- data/ext/abc/src/proof/cec/cec.c +0 -53
- data/ext/abc/src/proof/cec/cec.h +0 -240
- data/ext/abc/src/proof/cec/cecCec.c +0 -580
- data/ext/abc/src/proof/cec/cecChoice.c +0 -410
- data/ext/abc/src/proof/cec/cecClass.c +0 -931
- data/ext/abc/src/proof/cec/cecCore.c +0 -554
- data/ext/abc/src/proof/cec/cecCorr.c +0 -1229
- data/ext/abc/src/proof/cec/cecInt.h +0 -227
- data/ext/abc/src/proof/cec/cecIso.c +0 -375
- data/ext/abc/src/proof/cec/cecMan.c +0 -297
- data/ext/abc/src/proof/cec/cecPat.c +0 -578
- data/ext/abc/src/proof/cec/cecSat.c +0 -1040
- data/ext/abc/src/proof/cec/cecSatG.c +0 -1048
- data/ext/abc/src/proof/cec/cecSeq.c +0 -449
- data/ext/abc/src/proof/cec/cecSim.c +0 -53
- data/ext/abc/src/proof/cec/cecSimBack.c +0 -194
- data/ext/abc/src/proof/cec/cecSolve.c +0 -1107
- data/ext/abc/src/proof/cec/cecSplit.c +0 -849
- data/ext/abc/src/proof/cec/cecSweep.c +0 -301
- data/ext/abc/src/proof/cec/cecSynth.c +0 -433
- data/ext/abc/src/proof/cec/module.make +0 -15
- data/ext/abc/src/proof/dch/dch.h +0 -91
- data/ext/abc/src/proof/dch/dchAig.c +0 -119
- data/ext/abc/src/proof/dch/dchChoice.c +0 -552
- data/ext/abc/src/proof/dch/dchClass.c +0 -611
- data/ext/abc/src/proof/dch/dchCnf.c +0 -334
- data/ext/abc/src/proof/dch/dchCore.c +0 -161
- data/ext/abc/src/proof/dch/dchInt.h +0 -170
- data/ext/abc/src/proof/dch/dchMan.c +0 -191
- data/ext/abc/src/proof/dch/dchSat.c +0 -167
- data/ext/abc/src/proof/dch/dchSim.c +0 -297
- data/ext/abc/src/proof/dch/dchSimSat.c +0 -260
- data/ext/abc/src/proof/dch/dchSweep.c +0 -146
- data/ext/abc/src/proof/dch/module.make +0 -10
- data/ext/abc/src/proof/fra/fra.h +0 -389
- data/ext/abc/src/proof/fra/fraBmc.c +0 -453
- data/ext/abc/src/proof/fra/fraCec.c +0 -574
- data/ext/abc/src/proof/fra/fraClass.c +0 -862
- data/ext/abc/src/proof/fra/fraClau.c +0 -745
- data/ext/abc/src/proof/fra/fraClaus.c +0 -1877
- data/ext/abc/src/proof/fra/fraCnf.c +0 -289
- data/ext/abc/src/proof/fra/fraCore.c +0 -490
- data/ext/abc/src/proof/fra/fraHot.c +0 -476
- data/ext/abc/src/proof/fra/fraImp.c +0 -732
- data/ext/abc/src/proof/fra/fraInd.c +0 -712
- data/ext/abc/src/proof/fra/fraIndVer.c +0 -166
- data/ext/abc/src/proof/fra/fraLcr.c +0 -708
- data/ext/abc/src/proof/fra/fraMan.c +0 -314
- data/ext/abc/src/proof/fra/fraPart.c +0 -269
- data/ext/abc/src/proof/fra/fraSat.c +0 -571
- data/ext/abc/src/proof/fra/fraSec.c +0 -693
- data/ext/abc/src/proof/fra/fraSim.c +0 -1173
- data/ext/abc/src/proof/fra/fra_.c +0 -53
- data/ext/abc/src/proof/fra/module.make +0 -17
- data/ext/abc/src/proof/fraig/fraig.h +0 -257
- data/ext/abc/src/proof/fraig/fraigApi.c +0 -299
- data/ext/abc/src/proof/fraig/fraigCanon.c +0 -223
- data/ext/abc/src/proof/fraig/fraigChoice.c +0 -246
- data/ext/abc/src/proof/fraig/fraigFanout.c +0 -180
- data/ext/abc/src/proof/fraig/fraigFeed.c +0 -914
- data/ext/abc/src/proof/fraig/fraigInt.h +0 -436
- data/ext/abc/src/proof/fraig/fraigMan.c +0 -546
- data/ext/abc/src/proof/fraig/fraigMem.c +0 -251
- data/ext/abc/src/proof/fraig/fraigNode.c +0 -319
- data/ext/abc/src/proof/fraig/fraigPrime.c +0 -113
- data/ext/abc/src/proof/fraig/fraigSat.c +0 -1463
- data/ext/abc/src/proof/fraig/fraigTable.c +0 -664
- data/ext/abc/src/proof/fraig/fraigUtil.c +0 -1039
- data/ext/abc/src/proof/fraig/fraigVec.c +0 -550
- data/ext/abc/src/proof/fraig/module.make +0 -12
- data/ext/abc/src/proof/int/int.h +0 -96
- data/ext/abc/src/proof/int/intCheck.c +0 -305
- data/ext/abc/src/proof/int/intContain.c +0 -341
- data/ext/abc/src/proof/int/intCore.c +0 -412
- data/ext/abc/src/proof/int/intCtrex.c +0 -168
- data/ext/abc/src/proof/int/intDup.c +0 -184
- data/ext/abc/src/proof/int/intFrames.c +0 -124
- data/ext/abc/src/proof/int/intInt.h +0 -143
- data/ext/abc/src/proof/int/intInter.c +0 -145
- data/ext/abc/src/proof/int/intM114.c +0 -323
- data/ext/abc/src/proof/int/intM114p.c +0 -443
- data/ext/abc/src/proof/int/intMan.c +0 -165
- data/ext/abc/src/proof/int/intUtil.c +0 -108
- data/ext/abc/src/proof/int/module.make +0 -10
- data/ext/abc/src/proof/int2/int2.h +0 -90
- data/ext/abc/src/proof/int2/int2Bmc.c +0 -355
- data/ext/abc/src/proof/int2/int2Core.c +0 -335
- data/ext/abc/src/proof/int2/int2Int.h +0 -164
- data/ext/abc/src/proof/int2/int2Refine.c +0 -154
- data/ext/abc/src/proof/int2/int2Util.c +0 -152
- data/ext/abc/src/proof/int2/module.make +0 -4
- data/ext/abc/src/proof/live/arenaViolation.c +0 -549
- data/ext/abc/src/proof/live/combination.c +0 -463
- data/ext/abc/src/proof/live/disjunctiveMonotone.c +0 -757
- data/ext/abc/src/proof/live/kLiveConstraints.c +0 -177
- data/ext/abc/src/proof/live/kliveness.c +0 -816
- data/ext/abc/src/proof/live/liveness.c +0 -2575
- data/ext/abc/src/proof/live/liveness_sim.c +0 -849
- data/ext/abc/src/proof/live/ltl_parser.c +0 -839
- data/ext/abc/src/proof/live/module.make +0 -9
- data/ext/abc/src/proof/live/monotone.c +0 -507
- data/ext/abc/src/proof/pdr/module.make +0 -10
- data/ext/abc/src/proof/pdr/pdr.c +0 -53
- data/ext/abc/src/proof/pdr/pdr.h +0 -109
- data/ext/abc/src/proof/pdr/pdrClass.c +0 -223
- data/ext/abc/src/proof/pdr/pdrCnf.c +0 -455
- data/ext/abc/src/proof/pdr/pdrCore.c +0 -1451
- data/ext/abc/src/proof/pdr/pdrIncr.c +0 -1046
- data/ext/abc/src/proof/pdr/pdrInt.h +0 -275
- data/ext/abc/src/proof/pdr/pdrInv.c +0 -985
- data/ext/abc/src/proof/pdr/pdrMan.c +0 -549
- data/ext/abc/src/proof/pdr/pdrSat.c +0 -395
- data/ext/abc/src/proof/pdr/pdrTsim.c +0 -502
- data/ext/abc/src/proof/pdr/pdrTsim2.c +0 -550
- data/ext/abc/src/proof/pdr/pdrTsim3.c +0 -361
- data/ext/abc/src/proof/pdr/pdrUtil.c +0 -800
- data/ext/abc/src/proof/ssc/module.make +0 -5
- data/ext/abc/src/proof/ssc/ssc.h +0 -78
- data/ext/abc/src/proof/ssc/sscClass.c +0 -326
- data/ext/abc/src/proof/ssc/sscCore.c +0 -469
- data/ext/abc/src/proof/ssc/sscInt.h +0 -135
- data/ext/abc/src/proof/ssc/sscSat.c +0 -430
- data/ext/abc/src/proof/ssc/sscSim.c +0 -364
- data/ext/abc/src/proof/ssc/sscUtil.c +0 -173
- data/ext/abc/src/proof/ssw/module.make +0 -20
- data/ext/abc/src/proof/ssw/ssw.h +0 -170
- data/ext/abc/src/proof/ssw/sswAig.c +0 -258
- data/ext/abc/src/proof/ssw/sswBmc.c +0 -224
- data/ext/abc/src/proof/ssw/sswClass.c +0 -1170
- data/ext/abc/src/proof/ssw/sswCnf.c +0 -427
- data/ext/abc/src/proof/ssw/sswConstr.c +0 -718
- data/ext/abc/src/proof/ssw/sswCore.c +0 -539
- data/ext/abc/src/proof/ssw/sswDyn.c +0 -491
- data/ext/abc/src/proof/ssw/sswFilter.c +0 -493
- data/ext/abc/src/proof/ssw/sswInt.h +0 -302
- data/ext/abc/src/proof/ssw/sswIslands.c +0 -598
- data/ext/abc/src/proof/ssw/sswLcorr.c +0 -337
- data/ext/abc/src/proof/ssw/sswMan.c +0 -217
- data/ext/abc/src/proof/ssw/sswPairs.c +0 -480
- data/ext/abc/src/proof/ssw/sswPart.c +0 -140
- data/ext/abc/src/proof/ssw/sswRarity.c +0 -1385
- data/ext/abc/src/proof/ssw/sswRarity2.c +0 -518
- data/ext/abc/src/proof/ssw/sswSat.c +0 -307
- data/ext/abc/src/proof/ssw/sswSemi.c +0 -323
- data/ext/abc/src/proof/ssw/sswSim.c +0 -1406
- data/ext/abc/src/proof/ssw/sswSimSat.c +0 -124
- data/ext/abc/src/proof/ssw/sswSweep.c +0 -440
- data/ext/abc/src/proof/ssw/sswUnique.c +0 -196
- data/ext/abc/src/sat/bmc/bmc.c +0 -52
- data/ext/abc/src/sat/bmc/bmc.h +0 -205
- data/ext/abc/src/sat/bmc/bmcBCore.c +0 -273
- data/ext/abc/src/sat/bmc/bmcBmc.c +0 -377
- data/ext/abc/src/sat/bmc/bmcBmc2.c +0 -944
- data/ext/abc/src/sat/bmc/bmcBmc3.c +0 -1893
- data/ext/abc/src/sat/bmc/bmcBmcAnd.c +0 -1100
- data/ext/abc/src/sat/bmc/bmcBmcG.c +0 -455
- data/ext/abc/src/sat/bmc/bmcBmcS.c +0 -940
- data/ext/abc/src/sat/bmc/bmcBmci.c +0 -344
- data/ext/abc/src/sat/bmc/bmcCexCare.c +0 -476
- data/ext/abc/src/sat/bmc/bmcCexCut.c +0 -537
- data/ext/abc/src/sat/bmc/bmcCexDepth.c +0 -373
- data/ext/abc/src/sat/bmc/bmcCexMin1.c +0 -578
- data/ext/abc/src/sat/bmc/bmcCexMin2.c +0 -363
- data/ext/abc/src/sat/bmc/bmcCexTools.c +0 -852
- data/ext/abc/src/sat/bmc/bmcChain.c +0 -396
- data/ext/abc/src/sat/bmc/bmcClp.c +0 -1548
- data/ext/abc/src/sat/bmc/bmcEco.c +0 -312
- data/ext/abc/src/sat/bmc/bmcEnum.c +0 -223
- data/ext/abc/src/sat/bmc/bmcExpand.c +0 -172
- data/ext/abc/src/sat/bmc/bmcFault.c +0 -1710
- data/ext/abc/src/sat/bmc/bmcFx.c +0 -725
- data/ext/abc/src/sat/bmc/bmcGen.c +0 -193
- data/ext/abc/src/sat/bmc/bmcICheck.c +0 -540
- data/ext/abc/src/sat/bmc/bmcInse.c +0 -345
- data/ext/abc/src/sat/bmc/bmcLoad.c +0 -212
- data/ext/abc/src/sat/bmc/bmcMaj.c +0 -745
- data/ext/abc/src/sat/bmc/bmcMaj2.c +0 -852
- data/ext/abc/src/sat/bmc/bmcMaxi.c +0 -282
- data/ext/abc/src/sat/bmc/bmcMesh.c +0 -433
- data/ext/abc/src/sat/bmc/bmcMesh2.c +0 -449
- data/ext/abc/src/sat/bmc/bmcMulti.c +0 -296
- data/ext/abc/src/sat/bmc/bmcUnroll.c +0 -505
- data/ext/abc/src/sat/bmc/module.make +0 -31
- data/ext/abc/src/sat/bsat/license +0 -21
- data/ext/abc/src/sat/bsat/module.make +0 -14
- data/ext/abc/src/sat/bsat/satChecker.c +0 -193
- data/ext/abc/src/sat/bsat/satClause.h +0 -476
- data/ext/abc/src/sat/bsat/satInter.c +0 -1077
- data/ext/abc/src/sat/bsat/satInterA.c +0 -1090
- data/ext/abc/src/sat/bsat/satInterB.c +0 -1115
- data/ext/abc/src/sat/bsat/satInterP.c +0 -1096
- data/ext/abc/src/sat/bsat/satMem.c +0 -583
- data/ext/abc/src/sat/bsat/satMem.h +0 -85
- data/ext/abc/src/sat/bsat/satProof.c +0 -934
- data/ext/abc/src/sat/bsat/satProof2.h +0 -327
- data/ext/abc/src/sat/bsat/satSolver.c +0 -2417
- data/ext/abc/src/sat/bsat/satSolver.h +0 -639
- data/ext/abc/src/sat/bsat/satSolver2.c +0 -1998
- data/ext/abc/src/sat/bsat/satSolver2.h +0 -377
- data/ext/abc/src/sat/bsat/satSolver2i.c +0 -242
- data/ext/abc/src/sat/bsat/satSolver3.c +0 -2299
- data/ext/abc/src/sat/bsat/satSolver3.h +0 -622
- data/ext/abc/src/sat/bsat/satStore.c +0 -469
- data/ext/abc/src/sat/bsat/satStore.h +0 -158
- data/ext/abc/src/sat/bsat/satTrace.c +0 -112
- data/ext/abc/src/sat/bsat/satTruth.c +0 -299
- data/ext/abc/src/sat/bsat/satTruth.h +0 -89
- data/ext/abc/src/sat/bsat/satUtil.c +0 -358
- data/ext/abc/src/sat/bsat/satVec.h +0 -161
- data/ext/abc/src/sat/bsat2/AbcApi.cpp +0 -59
- data/ext/abc/src/sat/bsat2/Alg.h +0 -84
- data/ext/abc/src/sat/bsat2/Alloc.h +0 -131
- data/ext/abc/src/sat/bsat2/Dimacs.h +0 -89
- data/ext/abc/src/sat/bsat2/Heap.h +0 -149
- data/ext/abc/src/sat/bsat2/IntTypes.h +0 -47
- data/ext/abc/src/sat/bsat2/LICENSE +0 -21
- data/ext/abc/src/sat/bsat2/MainSat.cpp +0 -197
- data/ext/abc/src/sat/bsat2/MainSimp.cpp +0 -206
- data/ext/abc/src/sat/bsat2/Map.h +0 -193
- data/ext/abc/src/sat/bsat2/Options.cpp +0 -93
- data/ext/abc/src/sat/bsat2/Options.h +0 -387
- data/ext/abc/src/sat/bsat2/ParseUtils.h +0 -122
- data/ext/abc/src/sat/bsat2/Queue.h +0 -69
- data/ext/abc/src/sat/bsat2/README +0 -24
- data/ext/abc/src/sat/bsat2/ReleaseNotes-2.2.0.txt +0 -79
- data/ext/abc/src/sat/bsat2/SimpSolver.cpp +0 -720
- data/ext/abc/src/sat/bsat2/SimpSolver.h +0 -197
- data/ext/abc/src/sat/bsat2/Solver.cpp +0 -924
- data/ext/abc/src/sat/bsat2/Solver.h +0 -373
- data/ext/abc/src/sat/bsat2/SolverTypes.h +0 -407
- data/ext/abc/src/sat/bsat2/Sort.h +0 -98
- data/ext/abc/src/sat/bsat2/System.cpp +0 -95
- data/ext/abc/src/sat/bsat2/System.h +0 -60
- data/ext/abc/src/sat/bsat2/Vec.h +0 -130
- data/ext/abc/src/sat/bsat2/XAlloc.h +0 -45
- data/ext/abc/src/sat/bsat2/module.make +0 -7
- data/ext/abc/src/sat/bsat2/pstdint.h +0 -813
- data/ext/abc/src/sat/cnf/cnf.h +0 -202
- data/ext/abc/src/sat/cnf/cnfCore.c +0 -290
- data/ext/abc/src/sat/cnf/cnfCut.c +0 -376
- data/ext/abc/src/sat/cnf/cnfData.c +0 -4789
- data/ext/abc/src/sat/cnf/cnfFast.c +0 -697
- data/ext/abc/src/sat/cnf/cnfMan.c +0 -726
- data/ext/abc/src/sat/cnf/cnfMap.c +0 -362
- data/ext/abc/src/sat/cnf/cnfPost.c +0 -238
- data/ext/abc/src/sat/cnf/cnfUtil.c +0 -479
- data/ext/abc/src/sat/cnf/cnfWrite.c +0 -806
- data/ext/abc/src/sat/cnf/cnf_.c +0 -53
- data/ext/abc/src/sat/cnf/module.make +0 -9
- data/ext/abc/src/sat/csat/csat_apis.c +0 -778
- data/ext/abc/src/sat/csat/csat_apis.h +0 -226
- data/ext/abc/src/sat/csat/module.make +0 -1
- data/ext/abc/src/sat/glucose/AbcGlucose.cpp +0 -1372
- data/ext/abc/src/sat/glucose/AbcGlucose.h +0 -110
- data/ext/abc/src/sat/glucose/AbcGlucoseCmd.cpp +0 -144
- data/ext/abc/src/sat/glucose/Alg.h +0 -84
- data/ext/abc/src/sat/glucose/Alloc.h +0 -132
- data/ext/abc/src/sat/glucose/BoundedQueue.h +0 -110
- data/ext/abc/src/sat/glucose/Constants.h +0 -33
- data/ext/abc/src/sat/glucose/Dimacs.h +0 -89
- data/ext/abc/src/sat/glucose/Glucose.cpp +0 -1493
- data/ext/abc/src/sat/glucose/Heap.h +0 -150
- data/ext/abc/src/sat/glucose/IntTypes.h +0 -47
- data/ext/abc/src/sat/glucose/Map.h +0 -193
- data/ext/abc/src/sat/glucose/Options.cpp +0 -92
- data/ext/abc/src/sat/glucose/Options.h +0 -388
- data/ext/abc/src/sat/glucose/ParseUtils.h +0 -151
- data/ext/abc/src/sat/glucose/Queue.h +0 -69
- data/ext/abc/src/sat/glucose/SimpSolver.cpp +0 -774
- data/ext/abc/src/sat/glucose/SimpSolver.h +0 -204
- data/ext/abc/src/sat/glucose/Solver.h +0 -491
- data/ext/abc/src/sat/glucose/SolverTypes.h +0 -434
- data/ext/abc/src/sat/glucose/Sort.h +0 -98
- data/ext/abc/src/sat/glucose/System.cpp +0 -95
- data/ext/abc/src/sat/glucose/System.h +0 -60
- data/ext/abc/src/sat/glucose/Vec.h +0 -130
- data/ext/abc/src/sat/glucose/XAlloc.h +0 -47
- data/ext/abc/src/sat/glucose/module.make +0 -6
- data/ext/abc/src/sat/glucose/pstdint.h +0 -919
- data/ext/abc/src/sat/glucose/stdint.h +0 -1628
- data/ext/abc/src/sat/lsat/solver.h +0 -132
- data/ext/abc/src/sat/msat/module.make +0 -13
- data/ext/abc/src/sat/msat/msat.h +0 -168
- data/ext/abc/src/sat/msat/msatActivity.c +0 -165
- data/ext/abc/src/sat/msat/msatClause.c +0 -537
- data/ext/abc/src/sat/msat/msatClauseVec.c +0 -237
- data/ext/abc/src/sat/msat/msatInt.h +0 -295
- data/ext/abc/src/sat/msat/msatMem.c +0 -534
- data/ext/abc/src/sat/msat/msatOrderH.c +0 -415
- data/ext/abc/src/sat/msat/msatOrderJ.c +0 -477
- data/ext/abc/src/sat/msat/msatQueue.c +0 -162
- data/ext/abc/src/sat/msat/msatRead.c +0 -274
- data/ext/abc/src/sat/msat/msatSolverApi.c +0 -505
- data/ext/abc/src/sat/msat/msatSolverCore.c +0 -215
- data/ext/abc/src/sat/msat/msatSolverIo.c +0 -182
- data/ext/abc/src/sat/msat/msatSolverSearch.c +0 -634
- data/ext/abc/src/sat/msat/msatSort.c +0 -178
- data/ext/abc/src/sat/msat/msatVec.c +0 -500
- data/ext/abc/src/sat/proof/pr.c +0 -1264
- data/ext/abc/src/sat/proof/pr.h +0 -69
- data/ext/abc/src/sat/proof/stats.txt +0 -66
- data/ext/abc/src/sat/psat/m114p.h +0 -47
- data/ext/abc/src/sat/psat/m114p_types.h +0 -13
- data/ext/abc/src/sat/psat/module.make +0 -1
- data/ext/abc/src/sat/satoko/LICENSE +0 -22
- data/ext/abc/src/sat/satoko/act_clause.h +0 -43
- data/ext/abc/src/sat/satoko/act_var.h +0 -53
- data/ext/abc/src/sat/satoko/cdb.h +0 -106
- data/ext/abc/src/sat/satoko/clause.h +0 -77
- data/ext/abc/src/sat/satoko/cnf_reader.c +0 -157
- data/ext/abc/src/sat/satoko/module.make +0 -3
- data/ext/abc/src/sat/satoko/satoko.h +0 -147
- data/ext/abc/src/sat/satoko/solver.c +0 -771
- data/ext/abc/src/sat/satoko/solver.h +0 -260
- data/ext/abc/src/sat/satoko/solver_api.c +0 -669
- data/ext/abc/src/sat/satoko/types.h +0 -39
- data/ext/abc/src/sat/satoko/utils/b_queue.h +0 -81
- data/ext/abc/src/sat/satoko/utils/heap.h +0 -178
- data/ext/abc/src/sat/satoko/utils/mem.h +0 -23
- data/ext/abc/src/sat/satoko/utils/misc.h +0 -35
- data/ext/abc/src/sat/satoko/utils/sdbl.h +0 -133
- data/ext/abc/src/sat/satoko/utils/sort.h +0 -65
- data/ext/abc/src/sat/satoko/utils/vec/vec_char.h +0 -260
- data/ext/abc/src/sat/satoko/utils/vec/vec_flt.h +0 -246
- data/ext/abc/src/sat/satoko/utils/vec/vec_int.h +0 -240
- data/ext/abc/src/sat/satoko/utils/vec/vec_sdbl.h +0 -253
- data/ext/abc/src/sat/satoko/utils/vec/vec_uint.h +0 -268
- data/ext/abc/src/sat/satoko/watch_list.h +0 -203
- data/ext/abc/src/sat/xsat/license +0 -39
- data/ext/abc/src/sat/xsat/module.make +0 -3
- data/ext/abc/src/sat/xsat/xsat.h +0 -59
- data/ext/abc/src/sat/xsat/xsatBQueue.h +0 -190
- data/ext/abc/src/sat/xsat/xsatClause.h +0 -109
- data/ext/abc/src/sat/xsat/xsatCnfReader.c +0 -236
- data/ext/abc/src/sat/xsat/xsatHeap.h +0 -330
- data/ext/abc/src/sat/xsat/xsatMemory.h +0 -222
- data/ext/abc/src/sat/xsat/xsatSolver.c +0 -1003
- data/ext/abc/src/sat/xsat/xsatSolver.h +0 -248
- data/ext/abc/src/sat/xsat/xsatSolverAPI.c +0 -346
- data/ext/abc/src/sat/xsat/xsatUtils.h +0 -106
- data/ext/abc/src/sat/xsat/xsatWatchList.h +0 -269
- data/ext/abc/src/starter.c +0 -190
- data/ext/abc/src/template.c +0 -111
- data/ext/extconf.rb +0 -14
- data/ext/ruby_abc_wrapper.h +0 -13
data/ext/abc/src/map/if/ifDsd.c
DELETED
@@ -1,2838 +0,0 @@
|
|
1
|
-
/**CFile****************************************************************
|
2
|
-
|
3
|
-
FileName [ifDsd.c]
|
4
|
-
|
5
|
-
SystemName [ABC: Logic synthesis and verification system.]
|
6
|
-
|
7
|
-
PackageName [FPGA mapping based on priority cuts.]
|
8
|
-
|
9
|
-
Synopsis [Computation of DSD representation.]
|
10
|
-
|
11
|
-
Author [Alan Mishchenko]
|
12
|
-
|
13
|
-
Affiliation [UC Berkeley]
|
14
|
-
|
15
|
-
Date [Ver. 1.0. Started - November 21, 2006.]
|
16
|
-
|
17
|
-
Revision [$Id: ifTruth.c,v 1.00 2006/11/21 00:00:00 alanmi Exp $]
|
18
|
-
|
19
|
-
***********************************************************************/
|
20
|
-
|
21
|
-
#include <math.h>
|
22
|
-
#include "if.h"
|
23
|
-
#include "ifCount.h"
|
24
|
-
#include "misc/extra/extra.h"
|
25
|
-
#include "sat/bsat/satSolver.h"
|
26
|
-
#include "aig/gia/gia.h"
|
27
|
-
#include "bool/kit/kit.h"
|
28
|
-
|
29
|
-
#ifdef ABC_USE_CUDD
|
30
|
-
#include "bdd/extrab/extraBdd.h"
|
31
|
-
#endif
|
32
|
-
|
33
|
-
#ifdef ABC_USE_PTHREADS
|
34
|
-
|
35
|
-
#ifdef _WIN32
|
36
|
-
#include "../lib/pthread.h"
|
37
|
-
#else
|
38
|
-
#include <pthread.h>
|
39
|
-
#include <unistd.h>
|
40
|
-
#endif
|
41
|
-
|
42
|
-
#endif
|
43
|
-
|
44
|
-
ABC_NAMESPACE_IMPL_START
|
45
|
-
|
46
|
-
|
47
|
-
////////////////////////////////////////////////////////////////////////
|
48
|
-
/// DECLARATIONS ///
|
49
|
-
////////////////////////////////////////////////////////////////////////
|
50
|
-
|
51
|
-
#define DSD_VERSION "dsd1"
|
52
|
-
|
53
|
-
// network types
|
54
|
-
typedef enum {
|
55
|
-
IF_DSD_NONE = 0, // 0: unknown
|
56
|
-
IF_DSD_CONST0, // 1: constant
|
57
|
-
IF_DSD_VAR, // 2: variable
|
58
|
-
IF_DSD_AND, // 3: AND
|
59
|
-
IF_DSD_XOR, // 4: XOR
|
60
|
-
IF_DSD_MUX, // 5: MUX
|
61
|
-
IF_DSD_PRIME // 6: PRIME
|
62
|
-
} If_DsdType_t;
|
63
|
-
|
64
|
-
typedef struct If_DsdObj_t_ If_DsdObj_t;
|
65
|
-
struct If_DsdObj_t_
|
66
|
-
{
|
67
|
-
unsigned Id; // node ID
|
68
|
-
unsigned Type : 3; // node type
|
69
|
-
unsigned nSupp : 5; // variable
|
70
|
-
unsigned fMark : 1; // user mark
|
71
|
-
unsigned Count : 18; // variable
|
72
|
-
unsigned nFans : 5; // fanin count
|
73
|
-
unsigned pFans[0]; // fanins
|
74
|
-
};
|
75
|
-
|
76
|
-
struct If_DsdMan_t_
|
77
|
-
{
|
78
|
-
char * pStore; // input/output file
|
79
|
-
int nVars; // max var number
|
80
|
-
int LutSize; // LUT size
|
81
|
-
int nWords; // word number
|
82
|
-
int nBins; // table size
|
83
|
-
unsigned * pBins; // hash table
|
84
|
-
Mem_Flex_t * pMem; // memory for nodes
|
85
|
-
Vec_Ptr_t vObjs; // objects
|
86
|
-
Vec_Int_t vNexts; // next pointers
|
87
|
-
Vec_Int_t vTruths; // truth IDs of prime nodes
|
88
|
-
Vec_Int_t * vTemp1; // temp
|
89
|
-
Vec_Int_t * vTemp2; // temp
|
90
|
-
word ** pTtElems; // elementary TTs
|
91
|
-
Vec_Mem_t * vTtMem[IF_MAX_FUNC_LUTSIZE+1]; // truth table memory and hash table
|
92
|
-
Vec_Ptr_t * vTtDecs[IF_MAX_FUNC_LUTSIZE+1]; // truth table decompositions
|
93
|
-
Vec_Wec_t * vIsops[IF_MAX_FUNC_LUTSIZE+1]; // ISOP for each function
|
94
|
-
int * pSched[IF_MAX_FUNC_LUTSIZE]; // grey code schedules
|
95
|
-
int nTtBits; // the number of truth table bits
|
96
|
-
int nConfigWords; // the number of words for config data per node
|
97
|
-
Vec_Wrd_t * vConfigs; // permutations
|
98
|
-
Gia_Man_t * pTtGia; // GIA to represent truth tables
|
99
|
-
Vec_Int_t * vCover; // temporary memory
|
100
|
-
void * pSat; // SAT solver
|
101
|
-
char * pCellStr; // symbolic cell description
|
102
|
-
int nObjsPrev; // previous number of objects
|
103
|
-
int fNewAsUseless; // set new as useless
|
104
|
-
int nUniqueHits; // statistics
|
105
|
-
int nUniqueMisses; // statistics
|
106
|
-
abctime timeDsd; // statistics
|
107
|
-
abctime timeCanon; // statistics
|
108
|
-
abctime timeCheck; // statistics
|
109
|
-
abctime timeCheck2; // statistics
|
110
|
-
abctime timeVerify; // statistics
|
111
|
-
};
|
112
|
-
|
113
|
-
static inline int If_DsdObjWordNum( int nFans ) { return sizeof(If_DsdObj_t) / 8 + nFans / 2 + ((nFans & 1) > 0); }
|
114
|
-
static inline int If_DsdObjTruthId( If_DsdMan_t * p, If_DsdObj_t * pObj ) { return (pObj->Type == IF_DSD_PRIME && pObj->nFans > 2) ? Vec_IntEntry(&p->vTruths, pObj->Id) : -1; }
|
115
|
-
static inline word * If_DsdObjTruth( If_DsdMan_t * p, If_DsdObj_t * pObj ) { return Vec_MemReadEntry(p->vTtMem[pObj->nFans], If_DsdObjTruthId(p, pObj)); }
|
116
|
-
static inline void If_DsdObjSetTruth( If_DsdMan_t * p, If_DsdObj_t * pObj, int Id ) { assert( pObj->Type == IF_DSD_PRIME && pObj->nFans > 2 ); Vec_IntWriteEntry(&p->vTruths, pObj->Id, Id); }
|
117
|
-
|
118
|
-
static inline void If_DsdObjClean( If_DsdObj_t * pObj ) { memset( pObj, 0, sizeof(If_DsdObj_t) ); }
|
119
|
-
static inline int If_DsdObjId( If_DsdObj_t * pObj ) { return pObj->Id; }
|
120
|
-
static inline int If_DsdObjType( If_DsdObj_t * pObj ) { return pObj->Type; }
|
121
|
-
static inline int If_DsdObjIsVar( If_DsdObj_t * pObj ) { return (int)(pObj->Type == IF_DSD_VAR); }
|
122
|
-
static inline int If_DsdObjSuppSize( If_DsdObj_t * pObj ) { return pObj->nSupp; }
|
123
|
-
static inline int If_DsdObjFaninNum( If_DsdObj_t * pObj ) { return pObj->nFans; }
|
124
|
-
static inline int If_DsdObjFaninC( If_DsdObj_t * pObj, int i ) { assert(i < (int)pObj->nFans); return Abc_LitIsCompl(pObj->pFans[i]); }
|
125
|
-
static inline int If_DsdObjFaninLit( If_DsdObj_t * pObj, int i ) { assert(i < (int)pObj->nFans); return pObj->pFans[i]; }
|
126
|
-
|
127
|
-
static inline If_DsdObj_t * If_DsdVecObj( Vec_Ptr_t * p, int Id ) { return (If_DsdObj_t *)Vec_PtrEntry(p, Id); }
|
128
|
-
static inline If_DsdObj_t * If_DsdVecConst0( Vec_Ptr_t * p ) { return If_DsdVecObj( p, 0 ); }
|
129
|
-
static inline If_DsdObj_t * If_DsdVecVar( Vec_Ptr_t * p, int v ) { return If_DsdVecObj( p, v+1 ); }
|
130
|
-
static inline int If_DsdVecObjSuppSize( Vec_Ptr_t * p, int iObj ) { return If_DsdVecObj( p, iObj )->nSupp; }
|
131
|
-
static inline int If_DsdVecLitSuppSize( Vec_Ptr_t * p, int iLit ) { return If_DsdVecObjSuppSize( p, Abc_Lit2Var(iLit) ); }
|
132
|
-
static inline int If_DsdVecObjRef( Vec_Ptr_t * p, int iObj ) { return If_DsdVecObj( p, iObj )->Count; }
|
133
|
-
static inline void If_DsdVecObjIncRef( Vec_Ptr_t * p, int iObj ) { if ( If_DsdVecObjRef(p, iObj) < 0x3FFFF ) If_DsdVecObj( p, iObj )->Count++; }
|
134
|
-
static inline If_DsdObj_t * If_DsdObjFanin( Vec_Ptr_t * p, If_DsdObj_t * pObj, int i ) { assert(i < (int)pObj->nFans); return If_DsdVecObj(p, Abc_Lit2Var(pObj->pFans[i])); }
|
135
|
-
static inline int If_DsdVecObjMark( Vec_Ptr_t * p, int iObj ) { return If_DsdVecObj( p, iObj )->fMark; }
|
136
|
-
static inline void If_DsdVecObjSetMark( Vec_Ptr_t * p, int iObj ) { If_DsdVecObj( p, iObj )->fMark = 1; }
|
137
|
-
static inline void If_DsdVecObjClearMark( Vec_Ptr_t * p, int iObj ) { If_DsdVecObj( p, iObj )->fMark = 0; }
|
138
|
-
|
139
|
-
#define If_DsdVecForEachObj( vVec, pObj, i ) \
|
140
|
-
Vec_PtrForEachEntry( If_DsdObj_t *, vVec, pObj, i )
|
141
|
-
#define If_DsdVecForEachObjStart( vVec, pObj, i, Start ) \
|
142
|
-
Vec_PtrForEachEntryStart( If_DsdObj_t *, vVec, pObj, i, Start )
|
143
|
-
#define If_DsdVecForEachObjVec( vNodes, vVec, pObj, i ) \
|
144
|
-
for ( i = 0; (i < Vec_IntSize(vNodes)) && ((pObj) = If_DsdVecObj(vVec, Vec_IntEntry(vNodes,i))); i++ )
|
145
|
-
#define If_DsdVecForEachNode( vVec, pObj, i ) \
|
146
|
-
Vec_PtrForEachEntryStart( If_DsdObj_t *, vVec, pObj, i, 2 )
|
147
|
-
#define If_DsdObjForEachFanin( vVec, pObj, pFanin, i ) \
|
148
|
-
for ( i = 0; (i < If_DsdObjFaninNum(pObj)) && ((pFanin) = If_DsdObjFanin(vVec, pObj, i)); i++ )
|
149
|
-
#define If_DsdObjForEachFaninLit( vVec, pObj, iLit, i ) \
|
150
|
-
for ( i = 0; (i < If_DsdObjFaninNum(pObj)) && ((iLit) = If_DsdObjFaninLit(pObj, i)); i++ )
|
151
|
-
|
152
|
-
extern int Kit_TruthToGia( Gia_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory, Vec_Int_t * vLeaves, int fHash );
|
153
|
-
|
154
|
-
////////////////////////////////////////////////////////////////////////
|
155
|
-
/// FUNCTION DEFINITIONS ///
|
156
|
-
////////////////////////////////////////////////////////////////////////
|
157
|
-
|
158
|
-
/**Function*************************************************************
|
159
|
-
|
160
|
-
Synopsis []
|
161
|
-
|
162
|
-
Description []
|
163
|
-
|
164
|
-
SideEffects []
|
165
|
-
|
166
|
-
SeeAlso []
|
167
|
-
|
168
|
-
***********************************************************************/
|
169
|
-
char * If_DsdManFileName( If_DsdMan_t * p )
|
170
|
-
{
|
171
|
-
return p->pStore;
|
172
|
-
}
|
173
|
-
int If_DsdManVarNum( If_DsdMan_t * p )
|
174
|
-
{
|
175
|
-
return p->nVars;
|
176
|
-
}
|
177
|
-
int If_DsdManObjNum( If_DsdMan_t * p )
|
178
|
-
{
|
179
|
-
return Vec_PtrSize( &p->vObjs );
|
180
|
-
}
|
181
|
-
int If_DsdManLutSize( If_DsdMan_t * p )
|
182
|
-
{
|
183
|
-
return p->LutSize;
|
184
|
-
}
|
185
|
-
int If_DsdManTtBitNum( If_DsdMan_t * p )
|
186
|
-
{
|
187
|
-
return p->nTtBits;
|
188
|
-
}
|
189
|
-
int If_DsdManPermBitNum( If_DsdMan_t * p )
|
190
|
-
{
|
191
|
-
return (Abc_Base2Log(p->nVars + 1) + 1) * p->nVars;
|
192
|
-
}
|
193
|
-
void If_DsdManSetLutSize( If_DsdMan_t * p, int nLutSize )
|
194
|
-
{
|
195
|
-
p->LutSize = nLutSize;
|
196
|
-
}
|
197
|
-
int If_DsdManSuppSize( If_DsdMan_t * p, int iDsd )
|
198
|
-
{
|
199
|
-
return If_DsdVecLitSuppSize( &p->vObjs, iDsd );
|
200
|
-
}
|
201
|
-
int If_DsdManCheckDec( If_DsdMan_t * p, int iDsd )
|
202
|
-
{
|
203
|
-
return If_DsdVecObjMark( &p->vObjs, Abc_Lit2Var(iDsd) );
|
204
|
-
}
|
205
|
-
int If_DsdManReadMark( If_DsdMan_t * p, int iDsd )
|
206
|
-
{
|
207
|
-
return If_DsdVecObjMark( &p->vObjs, Abc_Lit2Var(iDsd) );
|
208
|
-
}
|
209
|
-
void If_DsdManSetNewAsUseless( If_DsdMan_t * p )
|
210
|
-
{
|
211
|
-
if ( p->nObjsPrev == 0 )
|
212
|
-
p->nObjsPrev = If_DsdManObjNum(p);
|
213
|
-
p->fNewAsUseless = 1;
|
214
|
-
}
|
215
|
-
word * If_DsdManGetFuncConfig( If_DsdMan_t * p, int iDsd )
|
216
|
-
{
|
217
|
-
return p->vConfigs ? Vec_WrdEntryP(p->vConfigs, p->nConfigWords * Abc_Lit2Var(iDsd)) : NULL;
|
218
|
-
}
|
219
|
-
char * If_DsdManGetCellStr( If_DsdMan_t * p )
|
220
|
-
{
|
221
|
-
return p->pCellStr;
|
222
|
-
}
|
223
|
-
|
224
|
-
/**Function*************************************************************
|
225
|
-
|
226
|
-
Synopsis [DSD manager.]
|
227
|
-
|
228
|
-
Description []
|
229
|
-
|
230
|
-
SideEffects []
|
231
|
-
|
232
|
-
SeeAlso []
|
233
|
-
|
234
|
-
***********************************************************************/
|
235
|
-
static inline word ** If_ManDsdTtElems()
|
236
|
-
{
|
237
|
-
static word TtElems[DAU_MAX_VAR+1][DAU_MAX_WORD], * pTtElems[DAU_MAX_VAR+1] = {NULL};
|
238
|
-
if ( pTtElems[0] == NULL )
|
239
|
-
{
|
240
|
-
int v;
|
241
|
-
for ( v = 0; v <= DAU_MAX_VAR; v++ )
|
242
|
-
pTtElems[v] = TtElems[v];
|
243
|
-
Abc_TtElemInit( pTtElems, DAU_MAX_VAR );
|
244
|
-
}
|
245
|
-
return pTtElems;
|
246
|
-
}
|
247
|
-
If_DsdObj_t * If_DsdObjAlloc( If_DsdMan_t * p, int Type, int nFans )
|
248
|
-
{
|
249
|
-
int nWords = If_DsdObjWordNum( nFans );
|
250
|
-
If_DsdObj_t * pObj = (If_DsdObj_t *)Mem_FlexEntryFetch( p->pMem, sizeof(word) * nWords );
|
251
|
-
If_DsdObjClean( pObj );
|
252
|
-
pObj->Type = Type;
|
253
|
-
pObj->nFans = nFans;
|
254
|
-
pObj->Id = Vec_PtrSize( &p->vObjs );
|
255
|
-
pObj->fMark = p->fNewAsUseless;
|
256
|
-
pObj->Count = 0;
|
257
|
-
Vec_PtrPush( &p->vObjs, pObj );
|
258
|
-
Vec_IntPush( &p->vNexts, 0 );
|
259
|
-
Vec_IntPush( &p->vTruths, -1 );
|
260
|
-
assert( Vec_IntSize(&p->vNexts) == Vec_PtrSize(&p->vObjs) );
|
261
|
-
assert( Vec_IntSize(&p->vTruths) == Vec_PtrSize(&p->vObjs) );
|
262
|
-
return pObj;
|
263
|
-
}
|
264
|
-
If_DsdMan_t * If_DsdManAlloc( int nVars, int LutSize )
|
265
|
-
{
|
266
|
-
If_DsdMan_t * p; int v;
|
267
|
-
char pFileName[10];
|
268
|
-
assert( nVars <= DAU_MAX_VAR );
|
269
|
-
sprintf( pFileName, "%02d.dsd", nVars );
|
270
|
-
p = ABC_CALLOC( If_DsdMan_t, 1 );
|
271
|
-
p->pStore = Abc_UtilStrsav( pFileName );
|
272
|
-
p->nVars = nVars;
|
273
|
-
p->LutSize = LutSize;
|
274
|
-
p->nWords = Abc_TtWordNum( nVars );
|
275
|
-
p->nBins = Abc_PrimeCudd( 100000 );
|
276
|
-
p->pBins = ABC_CALLOC( unsigned, p->nBins );
|
277
|
-
p->pMem = Mem_FlexStart();
|
278
|
-
p->nConfigWords = 1;
|
279
|
-
Vec_PtrGrow( &p->vObjs, 10000 );
|
280
|
-
Vec_IntGrow( &p->vNexts, 10000 );
|
281
|
-
Vec_IntGrow( &p->vTruths, 10000 );
|
282
|
-
If_DsdObjAlloc( p, IF_DSD_CONST0, 0 );
|
283
|
-
If_DsdObjAlloc( p, IF_DSD_VAR, 0 )->nSupp = 1;
|
284
|
-
p->vTemp1 = Vec_IntAlloc( 32 );
|
285
|
-
p->vTemp2 = Vec_IntAlloc( 32 );
|
286
|
-
p->pTtElems = If_ManDsdTtElems();
|
287
|
-
for ( v = 3; v <= nVars; v++ )
|
288
|
-
{
|
289
|
-
p->vTtMem[v] = Vec_MemAlloc( Abc_TtWordNum(v), 12 );
|
290
|
-
Vec_MemHashAlloc( p->vTtMem[v], 10000 );
|
291
|
-
p->vTtDecs[v] = Vec_PtrAlloc( 1000 );
|
292
|
-
}
|
293
|
-
/*
|
294
|
-
p->pTtGia = Gia_ManStart( nVars );
|
295
|
-
Gia_ManHashAlloc( p->pTtGia );
|
296
|
-
for ( v = 0; v < nVars; v++ )
|
297
|
-
Gia_ManAppendCi( p->pTtGia );
|
298
|
-
*/
|
299
|
-
for ( v = 2; v < nVars; v++ )
|
300
|
-
p->pSched[v] = Extra_GreyCodeSchedule( v );
|
301
|
-
if ( LutSize )
|
302
|
-
p->pSat = If_ManSatBuildXY( LutSize );
|
303
|
-
p->vCover = Vec_IntAlloc( 0 );
|
304
|
-
return p;
|
305
|
-
}
|
306
|
-
void If_DsdManAllocIsops( If_DsdMan_t * p, int nLutSize )
|
307
|
-
{
|
308
|
-
Vec_Int_t * vLevel;
|
309
|
-
int v, i, fCompl;
|
310
|
-
word * pTruth;
|
311
|
-
if ( p->vIsops[3] != NULL )
|
312
|
-
return;
|
313
|
-
if ( Vec_PtrSize(&p->vObjs) > 2 )
|
314
|
-
printf( "Warning: DSD manager is already started without ISOPs.\n" );
|
315
|
-
for ( v = 3; v <= nLutSize; v++ )
|
316
|
-
{
|
317
|
-
p->vIsops[v] = Vec_WecAlloc( 100 );
|
318
|
-
Vec_MemForEachEntry( p->vTtMem[v], pTruth, i )
|
319
|
-
{
|
320
|
-
vLevel = Vec_WecPushLevel( p->vIsops[v] );
|
321
|
-
fCompl = Kit_TruthIsop( (unsigned *)pTruth, v, p->vCover, 1 );
|
322
|
-
if ( fCompl >= 0 && Vec_IntSize(p->vCover) <= 8 )
|
323
|
-
{
|
324
|
-
Vec_IntGrow( vLevel, Vec_IntSize(p->vCover) );
|
325
|
-
Vec_IntAppend( vLevel, p->vCover );
|
326
|
-
if ( fCompl )
|
327
|
-
vLevel->nCap ^= (1<<16); // hack to remember complemented attribute
|
328
|
-
}
|
329
|
-
}
|
330
|
-
assert( Vec_WecSize(p->vIsops[v]) == Vec_MemEntryNum(p->vTtMem[v]) );
|
331
|
-
}
|
332
|
-
}
|
333
|
-
void If_DsdManFree( If_DsdMan_t * p, int fVerbose )
|
334
|
-
{
|
335
|
-
int v;
|
336
|
-
// If_DsdManDumpDsd( p );
|
337
|
-
if ( fVerbose )
|
338
|
-
If_DsdManPrint( p, NULL, 0, 0, 0, 0, 0 );
|
339
|
-
if ( fVerbose )
|
340
|
-
{
|
341
|
-
char FileName[10];
|
342
|
-
for ( v = 3; v <= p->nVars; v++ )
|
343
|
-
{
|
344
|
-
sprintf( FileName, "dumpdsd%02d", v );
|
345
|
-
Vec_MemDumpTruthTables( p->vTtMem[v], FileName, v );
|
346
|
-
}
|
347
|
-
}
|
348
|
-
for ( v = 2; v < p->nVars; v++ )
|
349
|
-
ABC_FREE( p->pSched[v] );
|
350
|
-
for ( v = 3; v <= p->nVars; v++ )
|
351
|
-
{
|
352
|
-
Vec_MemHashFree( p->vTtMem[v] );
|
353
|
-
Vec_MemFree( p->vTtMem[v] );
|
354
|
-
Vec_VecFree( (Vec_Vec_t *)(p->vTtDecs[v]) );
|
355
|
-
if ( p->vIsops[v] )
|
356
|
-
Vec_WecFree( p->vIsops[v] );
|
357
|
-
}
|
358
|
-
Vec_WrdFreeP( &p->vConfigs );
|
359
|
-
Vec_IntFreeP( &p->vTemp1 );
|
360
|
-
Vec_IntFreeP( &p->vTemp2 );
|
361
|
-
ABC_FREE( p->vObjs.pArray );
|
362
|
-
ABC_FREE( p->vNexts.pArray );
|
363
|
-
ABC_FREE( p->vTruths.pArray );
|
364
|
-
Mem_FlexStop( p->pMem, 0 );
|
365
|
-
Gia_ManStopP( &p->pTtGia );
|
366
|
-
Vec_IntFreeP( &p->vCover );
|
367
|
-
If_ManSatUnbuild( p->pSat );
|
368
|
-
ABC_FREE( p->pCellStr );
|
369
|
-
ABC_FREE( p->pStore );
|
370
|
-
ABC_FREE( p->pBins );
|
371
|
-
ABC_FREE( p );
|
372
|
-
}
|
373
|
-
void If_DsdManDumpDsd( If_DsdMan_t * p, int Support )
|
374
|
-
{
|
375
|
-
char * pFileName = "tts_nondsd.txt";
|
376
|
-
If_DsdObj_t * pObj;
|
377
|
-
Vec_Int_t * vMap;
|
378
|
-
FILE * pFile = fopen( pFileName, "wb" );
|
379
|
-
int v, i;
|
380
|
-
if ( pFile == NULL )
|
381
|
-
{
|
382
|
-
printf( "Cannot open file \"%s\".\n", pFileName );
|
383
|
-
return;
|
384
|
-
}
|
385
|
-
for ( v = 3; v <= p->nVars; v++ )
|
386
|
-
{
|
387
|
-
vMap = Vec_IntStart( Vec_MemEntryNum(p->vTtMem[v]) );
|
388
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
389
|
-
{
|
390
|
-
if ( Support && Support != If_DsdObjSuppSize(pObj) )
|
391
|
-
continue;
|
392
|
-
if ( If_DsdObjType(pObj) != IF_DSD_PRIME )
|
393
|
-
continue;
|
394
|
-
if ( Vec_IntEntry(vMap, If_DsdObjTruthId(p, pObj)) )
|
395
|
-
continue;
|
396
|
-
Vec_IntWriteEntry(vMap, If_DsdObjTruthId(p, pObj), 1);
|
397
|
-
fprintf( pFile, "0x" );
|
398
|
-
Abc_TtPrintHexRev( pFile, If_DsdObjTruth(p, pObj), Support ? Abc_MaxInt(Support, 6) : v );
|
399
|
-
fprintf( pFile, "\n" );
|
400
|
-
//printf( " " );
|
401
|
-
//Dau_DsdPrintFromTruth( If_DsdObjTruth(p, pObj), p->nVars );
|
402
|
-
}
|
403
|
-
Vec_IntFree( vMap );
|
404
|
-
}
|
405
|
-
fclose( pFile );
|
406
|
-
}
|
407
|
-
void If_DsdManDumpAll( If_DsdMan_t * p, int Support )
|
408
|
-
{
|
409
|
-
extern word * If_DsdManComputeTruth( If_DsdMan_t * p, int iDsd, unsigned char * pPermLits );
|
410
|
-
char * pFileName = "tts_all.txt";
|
411
|
-
If_DsdObj_t * pObj;
|
412
|
-
word * pRes; int i;
|
413
|
-
FILE * pFile = fopen( pFileName, "wb" );
|
414
|
-
if ( pFile == NULL )
|
415
|
-
{
|
416
|
-
printf( "Cannot open file \"%s\".\n", pFileName );
|
417
|
-
return;
|
418
|
-
}
|
419
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
420
|
-
{
|
421
|
-
if ( Support && Support != If_DsdObjSuppSize(pObj) )
|
422
|
-
continue;
|
423
|
-
pRes = If_DsdManComputeTruth( p, Abc_Var2Lit(i, 0), NULL );
|
424
|
-
fprintf( pFile, "0x" );
|
425
|
-
Abc_TtPrintHexRev( pFile, pRes, Support ? Abc_MaxInt(Support, 6) : p->nVars );
|
426
|
-
fprintf( pFile, "\n" );
|
427
|
-
// printf( " " );
|
428
|
-
// Dau_DsdPrintFromTruth( pRes, p->nVars );
|
429
|
-
}
|
430
|
-
fclose( pFile );
|
431
|
-
}
|
432
|
-
int If_DsdManHasMarks( If_DsdMan_t * p )
|
433
|
-
{
|
434
|
-
If_DsdObj_t * pObj;
|
435
|
-
int i;
|
436
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
437
|
-
if ( pObj->fMark )
|
438
|
-
return 1;
|
439
|
-
return 0;
|
440
|
-
}
|
441
|
-
|
442
|
-
/**Function*************************************************************
|
443
|
-
|
444
|
-
Synopsis [Printing.]
|
445
|
-
|
446
|
-
Description []
|
447
|
-
|
448
|
-
SideEffects []
|
449
|
-
|
450
|
-
SeeAlso []
|
451
|
-
|
452
|
-
***********************************************************************/
|
453
|
-
void If_DsdManHashProfile( If_DsdMan_t * p )
|
454
|
-
{
|
455
|
-
If_DsdObj_t * pObj;
|
456
|
-
unsigned * pSpot;
|
457
|
-
int i, Counter;
|
458
|
-
for ( i = 0; i < p->nBins; i++ )
|
459
|
-
{
|
460
|
-
Counter = 0;
|
461
|
-
for ( pSpot = p->pBins + i; *pSpot; pSpot = (unsigned *)Vec_IntEntryP(&p->vNexts, pObj->Id), Counter++ )
|
462
|
-
pObj = If_DsdVecObj( &p->vObjs, *pSpot );
|
463
|
-
// if ( Counter > 5 )
|
464
|
-
// printf( "%d ", Counter );
|
465
|
-
// if ( i > 10000 )
|
466
|
-
// break;
|
467
|
-
}
|
468
|
-
// printf( "\n" );
|
469
|
-
}
|
470
|
-
int If_DsdManCheckNonDec_rec( If_DsdMan_t * p, int Id )
|
471
|
-
{
|
472
|
-
If_DsdObj_t * pObj;
|
473
|
-
int i, iFanin;
|
474
|
-
pObj = If_DsdVecObj( &p->vObjs, Id );
|
475
|
-
if ( If_DsdObjType(pObj) == IF_DSD_CONST0 )
|
476
|
-
return 0;
|
477
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
478
|
-
return 0;
|
479
|
-
if ( If_DsdObjType(pObj) == IF_DSD_PRIME )
|
480
|
-
return 1;
|
481
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
482
|
-
if ( If_DsdManCheckNonDec_rec( p, Abc_Lit2Var(iFanin) ) )
|
483
|
-
return 1;
|
484
|
-
return 0;
|
485
|
-
}
|
486
|
-
void If_DsdManPrint_rec( FILE * pFile, If_DsdMan_t * p, int iDsdLit, unsigned char * pPermLits, int * pnSupp )
|
487
|
-
{
|
488
|
-
char OpenType[7] = {0, 0, 0, '(', '[', '<', '{'};
|
489
|
-
char CloseType[7] = {0, 0, 0, ')', ']', '>', '}'};
|
490
|
-
If_DsdObj_t * pObj;
|
491
|
-
int i, iFanin;
|
492
|
-
fprintf( pFile, "%s", Abc_LitIsCompl(iDsdLit) ? "!" : "" );
|
493
|
-
pObj = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(iDsdLit) );
|
494
|
-
if ( If_DsdObjType(pObj) == IF_DSD_CONST0 )
|
495
|
-
{ fprintf( pFile, "0" ); return; }
|
496
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
497
|
-
{
|
498
|
-
int iPermLit = pPermLits ? (int)pPermLits[(*pnSupp)++] : Abc_Var2Lit((*pnSupp)++, 0);
|
499
|
-
fprintf( pFile, "%s%c", Abc_LitIsCompl(iPermLit)? "!":"", 'a' + Abc_Lit2Var(iPermLit) );
|
500
|
-
return;
|
501
|
-
}
|
502
|
-
if ( If_DsdObjType(pObj) == IF_DSD_PRIME )
|
503
|
-
Abc_TtPrintHexRev( pFile, If_DsdObjTruth(p, pObj), If_DsdObjFaninNum(pObj) );
|
504
|
-
fprintf( pFile, "%c", OpenType[If_DsdObjType(pObj)] );
|
505
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
506
|
-
If_DsdManPrint_rec( pFile, p, iFanin, pPermLits, pnSupp );
|
507
|
-
fprintf( pFile, "%c", CloseType[If_DsdObjType(pObj)] );
|
508
|
-
}
|
509
|
-
void If_DsdManPrintOne( FILE * pFile, If_DsdMan_t * p, int iObjId, unsigned char * pPermLits, int fNewLine )
|
510
|
-
{
|
511
|
-
int nSupp = 0;
|
512
|
-
fprintf( pFile, "%6d : ", iObjId );
|
513
|
-
fprintf( pFile, "%2d ", If_DsdVecObjSuppSize(&p->vObjs, iObjId) );
|
514
|
-
fprintf( pFile, "%8d ", If_DsdVecObjRef(&p->vObjs, iObjId) );
|
515
|
-
fprintf( pFile, "%d ", If_DsdVecObjMark(&p->vObjs, iObjId) );
|
516
|
-
If_DsdManPrint_rec( pFile, p, Abc_Var2Lit(iObjId, 0), pPermLits, &nSupp );
|
517
|
-
if ( fNewLine )
|
518
|
-
fprintf( pFile, "\n" );
|
519
|
-
assert( nSupp == If_DsdVecObjSuppSize(&p->vObjs, iObjId) );
|
520
|
-
}
|
521
|
-
#define DSD_ARRAY_LIMIT 16
|
522
|
-
void If_DsdManPrintDecs( FILE * pFile, If_DsdMan_t * p )
|
523
|
-
{
|
524
|
-
Vec_Int_t * vDecs;
|
525
|
-
int i, k, v, nSuppSize, nDecMax = 0;
|
526
|
-
int pDecMax[IF_MAX_FUNC_LUTSIZE] = {0};
|
527
|
-
int pCountsAll[IF_MAX_FUNC_LUTSIZE] = {0};
|
528
|
-
int pCountsSSizes[IF_MAX_FUNC_LUTSIZE] = {0};
|
529
|
-
int pCounts[IF_MAX_FUNC_LUTSIZE][DSD_ARRAY_LIMIT+2] = {{0}};
|
530
|
-
word * pTruth;
|
531
|
-
for ( v = 3; v <= p->nVars; v++ )
|
532
|
-
{
|
533
|
-
assert( Vec_MemEntryNum(p->vTtMem[v]) == Vec_PtrSize(p->vTtDecs[v]) );
|
534
|
-
// find max number of decompositions
|
535
|
-
Vec_PtrForEachEntry( Vec_Int_t *, p->vTtDecs[v], vDecs, i )
|
536
|
-
{
|
537
|
-
pTruth = Vec_MemReadEntry( p->vTtMem[v], i );
|
538
|
-
nSuppSize = Abc_TtSupportSize( pTruth, p->nVars );
|
539
|
-
pDecMax[nSuppSize] = Abc_MaxInt( pDecMax[nSuppSize], Vec_IntSize(vDecs) );
|
540
|
-
nDecMax = Abc_MaxInt( nDecMax, Vec_IntSize(vDecs) );
|
541
|
-
}
|
542
|
-
// fill up
|
543
|
-
Vec_PtrForEachEntry( Vec_Int_t *, p->vTtDecs[v], vDecs, i )
|
544
|
-
{
|
545
|
-
pTruth = Vec_MemReadEntry( p->vTtMem[v], i );
|
546
|
-
nSuppSize = Abc_TtSupportSize( pTruth, p->nVars );
|
547
|
-
pCountsAll[nSuppSize]++;
|
548
|
-
pCountsSSizes[nSuppSize] += Vec_IntSize(vDecs);
|
549
|
-
pCounts[nSuppSize][Abc_MinInt(DSD_ARRAY_LIMIT+1,Vec_IntSize(vDecs))]++;
|
550
|
-
// pCounts[nSuppSize][Abc_MinInt(DSD_ARRAY_LIMIT+1,Vec_IntSize(vDecs)?1+(Vec_IntSize(vDecs)/10):0)]++;
|
551
|
-
/*
|
552
|
-
if ( nSuppSize == 6 && Vec_IntSize(vDecs) == pDecMax[6] )
|
553
|
-
{
|
554
|
-
fprintf( pFile, "0x" );
|
555
|
-
Abc_TtPrintHex( pTruth, nSuppSize );
|
556
|
-
Dau_DecPrintSets( vDecs, nSuppSize );
|
557
|
-
}
|
558
|
-
*/
|
559
|
-
}
|
560
|
-
}
|
561
|
-
// print header
|
562
|
-
fprintf( pFile, " N : " );
|
563
|
-
fprintf( pFile, " Total " );
|
564
|
-
for ( k = 0; k <= DSD_ARRAY_LIMIT; k++ )
|
565
|
-
fprintf( pFile, "%6d", k );
|
566
|
-
fprintf( pFile, " " );
|
567
|
-
fprintf( pFile, " More" );
|
568
|
-
fprintf( pFile, " Ave" );
|
569
|
-
fprintf( pFile, " Max" );
|
570
|
-
fprintf( pFile, "\n" );
|
571
|
-
// print rows
|
572
|
-
for ( i = 0; i <= p->nVars; i++ )
|
573
|
-
{
|
574
|
-
fprintf( pFile, "%2d : ", i );
|
575
|
-
fprintf( pFile, "%6d ", pCountsAll[i] );
|
576
|
-
for ( k = 0; k <= DSD_ARRAY_LIMIT; k++ )
|
577
|
-
// fprintf( pFile, "%6d", pCounts[i][k] );
|
578
|
-
fprintf( pFile, "%6.1f", 100.0*pCounts[i][k]/Abc_MaxInt(1,pCountsAll[i]) );
|
579
|
-
fprintf( pFile, " " );
|
580
|
-
// fprintf( pFile, "%6d", pCounts[i][k] );
|
581
|
-
fprintf( pFile, "%6.1f", 100.0*pCounts[i][k]/Abc_MaxInt(1,pCountsAll[i]) );
|
582
|
-
fprintf( pFile, " " );
|
583
|
-
fprintf( pFile, "%6.1f", 1.0*pCountsSSizes[i]/Abc_MaxInt(1,pCountsAll[i]) );
|
584
|
-
fprintf( pFile, " " );
|
585
|
-
fprintf( pFile, "%6d", pDecMax[i] );
|
586
|
-
fprintf( pFile, "\n" );
|
587
|
-
}
|
588
|
-
}
|
589
|
-
void If_DsdManPrintOccurs( FILE * pFile, If_DsdMan_t * p )
|
590
|
-
{
|
591
|
-
char Buffer[100];
|
592
|
-
If_DsdObj_t * pObj;
|
593
|
-
Vec_Int_t * vOccurs;
|
594
|
-
int nOccurs, nOccursMax, nOccursAll;
|
595
|
-
int i, k, nSizeMax, Counter = 0;
|
596
|
-
// determine the largest fanin and fanout
|
597
|
-
nOccursMax = nOccursAll = 0;
|
598
|
-
If_DsdVecForEachNode( &p->vObjs, pObj, i )
|
599
|
-
{
|
600
|
-
nOccurs = pObj->Count;
|
601
|
-
nOccursAll += nOccurs;
|
602
|
-
nOccursMax = Abc_MaxInt( nOccursMax, nOccurs );
|
603
|
-
}
|
604
|
-
// allocate storage for fanin/fanout numbers
|
605
|
-
nSizeMax = 10 * (Abc_Base10Log(nOccursMax) + 1);
|
606
|
-
vOccurs = Vec_IntStart( nSizeMax );
|
607
|
-
// count the number of fanins and fanouts
|
608
|
-
If_DsdVecForEachNode( &p->vObjs, pObj, i )
|
609
|
-
{
|
610
|
-
nOccurs = pObj->Count;
|
611
|
-
if ( nOccurs < 10 )
|
612
|
-
Vec_IntAddToEntry( vOccurs, nOccurs, 1 );
|
613
|
-
else if ( nOccurs < 100 )
|
614
|
-
Vec_IntAddToEntry( vOccurs, 10 + nOccurs/10, 1 );
|
615
|
-
else if ( nOccurs < 1000 )
|
616
|
-
Vec_IntAddToEntry( vOccurs, 20 + nOccurs/100, 1 );
|
617
|
-
else if ( nOccurs < 10000 )
|
618
|
-
Vec_IntAddToEntry( vOccurs, 30 + nOccurs/1000, 1 );
|
619
|
-
else if ( nOccurs < 100000 )
|
620
|
-
Vec_IntAddToEntry( vOccurs, 40 + nOccurs/10000, 1 );
|
621
|
-
else if ( nOccurs < 1000000 )
|
622
|
-
Vec_IntAddToEntry( vOccurs, 50 + nOccurs/100000, 1 );
|
623
|
-
else if ( nOccurs < 10000000 )
|
624
|
-
Vec_IntAddToEntry( vOccurs, 60 + nOccurs/1000000, 1 );
|
625
|
-
}
|
626
|
-
fprintf( pFile, "The distribution of object occurrences:\n" );
|
627
|
-
for ( k = 0; k < nSizeMax; k++ )
|
628
|
-
{
|
629
|
-
if ( Vec_IntEntry(vOccurs, k) == 0 )
|
630
|
-
continue;
|
631
|
-
if ( k < 10 )
|
632
|
-
fprintf( pFile, "%15d : ", k );
|
633
|
-
else
|
634
|
-
{
|
635
|
-
sprintf( Buffer, "%d - %d", (int)pow((double)10, k/10) * (k%10), (int)pow((double)10, k/10) * (k%10+1) - 1 );
|
636
|
-
fprintf( pFile, "%15s : ", Buffer );
|
637
|
-
}
|
638
|
-
fprintf( pFile, "%12d ", Vec_IntEntry(vOccurs, k) );
|
639
|
-
Counter += Vec_IntEntry(vOccurs, k);
|
640
|
-
fprintf( pFile, "(%6.2f %%)", 100.0*Counter/Vec_PtrSize(&p->vObjs) );
|
641
|
-
fprintf( pFile, "\n" );
|
642
|
-
}
|
643
|
-
Vec_IntFree( vOccurs );
|
644
|
-
fprintf( pFile, "Fanins: Max = %d. Ave = %.2f.\n", nOccursMax, 1.0*nOccursAll/Vec_PtrSize(&p->vObjs) );
|
645
|
-
}
|
646
|
-
|
647
|
-
void If_DsdManPrintDistrib( If_DsdMan_t * p )
|
648
|
-
{
|
649
|
-
If_DsdObj_t * pObj; int i;
|
650
|
-
int CountObj[IF_MAX_FUNC_LUTSIZE+2] = {0};
|
651
|
-
int CountObjNon[IF_MAX_FUNC_LUTSIZE+2] = {0};
|
652
|
-
int CountObjNpn[IF_MAX_FUNC_LUTSIZE+2] = {0};
|
653
|
-
int CountStr[IF_MAX_FUNC_LUTSIZE+2] = {0};
|
654
|
-
int CountStrNon[IF_MAX_FUNC_LUTSIZE+2] = {0};
|
655
|
-
int CountMarked[IF_MAX_FUNC_LUTSIZE+2] = {0};
|
656
|
-
for ( i = 3; i <= p->nVars; i++ )
|
657
|
-
{
|
658
|
-
CountObjNpn[i] = Vec_MemEntryNum(p->vTtMem[i]);
|
659
|
-
CountObjNpn[p->nVars+1] += Vec_MemEntryNum(p->vTtMem[i]);
|
660
|
-
}
|
661
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
662
|
-
{
|
663
|
-
CountObj[If_DsdObjFaninNum(pObj)]++, CountObj[p->nVars+1]++;
|
664
|
-
if ( If_DsdObjType(pObj) == IF_DSD_PRIME )
|
665
|
-
CountObjNon[If_DsdObjFaninNum(pObj)]++, CountObjNon[p->nVars+1]++;
|
666
|
-
CountStr[If_DsdObjSuppSize(pObj)]++, CountStr[p->nVars+1]++;
|
667
|
-
if ( If_DsdManCheckNonDec_rec(p, i) )
|
668
|
-
CountStrNon[If_DsdObjSuppSize(pObj)]++, CountStrNon[p->nVars+1]++;
|
669
|
-
if ( If_DsdVecObjMark(&p->vObjs, i) )
|
670
|
-
CountMarked[If_DsdObjSuppSize(pObj)]++, CountMarked[p->nVars+1]++;
|
671
|
-
}
|
672
|
-
printf( "***** DSD MANAGER STATISTICS *****\n" );
|
673
|
-
printf( "Support " );
|
674
|
-
printf( "Obj " );
|
675
|
-
printf( "ObjNDSD " );
|
676
|
-
printf( "NPNNDSD " );
|
677
|
-
printf( "Str " );
|
678
|
-
printf( "StrNDSD " );
|
679
|
-
printf( "Marked " );
|
680
|
-
printf( "\n" );
|
681
|
-
for ( i = 0; i <= p->nVars + 1; i++ )
|
682
|
-
{
|
683
|
-
if ( i == p->nVars + 1 )
|
684
|
-
printf( "All : " );
|
685
|
-
else
|
686
|
-
printf( "%3d : ", i );
|
687
|
-
printf( "%9d ", CountObj[i] );
|
688
|
-
printf( "%9d ", CountObjNon[i] );
|
689
|
-
printf( "%6.2f %% ", 100.0 * CountObjNon[i] / Abc_MaxInt(1, CountObj[i]) );
|
690
|
-
printf( "%9d ", CountObjNpn[i] );
|
691
|
-
printf( "%6.2f %% ", 100.0 * CountObjNpn[i] / Abc_MaxInt(1, CountObj[i]) );
|
692
|
-
printf( " " );
|
693
|
-
printf( "%9d ", CountStr[i] );
|
694
|
-
printf( "%9d ", CountStrNon[i] );
|
695
|
-
printf( "%6.2f %% ", 100.0 * CountStrNon[i] / Abc_MaxInt(1, CountStr[i]) );
|
696
|
-
printf( "%9d ", CountMarked[i] );
|
697
|
-
printf( "%6.2f %%", 100.0 * CountMarked[i] / Abc_MaxInt(1, CountStr[i]) );
|
698
|
-
printf( "\n" );
|
699
|
-
}
|
700
|
-
}
|
701
|
-
void If_DsdManPrint( If_DsdMan_t * p, char * pFileName, int Number, int Support, int fOccurs, int fTtDump, int fVerbose )
|
702
|
-
{
|
703
|
-
If_DsdObj_t * pObj;
|
704
|
-
Vec_Int_t * vStructs, * vCounts;
|
705
|
-
int CountUsed = 0, CountNonDsd = 0, CountNonDsdStr = 0, CountMarked = 0, CountPrime = 0;
|
706
|
-
int i, v, * pPerm, DsdMax = 0, MemSizeTTs = 0, MemSizeDecs = 0;
|
707
|
-
FILE * pFile;
|
708
|
-
pFile = pFileName ? fopen( pFileName, "wb" ) : stdout;
|
709
|
-
if ( pFileName && pFile == NULL )
|
710
|
-
{
|
711
|
-
printf( "cannot open output file\n" );
|
712
|
-
return;
|
713
|
-
}
|
714
|
-
if ( fVerbose )
|
715
|
-
{
|
716
|
-
fprintf( pFile, "***** NOTATIONS USED BELOW *****\n" );
|
717
|
-
fprintf( pFile, "Support -- the support size\n" );
|
718
|
-
fprintf( pFile, "Obj -- the number of nodes in the DSD manager for each support size\n" );
|
719
|
-
fprintf( pFile, " (the constant node and the primary input node have no support)\n" );
|
720
|
-
fprintf( pFile, "ObjNDSD -- the number of prime nodes (that is, nodes whose function has no DSD)\n" );
|
721
|
-
fprintf( pFile, " (percentage is relative to the number of all nodes of that size)\n" );
|
722
|
-
fprintf( pFile, "NPNNDSD -- the number of different NPN classes of prime nodes\n" );
|
723
|
-
fprintf( pFile, " (Each NPN class may appear more than once. For example: F1 = 17(ab(cd))\n" );
|
724
|
-
fprintf( pFile, " and F2 = 17(ab[cd]) both have prime majority node (hex TT is 17),\n" );
|
725
|
-
fprintf( pFile, " but in one case the majority node is fed by AND, and in another by XOR.\n" );
|
726
|
-
fprintf( pFile, " These two majority nodes are different nodes in the DSD manager\n" );
|
727
|
-
fprintf( pFile, "Str -- the number of structures for each support size\n" );
|
728
|
-
fprintf( pFile, " (each structure is composed of one or more nodes)\n" );
|
729
|
-
fprintf( pFile, "StrNDSD -- the number of DSD structures containing at least one prime node\n" );
|
730
|
-
fprintf( pFile, "Marked -- the number of DSD structures matchable with the LUT structure (say, \"44\")\n" );
|
731
|
-
}
|
732
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
733
|
-
{
|
734
|
-
if ( If_DsdObjType(pObj) == IF_DSD_PRIME )
|
735
|
-
DsdMax = Abc_MaxInt( DsdMax, pObj->nFans );
|
736
|
-
CountPrime += If_DsdObjType(pObj) == IF_DSD_PRIME;
|
737
|
-
CountNonDsdStr += If_DsdManCheckNonDec_rec( p, pObj->Id );
|
738
|
-
CountUsed += ( If_DsdVecObjRef(&p->vObjs, pObj->Id) > 0 );
|
739
|
-
CountMarked += If_DsdVecObjMark( &p->vObjs, i );
|
740
|
-
}
|
741
|
-
for ( v = 3; v <= p->nVars; v++ )
|
742
|
-
{
|
743
|
-
CountNonDsd += Vec_MemEntryNum(p->vTtMem[v]);
|
744
|
-
MemSizeTTs += Vec_MemEntrySize(p->vTtMem[v]) * Vec_MemEntryNum(p->vTtMem[v]);
|
745
|
-
MemSizeDecs += (int)Vec_VecMemoryInt((Vec_Vec_t *)(p->vTtDecs[v]));
|
746
|
-
}
|
747
|
-
If_DsdManPrintDistrib( p );
|
748
|
-
printf( "Number of inputs = %d. LUT size = %d. Marks = %s. NewAsUseless = %s. Bookmark = %d.\n",
|
749
|
-
p->nVars, p->LutSize, If_DsdManHasMarks(p)? "yes" : "no", p->fNewAsUseless? "yes" : "no", p->nObjsPrev );
|
750
|
-
if ( p->pCellStr )
|
751
|
-
printf( "Symbolic cell description: %s\n", p->pCellStr );
|
752
|
-
if ( p->pTtGia )
|
753
|
-
fprintf( pFile, "Non-DSD AIG nodes = %8d\n", Gia_ManAndNum(p->pTtGia) );
|
754
|
-
fprintf( pFile, "Unique table misses = %8d\n", p->nUniqueMisses );
|
755
|
-
fprintf( pFile, "Unique table hits = %8d\n", p->nUniqueHits );
|
756
|
-
fprintf( pFile, "Memory used for objects = %8.2f MB.\n", 1.0*Mem_FlexReadMemUsage(p->pMem)/(1<<20) );
|
757
|
-
fprintf( pFile, "Memory used for functions = %8.2f MB.\n", 8.0*(MemSizeTTs+sizeof(int)*Vec_IntCap(&p->vTruths))/(1<<20) );
|
758
|
-
fprintf( pFile, "Memory used for hash table = %8.2f MB.\n", 1.0*sizeof(int)*(p->nBins+Vec_IntCap(&p->vNexts))/(1<<20) );
|
759
|
-
fprintf( pFile, "Memory used for bound sets = %8.2f MB.\n", 1.0*MemSizeDecs/(1<<20) );
|
760
|
-
fprintf( pFile, "Memory used for array = %8.2f MB.\n", 1.0*sizeof(void *)*Vec_PtrCap(&p->vObjs)/(1<<20) );
|
761
|
-
if ( p->pTtGia )
|
762
|
-
fprintf( pFile, "Memory used for AIG = %8.2f MB.\n", 8.0*Gia_ManAndNum(p->pTtGia)/(1<<20) );
|
763
|
-
if ( p->timeDsd )
|
764
|
-
{
|
765
|
-
Abc_PrintTime( 1, "Time DSD ", p->timeDsd );
|
766
|
-
Abc_PrintTime( 1, "Time canon ", p->timeCanon-p->timeCheck );
|
767
|
-
Abc_PrintTime( 1, "Time check ", p->timeCheck );
|
768
|
-
Abc_PrintTime( 1, "Time check2", p->timeCheck2 );
|
769
|
-
Abc_PrintTime( 1, "Time verify", p->timeVerify );
|
770
|
-
}
|
771
|
-
if ( fOccurs )
|
772
|
-
If_DsdManPrintOccurs( stdout, p );
|
773
|
-
// If_DsdManHashProfile( p );
|
774
|
-
if ( fTtDump )
|
775
|
-
If_DsdManDumpDsd( p, Support );
|
776
|
-
if ( fTtDump )
|
777
|
-
If_DsdManDumpAll( p, Support );
|
778
|
-
// If_DsdManPrintDecs( stdout, p );
|
779
|
-
if ( !fVerbose )
|
780
|
-
return;
|
781
|
-
vStructs = Vec_IntAlloc( 1000 );
|
782
|
-
vCounts = Vec_IntAlloc( 1000 );
|
783
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
784
|
-
{
|
785
|
-
if ( Number && i % Number )
|
786
|
-
continue;
|
787
|
-
if ( Support && Support != If_DsdObjSuppSize(pObj) )
|
788
|
-
continue;
|
789
|
-
Vec_IntPush( vStructs, i );
|
790
|
-
Vec_IntPush( vCounts, -(int)pObj->Count );
|
791
|
-
// If_DsdManPrintOne( pFile, p, pObj->Id, NULL, 1 );
|
792
|
-
}
|
793
|
-
// fprintf( pFile, "\n" );
|
794
|
-
pPerm = Abc_MergeSortCost( Vec_IntArray(vCounts), Vec_IntSize(vCounts) );
|
795
|
-
for ( i = 0; i < Abc_MinInt(Vec_IntSize(vCounts), 20); i++ )
|
796
|
-
{
|
797
|
-
printf( "%2d : ", i+1 );
|
798
|
-
pObj = If_DsdVecObj( &p->vObjs, Vec_IntEntry(vStructs, pPerm[i]) );
|
799
|
-
If_DsdManPrintOne( pFile, p, pObj->Id, NULL, 1 );
|
800
|
-
}
|
801
|
-
ABC_FREE( pPerm );
|
802
|
-
Vec_IntFree( vStructs );
|
803
|
-
Vec_IntFree( vCounts );
|
804
|
-
if ( pFileName )
|
805
|
-
fclose( pFile );
|
806
|
-
}
|
807
|
-
|
808
|
-
/**Function*************************************************************
|
809
|
-
|
810
|
-
Synopsis [Check if the function is non-trivial.]
|
811
|
-
|
812
|
-
Description []
|
813
|
-
|
814
|
-
SideEffects []
|
815
|
-
|
816
|
-
SeeAlso []
|
817
|
-
|
818
|
-
***********************************************************************/
|
819
|
-
int If_DsdManCheckNonTriv( If_DsdMan_t * p, int Id, int nVars, int iVarMax )
|
820
|
-
{
|
821
|
-
If_DsdObj_t * pObj; int i, iFanin;
|
822
|
-
pObj = If_DsdVecObj( &p->vObjs, Id );
|
823
|
-
if ( If_DsdObjType(pObj) == IF_DSD_PRIME )
|
824
|
-
return 1;
|
825
|
-
if ( If_DsdObjFaninNum(pObj) == nVars )
|
826
|
-
return 0;
|
827
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
828
|
-
if ( Abc_Lit2Var(iFanin) == 1 && i == iVarMax )
|
829
|
-
return 0;
|
830
|
-
return 1;
|
831
|
-
}
|
832
|
-
|
833
|
-
/**Function*************************************************************
|
834
|
-
|
835
|
-
Synopsis [Sorting DSD literals.]
|
836
|
-
|
837
|
-
Description []
|
838
|
-
|
839
|
-
SideEffects []
|
840
|
-
|
841
|
-
SeeAlso []
|
842
|
-
|
843
|
-
***********************************************************************/
|
844
|
-
int If_DsdObjCompare( If_DsdMan_t * pMan, Vec_Ptr_t * p, int iLit0, int iLit1 )
|
845
|
-
{
|
846
|
-
If_DsdObj_t * p0 = If_DsdVecObj(p, Abc_Lit2Var(iLit0));
|
847
|
-
If_DsdObj_t * p1 = If_DsdVecObj(p, Abc_Lit2Var(iLit1));
|
848
|
-
int i, Res;
|
849
|
-
if ( If_DsdObjType(p0) < If_DsdObjType(p1) )
|
850
|
-
return -1;
|
851
|
-
if ( If_DsdObjType(p0) > If_DsdObjType(p1) )
|
852
|
-
return 1;
|
853
|
-
if ( If_DsdObjType(p0) < IF_DSD_AND )
|
854
|
-
return 0;
|
855
|
-
if ( If_DsdObjFaninNum(p0) < If_DsdObjFaninNum(p1) )
|
856
|
-
return -1;
|
857
|
-
if ( If_DsdObjFaninNum(p0) > If_DsdObjFaninNum(p1) )
|
858
|
-
return 1;
|
859
|
-
if ( If_DsdObjType(p0) == IF_DSD_PRIME )
|
860
|
-
{
|
861
|
-
if ( If_DsdObjTruthId(pMan, p0) < If_DsdObjTruthId(pMan, p1) )
|
862
|
-
return -1;
|
863
|
-
if ( If_DsdObjTruthId(pMan, p0) > If_DsdObjTruthId(pMan, p1) )
|
864
|
-
return 1;
|
865
|
-
}
|
866
|
-
for ( i = 0; i < If_DsdObjFaninNum(p0); i++ )
|
867
|
-
{
|
868
|
-
Res = If_DsdObjCompare( pMan, p, If_DsdObjFaninLit(p0, i), If_DsdObjFaninLit(p1, i) );
|
869
|
-
if ( Res != 0 )
|
870
|
-
return Res;
|
871
|
-
}
|
872
|
-
if ( Abc_LitIsCompl(iLit0) > Abc_LitIsCompl(iLit1) )
|
873
|
-
return -1;
|
874
|
-
if ( Abc_LitIsCompl(iLit0) < Abc_LitIsCompl(iLit1) )
|
875
|
-
return 1;
|
876
|
-
assert( iLit0 == iLit1 );
|
877
|
-
return 0;
|
878
|
-
}
|
879
|
-
void If_DsdObjSort( If_DsdMan_t * pMan, Vec_Ptr_t * p, int * pLits, int nLits, int * pPerm )
|
880
|
-
{
|
881
|
-
int i, j, best_i;
|
882
|
-
for ( i = 0; i < nLits-1; i++ )
|
883
|
-
{
|
884
|
-
best_i = i;
|
885
|
-
for ( j = i+1; j < nLits; j++ )
|
886
|
-
if ( If_DsdObjCompare(pMan, p, pLits[best_i], pLits[j]) == 1 )
|
887
|
-
best_i = j;
|
888
|
-
if ( i == best_i )
|
889
|
-
continue;
|
890
|
-
ABC_SWAP( int, pLits[i], pLits[best_i] );
|
891
|
-
if ( pPerm )
|
892
|
-
ABC_SWAP( int, pPerm[i], pPerm[best_i] );
|
893
|
-
}
|
894
|
-
}
|
895
|
-
|
896
|
-
/**Function*************************************************************
|
897
|
-
|
898
|
-
Synopsis []
|
899
|
-
|
900
|
-
Description []
|
901
|
-
|
902
|
-
SideEffects []
|
903
|
-
|
904
|
-
SeeAlso []
|
905
|
-
|
906
|
-
***********************************************************************/
|
907
|
-
static inline unsigned If_DsdObjHashKey( If_DsdMan_t * p, int Type, int * pLits, int nLits, int truthId )
|
908
|
-
{
|
909
|
-
static int s_Primes[24] = { 1049, 1297, 1559, 1823, 2089, 2371, 2663, 2909,
|
910
|
-
3221, 3517, 3779, 4073, 4363, 4663, 4973, 5281,
|
911
|
-
5573, 5861, 6199, 6481, 6803, 7109, 7477, 7727 };
|
912
|
-
int i;
|
913
|
-
unsigned uHash = Type * 7873 + nLits * 8147;
|
914
|
-
for ( i = 0; i < nLits; i++ )
|
915
|
-
uHash += pLits[i] * s_Primes[i & 0xF];
|
916
|
-
if ( Type == IF_DSD_PRIME )
|
917
|
-
uHash += truthId * s_Primes[i & 0xF];
|
918
|
-
return uHash % p->nBins;
|
919
|
-
}
|
920
|
-
unsigned * If_DsdObjHashLookup( If_DsdMan_t * p, int Type, int * pLits, int nLits, int truthId )
|
921
|
-
{
|
922
|
-
If_DsdObj_t * pObj;
|
923
|
-
unsigned * pSpot = p->pBins + If_DsdObjHashKey(p, Type, pLits, nLits, truthId);
|
924
|
-
for ( ; *pSpot; pSpot = (unsigned *)Vec_IntEntryP(&p->vNexts, pObj->Id) )
|
925
|
-
{
|
926
|
-
pObj = If_DsdVecObj( &p->vObjs, *pSpot );
|
927
|
-
if ( If_DsdObjType(pObj) == Type &&
|
928
|
-
If_DsdObjFaninNum(pObj) == nLits &&
|
929
|
-
!memcmp(pObj->pFans, pLits, sizeof(int)*If_DsdObjFaninNum(pObj)) &&
|
930
|
-
truthId == If_DsdObjTruthId(p, pObj) )
|
931
|
-
{
|
932
|
-
p->nUniqueHits++;
|
933
|
-
return pSpot;
|
934
|
-
}
|
935
|
-
}
|
936
|
-
p->nUniqueMisses++;
|
937
|
-
return pSpot;
|
938
|
-
}
|
939
|
-
static void If_DsdObjHashResize( If_DsdMan_t * p )
|
940
|
-
{
|
941
|
-
If_DsdObj_t * pObj;
|
942
|
-
unsigned * pSpot;
|
943
|
-
int i, Prev = p->nUniqueMisses;
|
944
|
-
p->nBins = Abc_PrimeCudd( 2 * p->nBins );
|
945
|
-
p->pBins = ABC_REALLOC( unsigned, p->pBins, p->nBins );
|
946
|
-
memset( p->pBins, 0, sizeof(unsigned) * p->nBins );
|
947
|
-
Vec_IntFill( &p->vNexts, Vec_PtrSize(&p->vObjs), 0 );
|
948
|
-
If_DsdVecForEachNode( &p->vObjs, pObj, i )
|
949
|
-
{
|
950
|
-
pSpot = If_DsdObjHashLookup( p, pObj->Type, (int *)pObj->pFans, pObj->nFans, If_DsdObjTruthId(p, pObj) );
|
951
|
-
assert( *pSpot == 0 );
|
952
|
-
*pSpot = pObj->Id;
|
953
|
-
}
|
954
|
-
assert( p->nUniqueMisses - Prev == Vec_PtrSize(&p->vObjs) - 2 );
|
955
|
-
p->nUniqueMisses = Prev;
|
956
|
-
}
|
957
|
-
|
958
|
-
int If_DsdObjCreate( If_DsdMan_t * p, int Type, int * pLits, int nLits, int truthId )
|
959
|
-
{
|
960
|
-
If_DsdObj_t * pObj, * pFanin;
|
961
|
-
int i, iPrev = -1;
|
962
|
-
// check structural canonicity
|
963
|
-
assert( Type != DAU_DSD_MUX || nLits == 3 );
|
964
|
-
// assert( Type != DAU_DSD_MUX || !Abc_LitIsCompl(pLits[0]) );
|
965
|
-
assert( Type != DAU_DSD_MUX || !Abc_LitIsCompl(pLits[1]) || !Abc_LitIsCompl(pLits[2]) );
|
966
|
-
// check that leaves are in good order
|
967
|
-
if ( Type == DAU_DSD_AND || Type == DAU_DSD_XOR )
|
968
|
-
{
|
969
|
-
for ( i = 0; i < nLits; i++ )
|
970
|
-
{
|
971
|
-
pFanin = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(pLits[i]) );
|
972
|
-
assert( Type != DAU_DSD_AND || Abc_LitIsCompl(pLits[i]) || If_DsdObjType(pFanin) != DAU_DSD_AND );
|
973
|
-
assert( Type != DAU_DSD_XOR || If_DsdObjType(pFanin) != DAU_DSD_XOR );
|
974
|
-
assert( iPrev == -1 || If_DsdObjCompare(p, &p->vObjs, iPrev, pLits[i]) <= 0 );
|
975
|
-
iPrev = pLits[i];
|
976
|
-
}
|
977
|
-
}
|
978
|
-
// create new node
|
979
|
-
pObj = If_DsdObjAlloc( p, Type, nLits );
|
980
|
-
if ( Type == DAU_DSD_PRIME )
|
981
|
-
If_DsdObjSetTruth( p, pObj, truthId );
|
982
|
-
assert( pObj->nSupp == 0 );
|
983
|
-
for ( i = 0; i < nLits; i++ )
|
984
|
-
{
|
985
|
-
pObj->pFans[i] = pLits[i];
|
986
|
-
pObj->nSupp += If_DsdVecLitSuppSize(&p->vObjs, pLits[i]);
|
987
|
-
}
|
988
|
-
// check decomposability
|
989
|
-
if ( p->LutSize && !If_DsdManCheckXY(p, Abc_Var2Lit(pObj->Id, 0), p->LutSize, 0, 0, 0, 0) )
|
990
|
-
If_DsdVecObjSetMark( &p->vObjs, pObj->Id );
|
991
|
-
return pObj->Id;
|
992
|
-
}
|
993
|
-
int If_DsdObjFindOrAdd( If_DsdMan_t * p, int Type, int * pLits, int nLits, word * pTruth )
|
994
|
-
{
|
995
|
-
int PrevSize = (Type == IF_DSD_PRIME) ? Vec_MemEntryNum( p->vTtMem[nLits] ) : -1;
|
996
|
-
int objId, truthId = (Type == IF_DSD_PRIME) ? Vec_MemHashInsert(p->vTtMem[nLits], pTruth) : -1;
|
997
|
-
unsigned * pSpot = If_DsdObjHashLookup( p, Type, pLits, nLits, truthId );
|
998
|
-
//abctime clk;
|
999
|
-
if ( *pSpot )
|
1000
|
-
return (int)*pSpot;
|
1001
|
-
//clk = Abc_Clock();
|
1002
|
-
if ( p->LutSize && truthId >= 0 && truthId == Vec_PtrSize(p->vTtDecs[nLits]) )
|
1003
|
-
{
|
1004
|
-
Vec_Int_t * vSets = Dau_DecFindSets_int( pTruth, nLits, p->pSched );
|
1005
|
-
assert( truthId == Vec_MemEntryNum(p->vTtMem[nLits])-1 );
|
1006
|
-
Vec_PtrPush( p->vTtDecs[nLits], vSets );
|
1007
|
-
// Dau_DecPrintSets( vSets, nLits );
|
1008
|
-
}
|
1009
|
-
if ( p->vIsops[nLits] && truthId >= 0 && PrevSize != Vec_MemEntryNum(p->vTtMem[nLits]) )
|
1010
|
-
{
|
1011
|
-
Vec_Int_t * vLevel = Vec_WecPushLevel( p->vIsops[nLits] );
|
1012
|
-
int fCompl = Kit_TruthIsop( (unsigned *)pTruth, nLits, p->vCover, 1 );
|
1013
|
-
if ( fCompl >= 0 && Vec_IntSize(p->vCover) <= 8 )
|
1014
|
-
{
|
1015
|
-
Vec_IntGrow( vLevel, Vec_IntSize(p->vCover) );
|
1016
|
-
Vec_IntAppend( vLevel, p->vCover );
|
1017
|
-
if ( fCompl )
|
1018
|
-
vLevel->nCap ^= (1<<16); // hack to remember complemented attribute
|
1019
|
-
}
|
1020
|
-
assert( Vec_WecSize(p->vIsops[nLits]) == Vec_MemEntryNum(p->vTtMem[nLits]) );
|
1021
|
-
}
|
1022
|
-
if ( p->pTtGia && truthId >= 0 && truthId == Vec_MemEntryNum(p->vTtMem[nLits])-1 )
|
1023
|
-
{
|
1024
|
-
// int nObjOld = Gia_ManAndNum(p->pTtGia);
|
1025
|
-
int Lit = Kit_TruthToGia( p->pTtGia, (unsigned *)pTruth, nLits, p->vCover, NULL, 1 );
|
1026
|
-
// printf( "%d ", Gia_ManAndNum(p->pTtGia)-nObjOld );
|
1027
|
-
Gia_ManAppendCo( p->pTtGia, Lit );
|
1028
|
-
}
|
1029
|
-
//p->timeCheck += Abc_Clock() - clk;
|
1030
|
-
*pSpot = Vec_PtrSize( &p->vObjs );
|
1031
|
-
objId = If_DsdObjCreate( p, Type, pLits, nLits, truthId );
|
1032
|
-
if ( Vec_PtrSize(&p->vObjs) > p->nBins )
|
1033
|
-
If_DsdObjHashResize( p );
|
1034
|
-
return objId;
|
1035
|
-
}
|
1036
|
-
|
1037
|
-
|
1038
|
-
/**Function*************************************************************
|
1039
|
-
|
1040
|
-
Synopsis [Saving/loading DSD manager.]
|
1041
|
-
|
1042
|
-
Description []
|
1043
|
-
|
1044
|
-
SideEffects []
|
1045
|
-
|
1046
|
-
SeeAlso []
|
1047
|
-
|
1048
|
-
***********************************************************************/
|
1049
|
-
void If_DsdManSave( If_DsdMan_t * p, char * pFileName )
|
1050
|
-
{
|
1051
|
-
If_DsdObj_t * pObj;
|
1052
|
-
Vec_Int_t * vSets;
|
1053
|
-
word * pTruth;
|
1054
|
-
int i, v, Num;
|
1055
|
-
FILE * pFile = fopen( pFileName ? pFileName : p->pStore, "wb" );
|
1056
|
-
if ( pFile == NULL )
|
1057
|
-
{
|
1058
|
-
printf( "Writing DSD manager file \"%s\" has failed.\n", pFileName ? pFileName : p->pStore );
|
1059
|
-
return;
|
1060
|
-
}
|
1061
|
-
fwrite( DSD_VERSION, 4, 1, pFile );
|
1062
|
-
Num = p->nVars;
|
1063
|
-
fwrite( &Num, 4, 1, pFile );
|
1064
|
-
Num = p->LutSize;
|
1065
|
-
fwrite( &Num, 4, 1, pFile );
|
1066
|
-
Num = Vec_PtrSize(&p->vObjs);
|
1067
|
-
fwrite( &Num, 4, 1, pFile );
|
1068
|
-
Vec_PtrForEachEntryStart( If_DsdObj_t *, &p->vObjs, pObj, i, 2 )
|
1069
|
-
{
|
1070
|
-
Num = If_DsdObjWordNum( pObj->nFans );
|
1071
|
-
fwrite( &Num, 4, 1, pFile );
|
1072
|
-
fwrite( pObj, sizeof(word)*Num, 1, pFile );
|
1073
|
-
if ( pObj->Type == IF_DSD_PRIME )
|
1074
|
-
fwrite( Vec_IntEntryP(&p->vTruths, i), 4, 1, pFile );
|
1075
|
-
}
|
1076
|
-
for ( v = 3; v <= p->nVars; v++ )
|
1077
|
-
{
|
1078
|
-
int nBytes = sizeof(word)*Vec_MemEntrySize(p->vTtMem[v]);
|
1079
|
-
Num = Vec_MemEntryNum(p->vTtMem[v]);
|
1080
|
-
fwrite( &Num, 4, 1, pFile );
|
1081
|
-
Vec_MemForEachEntry( p->vTtMem[v], pTruth, i )
|
1082
|
-
fwrite( pTruth, nBytes, 1, pFile );
|
1083
|
-
Num = Vec_PtrSize(p->vTtDecs[v]);
|
1084
|
-
fwrite( &Num, 4, 1, pFile );
|
1085
|
-
Vec_PtrForEachEntry( Vec_Int_t *, p->vTtDecs[v], vSets, i )
|
1086
|
-
{
|
1087
|
-
Num = Vec_IntSize(vSets);
|
1088
|
-
fwrite( &Num, 4, 1, pFile );
|
1089
|
-
fwrite( Vec_IntArray(vSets), sizeof(int)*Num, 1, pFile );
|
1090
|
-
}
|
1091
|
-
}
|
1092
|
-
Num = p->nConfigWords;
|
1093
|
-
fwrite( &Num, 4, 1, pFile );
|
1094
|
-
Num = p->nTtBits;
|
1095
|
-
fwrite( &Num, 4, 1, pFile );
|
1096
|
-
Num = p->vConfigs ? Vec_WrdSize(p->vConfigs) : 0;
|
1097
|
-
fwrite( &Num, 4, 1, pFile );
|
1098
|
-
if ( Num )
|
1099
|
-
fwrite( Vec_WrdArray(p->vConfigs), sizeof(word)*Num, 1, pFile );
|
1100
|
-
Num = p->pCellStr ? strlen(p->pCellStr) : 0;
|
1101
|
-
fwrite( &Num, 4, 1, pFile );
|
1102
|
-
if ( Num )
|
1103
|
-
fwrite( p->pCellStr, sizeof(char)*Num, 1, pFile );
|
1104
|
-
fclose( pFile );
|
1105
|
-
}
|
1106
|
-
If_DsdMan_t * If_DsdManLoad( char * pFileName )
|
1107
|
-
{
|
1108
|
-
If_DsdMan_t * p;
|
1109
|
-
If_DsdObj_t * pObj;
|
1110
|
-
Vec_Int_t * vSets;
|
1111
|
-
char pBuffer[10];
|
1112
|
-
unsigned * pSpot;
|
1113
|
-
word * pTruth;
|
1114
|
-
int i, v, Num, Num2, RetValue;
|
1115
|
-
FILE * pFile = fopen( pFileName, "rb" );
|
1116
|
-
if ( pFile == NULL )
|
1117
|
-
{
|
1118
|
-
printf( "Reading DSD manager file \"%s\" has failed.\n", pFileName );
|
1119
|
-
return NULL;
|
1120
|
-
}
|
1121
|
-
RetValue = fread( pBuffer, 4, 1, pFile );
|
1122
|
-
if ( strncmp(pBuffer, DSD_VERSION, strlen(DSD_VERSION)) )
|
1123
|
-
{
|
1124
|
-
printf( "Unrecognized format of file \"%s\".\n", pFileName );
|
1125
|
-
return NULL;
|
1126
|
-
}
|
1127
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1128
|
-
p = If_DsdManAlloc( Num, 0 );
|
1129
|
-
ABC_FREE( p->pStore );
|
1130
|
-
p->pStore = Abc_UtilStrsav( pFileName );
|
1131
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1132
|
-
p->LutSize = Num;
|
1133
|
-
p->pSat = If_ManSatBuildXY( p->LutSize );
|
1134
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1135
|
-
assert( Num >= 2 );
|
1136
|
-
Vec_PtrFillExtra( &p->vObjs, Num, NULL );
|
1137
|
-
Vec_IntFill( &p->vNexts, Num, 0 );
|
1138
|
-
Vec_IntFill( &p->vTruths, Num, -1 );
|
1139
|
-
p->nBins = Abc_PrimeCudd( 2*Num );
|
1140
|
-
p->pBins = ABC_REALLOC( unsigned, p->pBins, p->nBins );
|
1141
|
-
memset( p->pBins, 0, sizeof(unsigned) * p->nBins );
|
1142
|
-
for ( i = 2; i < Vec_PtrSize(&p->vObjs); i++ )
|
1143
|
-
{
|
1144
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1145
|
-
pObj = (If_DsdObj_t *)Mem_FlexEntryFetch( p->pMem, sizeof(word) * Num );
|
1146
|
-
RetValue = fread( pObj, sizeof(word)*Num, 1, pFile );
|
1147
|
-
Vec_PtrWriteEntry( &p->vObjs, i, pObj );
|
1148
|
-
if ( pObj->Type == IF_DSD_PRIME )
|
1149
|
-
{
|
1150
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1151
|
-
Vec_IntWriteEntry( &p->vTruths, i, Num );
|
1152
|
-
}
|
1153
|
-
pSpot = If_DsdObjHashLookup( p, pObj->Type, (int *)pObj->pFans, pObj->nFans, If_DsdObjTruthId(p, pObj) );
|
1154
|
-
assert( *pSpot == 0 );
|
1155
|
-
*pSpot = pObj->Id;
|
1156
|
-
}
|
1157
|
-
assert( p->nUniqueMisses == Vec_PtrSize(&p->vObjs) - 2 );
|
1158
|
-
p->nUniqueMisses = 0;
|
1159
|
-
pTruth = ABC_ALLOC( word, p->nWords );
|
1160
|
-
for ( v = 3; v <= p->nVars; v++ )
|
1161
|
-
{
|
1162
|
-
int nBytes = sizeof(word)*Vec_MemEntrySize(p->vTtMem[v]);
|
1163
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1164
|
-
for ( i = 0; i < Num; i++ )
|
1165
|
-
{
|
1166
|
-
RetValue = fread( pTruth, nBytes, 1, pFile );
|
1167
|
-
Vec_MemHashInsert( p->vTtMem[v], pTruth );
|
1168
|
-
}
|
1169
|
-
assert( Num == Vec_MemEntryNum(p->vTtMem[v]) );
|
1170
|
-
RetValue = fread( &Num2, 4, 1, pFile );
|
1171
|
-
for ( i = 0; i < Num2; i++ )
|
1172
|
-
{
|
1173
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1174
|
-
vSets = Vec_IntAlloc( Num );
|
1175
|
-
RetValue = fread( Vec_IntArray(vSets), sizeof(int)*Num, 1, pFile );
|
1176
|
-
vSets->nSize = Num;
|
1177
|
-
Vec_PtrPush( p->vTtDecs[v], vSets );
|
1178
|
-
}
|
1179
|
-
assert( Num2 == Vec_PtrSize(p->vTtDecs[v]) );
|
1180
|
-
}
|
1181
|
-
ABC_FREE( pTruth );
|
1182
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1183
|
-
p->nConfigWords = Num;
|
1184
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1185
|
-
p->nTtBits = Num;
|
1186
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1187
|
-
if ( RetValue && Num )
|
1188
|
-
{
|
1189
|
-
p->vConfigs = Vec_WrdStart( Num );
|
1190
|
-
RetValue = fread( Vec_WrdArray(p->vConfigs), sizeof(word)*Num, 1, pFile );
|
1191
|
-
}
|
1192
|
-
RetValue = fread( &Num, 4, 1, pFile );
|
1193
|
-
if ( RetValue && Num )
|
1194
|
-
{
|
1195
|
-
p->pCellStr = ABC_CALLOC( char, Num + 1 );
|
1196
|
-
RetValue = fread( p->pCellStr, sizeof(char)*Num, 1, pFile );
|
1197
|
-
}
|
1198
|
-
fclose( pFile );
|
1199
|
-
return p;
|
1200
|
-
}
|
1201
|
-
void If_DsdManMerge( If_DsdMan_t * p, If_DsdMan_t * pNew )
|
1202
|
-
{
|
1203
|
-
If_DsdObj_t * pObj;
|
1204
|
-
Vec_Int_t * vMap;
|
1205
|
-
int pFanins[DAU_MAX_VAR];
|
1206
|
-
int i, k, iFanin, Id;
|
1207
|
-
if ( p->nVars < pNew->nVars )
|
1208
|
-
{
|
1209
|
-
printf( "The number of variables should be the same or smaller.\n" );
|
1210
|
-
return;
|
1211
|
-
}
|
1212
|
-
if ( p->LutSize != pNew->LutSize )
|
1213
|
-
{
|
1214
|
-
printf( "LUT size should be the same.\n" );
|
1215
|
-
return;
|
1216
|
-
}
|
1217
|
-
assert( p->nTtBits == pNew->nTtBits );
|
1218
|
-
assert( p->nConfigWords == pNew->nConfigWords );
|
1219
|
-
if ( If_DsdManHasMarks(p) != If_DsdManHasMarks(pNew) )
|
1220
|
-
printf( "Warning! Old manager has %smarks while new manager has %smarks.\n",
|
1221
|
-
If_DsdManHasMarks(p) ? "" : "no ", If_DsdManHasMarks(pNew) ? "" : "no " );
|
1222
|
-
vMap = Vec_IntAlloc( Vec_PtrSize(&pNew->vObjs) );
|
1223
|
-
Vec_IntPush( vMap, 0 );
|
1224
|
-
Vec_IntPush( vMap, 1 );
|
1225
|
-
if ( p->vConfigs && pNew->vConfigs )
|
1226
|
-
Vec_WrdFillExtra( p->vConfigs, p->nConfigWords * (Vec_PtrSize(&p->vObjs) + Vec_PtrSize(&pNew->vObjs)), 0 );
|
1227
|
-
If_DsdVecForEachNode( &pNew->vObjs, pObj, i )
|
1228
|
-
{
|
1229
|
-
If_DsdObjForEachFaninLit( &pNew->vObjs, pObj, iFanin, k )
|
1230
|
-
pFanins[k] = Abc_Lit2LitV( Vec_IntArray(vMap), iFanin );
|
1231
|
-
Id = If_DsdObjFindOrAdd( p, pObj->Type, pFanins, pObj->nFans, pObj->Type == IF_DSD_PRIME ? If_DsdObjTruth(pNew, pObj) : NULL );
|
1232
|
-
if ( pObj->fMark )
|
1233
|
-
If_DsdVecObjSetMark( &p->vObjs, Id );
|
1234
|
-
if ( p->vConfigs && pNew->vConfigs && p->nConfigWords * i < Vec_WrdSize(pNew->vConfigs) )
|
1235
|
-
{
|
1236
|
-
//Vec_WrdFillExtra( p->vConfigs, Id, Vec_WrdEntry(pNew->vConfigs, i) );
|
1237
|
-
word * pConfigNew = Vec_WrdEntryP(pNew->vConfigs, p->nConfigWords * i);
|
1238
|
-
word * pConfigOld = Vec_WrdEntryP(p->vConfigs, p->nConfigWords * Id);
|
1239
|
-
memcpy( pConfigOld, pConfigNew, sizeof(word) * p->nConfigWords );
|
1240
|
-
}
|
1241
|
-
Vec_IntPush( vMap, Id );
|
1242
|
-
}
|
1243
|
-
assert( Vec_IntSize(vMap) == Vec_PtrSize(&pNew->vObjs) );
|
1244
|
-
Vec_IntFree( vMap );
|
1245
|
-
if ( p->vConfigs && pNew->vConfigs )
|
1246
|
-
Vec_WrdShrink( p->vConfigs, p->nConfigWords * Vec_PtrSize(&p->vObjs) );
|
1247
|
-
}
|
1248
|
-
void If_DsdManCleanOccur( If_DsdMan_t * p, int fVerbose )
|
1249
|
-
{
|
1250
|
-
If_DsdObj_t * pObj;
|
1251
|
-
int i;
|
1252
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
1253
|
-
pObj->Count = 0;
|
1254
|
-
}
|
1255
|
-
void If_DsdManCleanMarks( If_DsdMan_t * p, int fVerbose )
|
1256
|
-
{
|
1257
|
-
If_DsdObj_t * pObj;
|
1258
|
-
int i;
|
1259
|
-
ABC_FREE( p->pCellStr );
|
1260
|
-
Vec_WrdFreeP( &p->vConfigs );
|
1261
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
1262
|
-
pObj->fMark = 0;
|
1263
|
-
}
|
1264
|
-
void If_DsdManInvertMarks( If_DsdMan_t * p, int fVerbose )
|
1265
|
-
{
|
1266
|
-
If_DsdObj_t * pObj;
|
1267
|
-
int i;
|
1268
|
-
ABC_FREE( p->pCellStr );
|
1269
|
-
//Vec_WrdFreeP( &p->vConfigs );
|
1270
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
1271
|
-
pObj->fMark = !pObj->fMark;
|
1272
|
-
}
|
1273
|
-
void If_DsdManFilter_rec( If_DsdMan_t * pNew, If_DsdMan_t * p, int i, Vec_Int_t * vMap )
|
1274
|
-
{
|
1275
|
-
If_DsdObj_t * pObj;
|
1276
|
-
int pFanins[DAU_MAX_VAR];
|
1277
|
-
int k, iFanin, Id;
|
1278
|
-
if ( Vec_IntEntry(vMap, i) >= 0 )
|
1279
|
-
return;
|
1280
|
-
// call recursively
|
1281
|
-
pObj = If_DsdVecObj( &p->vObjs, i );
|
1282
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, k )
|
1283
|
-
If_DsdManFilter_rec( pNew, p, Abc_Lit2Var(iFanin), vMap );
|
1284
|
-
// duplicate this one
|
1285
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, k )
|
1286
|
-
pFanins[k] = Abc_Lit2LitV( Vec_IntArray(vMap), iFanin );
|
1287
|
-
Id = If_DsdObjFindOrAdd( pNew, pObj->Type, pFanins, pObj->nFans, pObj->Type == IF_DSD_PRIME ? If_DsdObjTruth(p, pObj) : NULL );
|
1288
|
-
if ( pObj->fMark )
|
1289
|
-
If_DsdVecObjSetMark( &pNew->vObjs, Id );
|
1290
|
-
If_DsdVecObj( &pNew->vObjs, Id )->Count = pObj->Count;
|
1291
|
-
// save the result
|
1292
|
-
Vec_IntWriteEntry( vMap, i, Id );
|
1293
|
-
}
|
1294
|
-
If_DsdMan_t * If_DsdManFilter( If_DsdMan_t * p, int Limit )
|
1295
|
-
{
|
1296
|
-
If_DsdMan_t * pNew = If_DsdManAlloc( p->nVars, p->LutSize );
|
1297
|
-
If_DsdObj_t * pObj;
|
1298
|
-
Vec_Int_t * vMap;
|
1299
|
-
int i;
|
1300
|
-
vMap = Vec_IntStartFull( Vec_PtrSize(&p->vObjs) );
|
1301
|
-
Vec_IntWriteEntry( vMap, 0, 0 );
|
1302
|
-
Vec_IntWriteEntry( vMap, 1, 1 );
|
1303
|
-
If_DsdVecForEachNode( &p->vObjs, pObj, i )
|
1304
|
-
if ( (int)pObj->Count >= Limit )
|
1305
|
-
If_DsdManFilter_rec( pNew, p, i, vMap );
|
1306
|
-
Vec_IntFree( vMap );
|
1307
|
-
return pNew;
|
1308
|
-
}
|
1309
|
-
|
1310
|
-
/**Function*************************************************************
|
1311
|
-
|
1312
|
-
Synopsis [Collect nodes of the tree.]
|
1313
|
-
|
1314
|
-
Description []
|
1315
|
-
|
1316
|
-
SideEffects []
|
1317
|
-
|
1318
|
-
SeeAlso []
|
1319
|
-
|
1320
|
-
***********************************************************************/
|
1321
|
-
void If_DsdManCollect_rec( If_DsdMan_t * p, int Id, Vec_Int_t * vNodes, Vec_Int_t * vFirsts, int * pnSupp )
|
1322
|
-
{
|
1323
|
-
int i, iFanin, iFirst;
|
1324
|
-
If_DsdObj_t * pObj = If_DsdVecObj( &p->vObjs, Id );
|
1325
|
-
if ( If_DsdObjType(pObj) == IF_DSD_CONST0 )
|
1326
|
-
return;
|
1327
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
1328
|
-
{
|
1329
|
-
(*pnSupp)++;
|
1330
|
-
return;
|
1331
|
-
}
|
1332
|
-
iFirst = *pnSupp;
|
1333
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
1334
|
-
If_DsdManCollect_rec( p, Abc_Lit2Var(iFanin), vNodes, vFirsts, pnSupp );
|
1335
|
-
Vec_IntPush( vNodes, Id );
|
1336
|
-
Vec_IntPush( vFirsts, iFirst );
|
1337
|
-
}
|
1338
|
-
void If_DsdManCollect( If_DsdMan_t * p, int Id, Vec_Int_t * vNodes, Vec_Int_t * vFirsts )
|
1339
|
-
{
|
1340
|
-
int nSupp = 0;
|
1341
|
-
Vec_IntClear( vNodes );
|
1342
|
-
Vec_IntClear( vFirsts );
|
1343
|
-
If_DsdManCollect_rec( p, Id, vNodes, vFirsts, &nSupp );
|
1344
|
-
}
|
1345
|
-
|
1346
|
-
/**Function*************************************************************
|
1347
|
-
|
1348
|
-
Synopsis []
|
1349
|
-
|
1350
|
-
Description []
|
1351
|
-
|
1352
|
-
SideEffects []
|
1353
|
-
|
1354
|
-
SeeAlso []
|
1355
|
-
|
1356
|
-
***********************************************************************/
|
1357
|
-
void If_DsdManComputeTruth_rec( If_DsdMan_t * p, int iDsd, word * pRes, unsigned char * pPermLits, int * pnSupp )
|
1358
|
-
{
|
1359
|
-
int i, iFanin, fCompl = Abc_LitIsCompl(iDsd);
|
1360
|
-
If_DsdObj_t * pObj = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(iDsd) );
|
1361
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
1362
|
-
{
|
1363
|
-
int iPermLit = pPermLits ? (int)pPermLits[*pnSupp] : Abc_Var2Lit(*pnSupp, 0);
|
1364
|
-
(*pnSupp)++;
|
1365
|
-
assert( (*pnSupp) <= p->nVars );
|
1366
|
-
Abc_TtCopy( pRes, p->pTtElems[Abc_Lit2Var(iPermLit)], p->nWords, fCompl ^ Abc_LitIsCompl(iPermLit) );
|
1367
|
-
return;
|
1368
|
-
}
|
1369
|
-
if ( If_DsdObjType(pObj) == IF_DSD_AND || If_DsdObjType(pObj) == IF_DSD_XOR )
|
1370
|
-
{
|
1371
|
-
word pTtTemp[DAU_MAX_WORD];
|
1372
|
-
if ( If_DsdObjType(pObj) == IF_DSD_AND )
|
1373
|
-
Abc_TtConst1( pRes, p->nWords );
|
1374
|
-
else
|
1375
|
-
Abc_TtConst0( pRes, p->nWords );
|
1376
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
1377
|
-
{
|
1378
|
-
If_DsdManComputeTruth_rec( p, iFanin, pTtTemp, pPermLits, pnSupp );
|
1379
|
-
if ( If_DsdObjType(pObj) == IF_DSD_AND )
|
1380
|
-
Abc_TtAnd( pRes, pRes, pTtTemp, p->nWords, 0 );
|
1381
|
-
else
|
1382
|
-
Abc_TtXor( pRes, pRes, pTtTemp, p->nWords, 0 );
|
1383
|
-
}
|
1384
|
-
if ( fCompl ) Abc_TtNot( pRes, p->nWords );
|
1385
|
-
return;
|
1386
|
-
}
|
1387
|
-
if ( If_DsdObjType(pObj) == IF_DSD_MUX ) // mux
|
1388
|
-
{
|
1389
|
-
word pTtTemp[3][DAU_MAX_WORD];
|
1390
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
1391
|
-
If_DsdManComputeTruth_rec( p, iFanin, pTtTemp[i], pPermLits, pnSupp );
|
1392
|
-
assert( i == 3 );
|
1393
|
-
Abc_TtMux( pRes, pTtTemp[0], pTtTemp[1], pTtTemp[2], p->nWords );
|
1394
|
-
if ( fCompl ) Abc_TtNot( pRes, p->nWords );
|
1395
|
-
return;
|
1396
|
-
}
|
1397
|
-
if ( If_DsdObjType(pObj) == IF_DSD_PRIME ) // function
|
1398
|
-
{
|
1399
|
-
word pFanins[DAU_MAX_VAR][DAU_MAX_WORD];
|
1400
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
1401
|
-
If_DsdManComputeTruth_rec( p, iFanin, pFanins[i], pPermLits, pnSupp );
|
1402
|
-
Dau_DsdTruthCompose_rec( If_DsdObjTruth(p, pObj), pFanins, pRes, pObj->nFans, p->nWords );
|
1403
|
-
if ( fCompl ) Abc_TtNot( pRes, p->nWords );
|
1404
|
-
return;
|
1405
|
-
}
|
1406
|
-
assert( 0 );
|
1407
|
-
|
1408
|
-
}
|
1409
|
-
void If_DsdManComputeTruthPtr( If_DsdMan_t * p, int iDsd, unsigned char * pPermLits, word * pRes )
|
1410
|
-
{
|
1411
|
-
int nSupp = 0;
|
1412
|
-
If_DsdObj_t * pObj = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(iDsd) );
|
1413
|
-
if ( iDsd == 0 )
|
1414
|
-
Abc_TtConst0( pRes, p->nWords );
|
1415
|
-
else if ( iDsd == 1 )
|
1416
|
-
Abc_TtConst1( pRes, p->nWords );
|
1417
|
-
else if ( pObj->Type == IF_DSD_VAR )
|
1418
|
-
{
|
1419
|
-
int iPermLit = pPermLits ? (int)pPermLits[nSupp] : Abc_Var2Lit(nSupp, 0);
|
1420
|
-
nSupp++;
|
1421
|
-
Abc_TtCopy( pRes, p->pTtElems[Abc_Lit2Var(iPermLit)], p->nWords, Abc_LitIsCompl(iDsd) ^ Abc_LitIsCompl(iPermLit) );
|
1422
|
-
}
|
1423
|
-
else
|
1424
|
-
If_DsdManComputeTruth_rec( p, iDsd, pRes, pPermLits, &nSupp );
|
1425
|
-
assert( nSupp == If_DsdVecLitSuppSize(&p->vObjs, iDsd) );
|
1426
|
-
}
|
1427
|
-
word * If_DsdManComputeTruth( If_DsdMan_t * p, int iDsd, unsigned char * pPermLits )
|
1428
|
-
{
|
1429
|
-
word * pRes = p->pTtElems[DAU_MAX_VAR];
|
1430
|
-
If_DsdManComputeTruthPtr( p, iDsd, pPermLits, pRes );
|
1431
|
-
return pRes;
|
1432
|
-
}
|
1433
|
-
|
1434
|
-
/**Function*************************************************************
|
1435
|
-
|
1436
|
-
Synopsis [Procedures to propagate the invertor.]
|
1437
|
-
|
1438
|
-
Description []
|
1439
|
-
|
1440
|
-
SideEffects []
|
1441
|
-
|
1442
|
-
SeeAlso []
|
1443
|
-
|
1444
|
-
***********************************************************************/
|
1445
|
-
int If_DsdManCheckInv_rec( If_DsdMan_t * p, int iLit )
|
1446
|
-
{
|
1447
|
-
If_DsdObj_t * pObj;
|
1448
|
-
int i, iFanin;
|
1449
|
-
pObj = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(iLit) );
|
1450
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
1451
|
-
return 1;
|
1452
|
-
if ( If_DsdObjType(pObj) == IF_DSD_AND || If_DsdObjType(pObj) == IF_DSD_PRIME )
|
1453
|
-
return 0;
|
1454
|
-
if ( If_DsdObjType(pObj) == IF_DSD_XOR )
|
1455
|
-
{
|
1456
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
1457
|
-
if ( If_DsdManCheckInv_rec(p, iFanin) )
|
1458
|
-
return 1;
|
1459
|
-
return 0;
|
1460
|
-
}
|
1461
|
-
if ( If_DsdObjType(pObj) == IF_DSD_MUX )
|
1462
|
-
return If_DsdManCheckInv_rec(p, pObj->pFans[1]) && If_DsdManCheckInv_rec(p, pObj->pFans[2]);
|
1463
|
-
assert( 0 );
|
1464
|
-
return 0;
|
1465
|
-
}
|
1466
|
-
int If_DsdManPushInv_rec( If_DsdMan_t * p, int iLit, unsigned char * pPerm )
|
1467
|
-
{
|
1468
|
-
If_DsdObj_t * pObj;
|
1469
|
-
int i, iFanin;
|
1470
|
-
pObj = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(iLit) );
|
1471
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
1472
|
-
pPerm[0] = (unsigned char)Abc_LitNot((int)pPerm[0]);
|
1473
|
-
else if ( If_DsdObjType(pObj) == IF_DSD_XOR )
|
1474
|
-
{
|
1475
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
1476
|
-
{
|
1477
|
-
if ( If_DsdManCheckInv_rec(p, iFanin) )
|
1478
|
-
{
|
1479
|
-
If_DsdManPushInv_rec( p, iFanin, pPerm );
|
1480
|
-
break;
|
1481
|
-
}
|
1482
|
-
pPerm += If_DsdVecLitSuppSize(&p->vObjs, iFanin);
|
1483
|
-
}
|
1484
|
-
}
|
1485
|
-
else if ( If_DsdObjType(pObj) == IF_DSD_MUX )
|
1486
|
-
{
|
1487
|
-
assert( If_DsdManCheckInv_rec(p, pObj->pFans[1]) && If_DsdManCheckInv_rec(p, pObj->pFans[2]) );
|
1488
|
-
pPerm += If_DsdVecLitSuppSize(&p->vObjs, pObj->pFans[0]);
|
1489
|
-
If_DsdManPushInv_rec(p, pObj->pFans[1], pPerm);
|
1490
|
-
pPerm += If_DsdVecLitSuppSize(&p->vObjs, pObj->pFans[1]);
|
1491
|
-
If_DsdManPushInv_rec(p, pObj->pFans[2], pPerm);
|
1492
|
-
}
|
1493
|
-
else assert( 0 );
|
1494
|
-
return 1;
|
1495
|
-
}
|
1496
|
-
int If_DsdManPushInv( If_DsdMan_t * p, int iLit, unsigned char * pPerm )
|
1497
|
-
{
|
1498
|
-
if ( Abc_LitIsCompl(iLit) && If_DsdManCheckInv_rec(p, iLit) )
|
1499
|
-
return If_DsdManPushInv_rec( p, iLit, pPerm );
|
1500
|
-
return 0;
|
1501
|
-
}
|
1502
|
-
|
1503
|
-
/**Function*************************************************************
|
1504
|
-
|
1505
|
-
Synopsis [Performs DSD operation.]
|
1506
|
-
|
1507
|
-
Description []
|
1508
|
-
|
1509
|
-
SideEffects []
|
1510
|
-
|
1511
|
-
SeeAlso []
|
1512
|
-
|
1513
|
-
***********************************************************************/
|
1514
|
-
int If_DsdManComputeFirstArray( If_DsdMan_t * p, int * pLits, int nLits, int * pFirsts )
|
1515
|
-
{
|
1516
|
-
int i, nSSize = 0;
|
1517
|
-
for ( i = 0; i < nLits; i++ )
|
1518
|
-
{
|
1519
|
-
pFirsts[i] = nSSize;
|
1520
|
-
nSSize += If_DsdVecLitSuppSize(&p->vObjs, pLits[i]);
|
1521
|
-
}
|
1522
|
-
return nSSize;
|
1523
|
-
}
|
1524
|
-
int If_DsdManComputeFirst( If_DsdMan_t * p, If_DsdObj_t * pObj, int * pFirsts )
|
1525
|
-
{
|
1526
|
-
return If_DsdManComputeFirstArray( p, (int *)pObj->pFans, pObj->nFans, pFirsts );
|
1527
|
-
}
|
1528
|
-
int If_DsdManOperation( If_DsdMan_t * p, int Type, int * pLits, int nLits, unsigned char * pPerm, word * pTruth )
|
1529
|
-
{
|
1530
|
-
If_DsdObj_t * pObj, * pFanin;
|
1531
|
-
unsigned char pPermNew[DAU_MAX_VAR], * pPermStart = pPerm;
|
1532
|
-
int nChildren = 0, pChildren[DAU_MAX_VAR], pBegEnd[DAU_MAX_VAR];
|
1533
|
-
int i, k, j, Id, iFanin, fCompl = 0, nSSize = 0;
|
1534
|
-
if ( Type == IF_DSD_AND || Type == IF_DSD_XOR )
|
1535
|
-
{
|
1536
|
-
for ( k = 0; k < nLits; k++ )
|
1537
|
-
{
|
1538
|
-
if ( Type == IF_DSD_XOR && Abc_LitIsCompl(pLits[k]) )
|
1539
|
-
{
|
1540
|
-
pLits[k] = Abc_LitNot(pLits[k]);
|
1541
|
-
fCompl ^= 1;
|
1542
|
-
}
|
1543
|
-
pObj = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(pLits[k]) );
|
1544
|
-
if ( Type == If_DsdObjType(pObj) && (Type == IF_DSD_XOR || !Abc_LitIsCompl(pLits[k])) )
|
1545
|
-
{
|
1546
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
1547
|
-
{
|
1548
|
-
assert( Type == IF_DSD_AND || !Abc_LitIsCompl(iFanin) );
|
1549
|
-
pChildren[nChildren] = iFanin;
|
1550
|
-
pBegEnd[nChildren++] = (nSSize << 16) | (nSSize + If_DsdVecLitSuppSize(&p->vObjs, iFanin));
|
1551
|
-
nSSize += If_DsdVecLitSuppSize(&p->vObjs, iFanin);
|
1552
|
-
}
|
1553
|
-
}
|
1554
|
-
else
|
1555
|
-
{
|
1556
|
-
pChildren[nChildren] = Abc_LitNotCond( pLits[k], If_DsdManPushInv(p, pLits[k], pPermStart) );
|
1557
|
-
pBegEnd[nChildren++] = (nSSize << 16) | (nSSize + If_DsdObjSuppSize(pObj));
|
1558
|
-
nSSize += If_DsdObjSuppSize(pObj);
|
1559
|
-
}
|
1560
|
-
pPermStart += If_DsdObjSuppSize(pObj);
|
1561
|
-
}
|
1562
|
-
If_DsdObjSort( p, &p->vObjs, pChildren, nChildren, pBegEnd );
|
1563
|
-
// create permutation
|
1564
|
-
for ( j = i = 0; i < nChildren; i++ )
|
1565
|
-
for ( k = (pBegEnd[i] >> 16); k < (pBegEnd[i] & 0xFF); k++ )
|
1566
|
-
pPermNew[j++] = pPerm[k];
|
1567
|
-
assert( j == nSSize );
|
1568
|
-
for ( j = 0; j < nSSize; j++ )
|
1569
|
-
pPerm[j] = pPermNew[j];
|
1570
|
-
}
|
1571
|
-
else if ( Type == IF_DSD_MUX )
|
1572
|
-
{
|
1573
|
-
int RetValue;
|
1574
|
-
assert( nLits == 3 );
|
1575
|
-
for ( k = 0; k < nLits; k++ )
|
1576
|
-
{
|
1577
|
-
pFanin = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(pLits[k]) );
|
1578
|
-
pLits[k] = Abc_LitNotCond( pLits[k], If_DsdManPushInv(p, pLits[k], pPermStart) );
|
1579
|
-
pPermStart += pFanin->nSupp;
|
1580
|
-
}
|
1581
|
-
RetValue = If_DsdObjCompare( p, &p->vObjs, pLits[1], pLits[2] );
|
1582
|
-
if ( RetValue == 1 || (RetValue == 0 && Abc_LitIsCompl(pLits[0])) )
|
1583
|
-
{
|
1584
|
-
int nSupp0 = If_DsdVecLitSuppSize( &p->vObjs, pLits[0] );
|
1585
|
-
int nSupp1 = If_DsdVecLitSuppSize( &p->vObjs, pLits[1] );
|
1586
|
-
int nSupp2 = If_DsdVecLitSuppSize( &p->vObjs, pLits[2] );
|
1587
|
-
pLits[0] = Abc_LitNot(pLits[0]);
|
1588
|
-
ABC_SWAP( int, pLits[1], pLits[2] );
|
1589
|
-
for ( j = k = 0; k < nSupp0; k++ )
|
1590
|
-
pPermNew[j++] = pPerm[k];
|
1591
|
-
for ( k = 0; k < nSupp2; k++ )
|
1592
|
-
pPermNew[j++] = pPerm[nSupp0 + nSupp1 + k];
|
1593
|
-
for ( k = 0; k < nSupp1; k++ )
|
1594
|
-
pPermNew[j++] = pPerm[nSupp0 + k];
|
1595
|
-
for ( j = 0; j < nSupp0 + nSupp1 + nSupp2; j++ )
|
1596
|
-
pPerm[j] = pPermNew[j];
|
1597
|
-
}
|
1598
|
-
if ( Abc_LitIsCompl(pLits[1]) )
|
1599
|
-
{
|
1600
|
-
pLits[1] = Abc_LitNot(pLits[1]);
|
1601
|
-
pLits[2] = Abc_LitNot(pLits[2]);
|
1602
|
-
fCompl ^= 1;
|
1603
|
-
}
|
1604
|
-
pPermStart = pPerm;
|
1605
|
-
for ( k = 0; k < nLits; k++ )
|
1606
|
-
{
|
1607
|
-
pFanin = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(pLits[k]) );
|
1608
|
-
pChildren[nChildren++] = Abc_LitNotCond( pLits[k], If_DsdManPushInv(p, pLits[k], pPermStart) );
|
1609
|
-
pPermStart += pFanin->nSupp;
|
1610
|
-
}
|
1611
|
-
}
|
1612
|
-
else if ( Type == IF_DSD_PRIME )
|
1613
|
-
{
|
1614
|
-
char pCanonPerm[DAU_MAX_VAR];
|
1615
|
-
int i, uCanonPhase, pFirsts[DAU_MAX_VAR];
|
1616
|
-
uCanonPhase = Abc_TtCanonicize( pTruth, nLits, pCanonPerm );
|
1617
|
-
fCompl = ((uCanonPhase >> nLits) & 1);
|
1618
|
-
nSSize = If_DsdManComputeFirstArray( p, pLits, nLits, pFirsts );
|
1619
|
-
for ( j = i = 0; i < nLits; i++ )
|
1620
|
-
{
|
1621
|
-
int iLitNew = Abc_LitNotCond( pLits[(int)pCanonPerm[i]], ((uCanonPhase>>i)&1) );
|
1622
|
-
pFanin = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(iLitNew) );
|
1623
|
-
pPermStart = pPerm + pFirsts[(int)pCanonPerm[i]];
|
1624
|
-
pChildren[nChildren++] = Abc_LitNotCond( iLitNew, If_DsdManPushInv(p, iLitNew, pPermStart) );
|
1625
|
-
for ( k = 0; k < (int)pFanin->nSupp; k++ )
|
1626
|
-
pPermNew[j++] = pPermStart[k];
|
1627
|
-
}
|
1628
|
-
assert( j == nSSize );
|
1629
|
-
for ( j = 0; j < nSSize; j++ )
|
1630
|
-
pPerm[j] = pPermNew[j];
|
1631
|
-
Abc_TtStretch6( pTruth, nLits, p->nVars );
|
1632
|
-
}
|
1633
|
-
else assert( 0 );
|
1634
|
-
// create new graph
|
1635
|
-
Id = If_DsdObjFindOrAdd( p, Type, pChildren, nChildren, pTruth );
|
1636
|
-
return Abc_Var2Lit( Id, fCompl );
|
1637
|
-
}
|
1638
|
-
|
1639
|
-
/**Function*************************************************************
|
1640
|
-
|
1641
|
-
Synopsis [Creating DSD network from SOP.]
|
1642
|
-
|
1643
|
-
Description []
|
1644
|
-
|
1645
|
-
SideEffects []
|
1646
|
-
|
1647
|
-
SeeAlso []
|
1648
|
-
|
1649
|
-
***********************************************************************/
|
1650
|
-
static inline void If_DsdMergeMatches( char * pDsd, int * pMatches )
|
1651
|
-
{
|
1652
|
-
int pNested[DAU_MAX_VAR];
|
1653
|
-
int i, nNested = 0;
|
1654
|
-
for ( i = 0; pDsd[i]; i++ )
|
1655
|
-
{
|
1656
|
-
pMatches[i] = 0;
|
1657
|
-
if ( pDsd[i] == '(' || pDsd[i] == '[' || pDsd[i] == '<' || pDsd[i] == '{' )
|
1658
|
-
pNested[nNested++] = i;
|
1659
|
-
else if ( pDsd[i] == ')' || pDsd[i] == ']' || pDsd[i] == '>' || pDsd[i] == '}' )
|
1660
|
-
pMatches[pNested[--nNested]] = i;
|
1661
|
-
assert( nNested < DAU_MAX_VAR );
|
1662
|
-
}
|
1663
|
-
assert( nNested == 0 );
|
1664
|
-
}
|
1665
|
-
int If_DsdManAddDsd_rec( char * pStr, char ** p, int * pMatches, If_DsdMan_t * pMan, word * pTruth, unsigned char * pPerm, int * pnSupp )
|
1666
|
-
{
|
1667
|
-
unsigned char * pPermStart = pPerm + *pnSupp;
|
1668
|
-
int iRes = -1, fCompl = 0;
|
1669
|
-
if ( **p == '!' )
|
1670
|
-
{
|
1671
|
-
fCompl = 1;
|
1672
|
-
(*p)++;
|
1673
|
-
}
|
1674
|
-
if ( **p >= 'a' && **p <= 'z' ) // var
|
1675
|
-
{
|
1676
|
-
pPerm[(*pnSupp)++] = Abc_Var2Lit( **p - 'a', fCompl );
|
1677
|
-
return 2;
|
1678
|
-
}
|
1679
|
-
if ( **p == '(' || **p == '[' || **p == '<' || **p == '{' ) // and/or/xor
|
1680
|
-
{
|
1681
|
-
int Type = 0, nLits = 0, pLits[DAU_MAX_VAR];
|
1682
|
-
char * q = pStr + pMatches[ *p - pStr ];
|
1683
|
-
if ( **p == '(' )
|
1684
|
-
Type = DAU_DSD_AND;
|
1685
|
-
else if ( **p == '[' )
|
1686
|
-
Type = DAU_DSD_XOR;
|
1687
|
-
else if ( **p == '<' )
|
1688
|
-
Type = DAU_DSD_MUX;
|
1689
|
-
else if ( **p == '{' )
|
1690
|
-
Type = DAU_DSD_PRIME;
|
1691
|
-
else assert( 0 );
|
1692
|
-
assert( *q == **p + 1 + (**p != '(') );
|
1693
|
-
for ( (*p)++; *p < q; (*p)++ )
|
1694
|
-
pLits[nLits++] = If_DsdManAddDsd_rec( pStr, p, pMatches, pMan, pTruth, pPerm, pnSupp );
|
1695
|
-
assert( *p == q );
|
1696
|
-
iRes = If_DsdManOperation( pMan, Type, pLits, nLits, pPermStart, pTruth );
|
1697
|
-
return Abc_LitNotCond( iRes, fCompl );
|
1698
|
-
}
|
1699
|
-
if ( (**p >= 'A' && **p <= 'F') || (**p >= '0' && **p <= '9') )
|
1700
|
-
{
|
1701
|
-
word pFunc[DAU_MAX_WORD];
|
1702
|
-
int nLits = 0, pLits[DAU_MAX_VAR];
|
1703
|
-
char * q;
|
1704
|
-
int i, nVarsF = Abc_TtReadHex( pFunc, *p );
|
1705
|
-
*p += Abc_TtHexDigitNum( nVarsF );
|
1706
|
-
q = pStr + pMatches[ *p - pStr ];
|
1707
|
-
assert( **p == '{' && *q == '}' );
|
1708
|
-
for ( i = 0, (*p)++; *p < q; (*p)++, i++ )
|
1709
|
-
pLits[nLits++] = If_DsdManAddDsd_rec( pStr, p, pMatches, pMan, pTruth, pPerm, pnSupp );
|
1710
|
-
assert( i == nVarsF );
|
1711
|
-
assert( *p == q );
|
1712
|
-
iRes = If_DsdManOperation( pMan, DAU_DSD_PRIME, pLits, nLits, pPermStart, pFunc );
|
1713
|
-
return Abc_LitNotCond( iRes, fCompl );
|
1714
|
-
}
|
1715
|
-
assert( 0 );
|
1716
|
-
return -1;
|
1717
|
-
}
|
1718
|
-
int If_DsdManAddDsd( If_DsdMan_t * p, char * pDsd, word * pTruth, unsigned char * pPerm, int * pnSupp )
|
1719
|
-
{
|
1720
|
-
int iRes = -1, fCompl = 0;
|
1721
|
-
if ( *pDsd == '!' )
|
1722
|
-
pDsd++, fCompl = 1;
|
1723
|
-
if ( Dau_DsdIsConst0(pDsd) )
|
1724
|
-
iRes = 0;
|
1725
|
-
else if ( Dau_DsdIsConst1(pDsd) )
|
1726
|
-
iRes = 1;
|
1727
|
-
else if ( Dau_DsdIsVar(pDsd) )
|
1728
|
-
{
|
1729
|
-
pPerm[(*pnSupp)++] = Dau_DsdReadVar(pDsd);
|
1730
|
-
iRes = 2;
|
1731
|
-
}
|
1732
|
-
else
|
1733
|
-
{
|
1734
|
-
int pMatches[DAU_MAX_STR];
|
1735
|
-
If_DsdMergeMatches( pDsd, pMatches );
|
1736
|
-
iRes = If_DsdManAddDsd_rec( pDsd, &pDsd, pMatches, p, pTruth, pPerm, pnSupp );
|
1737
|
-
}
|
1738
|
-
return Abc_LitNotCond( iRes, fCompl );
|
1739
|
-
}
|
1740
|
-
|
1741
|
-
/**Function*************************************************************
|
1742
|
-
|
1743
|
-
Synopsis [Returns 1 if XY-decomposability holds to this LUT size.]
|
1744
|
-
|
1745
|
-
Description []
|
1746
|
-
|
1747
|
-
SideEffects []
|
1748
|
-
|
1749
|
-
SeeAlso []
|
1750
|
-
|
1751
|
-
***********************************************************************/
|
1752
|
-
// create signature of the support of the node
|
1753
|
-
unsigned If_DsdSign_rec( If_DsdMan_t * p, If_DsdObj_t * pObj, int * pnSupp )
|
1754
|
-
{
|
1755
|
-
unsigned uSign = 0; int i;
|
1756
|
-
If_DsdObj_t * pFanin;
|
1757
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
1758
|
-
return (1 << (2*(*pnSupp)++));
|
1759
|
-
If_DsdObjForEachFanin( &p->vObjs, pObj, pFanin, i )
|
1760
|
-
uSign |= If_DsdSign_rec( p, pFanin, pnSupp );
|
1761
|
-
return uSign;
|
1762
|
-
}
|
1763
|
-
unsigned If_DsdSign( If_DsdMan_t * p, If_DsdObj_t * pObj, int iFan, int iFirst, int fShared )
|
1764
|
-
{
|
1765
|
-
If_DsdObj_t * pFanin = If_DsdObjFanin( &p->vObjs, pObj, iFan );
|
1766
|
-
unsigned uSign = If_DsdSign_rec( p, pFanin, &iFirst );
|
1767
|
-
return fShared ? (uSign << 1) | uSign : uSign;
|
1768
|
-
}
|
1769
|
-
// collect supports of the node
|
1770
|
-
void If_DsdManGetSuppSizes( If_DsdMan_t * p, If_DsdObj_t * pObj, int * pSSizes )
|
1771
|
-
{
|
1772
|
-
If_DsdObj_t * pFanin; int i;
|
1773
|
-
If_DsdObjForEachFanin( &p->vObjs, pObj, pFanin, i )
|
1774
|
-
pSSizes[i] = If_DsdObjSuppSize(pFanin);
|
1775
|
-
}
|
1776
|
-
// checks if there is a way to package some fanins
|
1777
|
-
unsigned If_DsdManCheckAndXor( If_DsdMan_t * p, int iFirst, unsigned uMaskNot, If_DsdObj_t * pObj, int nSuppAll, int LutSize, int fDerive, int fVerbose )
|
1778
|
-
{
|
1779
|
-
int i[6], LimitOut, SizeIn, SizeOut, pSSizes[DAU_MAX_VAR];
|
1780
|
-
int nFans = If_DsdObjFaninNum(pObj), pFirsts[DAU_MAX_VAR];
|
1781
|
-
unsigned uRes;
|
1782
|
-
assert( pObj->nFans > 2 );
|
1783
|
-
assert( If_DsdObjSuppSize(pObj) > LutSize );
|
1784
|
-
If_DsdManGetSuppSizes( p, pObj, pSSizes );
|
1785
|
-
LimitOut = LutSize - (nSuppAll - pObj->nSupp + 1);
|
1786
|
-
assert( LimitOut < LutSize );
|
1787
|
-
for ( i[0] = 0; i[0] < nFans; i[0]++ )
|
1788
|
-
for ( i[1] = i[0]+1; i[1] < nFans; i[1]++ )
|
1789
|
-
{
|
1790
|
-
SizeIn = pSSizes[i[0]] + pSSizes[i[1]];
|
1791
|
-
SizeOut = pObj->nSupp - SizeIn;
|
1792
|
-
if ( SizeIn > LutSize || SizeOut > LimitOut )
|
1793
|
-
continue;
|
1794
|
-
if ( !fDerive )
|
1795
|
-
return ~0;
|
1796
|
-
If_DsdManComputeFirst( p, pObj, pFirsts );
|
1797
|
-
uRes = If_DsdSign(p, pObj, i[0], iFirst + pFirsts[i[0]], 0) |
|
1798
|
-
If_DsdSign(p, pObj, i[1], iFirst + pFirsts[i[1]], 0);
|
1799
|
-
if ( uRes & uMaskNot )
|
1800
|
-
continue;
|
1801
|
-
return uRes;
|
1802
|
-
}
|
1803
|
-
if ( pObj->nFans == 3 )
|
1804
|
-
return 0;
|
1805
|
-
for ( i[0] = 0; i[0] < nFans; i[0]++ )
|
1806
|
-
for ( i[1] = i[0]+1; i[1] < nFans; i[1]++ )
|
1807
|
-
for ( i[2] = i[1]+1; i[2] < nFans; i[2]++ )
|
1808
|
-
{
|
1809
|
-
SizeIn = pSSizes[i[0]] + pSSizes[i[1]] + pSSizes[i[2]];
|
1810
|
-
SizeOut = pObj->nSupp - SizeIn;
|
1811
|
-
if ( SizeIn > LutSize || SizeOut > LimitOut )
|
1812
|
-
continue;
|
1813
|
-
if ( !fDerive )
|
1814
|
-
return ~0;
|
1815
|
-
If_DsdManComputeFirst( p, pObj, pFirsts );
|
1816
|
-
uRes = If_DsdSign(p, pObj, i[0], iFirst + pFirsts[i[0]], 0) |
|
1817
|
-
If_DsdSign(p, pObj, i[1], iFirst + pFirsts[i[1]], 0) |
|
1818
|
-
If_DsdSign(p, pObj, i[2], iFirst + pFirsts[i[2]], 0);
|
1819
|
-
if ( uRes & uMaskNot )
|
1820
|
-
continue;
|
1821
|
-
return uRes;
|
1822
|
-
}
|
1823
|
-
if ( pObj->nFans == 4 )
|
1824
|
-
return 0;
|
1825
|
-
for ( i[0] = 0; i[0] < nFans; i[0]++ )
|
1826
|
-
for ( i[1] = i[0]+1; i[1] < nFans; i[1]++ )
|
1827
|
-
for ( i[2] = i[1]+1; i[2] < nFans; i[2]++ )
|
1828
|
-
for ( i[3] = i[2]+1; i[3] < nFans; i[3]++ )
|
1829
|
-
{
|
1830
|
-
SizeIn = pSSizes[i[0]] + pSSizes[i[1]] + pSSizes[i[2]] + pSSizes[i[3]];
|
1831
|
-
SizeOut = pObj->nSupp - SizeIn;
|
1832
|
-
if ( SizeIn > LutSize || SizeOut > LimitOut )
|
1833
|
-
continue;
|
1834
|
-
if ( !fDerive )
|
1835
|
-
return ~0;
|
1836
|
-
If_DsdManComputeFirst( p, pObj, pFirsts );
|
1837
|
-
uRes = If_DsdSign(p, pObj, i[0], iFirst + pFirsts[i[0]], 0) |
|
1838
|
-
If_DsdSign(p, pObj, i[1], iFirst + pFirsts[i[1]], 0) |
|
1839
|
-
If_DsdSign(p, pObj, i[2], iFirst + pFirsts[i[2]], 0) |
|
1840
|
-
If_DsdSign(p, pObj, i[3], iFirst + pFirsts[i[3]], 0);
|
1841
|
-
if ( uRes & uMaskNot )
|
1842
|
-
continue;
|
1843
|
-
return uRes;
|
1844
|
-
}
|
1845
|
-
return 0;
|
1846
|
-
}
|
1847
|
-
// checks if there is a way to package some fanins
|
1848
|
-
unsigned If_DsdManCheckMux( If_DsdMan_t * p, int iFirst, unsigned uMaskNot, If_DsdObj_t * pObj, int nSuppAll, int LutSize, int fDerive, int fVerbose )
|
1849
|
-
{
|
1850
|
-
int LimitOut, SizeIn, SizeOut, pSSizes[DAU_MAX_VAR], pFirsts[DAU_MAX_VAR];
|
1851
|
-
unsigned uRes;
|
1852
|
-
assert( If_DsdObjFaninNum(pObj) == 3 );
|
1853
|
-
assert( If_DsdObjSuppSize(pObj) > LutSize );
|
1854
|
-
If_DsdManGetSuppSizes( p, pObj, pSSizes );
|
1855
|
-
LimitOut = LutSize - (nSuppAll - If_DsdObjSuppSize(pObj) + 1);
|
1856
|
-
assert( LimitOut < LutSize );
|
1857
|
-
// first input
|
1858
|
-
SizeIn = pSSizes[0] + pSSizes[1];
|
1859
|
-
SizeOut = pSSizes[0] + pSSizes[2] + 1;
|
1860
|
-
if ( SizeIn <= LutSize && SizeOut <= LimitOut )
|
1861
|
-
{
|
1862
|
-
if ( !fDerive )
|
1863
|
-
return ~0;
|
1864
|
-
If_DsdManComputeFirst( p, pObj, pFirsts );
|
1865
|
-
uRes = If_DsdSign(p, pObj, 0, iFirst + pFirsts[0], 1) | If_DsdSign(p, pObj, 1, iFirst + pFirsts[1], 0);
|
1866
|
-
if ( (uRes & uMaskNot) == 0 )
|
1867
|
-
return uRes;
|
1868
|
-
}
|
1869
|
-
// second input
|
1870
|
-
SizeIn = pSSizes[0] + pSSizes[2];
|
1871
|
-
SizeOut = pSSizes[0] + pSSizes[1] + 1;
|
1872
|
-
if ( SizeIn <= LutSize && SizeOut <= LimitOut )
|
1873
|
-
{
|
1874
|
-
if ( !fDerive )
|
1875
|
-
return ~0;
|
1876
|
-
If_DsdManComputeFirst( p, pObj, pFirsts );
|
1877
|
-
uRes = If_DsdSign(p, pObj, 0, iFirst + pFirsts[0], 1) | If_DsdSign(p, pObj, 2, iFirst + pFirsts[2], 0);
|
1878
|
-
if ( (uRes & uMaskNot) == 0 )
|
1879
|
-
return uRes;
|
1880
|
-
}
|
1881
|
-
return 0;
|
1882
|
-
}
|
1883
|
-
// checks if there is a way to package some fanins
|
1884
|
-
unsigned If_DsdManCheckPrime( If_DsdMan_t * p, int iFirst, unsigned uMaskNot, If_DsdObj_t * pObj, int nSuppAll, int LutSize, int fDerive, int fVerbose )
|
1885
|
-
{
|
1886
|
-
int i, v, set, LimitOut, SizeIn, SizeOut, pSSizes[DAU_MAX_VAR], pFirsts[DAU_MAX_VAR];
|
1887
|
-
int truthId = If_DsdObjTruthId(p, pObj);
|
1888
|
-
int nFans = If_DsdObjFaninNum(pObj);
|
1889
|
-
Vec_Int_t * vSets = (Vec_Int_t *)Vec_PtrEntry(p->vTtDecs[pObj->nFans], truthId);
|
1890
|
-
if ( fVerbose )
|
1891
|
-
printf( "\n" );
|
1892
|
-
if ( fVerbose )
|
1893
|
-
Dau_DecPrintSets( vSets, nFans );
|
1894
|
-
assert( If_DsdObjFaninNum(pObj) > 2 );
|
1895
|
-
assert( If_DsdObjSuppSize(pObj) > LutSize );
|
1896
|
-
If_DsdManGetSuppSizes( p, pObj, pSSizes );
|
1897
|
-
LimitOut = LutSize - (nSuppAll - If_DsdObjSuppSize(pObj) + 1);
|
1898
|
-
assert( LimitOut < LutSize );
|
1899
|
-
Vec_IntForEachEntry( vSets, set, i )
|
1900
|
-
{
|
1901
|
-
SizeIn = SizeOut = 0;
|
1902
|
-
for ( v = 0; v < nFans; v++ )
|
1903
|
-
{
|
1904
|
-
int Value = ((set >> (v << 1)) & 3);
|
1905
|
-
if ( Value == 0 )
|
1906
|
-
SizeOut += pSSizes[v];
|
1907
|
-
else if ( Value == 1 )
|
1908
|
-
SizeIn += pSSizes[v];
|
1909
|
-
else if ( Value == 3 )
|
1910
|
-
{
|
1911
|
-
SizeIn += pSSizes[v];
|
1912
|
-
SizeOut += pSSizes[v];
|
1913
|
-
}
|
1914
|
-
else assert( 0 );
|
1915
|
-
if ( SizeIn > LutSize || SizeOut > LimitOut )
|
1916
|
-
break;
|
1917
|
-
}
|
1918
|
-
if ( v == nFans )
|
1919
|
-
{
|
1920
|
-
unsigned uRes = 0;
|
1921
|
-
if ( !fDerive )
|
1922
|
-
return ~0;
|
1923
|
-
If_DsdManComputeFirst( p, pObj, pFirsts );
|
1924
|
-
for ( v = 0; v < nFans; v++ )
|
1925
|
-
{
|
1926
|
-
int Value = ((set >> (v << 1)) & 3);
|
1927
|
-
if ( Value == 0 )
|
1928
|
-
{}
|
1929
|
-
else if ( Value == 1 )
|
1930
|
-
uRes |= If_DsdSign(p, pObj, v, iFirst + pFirsts[v], 0);
|
1931
|
-
else if ( Value == 3 )
|
1932
|
-
uRes |= If_DsdSign(p, pObj, v, iFirst + pFirsts[v], 1);
|
1933
|
-
else assert( 0 );
|
1934
|
-
}
|
1935
|
-
if ( uRes & uMaskNot )
|
1936
|
-
continue;
|
1937
|
-
return uRes;
|
1938
|
-
}
|
1939
|
-
}
|
1940
|
-
return 0;
|
1941
|
-
}
|
1942
|
-
unsigned If_DsdManCheckXY_int( If_DsdMan_t * p, int iDsd, int LutSize, int fDerive, unsigned uMaskNot, int fVerbose )
|
1943
|
-
{
|
1944
|
-
If_DsdObj_t * pObj, * pTemp;
|
1945
|
-
int i, Mask, iFirst;
|
1946
|
-
unsigned uRes;
|
1947
|
-
pObj = If_DsdVecObj( &p->vObjs, Abc_Lit2Var(iDsd) );
|
1948
|
-
if ( fVerbose )
|
1949
|
-
If_DsdManPrintOne( stdout, p, Abc_Lit2Var(iDsd), NULL, 0 );
|
1950
|
-
if ( If_DsdObjSuppSize(pObj) <= LutSize )
|
1951
|
-
{
|
1952
|
-
if ( fVerbose )
|
1953
|
-
printf( " Trivial\n" );
|
1954
|
-
return ~0;
|
1955
|
-
}
|
1956
|
-
If_DsdManCollect( p, pObj->Id, p->vTemp1, p->vTemp2 );
|
1957
|
-
If_DsdVecForEachObjVec( p->vTemp1, &p->vObjs, pTemp, i )
|
1958
|
-
if ( If_DsdObjSuppSize(pTemp) <= LutSize && If_DsdObjSuppSize(pObj) - If_DsdObjSuppSize(pTemp) <= LutSize - 1 )
|
1959
|
-
{
|
1960
|
-
if ( fVerbose )
|
1961
|
-
printf( " Dec using node " );
|
1962
|
-
if ( fVerbose )
|
1963
|
-
If_DsdManPrintOne( stdout, p, pTemp->Id, NULL, 1 );
|
1964
|
-
iFirst = Vec_IntEntry(p->vTemp2, i);
|
1965
|
-
uRes = If_DsdSign_rec(p, pTemp, &iFirst);
|
1966
|
-
if ( uRes & uMaskNot )
|
1967
|
-
continue;
|
1968
|
-
return uRes;
|
1969
|
-
}
|
1970
|
-
If_DsdVecForEachObjVec( p->vTemp1, &p->vObjs, pTemp, i )
|
1971
|
-
if ( (If_DsdObjType(pTemp) == IF_DSD_AND || If_DsdObjType(pTemp) == IF_DSD_XOR) && If_DsdObjFaninNum(pTemp) > 2 && If_DsdObjSuppSize(pTemp) > LutSize )
|
1972
|
-
{
|
1973
|
-
if ( (Mask = If_DsdManCheckAndXor(p, Vec_IntEntry(p->vTemp2, i), uMaskNot, pTemp, If_DsdObjSuppSize(pObj), LutSize, fDerive, fVerbose)) )
|
1974
|
-
{
|
1975
|
-
if ( fVerbose )
|
1976
|
-
printf( " " );
|
1977
|
-
if ( fVerbose )
|
1978
|
-
Abc_TtPrintBinary( (word *)&Mask, 4 );
|
1979
|
-
if ( fVerbose )
|
1980
|
-
printf( " Using multi-input AND/XOR node\n" );
|
1981
|
-
return Mask;
|
1982
|
-
}
|
1983
|
-
}
|
1984
|
-
If_DsdVecForEachObjVec( p->vTemp1, &p->vObjs, pTemp, i )
|
1985
|
-
if ( If_DsdObjType(pTemp) == IF_DSD_MUX && If_DsdObjSuppSize(pTemp) > LutSize )
|
1986
|
-
{
|
1987
|
-
if ( (Mask = If_DsdManCheckMux(p, Vec_IntEntry(p->vTemp2, i), uMaskNot, pTemp, If_DsdObjSuppSize(pObj), LutSize, fDerive, fVerbose)) )
|
1988
|
-
{
|
1989
|
-
if ( fVerbose )
|
1990
|
-
printf( " " );
|
1991
|
-
if ( fVerbose )
|
1992
|
-
Abc_TtPrintBinary( (word *)&Mask, 4 );
|
1993
|
-
if ( fVerbose )
|
1994
|
-
printf( " Using multi-input MUX node\n" );
|
1995
|
-
return Mask;
|
1996
|
-
}
|
1997
|
-
}
|
1998
|
-
If_DsdVecForEachObjVec( p->vTemp1, &p->vObjs, pTemp, i )
|
1999
|
-
if ( If_DsdObjType(pTemp) == IF_DSD_PRIME && If_DsdObjSuppSize(pTemp) > LutSize )
|
2000
|
-
{
|
2001
|
-
if ( (Mask = If_DsdManCheckPrime(p, Vec_IntEntry(p->vTemp2, i), uMaskNot, pTemp, If_DsdObjSuppSize(pObj), LutSize, fDerive, fVerbose)) )
|
2002
|
-
{
|
2003
|
-
if ( fVerbose )
|
2004
|
-
printf( " " );
|
2005
|
-
if ( fVerbose )
|
2006
|
-
Dau_DecPrintSet( Mask, If_DsdObjFaninNum(pTemp), 0 );
|
2007
|
-
if ( fVerbose )
|
2008
|
-
printf( " Using prime node\n" );
|
2009
|
-
return Mask;
|
2010
|
-
}
|
2011
|
-
}
|
2012
|
-
if ( fVerbose )
|
2013
|
-
printf( " UNDEC\n" );
|
2014
|
-
// If_DsdManPrintOne( stdout, p, Abc_Lit2Var(iDsd), NULL, 1 );
|
2015
|
-
return 0;
|
2016
|
-
}
|
2017
|
-
unsigned If_DsdManCheckXY( If_DsdMan_t * p, int iDsd, int LutSize, int fDerive, unsigned uMaskNot, int fHighEffort, int fVerbose )
|
2018
|
-
{
|
2019
|
-
unsigned uSet = If_DsdManCheckXY_int( p, iDsd, LutSize, fDerive, uMaskNot, fVerbose );
|
2020
|
-
if ( uSet == 0 && fHighEffort )
|
2021
|
-
{
|
2022
|
-
// abctime clk = Abc_Clock();
|
2023
|
-
int nVars = If_DsdVecLitSuppSize( &p->vObjs, iDsd );
|
2024
|
-
word * pRes = If_DsdManComputeTruth( p, iDsd, NULL );
|
2025
|
-
uSet = If_ManSatCheckXYall( p->pSat, LutSize, pRes, nVars, p->vTemp1 );
|
2026
|
-
if ( uSet )
|
2027
|
-
{
|
2028
|
-
// If_DsdManPrintOne( stdout, p, Abc_Lit2Var(iDsd), NULL, 1 );
|
2029
|
-
// Dau_DecPrintSet( uSet, nVars, 1 );
|
2030
|
-
}
|
2031
|
-
// p->timeCheck2 += Abc_Clock() - clk;
|
2032
|
-
}
|
2033
|
-
return uSet;
|
2034
|
-
}
|
2035
|
-
|
2036
|
-
/**Function*************************************************************
|
2037
|
-
|
2038
|
-
Synopsis [Checks existence of decomposition.]
|
2039
|
-
|
2040
|
-
Description []
|
2041
|
-
|
2042
|
-
SideEffects []
|
2043
|
-
|
2044
|
-
SeeAlso []
|
2045
|
-
|
2046
|
-
***********************************************************************/
|
2047
|
-
unsigned If_DsdManCheckXYZ( If_DsdMan_t * p, int iDsd, int LutSize, int fDerive, int fVerbose )
|
2048
|
-
{
|
2049
|
-
return ~0;
|
2050
|
-
}
|
2051
|
-
|
2052
|
-
/**Function*************************************************************
|
2053
|
-
|
2054
|
-
Synopsis [Add the function to the DSD manager.]
|
2055
|
-
|
2056
|
-
Description []
|
2057
|
-
|
2058
|
-
SideEffects []
|
2059
|
-
|
2060
|
-
SeeAlso []
|
2061
|
-
|
2062
|
-
***********************************************************************/
|
2063
|
-
int If_DsdManCompute( If_DsdMan_t * p, word * pTruth, int nLeaves, unsigned char * pPerm, char * pLutStruct )
|
2064
|
-
{
|
2065
|
-
word pCopy[DAU_MAX_WORD], * pRes;
|
2066
|
-
char pDsd[DAU_MAX_STR];
|
2067
|
-
int iDsd, nSizeNonDec, nSupp = 0;
|
2068
|
-
int nWords = Abc_TtWordNum(nLeaves);
|
2069
|
-
// abctime clk = 0;
|
2070
|
-
assert( nLeaves <= DAU_MAX_VAR );
|
2071
|
-
Abc_TtCopy( pCopy, pTruth, nWords, 0 );
|
2072
|
-
//clk = Abc_Clock();
|
2073
|
-
nSizeNonDec = Dau_DsdDecompose( pCopy, nLeaves, 0, 1, pDsd );
|
2074
|
-
//p->timeDsd += Abc_Clock() - clk;
|
2075
|
-
if ( nSizeNonDec > 0 )
|
2076
|
-
Abc_TtStretch6( pCopy, nSizeNonDec, p->nVars );
|
2077
|
-
memset( pPerm, 0xFF, nLeaves );
|
2078
|
-
//clk = Abc_Clock();
|
2079
|
-
iDsd = If_DsdManAddDsd( p, pDsd, pCopy, pPerm, &nSupp );
|
2080
|
-
//p->timeCanon += Abc_Clock() - clk;
|
2081
|
-
assert( nSupp == nLeaves );
|
2082
|
-
// verify the result
|
2083
|
-
//clk = Abc_Clock();
|
2084
|
-
pRes = If_DsdManComputeTruth( p, iDsd, pPerm );
|
2085
|
-
//p->timeVerify += Abc_Clock() - clk;
|
2086
|
-
if ( !Abc_TtEqual(pRes, pTruth, nWords) )
|
2087
|
-
{
|
2088
|
-
// If_DsdManPrint( p, NULL );
|
2089
|
-
printf( "\n" );
|
2090
|
-
printf( "Verification failed!\n" );
|
2091
|
-
printf( "%s\n", pDsd );
|
2092
|
-
Dau_DsdPrintFromTruth( pTruth, nLeaves );
|
2093
|
-
Dau_DsdPrintFromTruth( pRes, nLeaves );
|
2094
|
-
If_DsdManPrintOne( stdout, p, Abc_Lit2Var(iDsd), pPerm, 1 );
|
2095
|
-
printf( "\n" );
|
2096
|
-
}
|
2097
|
-
If_DsdVecObjIncRef( &p->vObjs, Abc_Lit2Var(iDsd) );
|
2098
|
-
assert( If_DsdVecLitSuppSize(&p->vObjs, iDsd) == nLeaves );
|
2099
|
-
return iDsd;
|
2100
|
-
}
|
2101
|
-
|
2102
|
-
/**Function*************************************************************
|
2103
|
-
|
2104
|
-
Synopsis [Checks existence of decomposition.]
|
2105
|
-
|
2106
|
-
Description []
|
2107
|
-
|
2108
|
-
SideEffects []
|
2109
|
-
|
2110
|
-
SeeAlso []
|
2111
|
-
|
2112
|
-
***********************************************************************/
|
2113
|
-
void If_DsdManTest()
|
2114
|
-
{
|
2115
|
-
Vec_Int_t * vSets;
|
2116
|
-
word t = 0x5277;
|
2117
|
-
t = Abc_Tt6Stretch( t, 4 );
|
2118
|
-
// word t = 0xD9D900D900D900001010001000100000;
|
2119
|
-
vSets = Dau_DecFindSets( &t, 6 );
|
2120
|
-
Vec_IntFree( vSets );
|
2121
|
-
}
|
2122
|
-
|
2123
|
-
|
2124
|
-
/**Function*************************************************************
|
2125
|
-
|
2126
|
-
Synopsis [Compute pin delays.]
|
2127
|
-
|
2128
|
-
Description []
|
2129
|
-
|
2130
|
-
SideEffects []
|
2131
|
-
|
2132
|
-
SeeAlso []
|
2133
|
-
|
2134
|
-
***********************************************************************/
|
2135
|
-
int If_CutDsdBalancePinDelays_rec( If_DsdMan_t * p, int Id, int * pTimes, word * pRes, int * pnSupp, int nSuppAll, char * pPermLits )
|
2136
|
-
{
|
2137
|
-
If_DsdObj_t * pObj = If_DsdVecObj( &p->vObjs, Id );
|
2138
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
2139
|
-
{
|
2140
|
-
int iCutVar = Abc_Lit2Var(pPermLits[(*pnSupp)++]);
|
2141
|
-
*pRes = If_CutPinDelayInit(iCutVar);
|
2142
|
-
return pTimes[iCutVar];
|
2143
|
-
}
|
2144
|
-
if ( If_DsdObjType(pObj) == IF_DSD_MUX )
|
2145
|
-
{
|
2146
|
-
word pFaninRes[3], Res0, Res1;
|
2147
|
-
int i, iFanin, Delays[3];
|
2148
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
2149
|
-
Delays[i] = If_CutDsdBalancePinDelays_rec( p, Abc_Lit2Var(iFanin), pTimes, pFaninRes+i, pnSupp, nSuppAll, pPermLits );
|
2150
|
-
Res0 = If_CutPinDelayMax( pFaninRes[0], pFaninRes[1], nSuppAll, 1 );
|
2151
|
-
Res1 = If_CutPinDelayMax( pFaninRes[0], pFaninRes[2], nSuppAll, 1 );
|
2152
|
-
*pRes = If_CutPinDelayMax( Res0, Res1, nSuppAll, 1 );
|
2153
|
-
return 2 + Abc_MaxInt(Delays[0], Abc_MaxInt(Delays[1], Delays[2]));
|
2154
|
-
}
|
2155
|
-
if ( If_DsdObjType(pObj) == IF_DSD_PRIME )
|
2156
|
-
{
|
2157
|
-
word pFaninRes[IF_MAX_FUNC_LUTSIZE];
|
2158
|
-
int i, iFanin, Delays[IF_MAX_FUNC_LUTSIZE];
|
2159
|
-
Vec_Int_t * vCover = Vec_WecEntry( p->vIsops[pObj->nFans], If_DsdObjTruthId(p, pObj) );
|
2160
|
-
assert( Vec_IntSize(vCover) > 0 );
|
2161
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
2162
|
-
Delays[i] = If_CutDsdBalancePinDelays_rec( p, Abc_Lit2Var(iFanin), pTimes, pFaninRes+i, pnSupp, nSuppAll, pPermLits );
|
2163
|
-
return If_CutSopBalancePinDelaysInt( vCover, Delays, pFaninRes, nSuppAll, pRes );
|
2164
|
-
}
|
2165
|
-
assert( If_DsdObjType(pObj) == IF_DSD_AND || If_DsdObjType(pObj) == IF_DSD_XOR );
|
2166
|
-
{
|
2167
|
-
word pFaninRes[IF_MAX_FUNC_LUTSIZE];
|
2168
|
-
int i, iFanin, Delay, Result = 0;
|
2169
|
-
int fXor = 0;//(If_DsdObjType(pObj) == IF_DSD_XOR);
|
2170
|
-
int nCounter = 0, pCounter[IF_MAX_FUNC_LUTSIZE];
|
2171
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
2172
|
-
{
|
2173
|
-
Delay = If_CutDsdBalancePinDelays_rec( p, Abc_Lit2Var(iFanin), pTimes, pFaninRes+i, pnSupp, nSuppAll, pPermLits );
|
2174
|
-
Result = If_LogCounterPinDelays( pCounter, &nCounter, pFaninRes, Delay, pFaninRes[i], nSuppAll, fXor );
|
2175
|
-
}
|
2176
|
-
assert( nCounter > 0 );
|
2177
|
-
if ( fXor )
|
2178
|
-
Result = If_LogCounterDelayXor( pCounter, nCounter ); // estimation
|
2179
|
-
*pRes = If_LogPinDelaysMulti( pFaninRes, nCounter, nSuppAll, fXor );
|
2180
|
-
return Result;
|
2181
|
-
}
|
2182
|
-
}
|
2183
|
-
int If_CutDsdBalancePinDelays( If_Man_t * p, If_Cut_t * pCut, char * pPerm )
|
2184
|
-
{
|
2185
|
-
if ( pCut->nLeaves == 0 ) // const
|
2186
|
-
return 0;
|
2187
|
-
if ( pCut->nLeaves == 1 ) // variable
|
2188
|
-
{
|
2189
|
-
pPerm[0] = 0;
|
2190
|
-
return (int)If_ObjCutBest(If_CutLeaf(p, pCut, 0))->Delay;
|
2191
|
-
}
|
2192
|
-
else
|
2193
|
-
{
|
2194
|
-
word Result = 0;
|
2195
|
-
int i, Delay, nSupp = 0, pTimes[IF_MAX_FUNC_LUTSIZE];
|
2196
|
-
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
|
2197
|
-
pTimes[i] = (int)If_ObjCutBest(If_CutLeaf(p, pCut, i))->Delay;
|
2198
|
-
Delay = If_CutDsdBalancePinDelays_rec( p->pIfDsdMan, Abc_Lit2Var(If_CutDsdLit(p, pCut)), pTimes, &Result, &nSupp, If_CutLeaveNum(pCut), If_CutDsdPerm(p, pCut) );
|
2199
|
-
assert( nSupp == If_CutLeaveNum(pCut) );
|
2200
|
-
If_CutPinDelayTranslate( Result, If_CutLeaveNum(pCut), pPerm );
|
2201
|
-
return Delay;
|
2202
|
-
}
|
2203
|
-
}
|
2204
|
-
|
2205
|
-
|
2206
|
-
/**Function*************************************************************
|
2207
|
-
|
2208
|
-
Synopsis []
|
2209
|
-
|
2210
|
-
Description []
|
2211
|
-
|
2212
|
-
SideEffects []
|
2213
|
-
|
2214
|
-
SeeAlso []
|
2215
|
-
|
2216
|
-
***********************************************************************/
|
2217
|
-
int If_CutDsdPermLitMax( char * pPermLits, int nVars, int iVar )
|
2218
|
-
{
|
2219
|
-
int i;
|
2220
|
-
assert( iVar >= 0 && iVar < nVars );
|
2221
|
-
for ( i = 0; i < nVars; i++ )
|
2222
|
-
if ( iVar == Abc_Lit2Var((int)pPermLits[i]) )
|
2223
|
-
return i;
|
2224
|
-
assert( 0 );
|
2225
|
-
return -1;
|
2226
|
-
}
|
2227
|
-
|
2228
|
-
/**Function*************************************************************
|
2229
|
-
|
2230
|
-
Synopsis [Evaluate delay using DSD balancing.]
|
2231
|
-
|
2232
|
-
Description []
|
2233
|
-
|
2234
|
-
SideEffects []
|
2235
|
-
|
2236
|
-
SeeAlso []
|
2237
|
-
|
2238
|
-
***********************************************************************/
|
2239
|
-
int If_CutDsdBalanceEval_rec( If_DsdMan_t * p, int Id, int * pTimes, int * pnSupp, Vec_Int_t * vAig, int * piLit, int nSuppAll, int * pArea, char * pPermLits )
|
2240
|
-
{
|
2241
|
-
If_DsdObj_t * pObj = If_DsdVecObj( &p->vObjs, Id );
|
2242
|
-
if ( If_DsdObjType(pObj) == IF_DSD_VAR )
|
2243
|
-
{
|
2244
|
-
int iCutVar = Abc_Lit2Var( pPermLits[*pnSupp] );
|
2245
|
-
if ( vAig )
|
2246
|
-
*piLit = Abc_Var2Lit( iCutVar, Abc_LitIsCompl(pPermLits[*pnSupp]) );
|
2247
|
-
(*pnSupp)++;
|
2248
|
-
return pTimes[iCutVar];
|
2249
|
-
}
|
2250
|
-
if ( If_DsdObjType(pObj) == IF_DSD_MUX )
|
2251
|
-
{
|
2252
|
-
int i, iFanin, Delays[3], pFaninLits[3];
|
2253
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
2254
|
-
{
|
2255
|
-
Delays[i] = If_CutDsdBalanceEval_rec( p, Abc_Lit2Var(iFanin), pTimes, pnSupp, vAig, pFaninLits+i, nSuppAll, pArea, pPermLits );
|
2256
|
-
if ( Delays[i] == -1 )
|
2257
|
-
return -1;
|
2258
|
-
if ( vAig )
|
2259
|
-
pFaninLits[i] = Abc_LitNotCond( pFaninLits[i], Abc_LitIsCompl(iFanin) );
|
2260
|
-
}
|
2261
|
-
if ( vAig )
|
2262
|
-
*piLit = If_LogCreateMux( vAig, pFaninLits[0], pFaninLits[1], pFaninLits[2], nSuppAll );
|
2263
|
-
else
|
2264
|
-
*pArea += 3;
|
2265
|
-
return 2 + Abc_MaxInt(Delays[0], Abc_MaxInt(Delays[1], Delays[2]));
|
2266
|
-
}
|
2267
|
-
if ( If_DsdObjType(pObj) == IF_DSD_PRIME )
|
2268
|
-
{
|
2269
|
-
int i, iFanin, Delays[IF_MAX_FUNC_LUTSIZE], pFaninLits[IF_MAX_FUNC_LUTSIZE];
|
2270
|
-
Vec_Int_t * vCover = Vec_WecEntry( p->vIsops[pObj->nFans], If_DsdObjTruthId(p, pObj) );
|
2271
|
-
if ( Vec_IntSize(vCover) == 0 )
|
2272
|
-
return -1;
|
2273
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
2274
|
-
{
|
2275
|
-
Delays[i] = If_CutDsdBalanceEval_rec( p, Abc_Lit2Var(iFanin), pTimes, pnSupp, vAig, pFaninLits+i, nSuppAll, pArea, pPermLits );
|
2276
|
-
if ( Delays[i] == -1 )
|
2277
|
-
return -1;
|
2278
|
-
if ( vAig )
|
2279
|
-
pFaninLits[i] = Abc_LitNotCond( pFaninLits[i], Abc_LitIsCompl(iFanin) );
|
2280
|
-
}
|
2281
|
-
return If_CutSopBalanceEvalInt( vCover, Delays, pFaninLits, vAig, piLit, nSuppAll, pArea );
|
2282
|
-
}
|
2283
|
-
assert( If_DsdObjType(pObj) == IF_DSD_AND || If_DsdObjType(pObj) == IF_DSD_XOR );
|
2284
|
-
{
|
2285
|
-
int i, iFanin, Delay, Result = 0;
|
2286
|
-
int fXor = 0;//(If_DsdObjType(pObj) == IF_DSD_XOR);
|
2287
|
-
int fXorFunc = (If_DsdObjType(pObj) == IF_DSD_XOR);
|
2288
|
-
int nCounter = 0, pCounter[IF_MAX_FUNC_LUTSIZE], pFaninLits[IF_MAX_FUNC_LUTSIZE];
|
2289
|
-
If_DsdObjForEachFaninLit( &p->vObjs, pObj, iFanin, i )
|
2290
|
-
{
|
2291
|
-
Delay = If_CutDsdBalanceEval_rec( p, Abc_Lit2Var(iFanin), pTimes, pnSupp, vAig, pFaninLits+i, nSuppAll, pArea, pPermLits );
|
2292
|
-
if ( Delay == -1 )
|
2293
|
-
return -1;
|
2294
|
-
if ( vAig )
|
2295
|
-
pFaninLits[i] = Abc_LitNotCond( pFaninLits[i], Abc_LitIsCompl(iFanin) );
|
2296
|
-
Result = If_LogCounterAddAig( pCounter, &nCounter, pFaninLits, Delay, vAig ? pFaninLits[i] : -1, vAig, nSuppAll, fXor, fXorFunc );
|
2297
|
-
}
|
2298
|
-
assert( nCounter > 0 );
|
2299
|
-
if ( fXor )
|
2300
|
-
Result = If_LogCounterDelayXor( pCounter, nCounter ); // estimation
|
2301
|
-
if ( vAig )
|
2302
|
-
*piLit = If_LogCreateAndXorMulti( vAig, pFaninLits, nCounter, nSuppAll, fXorFunc );
|
2303
|
-
else
|
2304
|
-
*pArea += (pObj->nFans - 1) * (1 + 2 * fXor);
|
2305
|
-
return Result;
|
2306
|
-
}
|
2307
|
-
}
|
2308
|
-
int If_CutDsdBalanceEvalInt( If_DsdMan_t * p, int iDsd, int * pTimes, Vec_Int_t * vAig, int * pArea, char * pPermLits )
|
2309
|
-
{
|
2310
|
-
int nSupp = 0, iLit = 0;
|
2311
|
-
int nSuppAll = If_DsdVecLitSuppSize( &p->vObjs, iDsd );
|
2312
|
-
int Res = If_CutDsdBalanceEval_rec( p, Abc_Lit2Var(iDsd), pTimes, &nSupp, vAig, &iLit, nSuppAll, pArea, pPermLits );
|
2313
|
-
if ( Res == -1 )
|
2314
|
-
return -1;
|
2315
|
-
assert( nSupp == nSuppAll );
|
2316
|
-
assert( vAig == NULL || Abc_Lit2Var(iLit) == nSupp + Abc_Lit2Var(Vec_IntSize(vAig)) - 1 );
|
2317
|
-
if ( vAig )
|
2318
|
-
Vec_IntPush( vAig, Abc_LitIsCompl(iLit) ^ Abc_LitIsCompl(iDsd) );
|
2319
|
-
assert( vAig == NULL || (Vec_IntSize(vAig) & 1) );
|
2320
|
-
return Res;
|
2321
|
-
}
|
2322
|
-
int If_CutDsdBalanceEval( If_Man_t * p, If_Cut_t * pCut, Vec_Int_t * vAig )
|
2323
|
-
{
|
2324
|
-
int fUseCofs = 0;
|
2325
|
-
pCut->fUser = 1;
|
2326
|
-
if ( vAig )
|
2327
|
-
Vec_IntClear( vAig );
|
2328
|
-
if ( pCut->nLeaves == 0 ) // const
|
2329
|
-
{
|
2330
|
-
assert( Abc_Lit2Var(If_CutDsdLit(p, pCut)) == 0 );
|
2331
|
-
if ( vAig )
|
2332
|
-
Vec_IntPush( vAig, Abc_LitIsCompl(If_CutDsdLit(p, pCut)) );
|
2333
|
-
pCut->Cost = 0;
|
2334
|
-
return 0;
|
2335
|
-
}
|
2336
|
-
if ( pCut->nLeaves == 1 ) // variable
|
2337
|
-
{
|
2338
|
-
assert( Abc_Lit2Var(If_CutDsdLit(p, pCut)) == 1 );
|
2339
|
-
if ( vAig )
|
2340
|
-
Vec_IntPush( vAig, 0 );
|
2341
|
-
if ( vAig )
|
2342
|
-
Vec_IntPush( vAig, Abc_LitIsCompl(If_CutDsdLit(p, pCut)) );
|
2343
|
-
pCut->Cost = 0;
|
2344
|
-
return (int)If_ObjCutBest(If_CutLeaf(p, pCut, 0))->Delay;
|
2345
|
-
}
|
2346
|
-
else
|
2347
|
-
{
|
2348
|
-
int fVerbose = 0;
|
2349
|
-
int i, pTimes[IF_MAX_FUNC_LUTSIZE];
|
2350
|
-
int Delay, Area = 0;
|
2351
|
-
char * pPermLits = If_CutDsdPerm(p, pCut);
|
2352
|
-
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
|
2353
|
-
pTimes[i] = (int)If_ObjCutBest(If_CutLeaf(p, pCut, i))->Delay;
|
2354
|
-
Delay = If_CutDsdBalanceEvalInt( p->pIfDsdMan, Abc_LitNotCond(If_CutDsdLit(p, pCut), pCut->fCompl), pTimes, vAig, &Area, If_CutDsdPerm(p, pCut) );
|
2355
|
-
pCut->Cost = Area;
|
2356
|
-
// try cofactoring
|
2357
|
-
if ( fUseCofs )
|
2358
|
-
{
|
2359
|
-
// count how many times the max one appears
|
2360
|
-
int iMax = 0, nCountMax = 1;
|
2361
|
-
for ( i = 1; i < If_CutLeaveNum(pCut); i++ )
|
2362
|
-
if ( pTimes[i] > pTimes[iMax] )
|
2363
|
-
iMax = i, nCountMax = 1;
|
2364
|
-
else if ( pTimes[i] == pTimes[iMax] )
|
2365
|
-
nCountMax++;
|
2366
|
-
// decide when to try the decomposition
|
2367
|
-
if ( nCountMax == 1 && pTimes[iMax] + 2 < Delay && If_DsdManCheckNonTriv( p->pIfDsdMan, Abc_Lit2Var(If_CutDsdLit(p, pCut)),
|
2368
|
-
If_CutLeaveNum(pCut), If_CutDsdPermLitMax(pPermLits, If_CutLeaveNum(pCut), iMax)) )
|
2369
|
-
{
|
2370
|
-
// fVerbose = 1;
|
2371
|
-
Delay = pTimes[iMax] + 2;
|
2372
|
-
}
|
2373
|
-
}
|
2374
|
-
// report the result
|
2375
|
-
if ( fVerbose )
|
2376
|
-
{
|
2377
|
-
/*
|
2378
|
-
int Max = 0, Two = 0;
|
2379
|
-
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
|
2380
|
-
Max = Abc_MaxInt( Max, pTimes[i] );
|
2381
|
-
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
|
2382
|
-
if ( pTimes[i] != Max )
|
2383
|
-
Two = Abc_MaxInt( Two, pTimes[i] );
|
2384
|
-
if ( Two + 2 < Max && Max + 3 < Delay )
|
2385
|
-
*/
|
2386
|
-
{
|
2387
|
-
for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
|
2388
|
-
printf( "%3d ", pTimes[Abc_Lit2Var(pPermLits[i])] );
|
2389
|
-
for ( ; i < p->pPars->nLutSize; i++ )
|
2390
|
-
printf( " " );
|
2391
|
-
printf( "-> %3d ", Delay );
|
2392
|
-
If_DsdManPrintOne( stdout, p->pIfDsdMan, Abc_Lit2Var(If_CutDsdLit(p, pCut)), NULL, 0 );
|
2393
|
-
printf( "\n" );
|
2394
|
-
}
|
2395
|
-
}
|
2396
|
-
return Delay;
|
2397
|
-
}
|
2398
|
-
}
|
2399
|
-
|
2400
|
-
/**Function*************************************************************
|
2401
|
-
|
2402
|
-
Synopsis []
|
2403
|
-
|
2404
|
-
Description []
|
2405
|
-
|
2406
|
-
SideEffects []
|
2407
|
-
|
2408
|
-
SeeAlso []
|
2409
|
-
|
2410
|
-
***********************************************************************/
|
2411
|
-
void If_DsdManTune( If_DsdMan_t * p, int LutSize, int fFast, int fAdd, int fSpec, int fVerbose )
|
2412
|
-
{
|
2413
|
-
ProgressBar * pProgress = NULL;
|
2414
|
-
sat_solver * pSat = NULL;
|
2415
|
-
If_DsdObj_t * pObj;
|
2416
|
-
Vec_Int_t * vLits;
|
2417
|
-
int i, Value, nVars;
|
2418
|
-
word * pTruth;
|
2419
|
-
if ( !fAdd || !LutSize )
|
2420
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
2421
|
-
pObj->fMark = 0;
|
2422
|
-
if ( LutSize == 0 )
|
2423
|
-
return;
|
2424
|
-
vLits = Vec_IntAlloc( 1000 );
|
2425
|
-
pSat = (sat_solver *)If_ManSatBuildXY( LutSize );
|
2426
|
-
pProgress = Extra_ProgressBarStart( stdout, Vec_PtrSize(&p->vObjs) );
|
2427
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
2428
|
-
{
|
2429
|
-
Extra_ProgressBarUpdate( pProgress, i, NULL );
|
2430
|
-
nVars = If_DsdObjSuppSize(pObj);
|
2431
|
-
if ( nVars <= LutSize )
|
2432
|
-
continue;
|
2433
|
-
if ( fAdd && !pObj->fMark )
|
2434
|
-
continue;
|
2435
|
-
pObj->fMark = 0;
|
2436
|
-
if ( If_DsdManCheckXY(p, Abc_Var2Lit(i, 0), LutSize, 0, 0, 0, 0) )
|
2437
|
-
continue;
|
2438
|
-
if ( fFast )
|
2439
|
-
Value = 0;
|
2440
|
-
else
|
2441
|
-
{
|
2442
|
-
pTruth = If_DsdManComputeTruth( p, Abc_Var2Lit(i, 0), NULL );
|
2443
|
-
Value = If_ManSatCheckXYall( pSat, LutSize, pTruth, nVars, vLits );
|
2444
|
-
}
|
2445
|
-
if ( Value )
|
2446
|
-
continue;
|
2447
|
-
If_DsdVecObjSetMark( &p->vObjs, i );
|
2448
|
-
}
|
2449
|
-
Extra_ProgressBarStop( pProgress );
|
2450
|
-
If_ManSatUnbuild( pSat );
|
2451
|
-
Vec_IntFree( vLits );
|
2452
|
-
if ( fVerbose )
|
2453
|
-
If_DsdManPrintDistrib( p );
|
2454
|
-
}
|
2455
|
-
|
2456
|
-
|
2457
|
-
|
2458
|
-
/**Function*************************************************************
|
2459
|
-
|
2460
|
-
Synopsis []
|
2461
|
-
|
2462
|
-
Description []
|
2463
|
-
|
2464
|
-
SideEffects []
|
2465
|
-
|
2466
|
-
SeeAlso []
|
2467
|
-
|
2468
|
-
***********************************************************************/
|
2469
|
-
void Id_DsdManTuneStr1( If_DsdMan_t * p, char * pStruct, int nConfls, int fVerbose )
|
2470
|
-
{
|
2471
|
-
int fVeryVerbose = 0;
|
2472
|
-
ProgressBar * pProgress = NULL;
|
2473
|
-
If_DsdObj_t * pObj;
|
2474
|
-
word * pTruth, * pConfig;
|
2475
|
-
int i, nVars, Value, LutSize;
|
2476
|
-
abctime clk = Abc_Clock();
|
2477
|
-
// parse the structure
|
2478
|
-
Ifn_Ntk_t * pNtk = Ifn_NtkParse( pStruct );
|
2479
|
-
if ( pNtk == NULL )
|
2480
|
-
return;
|
2481
|
-
if ( If_DsdManVarNum(p) > Ifn_NtkInputNum(pNtk) )
|
2482
|
-
{
|
2483
|
-
printf( "The support of DSD manager (%d) exceeds the support of the structure (%d).\n", If_DsdManVarNum(p), Ifn_NtkInputNum(pNtk) );
|
2484
|
-
ABC_FREE( pNtk );
|
2485
|
-
return;
|
2486
|
-
}
|
2487
|
-
ABC_FREE( p->pCellStr );
|
2488
|
-
p->pCellStr = Abc_UtilStrsav( pStruct );
|
2489
|
-
if ( If_DsdManVarNum(p) < Ifn_NtkInputNum(pNtk) )
|
2490
|
-
printf( "Warning: The support of DSD manager (%d) is less than the support of the structure (%d).\n", If_DsdManVarNum(p), Ifn_NtkInputNum(pNtk) );
|
2491
|
-
LutSize = Ifn_NtkLutSizeMax(pNtk);
|
2492
|
-
p->nTtBits = Ifn_NtkTtBits( pStruct );
|
2493
|
-
p->nConfigWords = 1 + Abc_Bit6WordNum( p->nTtBits );
|
2494
|
-
// print
|
2495
|
-
if ( fVerbose )
|
2496
|
-
{
|
2497
|
-
printf( "Considering programmable cell: " );
|
2498
|
-
Ifn_NtkPrint( pNtk );
|
2499
|
-
printf( "Largest LUT size = %d.\n", LutSize );
|
2500
|
-
}
|
2501
|
-
if ( p->nObjsPrev > 0 )
|
2502
|
-
printf( "Starting the tuning process from object %d (out of %d).\n", p->nObjsPrev, Vec_PtrSize(&p->vObjs) );
|
2503
|
-
// clean the attributes
|
2504
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
2505
|
-
if ( i >= p->nObjsPrev )
|
2506
|
-
pObj->fMark = 0;
|
2507
|
-
if ( p->vConfigs == NULL )
|
2508
|
-
p->vConfigs = Vec_WrdStart( p->nConfigWords * Vec_PtrSize(&p->vObjs) );
|
2509
|
-
else
|
2510
|
-
Vec_WrdFillExtra( p->vConfigs, p->nConfigWords * Vec_PtrSize(&p->vObjs), 0 );
|
2511
|
-
pProgress = Extra_ProgressBarStart( stdout, Vec_PtrSize(&p->vObjs) );
|
2512
|
-
If_DsdVecForEachObjStart( &p->vObjs, pObj, i, p->nObjsPrev )
|
2513
|
-
{
|
2514
|
-
if ( (i & 0xFF) == 0 )
|
2515
|
-
Extra_ProgressBarUpdate( pProgress, i, NULL );
|
2516
|
-
nVars = If_DsdObjSuppSize(pObj);
|
2517
|
-
//if ( nVars <= LutSize )
|
2518
|
-
// continue;
|
2519
|
-
pTruth = If_DsdManComputeTruth( p, Abc_Var2Lit(i, 0), NULL );
|
2520
|
-
if ( fVeryVerbose )
|
2521
|
-
Dau_DsdPrintFromTruth( pTruth, nVars );
|
2522
|
-
if ( fVerbose )
|
2523
|
-
printf( "%6d : %2d ", i, nVars );
|
2524
|
-
pConfig = Vec_WrdEntryP( p->vConfigs, p->nConfigWords * i );
|
2525
|
-
Value = Ifn_NtkMatch( pNtk, pTruth, nVars, nConfls, fVerbose, fVeryVerbose, pConfig );
|
2526
|
-
if ( fVeryVerbose )
|
2527
|
-
printf( "\n" );
|
2528
|
-
if ( Value == 0 )
|
2529
|
-
{
|
2530
|
-
If_DsdVecObjSetMark( &p->vObjs, i );
|
2531
|
-
memset( pConfig, 0, sizeof(word) * p->nConfigWords );
|
2532
|
-
}
|
2533
|
-
}
|
2534
|
-
p->nObjsPrev = 0;
|
2535
|
-
p->LutSize = 0;
|
2536
|
-
Extra_ProgressBarStop( pProgress );
|
2537
|
-
printf( "Finished matching %d functions. ", Vec_PtrSize(&p->vObjs) );
|
2538
|
-
Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
|
2539
|
-
if ( fVeryVerbose )
|
2540
|
-
If_DsdManPrintDistrib( p );
|
2541
|
-
ABC_FREE( pNtk );
|
2542
|
-
}
|
2543
|
-
|
2544
|
-
|
2545
|
-
/**Function*************************************************************
|
2546
|
-
|
2547
|
-
Synopsis []
|
2548
|
-
|
2549
|
-
Description []
|
2550
|
-
|
2551
|
-
SideEffects []
|
2552
|
-
|
2553
|
-
SeeAlso []
|
2554
|
-
|
2555
|
-
***********************************************************************/
|
2556
|
-
#ifndef ABC_USE_PTHREADS
|
2557
|
-
void Id_DsdManTuneStr( If_DsdMan_t * p, char * pStruct, int nConfls, int nProcs, int fVerbose )
|
2558
|
-
{
|
2559
|
-
Id_DsdManTuneStr1( p, pStruct, nConfls, fVerbose );
|
2560
|
-
}
|
2561
|
-
#else // pthreads are used
|
2562
|
-
|
2563
|
-
|
2564
|
-
#define PAR_THR_MAX 100
|
2565
|
-
typedef struct Ifn_ThData_t_
|
2566
|
-
{
|
2567
|
-
Ifn_Ntk_t * pNtk; // network
|
2568
|
-
word pTruth[DAU_MAX_WORD];
|
2569
|
-
word pConfig[10]; // configuration data
|
2570
|
-
int nConfigWords;// configuration data word count
|
2571
|
-
int nVars; // support
|
2572
|
-
int Id; // object
|
2573
|
-
int nConfls; // conflicts
|
2574
|
-
int Result; // result
|
2575
|
-
int Status; // state
|
2576
|
-
abctime clkUsed; // total runtime
|
2577
|
-
} Ifn_ThData_t;
|
2578
|
-
void * Ifn_WorkerThread( void * pArg )
|
2579
|
-
{
|
2580
|
-
Ifn_ThData_t * pThData = (Ifn_ThData_t *)pArg;
|
2581
|
-
volatile int * pPlace = &pThData->Status;
|
2582
|
-
abctime clk;
|
2583
|
-
while ( 1 )
|
2584
|
-
{
|
2585
|
-
while ( *pPlace == 0 );
|
2586
|
-
assert( pThData->Status == 1 );
|
2587
|
-
if ( pThData->Id == -1 )
|
2588
|
-
{
|
2589
|
-
pthread_exit( NULL );
|
2590
|
-
assert( 0 );
|
2591
|
-
return NULL;
|
2592
|
-
}
|
2593
|
-
clk = Abc_Clock();
|
2594
|
-
memset( pThData->pConfig, 0, sizeof(word) * pThData->nConfigWords );
|
2595
|
-
pThData->Result = Ifn_NtkMatch( pThData->pNtk, pThData->pTruth, pThData->nVars, pThData->nConfls, 0, 0, pThData->pConfig );
|
2596
|
-
pThData->clkUsed += Abc_Clock() - clk;
|
2597
|
-
pThData->Status = 0;
|
2598
|
-
// printf( "Finished object %d\n", pThData->Id );
|
2599
|
-
}
|
2600
|
-
assert( 0 );
|
2601
|
-
return NULL;
|
2602
|
-
}
|
2603
|
-
void Id_DsdManTuneStr( If_DsdMan_t * p, char * pStruct, int nConfls, int nProcs, int fVerbose )
|
2604
|
-
{
|
2605
|
-
int fVeryVerbose = 0;
|
2606
|
-
ProgressBar * pProgress = NULL;
|
2607
|
-
int i, k, nVars, LutSize;
|
2608
|
-
abctime clk = Abc_Clock();
|
2609
|
-
Ifn_Ntk_t * pNtk;
|
2610
|
-
If_DsdObj_t * pObj;
|
2611
|
-
if ( nProcs == 1 )
|
2612
|
-
{
|
2613
|
-
Id_DsdManTuneStr1( p, pStruct, nConfls, fVerbose );
|
2614
|
-
return;
|
2615
|
-
}
|
2616
|
-
if ( nProcs > PAR_THR_MAX )
|
2617
|
-
{
|
2618
|
-
printf( "The number of processes (%d) exceeds the precompiled limit (%d).\n", nProcs, PAR_THR_MAX );
|
2619
|
-
return;
|
2620
|
-
}
|
2621
|
-
// parse the structure
|
2622
|
-
pNtk = Ifn_NtkParse( pStruct );
|
2623
|
-
if ( pNtk == NULL )
|
2624
|
-
return;
|
2625
|
-
if ( If_DsdManVarNum(p) > Ifn_NtkInputNum(pNtk) )
|
2626
|
-
{
|
2627
|
-
printf( "The support of DSD manager (%d) exceeds the support of the structure (%d).\n", If_DsdManVarNum(p), Ifn_NtkInputNum(pNtk) );
|
2628
|
-
ABC_FREE( pNtk );
|
2629
|
-
return;
|
2630
|
-
}
|
2631
|
-
ABC_FREE( p->pCellStr );
|
2632
|
-
p->pCellStr = Abc_UtilStrsav( pStruct );
|
2633
|
-
if ( If_DsdManVarNum(p) < Ifn_NtkInputNum(pNtk) )
|
2634
|
-
printf( "Warning: The support of DSD manager (%d) is less than the support of the structure (%d).\n", If_DsdManVarNum(p), Ifn_NtkInputNum(pNtk) );
|
2635
|
-
// check the largest LUT
|
2636
|
-
LutSize = Ifn_NtkLutSizeMax(pNtk);
|
2637
|
-
p->nTtBits = Ifn_NtkTtBits( pStruct );
|
2638
|
-
p->nConfigWords = 1 + Abc_Bit6WordNum( p->nTtBits );
|
2639
|
-
assert( p->nConfigWords <= 10 );
|
2640
|
-
if ( fVerbose )
|
2641
|
-
{
|
2642
|
-
printf( "Considering programmable cell: " );
|
2643
|
-
Ifn_NtkPrint( pNtk );
|
2644
|
-
printf( "Largest LUT size = %d.\n", LutSize );
|
2645
|
-
}
|
2646
|
-
ABC_FREE( pNtk );
|
2647
|
-
if ( p->nObjsPrev > 0 )
|
2648
|
-
printf( "Starting the tuning process from object %d (out of %d).\n", p->nObjsPrev, Vec_PtrSize(&p->vObjs) );
|
2649
|
-
// clean the attributes
|
2650
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
2651
|
-
if ( i >= p->nObjsPrev )
|
2652
|
-
pObj->fMark = 0;
|
2653
|
-
if ( p->vConfigs == NULL )
|
2654
|
-
p->vConfigs = Vec_WrdStart( p->nConfigWords * Vec_PtrSize(&p->vObjs) );
|
2655
|
-
else
|
2656
|
-
Vec_WrdFillExtra( p->vConfigs, p->nConfigWords * Vec_PtrSize(&p->vObjs), 0 );
|
2657
|
-
pProgress = Extra_ProgressBarStart( stdout, Vec_PtrSize(&p->vObjs) );
|
2658
|
-
|
2659
|
-
// perform concurrent solving
|
2660
|
-
{
|
2661
|
-
pthread_t WorkerThread[PAR_THR_MAX];
|
2662
|
-
Ifn_ThData_t ThData[PAR_THR_MAX];
|
2663
|
-
abctime clk, clkUsed = 0;
|
2664
|
-
int status, fRunning = 1, iCurrentObj = p->nObjsPrev;
|
2665
|
-
// start the threads
|
2666
|
-
for ( i = 0; i < nProcs; i++ )
|
2667
|
-
{
|
2668
|
-
ThData[i].pNtk = Ifn_NtkParse( pStruct );
|
2669
|
-
ThData[i].nVars = -1; // support
|
2670
|
-
ThData[i].Id = -1; // object
|
2671
|
-
ThData[i].nConfls = nConfls; // conflicts
|
2672
|
-
ThData[i].Result = -1; // result
|
2673
|
-
ThData[i].Status = 0; // state
|
2674
|
-
ThData[i].clkUsed = 0; // total runtime
|
2675
|
-
ThData[i].nConfigWords = p->nConfigWords;
|
2676
|
-
status = pthread_create( WorkerThread + i, NULL, Ifn_WorkerThread, (void *)(ThData + i) ); assert( status == 0 );
|
2677
|
-
}
|
2678
|
-
// run the threads
|
2679
|
-
while ( fRunning || iCurrentObj < Vec_PtrSize(&p->vObjs) )
|
2680
|
-
{
|
2681
|
-
for ( i = 0; i < nProcs; i++ )
|
2682
|
-
{
|
2683
|
-
if ( ThData[i].Status )
|
2684
|
-
continue;
|
2685
|
-
assert( ThData[i].Status == 0 );
|
2686
|
-
if ( ThData[i].Id >= 0 )
|
2687
|
-
{
|
2688
|
-
//printf( "Closing obj %d with Thread %d:\n", ThData[i].Id, i );
|
2689
|
-
assert( ThData[i].Result == 0 || ThData[i].Result == 1 );
|
2690
|
-
if ( ThData[i].Result == 0 )
|
2691
|
-
If_DsdVecObjSetMark( &p->vObjs, ThData[i].Id );
|
2692
|
-
else
|
2693
|
-
{
|
2694
|
-
word * pTtWords = Vec_WrdEntryP( p->vConfigs, p->nConfigWords * ThData[i].Id );
|
2695
|
-
memcpy( pTtWords, ThData[i].pConfig, sizeof(word) * p->nConfigWords );
|
2696
|
-
}
|
2697
|
-
ThData[i].Id = -1;
|
2698
|
-
ThData[i].Result = -1;
|
2699
|
-
}
|
2700
|
-
for ( k = iCurrentObj; k < Vec_PtrSize(&p->vObjs); k++ )
|
2701
|
-
{
|
2702
|
-
if ( (k & 0xFF) == 0 )
|
2703
|
-
Extra_ProgressBarUpdate( pProgress, k, NULL );
|
2704
|
-
pObj = If_DsdVecObj( &p->vObjs, k );
|
2705
|
-
nVars = If_DsdObjSuppSize(pObj);
|
2706
|
-
//if ( nVars <= LutSize )
|
2707
|
-
// continue;
|
2708
|
-
clk = Abc_Clock();
|
2709
|
-
If_DsdManComputeTruthPtr( p, Abc_Var2Lit(k, 0), NULL, ThData[i].pTruth );
|
2710
|
-
clkUsed += Abc_Clock() - clk;
|
2711
|
-
ThData[i].nVars = nVars;
|
2712
|
-
ThData[i].Id = k;
|
2713
|
-
ThData[i].Result = -1;
|
2714
|
-
ThData[i].Status = 1;
|
2715
|
-
//printf( "Scheduling %d for Thread %d\n", ThData[i].Id, i );
|
2716
|
-
iCurrentObj = k+1;
|
2717
|
-
break;
|
2718
|
-
}
|
2719
|
-
}
|
2720
|
-
fRunning = 0;
|
2721
|
-
for ( i = 0; i < nProcs; i++ )
|
2722
|
-
if ( ThData[i].Status == 1 || (ThData[i].Status == 0 && ThData[i].Id >= 0) )
|
2723
|
-
fRunning = 1;
|
2724
|
-
//printf( "fRunning %d\n", fRunning );
|
2725
|
-
}
|
2726
|
-
// stop the threads
|
2727
|
-
for ( i = 0; i < nProcs; i++ )
|
2728
|
-
{
|
2729
|
-
assert( ThData[i].Status == 0 );
|
2730
|
-
ThData[i].Id = -1;
|
2731
|
-
ThData[i].Status = 1;
|
2732
|
-
ABC_FREE( ThData[i].pNtk );
|
2733
|
-
}
|
2734
|
-
if ( fVerbose )
|
2735
|
-
{
|
2736
|
-
printf( "Main : " );
|
2737
|
-
Abc_PrintTime( 1, "Time", clkUsed );
|
2738
|
-
for ( i = 0; i < nProcs; i++ )
|
2739
|
-
{
|
2740
|
-
printf( "Thread %d : ", i );
|
2741
|
-
Abc_PrintTime( 1, "Time", ThData[i].clkUsed );
|
2742
|
-
}
|
2743
|
-
}
|
2744
|
-
}
|
2745
|
-
|
2746
|
-
p->nObjsPrev = 0;
|
2747
|
-
p->LutSize = 0;
|
2748
|
-
Extra_ProgressBarStop( pProgress );
|
2749
|
-
printf( "Finished matching %d functions. ", Vec_PtrSize(&p->vObjs) );
|
2750
|
-
Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
|
2751
|
-
if ( fVeryVerbose )
|
2752
|
-
If_DsdManPrintDistrib( p );
|
2753
|
-
}
|
2754
|
-
|
2755
|
-
#endif // pthreads are used
|
2756
|
-
|
2757
|
-
/**Function*************************************************************
|
2758
|
-
|
2759
|
-
Synopsis []
|
2760
|
-
|
2761
|
-
Description []
|
2762
|
-
|
2763
|
-
SideEffects []
|
2764
|
-
|
2765
|
-
SeeAlso []
|
2766
|
-
|
2767
|
-
***********************************************************************/
|
2768
|
-
#ifdef ABC_USE_CUDD
|
2769
|
-
|
2770
|
-
void Id_DsdManTuneThresh( If_DsdMan_t * p, int fUnate, int fThresh, int fThreshHeuristic, int fVerbose )
|
2771
|
-
{
|
2772
|
-
extern int Extra_ThreshCheck( word * t, int nVars, int * pW );
|
2773
|
-
extern int Extra_ThreshHeuristic( word * t, int nVars, int * pW );
|
2774
|
-
int fVeryVerbose = 0;
|
2775
|
-
int pW[16];
|
2776
|
-
ProgressBar * pProgress = NULL;
|
2777
|
-
If_DsdObj_t * pObj;
|
2778
|
-
word * pTruth, Perm;
|
2779
|
-
int i, nVars, Value;
|
2780
|
-
abctime clk = Abc_Clock();
|
2781
|
-
assert( fUnate + fThresh + fThreshHeuristic <= 1 );
|
2782
|
-
if ( p->nObjsPrev > 0 )
|
2783
|
-
printf( "Starting the tuning process from object %d (out of %d).\n", p->nObjsPrev, Vec_PtrSize(&p->vObjs) );
|
2784
|
-
// clean the attributes
|
2785
|
-
If_DsdVecForEachObj( &p->vObjs, pObj, i )
|
2786
|
-
if ( i >= p->nObjsPrev )
|
2787
|
-
pObj->fMark = 0;
|
2788
|
-
if ( p->vConfigs == NULL )
|
2789
|
-
p->vConfigs = Vec_WrdStart( Vec_PtrSize(&p->vObjs) );
|
2790
|
-
else
|
2791
|
-
Vec_WrdFillExtra( p->vConfigs, Vec_PtrSize(&p->vObjs), 0 );
|
2792
|
-
pProgress = Extra_ProgressBarStart( stdout, Vec_PtrSize(&p->vObjs) );
|
2793
|
-
If_DsdVecForEachObjStart( &p->vObjs, pObj, i, p->nObjsPrev )
|
2794
|
-
{
|
2795
|
-
if ( (i & 0xFF) == 0 )
|
2796
|
-
Extra_ProgressBarUpdate( pProgress, i, NULL );
|
2797
|
-
nVars = If_DsdObjSuppSize(pObj);
|
2798
|
-
if ( nVars > 8 )
|
2799
|
-
continue;
|
2800
|
-
pTruth = If_DsdManComputeTruth( p, Abc_Var2Lit(i, 0), NULL );
|
2801
|
-
if ( fVeryVerbose )
|
2802
|
-
Dau_DsdPrintFromTruth( pTruth, nVars );
|
2803
|
-
if ( fVerbose )
|
2804
|
-
printf( "%6d : %2d ", i, nVars );
|
2805
|
-
if ( fUnate )
|
2806
|
-
Value = Abc_TtIsUnate( pTruth, nVars );
|
2807
|
-
else if ( fThresh )
|
2808
|
-
Value = Extra_ThreshCheck( pTruth, nVars, pW );
|
2809
|
-
else if ( fThreshHeuristic )
|
2810
|
-
Value = Extra_ThreshHeuristic( pTruth, nVars, pW );
|
2811
|
-
else
|
2812
|
-
Value = 0;
|
2813
|
-
Perm = 0;
|
2814
|
-
if ( fVeryVerbose )
|
2815
|
-
printf( "\n" );
|
2816
|
-
if ( Value )
|
2817
|
-
If_DsdVecObjSetMark( &p->vObjs, i );
|
2818
|
-
else
|
2819
|
-
Vec_WrdWriteEntry( p->vConfigs, i, Perm );
|
2820
|
-
}
|
2821
|
-
p->nObjsPrev = 0;
|
2822
|
-
p->LutSize = 0;
|
2823
|
-
Extra_ProgressBarStop( pProgress );
|
2824
|
-
printf( "Finished matching %d functions. ", Vec_PtrSize(&p->vObjs) );
|
2825
|
-
Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
|
2826
|
-
if ( fVeryVerbose )
|
2827
|
-
If_DsdManPrintDistrib( p );
|
2828
|
-
}
|
2829
|
-
|
2830
|
-
#endif // ABC_USE_CUDD are used
|
2831
|
-
|
2832
|
-
////////////////////////////////////////////////////////////////////////
|
2833
|
-
/// END OF FILE ///
|
2834
|
-
////////////////////////////////////////////////////////////////////////
|
2835
|
-
|
2836
|
-
|
2837
|
-
ABC_NAMESPACE_IMPL_END
|
2838
|
-
|