Commit 28db025b by Alan Mishchenko

Version abc50827

parent 9093ca53
...@@ -1113,7 +1113,7 @@ SOURCE=.\src\opt\rwr\rwr.h ...@@ -1113,7 +1113,7 @@ SOURCE=.\src\opt\rwr\rwr.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\opt\rwr\rwrCut.c SOURCE=.\src\opt\rwr\rwrDec.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
No preview for this file type
...@@ -3,579 +3,1136 @@ ...@@ -3,579 +3,1136 @@
<pre> <pre>
<h1>Build Log</h1> <h1>Build Log</h1>
<h3> <h3>
--------------------Configuration: abc - Win32 Debug-------------------- --------------------Configuration: abc - Win32 Release--------------------
</h3> </h3>
<h3>Command Lines</h3> <h3>Command Lines</h3>
Creating temporary file "C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2765.tmp" with contents Creating temporary file "C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2D56.tmp" with contents
[ [
/nologo /MLd /W3 /Gm /GX /ZI /Od /I "src\base\abc" /I "src\base\cmd" /I "src\base\io" /I "src\base\main" /I "src\bdd\cudd" /I "src\bdd\epd" /I "src\bdd\mtr" /I "src\bdd\parse" /I "src\bdd\dsd" /I "src\bdd\reo" /I "src\sop\mvc" /I "src\sop\ft" /I "src\sat\asat" /I "src\sat\msat" /I "src\sat\fraig" /I "src\opt\fxa" /I "src\opt\fxu" /I "src\opt\rwr" /I "src\opt\cut" /I "src\map\fpga" /I "src\map\mapper" /I "src\map\mio" /I "src\map\super" /I "src\misc\extra" /I "src\misc\st" /I "src\misc\util" /I "src\misc\vec" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /D "HAVE_ASSERT_H" /FR"Debug/" /Fp"Debug/abc.pch" /YX /Fo"Debug/" /Fd"Debug/" /FD /GZ /c /nologo /ML /W3 /GX /O2 /I "src\base\abc" /I "src\base\cmd" /I "src\base\io" /I "src\base\main" /I "src\bdd\cudd" /I "src\bdd\epd" /I "src\bdd\mtr" /I "src\bdd\parse" /I "src\bdd\dsd" /I "src\bdd\reo" /I "src\sop\mvc" /I "src\sop\ft" /I "src\sat\asat" /I "src\sat\msat" /I "src\sat\fraig" /I "src\opt\fxa" /I "src\opt\fxu" /I "src\opt\rwr" /I "src\opt\cut" /I "src\map\fpga" /I "src\map\mapper" /I "src\map\mio" /I "src\map\super" /I "src\misc\extra" /I "src\misc\st" /I "src\misc\util" /I "src\misc\vec" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /D "__STDC__" /D "HAVE_ASSERT_H" /FR"Release/" /Fp"Release/abc.pch" /YX /Fo"Release/" /Fd"Release/" /FD /c
"C:\_projects\abc\src\base\abc\abc.c"
"C:\_projects\abc\src\base\abc\abcAig.c"
"C:\_projects\abc\src\base\abc\abcAttach.c"
"C:\_projects\abc\src\base\abc\abcBalance.c"
"C:\_projects\abc\src\base\abc\abcCheck.c"
"C:\_projects\abc\src\base\abc\abcCollapse.c"
"C:\_projects\abc\src\base\abc\abcCreate.c"
"C:\_projects\abc\src\base\abc\abcCut.c"
"C:\_projects\abc\src\base\abc\abcDfs.c"
"C:\_projects\abc\src\base\abc\abcDsd.c"
"C:\_projects\abc\src\base\abc\abcFanio.c"
"C:\_projects\abc\src\base\abc\abcFpga.c"
"C:\_projects\abc\src\base\abc\abcFraig.c"
"C:\_projects\abc\src\base\abc\abcFunc.c"
"C:\_projects\abc\src\base\abc\abcFxu.c"
"C:\_projects\abc\src\base\abc\abcLatch.c"
"C:\_projects\abc\src\base\abc\abcMap.c"
"C:\_projects\abc\src\base\abc\abcMinBase.c"
"C:\_projects\abc\src\base\abc\abcMiter.c"
"C:\_projects\abc\src\base\abc\abcNames.c"
"C:\_projects\abc\src\base\abc\abcNetlist.c"
"C:\_projects\abc\src\base\abc\abcPrint.c"
"C:\_projects\abc\src\base\abc\abcReconv.c"
"C:\_projects\abc\src\base\abc\abcRefactor.c" "C:\_projects\abc\src\base\abc\abcRefactor.c"
"C:\_projects\abc\src\base\abc\abcRefs.c"
"C:\_projects\abc\src\base\abc\abcRenode.c"
"C:\_projects\abc\src\base\abc\abcRewrite.c"
"C:\_projects\abc\src\base\abc\abcSat.c"
"C:\_projects\abc\src\base\abc\abcSeq.c"
"C:\_projects\abc\src\base\abc\abcSeqRetime.c"
"C:\_projects\abc\src\base\abc\abcShow.c"
"C:\_projects\abc\src\base\abc\abcSop.c"
"C:\_projects\abc\src\base\abc\abcStrash.c"
"C:\_projects\abc\src\base\abc\abcSweep.c"
"C:\_projects\abc\src\base\abc\abcTiming.c"
"C:\_projects\abc\src\base\abc\abcUnreach.c"
"C:\_projects\abc\src\base\abc\abcUtil.c"
"C:\_projects\abc\src\base\abc\abcVerify.c"
"C:\_projects\abc\src\base\cmd\cmd.c"
"C:\_projects\abc\src\base\cmd\cmdAlias.c"
"C:\_projects\abc\src\base\cmd\cmdApi.c"
"C:\_projects\abc\src\base\cmd\cmdFlag.c"
"C:\_projects\abc\src\base\cmd\cmdHist.c"
"C:\_projects\abc\src\base\cmd\cmdUtils.c"
"C:\_projects\abc\src\base\io\io.c"
"C:\_projects\abc\src\base\io\ioRead.c"
"C:\_projects\abc\src\base\io\ioReadBench.c"
"C:\_projects\abc\src\base\io\ioReadBlif.c"
"C:\_projects\abc\src\base\io\ioReadEdif.c"
"C:\_projects\abc\src\base\io\ioReadPla.c"
"C:\_projects\abc\src\base\io\ioReadVerilog.c"
"C:\_projects\abc\src\base\io\ioUtil.c"
"C:\_projects\abc\src\base\io\ioWriteBench.c"
"C:\_projects\abc\src\base\io\ioWriteBlif.c"
"C:\_projects\abc\src\base\io\ioWriteCnf.c"
"C:\_projects\abc\src\base\io\ioWritePla.c"
"C:\_projects\abc\src\base\main\main.c"
"C:\_projects\abc\src\base\main\mainFrame.c"
"C:\_projects\abc\src\base\main\mainInit.c"
"C:\_projects\abc\src\base\main\mainUtils.c"
"C:\_projects\abc\src\bdd\cudd\cuddAddAbs.c"
"C:\_projects\abc\src\bdd\cudd\cuddAddApply.c"
"C:\_projects\abc\src\bdd\cudd\cuddAddFind.c"
"C:\_projects\abc\src\bdd\cudd\cuddAddInv.c"
"C:\_projects\abc\src\bdd\cudd\cuddAddIte.c"
"C:\_projects\abc\src\bdd\cudd\cuddAddNeg.c"
"C:\_projects\abc\src\bdd\cudd\cuddAddWalsh.c"
"C:\_projects\abc\src\bdd\cudd\cuddAndAbs.c"
"C:\_projects\abc\src\bdd\cudd\cuddAnneal.c"
"C:\_projects\abc\src\bdd\cudd\cuddApa.c"
"C:\_projects\abc\src\bdd\cudd\cuddAPI.c"
"C:\_projects\abc\src\bdd\cudd\cuddApprox.c"
"C:\_projects\abc\src\bdd\cudd\cuddBddAbs.c"
"C:\_projects\abc\src\bdd\cudd\cuddBddCorr.c"
"C:\_projects\abc\src\bdd\cudd\cuddBddIte.c"
"C:\_projects\abc\src\bdd\cudd\cuddBridge.c"
"C:\_projects\abc\src\bdd\cudd\cuddCache.c"
"C:\_projects\abc\src\bdd\cudd\cuddCheck.c"
"C:\_projects\abc\src\bdd\cudd\cuddClip.c"
"C:\_projects\abc\src\bdd\cudd\cuddCof.c"
"C:\_projects\abc\src\bdd\cudd\cuddCompose.c"
"C:\_projects\abc\src\bdd\cudd\cuddDecomp.c"
"C:\_projects\abc\src\bdd\cudd\cuddEssent.c"
"C:\_projects\abc\src\bdd\cudd\cuddExact.c"
"C:\_projects\abc\src\bdd\cudd\cuddExport.c"
"C:\_projects\abc\src\bdd\cudd\cuddGenCof.c"
"C:\_projects\abc\src\bdd\cudd\cuddGenetic.c"
"C:\_projects\abc\src\bdd\cudd\cuddGroup.c"
"C:\_projects\abc\src\bdd\cudd\cuddHarwell.c"
"C:\_projects\abc\src\bdd\cudd\cuddInit.c"
"C:\_projects\abc\src\bdd\cudd\cuddInteract.c"
"C:\_projects\abc\src\bdd\cudd\cuddLCache.c"
"C:\_projects\abc\src\bdd\cudd\cuddLevelQ.c"
"C:\_projects\abc\src\bdd\cudd\cuddLinear.c"
"C:\_projects\abc\src\bdd\cudd\cuddLiteral.c"
"C:\_projects\abc\src\bdd\cudd\cuddMatMult.c"
"C:\_projects\abc\src\bdd\cudd\cuddPriority.c"
"C:\_projects\abc\src\bdd\cudd\cuddRead.c"
"C:\_projects\abc\src\bdd\cudd\cuddRef.c"
"C:\_projects\abc\src\bdd\cudd\cuddReorder.c"
"C:\_projects\abc\src\bdd\cudd\cuddSat.c"
"C:\_projects\abc\src\bdd\cudd\cuddSign.c"
"C:\_projects\abc\src\bdd\cudd\cuddSolve.c"
"C:\_projects\abc\src\bdd\cudd\cuddSplit.c"
"C:\_projects\abc\src\bdd\cudd\cuddSubsetHB.c"
"C:\_projects\abc\src\bdd\cudd\cuddSubsetSP.c"
"C:\_projects\abc\src\bdd\cudd\cuddSymmetry.c"
"C:\_projects\abc\src\bdd\cudd\cuddTable.c"
"C:\_projects\abc\src\bdd\cudd\cuddUtil.c"
"C:\_projects\abc\src\bdd\cudd\cuddWindow.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddCount.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddFuncs.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddGroup.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddIsop.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddLin.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddMisc.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddPort.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddReord.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddSetop.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddSymm.c"
"C:\_projects\abc\src\bdd\cudd\cuddZddUtil.c"
"C:\_projects\abc\src\bdd\epd\epd.c"
"C:\_projects\abc\src\bdd\mtr\mtrBasic.c"
"C:\_projects\abc\src\bdd\mtr\mtrGroup.c"
"C:\_projects\abc\src\bdd\parse\parseCore.c"
"C:\_projects\abc\src\bdd\parse\parseStack.c"
"C:\_projects\abc\src\bdd\dsd\dsdApi.c"
"C:\_projects\abc\src\bdd\dsd\dsdCheck.c"
"C:\_projects\abc\src\bdd\dsd\dsdLocal.c"
"C:\_projects\abc\src\bdd\dsd\dsdMan.c"
"C:\_projects\abc\src\bdd\dsd\dsdProc.c"
"C:\_projects\abc\src\bdd\dsd\dsdTree.c"
"C:\_projects\abc\src\bdd\reo\reoApi.c"
"C:\_projects\abc\src\bdd\reo\reoCore.c"
"C:\_projects\abc\src\bdd\reo\reoProfile.c"
"C:\_projects\abc\src\bdd\reo\reoSift.c"
"C:\_projects\abc\src\bdd\reo\reoSwap.c"
"C:\_projects\abc\src\bdd\reo\reoTest.c"
"C:\_projects\abc\src\bdd\reo\reoTransfer.c"
"C:\_projects\abc\src\bdd\reo\reoUnits.c"
"C:\_projects\abc\src\sop\mvc\mvc.c"
"C:\_projects\abc\src\sop\mvc\mvcApi.c"
"C:\_projects\abc\src\sop\mvc\mvcCompare.c"
"C:\_projects\abc\src\sop\mvc\mvcContain.c"
"C:\_projects\abc\src\sop\mvc\mvcCover.c"
"C:\_projects\abc\src\sop\mvc\mvcCube.c"
"C:\_projects\abc\src\sop\mvc\mvcDivide.c"
"C:\_projects\abc\src\sop\mvc\mvcDivisor.c"
"C:\_projects\abc\src\sop\mvc\mvcList.c"
"C:\_projects\abc\src\sop\mvc\mvcLits.c"
"C:\_projects\abc\src\sop\mvc\mvcMan.c"
"C:\_projects\abc\src\sop\mvc\mvcOpAlg.c"
"C:\_projects\abc\src\sop\mvc\mvcOpBool.c"
"C:\_projects\abc\src\sop\mvc\mvcPrint.c"
"C:\_projects\abc\src\sop\mvc\mvcSort.c"
"C:\_projects\abc\src\sop\mvc\mvcUtils.c"
"C:\_projects\abc\src\sop\ft\ftFactor.c"
"C:\_projects\abc\src\sop\ft\ftPrint.c"
"C:\_projects\abc\src\sat\asat\added.c"
"C:\_projects\abc\src\sat\asat\solver.c"
"C:\_projects\abc\src\sat\msat\msatActivity.c"
"C:\_projects\abc\src\sat\msat\msatClause.c"
"C:\_projects\abc\src\sat\msat\msatClauseVec.c"
"C:\_projects\abc\src\sat\msat\msatMem.c"
"C:\_projects\abc\src\sat\msat\msatOrderJ.c"
"C:\_projects\abc\src\sat\msat\msatQueue.c"
"C:\_projects\abc\src\sat\msat\msatRead.c"
"C:\_projects\abc\src\sat\msat\msatSolverApi.c"
"C:\_projects\abc\src\sat\msat\msatSolverCore.c"
"C:\_projects\abc\src\sat\msat\msatSolverIo.c"
"C:\_projects\abc\src\sat\msat\msatSolverSearch.c"
"C:\_projects\abc\src\sat\msat\msatSort.c"
"C:\_projects\abc\src\sat\msat\msatVec.c"
"C:\_projects\abc\src\sat\fraig\fraigApi.c"
"C:\_projects\abc\src\sat\fraig\fraigCanon.c"
"C:\_projects\abc\src\sat\fraig\fraigFanout.c"
"C:\_projects\abc\src\sat\fraig\fraigFeed.c"
"C:\_projects\abc\src\sat\fraig\fraigMan.c"
"C:\_projects\abc\src\sat\fraig\fraigMem.c"
"C:\_projects\abc\src\sat\fraig\fraigNode.c"
"C:\_projects\abc\src\sat\fraig\fraigPrime.c"
"C:\_projects\abc\src\sat\fraig\fraigSat.c"
"C:\_projects\abc\src\sat\fraig\fraigTable.c"
"C:\_projects\abc\src\sat\fraig\fraigUtil.c"
"C:\_projects\abc\src\sat\fraig\fraigVec.c"
"C:\_projects\abc\src\sat\sim\simMan.c"
"C:\_projects\abc\src\sat\sim\simSat.c"
"C:\_projects\abc\src\sat\sim\simSupp.c"
"C:\_projects\abc\src\sat\sim\simSym.c"
"C:\_projects\abc\src\sat\sim\simUnate.c"
"C:\_projects\abc\src\sat\sim\simUtils.c"
"C:\_projects\abc\src\opt\fxu\fxu.c"
"C:\_projects\abc\src\opt\fxu\fxuCreate.c"
"C:\_projects\abc\src\opt\fxu\fxuHeapD.c"
"C:\_projects\abc\src\opt\fxu\fxuHeapS.c"
"C:\_projects\abc\src\opt\fxu\fxuList.c"
"C:\_projects\abc\src\opt\fxu\fxuMatrix.c"
"C:\_projects\abc\src\opt\fxu\fxuPair.c"
"C:\_projects\abc\src\opt\fxu\fxuPrint.c"
"C:\_projects\abc\src\opt\fxu\fxuReduce.c"
"C:\_projects\abc\src\opt\fxu\fxuSelect.c"
"C:\_projects\abc\src\opt\fxu\fxuSingle.c"
"C:\_projects\abc\src\opt\fxu\fxuUpdate.c"
"C:\_projects\abc\src\opt\rwr\rwrEva.c"
"C:\_projects\abc\src\opt\rwr\rwrExp.c"
"C:\_projects\abc\src\opt\rwr\rwrLib.c"
"C:\_projects\abc\src\opt\rwr\rwrMan.c"
"C:\_projects\abc\src\opt\rwr\rwrPrint.c"
"C:\_projects\abc\src\opt\rwr\rwrUtil.c"
"C:\_projects\abc\src\opt\cut\cutMan.c"
"C:\_projects\abc\src\opt\cut\cutMerge.c"
"C:\_projects\abc\src\opt\cut\cutNode.c"
"C:\_projects\abc\src\opt\cut\cutSeq.c"
"C:\_projects\abc\src\opt\cut\cutTable.c"
"C:\_projects\abc\src\opt\cut\cutTruth.c"
"C:\_projects\abc\src\map\fpga\fpga.c"
"C:\_projects\abc\src\map\fpga\fpgaCore.c"
"C:\_projects\abc\src\map\fpga\fpgaCreate.c"
"C:\_projects\abc\src\map\fpga\fpgaCut.c"
"C:\_projects\abc\src\map\fpga\fpgaCutUtils.c"
"C:\_projects\abc\src\map\fpga\fpgaFanout.c"
"C:\_projects\abc\src\map\fpga\fpgaLib.c"
"C:\_projects\abc\src\map\fpga\fpgaMatch.c"
"C:\_projects\abc\src\map\fpga\fpgaTime.c"
"C:\_projects\abc\src\map\fpga\fpgaTruth.c"
"C:\_projects\abc\src\map\fpga\fpgaUtils.c"
"C:\_projects\abc\src\map\fpga\fpgaVec.c"
"C:\_projects\abc\src\map\mapper\mapper.c"
"C:\_projects\abc\src\map\mapper\mapperCanon.c"
"C:\_projects\abc\src\map\mapper\mapperCore.c"
"C:\_projects\abc\src\map\mapper\mapperCreate.c"
"C:\_projects\abc\src\map\mapper\mapperCut.c"
"C:\_projects\abc\src\map\mapper\mapperCutUtils.c"
"C:\_projects\abc\src\map\mapper\mapperFanout.c"
"C:\_projects\abc\src\map\mapper\mapperLib.c"
"C:\_projects\abc\src\map\mapper\mapperMatch.c"
"C:\_projects\abc\src\map\mapper\mapperRefs.c"
"C:\_projects\abc\src\map\mapper\mapperSuper.c"
"C:\_projects\abc\src\map\mapper\mapperTable.c"
"C:\_projects\abc\src\map\mapper\mapperTime.c"
"C:\_projects\abc\src\map\mapper\mapperTree.c"
"C:\_projects\abc\src\map\mapper\mapperTruth.c"
"C:\_projects\abc\src\map\mapper\mapperUtils.c"
"C:\_projects\abc\src\map\mapper\mapperVec.c"
"C:\_projects\abc\src\map\mio\mio.c"
"C:\_projects\abc\src\map\mio\mioApi.c"
"C:\_projects\abc\src\map\mio\mioFunc.c"
"C:\_projects\abc\src\map\mio\mioRead.c"
"C:\_projects\abc\src\map\mio\mioUtils.c"
"C:\_projects\abc\src\map\super\super.c"
"C:\_projects\abc\src\map\super\superAnd.c"
"C:\_projects\abc\src\map\super\superGate.c"
"C:\_projects\abc\src\map\super\superWrite.c"
"C:\_projects\abc\src\misc\extra\extraUtilBdd.c"
"C:\_projects\abc\src\misc\extra\extraUtilBitMatrix.c"
"C:\_projects\abc\src\misc\extra\extraUtilCanon.c"
"C:\_projects\abc\src\misc\extra\extraUtilFile.c"
"C:\_projects\abc\src\misc\extra\extraUtilMemory.c"
"C:\_projects\abc\src\misc\extra\extraUtilMisc.c"
"C:\_projects\abc\src\misc\extra\extraUtilProgress.c"
"C:\_projects\abc\src\misc\extra\extraUtilReader.c"
"C:\_projects\abc\src\misc\st\st.c"
"C:\_projects\abc\src\misc\st\stmm.c"
"C:\_projects\abc\src\misc\util\cpu_stats.c"
"C:\_projects\abc\src\misc\util\cpu_time.c"
"C:\_projects\abc\src\misc\util\datalimit.c"
"C:\_projects\abc\src\misc\util\getopt.c"
"C:\_projects\abc\src\misc\util\pathsearch.c"
"C:\_projects\abc\src\misc\util\safe_mem.c"
"C:\_projects\abc\src\misc\util\strsav.c"
"C:\_projects\abc\src\misc\util\texpand.c"
"C:\_projects\abc\src\opt\rwr\rwrDec.c"
] ]
Creating command line "cl.exe @C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2765.tmp" Creating command line "cl.exe @C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2D56.tmp"
Creating temporary file "C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2766.tmp" with contents Creating temporary file "C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2D57.tmp" with contents
[ [
kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"Debug/abc.pdb" /debug /machine:I386 /out:"_TEST/abc.exe" /pdbtype:sept kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:no /pdb:"Release/abc.pdb" /machine:I386 /out:"_TEST/abc.exe"
.\Debug\abc.obj .\Release\abc.obj
.\Debug\abcAig.obj .\Release\abcAig.obj
.\Debug\abcAttach.obj .\Release\abcAttach.obj
.\Debug\abcCheck.obj .\Release\abcBalance.obj
.\Debug\abcCollapse.obj .\Release\abcCheck.obj
.\Debug\abcCreate.obj .\Release\abcCollapse.obj
.\Debug\abcCut.obj .\Release\abcCreate.obj
.\Debug\abcDfs.obj .\Release\abcCut.obj
.\Debug\abcDsd.obj .\Release\abcDfs.obj
.\Debug\abcFanio.obj .\Release\abcDsd.obj
.\Debug\abcFpga.obj .\Release\abcFanio.obj
.\Debug\abcFraig.obj .\Release\abcFpga.obj
.\Debug\abcFunc.obj .\Release\abcFraig.obj
.\Debug\abcFxu.obj .\Release\abcFunc.obj
.\Debug\abcLatch.obj .\Release\abcFxu.obj
.\Debug\abcMap.obj .\Release\abcLatch.obj
.\Debug\abcMinBase.obj .\Release\abcMap.obj
.\Debug\abcMiter.obj .\Release\abcMinBase.obj
.\Debug\abcNames.obj .\Release\abcMiter.obj
.\Debug\abcNetlist.obj .\Release\abcNames.obj
.\Debug\abcPrint.obj .\Release\abcNetlist.obj
.\Debug\abcReconv.obj .\Release\abcPrint.obj
.\Debug\abcRefactor.obj .\Release\abcReconv.obj
.\Debug\abcRefs.obj .\Release\abcRefactor.obj
.\Debug\abcRenode.obj .\Release\abcRefs.obj
.\Debug\abcRewrite.obj .\Release\abcRenode.obj
.\Debug\abcSat.obj .\Release\abcRewrite.obj
.\Debug\abcSeq.obj .\Release\abcSat.obj
.\Debug\abcSeqRetime.obj .\Release\abcSeq.obj
.\Debug\abcShow.obj .\Release\abcSeqRetime.obj
.\Debug\abcSop.obj .\Release\abcShow.obj
.\Debug\abcStrash.obj .\Release\abcSop.obj
.\Debug\abcSweep.obj .\Release\abcStrash.obj
.\Debug\abcTiming.obj .\Release\abcSweep.obj
.\Debug\abcUnreach.obj .\Release\abcTiming.obj
.\Debug\abcUtil.obj .\Release\abcUnreach.obj
.\Debug\abcVerify.obj .\Release\abcUtil.obj
.\Debug\cmd.obj .\Release\abcVerify.obj
.\Debug\cmdAlias.obj .\Release\cmd.obj
.\Debug\cmdApi.obj .\Release\cmdAlias.obj
.\Debug\cmdFlag.obj .\Release\cmdApi.obj
.\Debug\cmdHist.obj .\Release\cmdFlag.obj
.\Debug\cmdUtils.obj .\Release\cmdHist.obj
.\Debug\io.obj .\Release\cmdUtils.obj
.\Debug\ioRead.obj .\Release\io.obj
.\Debug\ioReadBench.obj .\Release\ioRead.obj
.\Debug\ioReadBlif.obj .\Release\ioReadBench.obj
.\Debug\ioReadEdif.obj .\Release\ioReadBlif.obj
.\Debug\ioReadPla.obj .\Release\ioReadEdif.obj
.\Debug\ioReadVerilog.obj .\Release\ioReadPla.obj
.\Debug\ioUtil.obj .\Release\ioReadVerilog.obj
.\Debug\ioWriteBench.obj .\Release\ioUtil.obj
.\Debug\ioWriteBlif.obj .\Release\ioWriteBench.obj
.\Debug\ioWriteCnf.obj .\Release\ioWriteBlif.obj
.\Debug\ioWritePla.obj .\Release\ioWriteCnf.obj
.\Debug\main.obj .\Release\ioWritePla.obj
.\Debug\mainFrame.obj .\Release\main.obj
.\Debug\mainInit.obj .\Release\mainFrame.obj
.\Debug\mainUtils.obj .\Release\mainInit.obj
.\Debug\cuddAddAbs.obj .\Release\mainUtils.obj
.\Debug\cuddAddApply.obj .\Release\cuddAddAbs.obj
.\Debug\cuddAddFind.obj .\Release\cuddAddApply.obj
.\Debug\cuddAddInv.obj .\Release\cuddAddFind.obj
.\Debug\cuddAddIte.obj .\Release\cuddAddInv.obj
.\Debug\cuddAddNeg.obj .\Release\cuddAddIte.obj
.\Debug\cuddAddWalsh.obj .\Release\cuddAddNeg.obj
.\Debug\cuddAndAbs.obj .\Release\cuddAddWalsh.obj
.\Debug\cuddAnneal.obj .\Release\cuddAndAbs.obj
.\Debug\cuddApa.obj .\Release\cuddAnneal.obj
.\Debug\cuddAPI.obj .\Release\cuddApa.obj
.\Debug\cuddApprox.obj .\Release\cuddAPI.obj
.\Debug\cuddBddAbs.obj .\Release\cuddApprox.obj
.\Debug\cuddBddCorr.obj .\Release\cuddBddAbs.obj
.\Debug\cuddBddIte.obj .\Release\cuddBddCorr.obj
.\Debug\cuddBridge.obj .\Release\cuddBddIte.obj
.\Debug\cuddCache.obj .\Release\cuddBridge.obj
.\Debug\cuddCheck.obj .\Release\cuddCache.obj
.\Debug\cuddClip.obj .\Release\cuddCheck.obj
.\Debug\cuddCof.obj .\Release\cuddClip.obj
.\Debug\cuddCompose.obj .\Release\cuddCof.obj
.\Debug\cuddDecomp.obj .\Release\cuddCompose.obj
.\Debug\cuddEssent.obj .\Release\cuddDecomp.obj
.\Debug\cuddExact.obj .\Release\cuddEssent.obj
.\Debug\cuddExport.obj .\Release\cuddExact.obj
.\Debug\cuddGenCof.obj .\Release\cuddExport.obj
.\Debug\cuddGenetic.obj .\Release\cuddGenCof.obj
.\Debug\cuddGroup.obj .\Release\cuddGenetic.obj
.\Debug\cuddHarwell.obj .\Release\cuddGroup.obj
.\Debug\cuddInit.obj .\Release\cuddHarwell.obj
.\Debug\cuddInteract.obj .\Release\cuddInit.obj
.\Debug\cuddLCache.obj .\Release\cuddInteract.obj
.\Debug\cuddLevelQ.obj .\Release\cuddLCache.obj
.\Debug\cuddLinear.obj .\Release\cuddLevelQ.obj
.\Debug\cuddLiteral.obj .\Release\cuddLinear.obj
.\Debug\cuddMatMult.obj .\Release\cuddLiteral.obj
.\Debug\cuddPriority.obj .\Release\cuddMatMult.obj
.\Debug\cuddRead.obj .\Release\cuddPriority.obj
.\Debug\cuddRef.obj .\Release\cuddRead.obj
.\Debug\cuddReorder.obj .\Release\cuddRef.obj
.\Debug\cuddSat.obj .\Release\cuddReorder.obj
.\Debug\cuddSign.obj .\Release\cuddSat.obj
.\Debug\cuddSolve.obj .\Release\cuddSign.obj
.\Debug\cuddSplit.obj .\Release\cuddSolve.obj
.\Debug\cuddSubsetHB.obj .\Release\cuddSplit.obj
.\Debug\cuddSubsetSP.obj .\Release\cuddSubsetHB.obj
.\Debug\cuddSymmetry.obj .\Release\cuddSubsetSP.obj
.\Debug\cuddTable.obj .\Release\cuddSymmetry.obj
.\Debug\cuddUtil.obj .\Release\cuddTable.obj
.\Debug\cuddWindow.obj .\Release\cuddUtil.obj
.\Debug\cuddZddCount.obj .\Release\cuddWindow.obj
.\Debug\cuddZddFuncs.obj .\Release\cuddZddCount.obj
.\Debug\cuddZddGroup.obj .\Release\cuddZddFuncs.obj
.\Debug\cuddZddIsop.obj .\Release\cuddZddGroup.obj
.\Debug\cuddZddLin.obj .\Release\cuddZddIsop.obj
.\Debug\cuddZddMisc.obj .\Release\cuddZddLin.obj
.\Debug\cuddZddPort.obj .\Release\cuddZddMisc.obj
.\Debug\cuddZddReord.obj .\Release\cuddZddPort.obj
.\Debug\cuddZddSetop.obj .\Release\cuddZddReord.obj
.\Debug\cuddZddSymm.obj .\Release\cuddZddSetop.obj
.\Debug\cuddZddUtil.obj .\Release\cuddZddSymm.obj
.\Debug\epd.obj .\Release\cuddZddUtil.obj
.\Debug\mtrBasic.obj .\Release\epd.obj
.\Debug\mtrGroup.obj .\Release\mtrBasic.obj
.\Debug\parseCore.obj .\Release\mtrGroup.obj
.\Debug\parseStack.obj .\Release\parseCore.obj
.\Debug\dsdApi.obj .\Release\parseStack.obj
.\Debug\dsdCheck.obj .\Release\dsdApi.obj
.\Debug\dsdLocal.obj .\Release\dsdCheck.obj
.\Debug\dsdMan.obj .\Release\dsdLocal.obj
.\Debug\dsdProc.obj .\Release\dsdMan.obj
.\Debug\dsdTree.obj .\Release\dsdProc.obj
.\Debug\reoApi.obj .\Release\dsdTree.obj
.\Debug\reoCore.obj .\Release\reoApi.obj
.\Debug\reoProfile.obj .\Release\reoCore.obj
.\Debug\reoSift.obj .\Release\reoProfile.obj
.\Debug\reoSwap.obj .\Release\reoSift.obj
.\Debug\reoTest.obj .\Release\reoSwap.obj
.\Debug\reoTransfer.obj .\Release\reoTest.obj
.\Debug\reoUnits.obj .\Release\reoTransfer.obj
.\Debug\mvc.obj .\Release\reoUnits.obj
.\Debug\mvcApi.obj .\Release\mvc.obj
.\Debug\mvcCompare.obj .\Release\mvcApi.obj
.\Debug\mvcContain.obj .\Release\mvcCompare.obj
.\Debug\mvcCover.obj .\Release\mvcContain.obj
.\Debug\mvcCube.obj .\Release\mvcCover.obj
.\Debug\mvcDivide.obj .\Release\mvcCube.obj
.\Debug\mvcDivisor.obj .\Release\mvcDivide.obj
.\Debug\mvcList.obj .\Release\mvcDivisor.obj
.\Debug\mvcLits.obj .\Release\mvcList.obj
.\Debug\mvcMan.obj .\Release\mvcLits.obj
.\Debug\mvcOpAlg.obj .\Release\mvcMan.obj
.\Debug\mvcOpBool.obj .\Release\mvcOpAlg.obj
.\Debug\mvcPrint.obj .\Release\mvcOpBool.obj
.\Debug\mvcSort.obj .\Release\mvcPrint.obj
.\Debug\mvcUtils.obj .\Release\mvcSort.obj
.\Debug\ftFactor.obj .\Release\mvcUtils.obj
.\Debug\ftPrint.obj .\Release\ftFactor.obj
.\Debug\added.obj .\Release\ftPrint.obj
.\Debug\solver.obj .\Release\added.obj
.\Debug\msatActivity.obj .\Release\solver.obj
.\Debug\msatClause.obj .\Release\msatActivity.obj
.\Debug\msatClauseVec.obj .\Release\msatClause.obj
.\Debug\msatMem.obj .\Release\msatClauseVec.obj
.\Debug\msatOrderJ.obj .\Release\msatMem.obj
.\Debug\msatQueue.obj .\Release\msatOrderJ.obj
.\Debug\msatRead.obj .\Release\msatQueue.obj
.\Debug\msatSolverApi.obj .\Release\msatRead.obj
.\Debug\msatSolverCore.obj .\Release\msatSolverApi.obj
.\Debug\msatSolverIo.obj .\Release\msatSolverCore.obj
.\Debug\msatSolverSearch.obj .\Release\msatSolverIo.obj
.\Debug\msatSort.obj .\Release\msatSolverSearch.obj
.\Debug\msatVec.obj .\Release\msatSort.obj
.\Debug\fraigApi.obj .\Release\msatVec.obj
.\Debug\fraigCanon.obj .\Release\fraigApi.obj
.\Debug\fraigFanout.obj .\Release\fraigCanon.obj
.\Debug\fraigFeed.obj .\Release\fraigFanout.obj
.\Debug\fraigMan.obj .\Release\fraigFeed.obj
.\Debug\fraigMem.obj .\Release\fraigMan.obj
.\Debug\fraigNode.obj .\Release\fraigMem.obj
.\Debug\fraigPrime.obj .\Release\fraigNode.obj
.\Debug\fraigSat.obj .\Release\fraigPrime.obj
.\Debug\fraigTable.obj .\Release\fraigSat.obj
.\Debug\fraigUtil.obj .\Release\fraigTable.obj
.\Debug\fraigVec.obj .\Release\fraigUtil.obj
.\Debug\simMan.obj .\Release\fraigVec.obj
.\Debug\simSat.obj .\Release\simMan.obj
.\Debug\simSupp.obj .\Release\simSat.obj
.\Debug\simSym.obj .\Release\simSupp.obj
.\Debug\simUnate.obj .\Release\simSym.obj
.\Debug\simUtils.obj .\Release\simUnate.obj
.\Debug\fxu.obj .\Release\simUtils.obj
.\Debug\fxuCreate.obj .\Release\fxu.obj
.\Debug\fxuHeapD.obj .\Release\fxuCreate.obj
.\Debug\fxuHeapS.obj .\Release\fxuHeapD.obj
.\Debug\fxuList.obj .\Release\fxuHeapS.obj
.\Debug\fxuMatrix.obj .\Release\fxuList.obj
.\Debug\fxuPair.obj .\Release\fxuMatrix.obj
.\Debug\fxuPrint.obj .\Release\fxuPair.obj
.\Debug\fxuReduce.obj .\Release\fxuPrint.obj
.\Debug\fxuSelect.obj .\Release\fxuReduce.obj
.\Debug\fxuSingle.obj .\Release\fxuSelect.obj
.\Debug\fxuUpdate.obj .\Release\fxuSingle.obj
.\Debug\rwrCut.obj .\Release\fxuUpdate.obj
.\Debug\rwrEva.obj .\Release\rwrEva.obj
.\Debug\rwrExp.obj .\Release\rwrExp.obj
.\Debug\rwrLib.obj .\Release\rwrLib.obj
.\Debug\rwrMan.obj .\Release\rwrMan.obj
.\Debug\rwrPrint.obj .\Release\rwrPrint.obj
.\Debug\rwrUtil.obj .\Release\rwrUtil.obj
.\Debug\cutMan.obj .\Release\cutMan.obj
.\Debug\cutMerge.obj .\Release\cutMerge.obj
.\Debug\cutNode.obj .\Release\cutNode.obj
.\Debug\cutSeq.obj .\Release\cutSeq.obj
.\Debug\cutTable.obj .\Release\cutTable.obj
.\Debug\cutTruth.obj .\Release\cutTruth.obj
.\Debug\fpga.obj .\Release\fpga.obj
.\Debug\fpgaCore.obj .\Release\fpgaCore.obj
.\Debug\fpgaCreate.obj .\Release\fpgaCreate.obj
.\Debug\fpgaCut.obj .\Release\fpgaCut.obj
.\Debug\fpgaCutUtils.obj .\Release\fpgaCutUtils.obj
.\Debug\fpgaFanout.obj .\Release\fpgaFanout.obj
.\Debug\fpgaLib.obj .\Release\fpgaLib.obj
.\Debug\fpgaMatch.obj .\Release\fpgaMatch.obj
.\Debug\fpgaTime.obj .\Release\fpgaTime.obj
.\Debug\fpgaTruth.obj .\Release\fpgaTruth.obj
.\Debug\fpgaUtils.obj .\Release\fpgaUtils.obj
.\Debug\fpgaVec.obj .\Release\fpgaVec.obj
.\Debug\mapper.obj .\Release\mapper.obj
.\Debug\mapperCanon.obj .\Release\mapperCanon.obj
.\Debug\mapperCore.obj .\Release\mapperCore.obj
.\Debug\mapperCreate.obj .\Release\mapperCreate.obj
.\Debug\mapperCut.obj .\Release\mapperCut.obj
.\Debug\mapperCutUtils.obj .\Release\mapperCutUtils.obj
.\Debug\mapperFanout.obj .\Release\mapperFanout.obj
.\Debug\mapperLib.obj .\Release\mapperLib.obj
.\Debug\mapperMatch.obj .\Release\mapperMatch.obj
.\Debug\mapperRefs.obj .\Release\mapperRefs.obj
.\Debug\mapperSuper.obj .\Release\mapperSuper.obj
.\Debug\mapperTable.obj .\Release\mapperTable.obj
.\Debug\mapperTime.obj .\Release\mapperTime.obj
.\Debug\mapperTree.obj .\Release\mapperTree.obj
.\Debug\mapperTruth.obj .\Release\mapperTruth.obj
.\Debug\mapperUtils.obj .\Release\mapperUtils.obj
.\Debug\mapperVec.obj .\Release\mapperVec.obj
.\Debug\mio.obj .\Release\mio.obj
.\Debug\mioApi.obj .\Release\mioApi.obj
.\Debug\mioFunc.obj .\Release\mioFunc.obj
.\Debug\mioRead.obj .\Release\mioRead.obj
.\Debug\mioUtils.obj .\Release\mioUtils.obj
.\Debug\super.obj .\Release\super.obj
.\Debug\superAnd.obj .\Release\superAnd.obj
.\Debug\superGate.obj .\Release\superGate.obj
.\Debug\superWrite.obj .\Release\superWrite.obj
.\Debug\extraUtilBdd.obj .\Release\extraUtilBdd.obj
.\Debug\extraUtilBitMatrix.obj .\Release\extraUtilBitMatrix.obj
.\Debug\extraUtilCanon.obj .\Release\extraUtilCanon.obj
.\Debug\extraUtilFile.obj .\Release\extraUtilFile.obj
.\Debug\extraUtilMemory.obj .\Release\extraUtilMemory.obj
.\Debug\extraUtilMisc.obj .\Release\extraUtilMisc.obj
.\Debug\extraUtilProgress.obj .\Release\extraUtilProgress.obj
.\Debug\extraUtilReader.obj .\Release\extraUtilReader.obj
.\Debug\st.obj .\Release\st.obj
.\Debug\stmm.obj .\Release\stmm.obj
.\Debug\cpu_stats.obj .\Release\cpu_stats.obj
.\Debug\cpu_time.obj .\Release\cpu_time.obj
.\Debug\datalimit.obj .\Release\datalimit.obj
.\Debug\getopt.obj .\Release\getopt.obj
.\Debug\pathsearch.obj .\Release\pathsearch.obj
.\Debug\safe_mem.obj .\Release\safe_mem.obj
.\Debug\strsav.obj .\Release\strsav.obj
.\Debug\texpand.obj .\Release\texpand.obj
.\Debug\abcBalance.obj .\Release\rwrDec.obj
] ]
Creating command line "link.exe @C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2766.tmp" Creating command line "link.exe @C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2D57.tmp"
<h3>Output Window</h3> <h3>Output Window</h3>
Compiling... Compiling...
abc.c
abcAig.c
abcAttach.c
abcBalance.c
abcCheck.c
abcCollapse.c
abcCreate.c
abcCut.c
abcDfs.c
abcDsd.c
abcFanio.c
abcFpga.c
abcFraig.c
abcFunc.c
abcFxu.c
abcLatch.c
abcMap.c
abcMinBase.c
abcMiter.c
abcNames.c
abcNetlist.c
abcPrint.c
abcReconv.c
abcRefactor.c abcRefactor.c
abcRefs.c
abcRenode.c
abcRewrite.c
abcSat.c
abcSeq.c
abcSeqRetime.c
abcShow.c
abcSop.c
abcStrash.c
abcSweep.c
abcTiming.c
abcUnreach.c
abcUtil.c
abcVerify.c
cmd.c
cmdAlias.c
cmdApi.c
cmdFlag.c
cmdHist.c
cmdUtils.c
io.c
ioRead.c
ioReadBench.c
ioReadBlif.c
ioReadEdif.c
ioReadPla.c
ioReadVerilog.c
ioUtil.c
ioWriteBench.c
ioWriteBlif.c
ioWriteCnf.c
ioWritePla.c
main.c
mainFrame.c
mainInit.c
mainUtils.c
cuddAddAbs.c
cuddAddApply.c
cuddAddFind.c
cuddAddInv.c
cuddAddIte.c
cuddAddNeg.c
cuddAddWalsh.c
cuddAndAbs.c
cuddAnneal.c
cuddApa.c
C:\_projects\abc\src\bdd\cudd\cuddApa.c(181) : warning C4244: 'return' : conversion from 'unsigned long ' to 'unsigned short ', possible loss of data
C:\_projects\abc\src\bdd\cudd\cuddApa.c(213) : warning C4244: 'return' : conversion from 'unsigned long ' to 'unsigned short ', possible loss of data
C:\_projects\abc\src\bdd\cudd\cuddApa.c(530) : warning C4244: '=' : conversion from 'unsigned short ' to 'unsigned char ', possible loss of data
C:\_projects\abc\src\bdd\cudd\cuddApa.c(588) : warning C4244: '=' : conversion from 'unsigned short ' to 'unsigned char ', possible loss of data
cuddAPI.c
cuddApprox.c
cuddBddAbs.c
cuddBddCorr.c
cuddBddIte.c
cuddBridge.c
cuddCache.c
C:\_projects\abc\src\bdd\cudd\cuddCache.c(902) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
cuddCheck.c
cuddClip.c
cuddCof.c
cuddCompose.c
cuddDecomp.c
cuddEssent.c
cuddExact.c
cuddExport.c
cuddGenCof.c
cuddGenetic.c
cuddGroup.c
C:\_projects\abc\src\bdd\cudd\cuddGroup.c(2062) : warning C4018: '<=' : signed/unsigned mismatch
cuddHarwell.c
cuddInit.c
cuddInteract.c
cuddLCache.c
C:\_projects\abc\src\bdd\cudd\cuddLCache.c(1387) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
cuddLevelQ.c
cuddLinear.c
cuddLiteral.c
cuddMatMult.c
cuddPriority.c
cuddRead.c
cuddRef.c
cuddReorder.c
C:\_projects\abc\src\bdd\cudd\cuddReorder.c(395) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
cuddSat.c
C:\_projects\abc\src\bdd\cudd\cuddReorder.c(2016) : warning C4700: local variable 'minLevel' used without having been initialized
C:\_projects\abc\src\bdd\cudd\cuddReorder.c(2020) : warning C4700: local variable 'maxLevel' used without having been initialized
cuddSign.c
cuddSolve.c
cuddSplit.c
cuddSubsetHB.c
cuddSubsetSP.c
cuddSymmetry.c
cuddTable.c
C:\_projects\abc\src\bdd\cudd\cuddTable.c(1822) : warning C4018: '<' : signed/unsigned mismatch
C:\_projects\abc\src\bdd\cudd\cuddTable.c(1927) : warning C4018: '<' : signed/unsigned mismatch
C:\_projects\abc\src\bdd\cudd\cuddTable.c(2235) : warning C4018: '<' : signed/unsigned mismatch
C:\_projects\abc\src\bdd\cudd\cuddTable.c(2303) : warning C4018: '<' : signed/unsigned mismatch
C:\_projects\abc\src\bdd\cudd\cuddTable.c(2358) : warning C4146: unary minus operator applied to unsigned type, result still unsigned
cuddUtil.c
cuddWindow.c
cuddZddCount.c
cuddZddFuncs.c
cuddZddGroup.c
cuddZddIsop.c
cuddZddLin.c
cuddZddMisc.c
cuddZddPort.c
cuddZddReord.c
cuddZddSetop.c
cuddZddSymm.c
cuddZddUtil.c
epd.c
mtrBasic.c
mtrGroup.c
parseCore.c
parseStack.c
dsdApi.c
dsdCheck.c
dsdLocal.c
dsdMan.c
dsdProc.c
dsdTree.c
reoApi.c
reoCore.c
reoProfile.c
reoSift.c
reoSwap.c
reoTest.c
reoTransfer.c
reoUnits.c
mvc.c
mvcApi.c
mvcCompare.c
mvcContain.c
mvcCover.c
mvcCube.c
mvcDivide.c
mvcDivisor.c
mvcList.c
mvcLits.c
mvcMan.c
mvcOpAlg.c
mvcOpBool.c
mvcPrint.c
mvcSort.c
mvcUtils.c
ftFactor.c
ftPrint.c
added.c
solver.c
msatActivity.c
msatClause.c
msatClauseVec.c
msatMem.c
msatOrderJ.c
msatQueue.c
msatRead.c
msatSolverApi.c
msatSolverCore.c
msatSolverIo.c
msatSolverSearch.c
msatSort.c
msatVec.c
fraigApi.c
fraigCanon.c
fraigFanout.c
fraigFeed.c
fraigMan.c
fraigMem.c
fraigNode.c
fraigPrime.c
fraigSat.c
fraigTable.c
fraigUtil.c
fraigVec.c
simMan.c
simSat.c
simSupp.c
simSym.c
simUnate.c
simUtils.c
fxu.c
fxuCreate.c
fxuHeapD.c
fxuHeapS.c
fxuList.c
fxuMatrix.c
fxuPair.c
fxuPrint.c
fxuReduce.c
fxuSelect.c
fxuSingle.c
fxuUpdate.c
rwrEva.c
rwrExp.c
rwrLib.c
rwrMan.c
rwrPrint.c
rwrUtil.c
cutMan.c
cutMerge.c
cutNode.c
cutSeq.c
cutTable.c
cutTruth.c
fpga.c
fpgaCore.c
fpgaCreate.c
fpgaCut.c
fpgaCutUtils.c
fpgaFanout.c
fpgaLib.c
fpgaMatch.c
fpgaTime.c
fpgaTruth.c
fpgaUtils.c
fpgaVec.c
mapper.c
mapperCanon.c
mapperCore.c
mapperCreate.c
mapperCut.c
mapperCutUtils.c
mapperFanout.c
mapperLib.c
mapperMatch.c
mapperRefs.c
mapperSuper.c
mapperTable.c
mapperTime.c
mapperTree.c
mapperTruth.c
mapperUtils.c
mapperVec.c
mio.c
mioApi.c
mioFunc.c
mioRead.c
mioUtils.c
super.c
superAnd.c
superGate.c
superWrite.c
extraUtilBdd.c
extraUtilBitMatrix.c
extraUtilCanon.c
extraUtilFile.c
extraUtilMemory.c
extraUtilMisc.c
extraUtilProgress.c
extraUtilReader.c
st.c
stmm.c
cpu_stats.c
cpu_time.c
datalimit.c
getopt.c
pathsearch.c
safe_mem.c
strsav.c
texpand.c
rwrDec.c
Linking... Linking...
Creating temporary file "C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2767.tmp" with contents Creating temporary file "C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2D59.tmp" with contents
[ [
/nologo /o"Debug/abc.bsc" /nologo /o"Release/abc.bsc"
.\Debug\abc.sbr .\Release\abc.sbr
.\Debug\abcAig.sbr .\Release\abcAig.sbr
.\Debug\abcAttach.sbr .\Release\abcAttach.sbr
.\Debug\abcCheck.sbr .\Release\abcBalance.sbr
.\Debug\abcCollapse.sbr .\Release\abcCheck.sbr
.\Debug\abcCreate.sbr .\Release\abcCollapse.sbr
.\Debug\abcCut.sbr .\Release\abcCreate.sbr
.\Debug\abcDfs.sbr .\Release\abcCut.sbr
.\Debug\abcDsd.sbr .\Release\abcDfs.sbr
.\Debug\abcFanio.sbr .\Release\abcDsd.sbr
.\Debug\abcFpga.sbr .\Release\abcFanio.sbr
.\Debug\abcFraig.sbr .\Release\abcFpga.sbr
.\Debug\abcFunc.sbr .\Release\abcFraig.sbr
.\Debug\abcFxu.sbr .\Release\abcFunc.sbr
.\Debug\abcLatch.sbr .\Release\abcFxu.sbr
.\Debug\abcMap.sbr .\Release\abcLatch.sbr
.\Debug\abcMinBase.sbr .\Release\abcMap.sbr
.\Debug\abcMiter.sbr .\Release\abcMinBase.sbr
.\Debug\abcNames.sbr .\Release\abcMiter.sbr
.\Debug\abcNetlist.sbr .\Release\abcNames.sbr
.\Debug\abcPrint.sbr .\Release\abcNetlist.sbr
.\Debug\abcReconv.sbr .\Release\abcPrint.sbr
.\Debug\abcRefactor.sbr .\Release\abcReconv.sbr
.\Debug\abcRefs.sbr .\Release\abcRefactor.sbr
.\Debug\abcRenode.sbr .\Release\abcRefs.sbr
.\Debug\abcRewrite.sbr .\Release\abcRenode.sbr
.\Debug\abcSat.sbr .\Release\abcRewrite.sbr
.\Debug\abcSeq.sbr .\Release\abcSat.sbr
.\Debug\abcSeqRetime.sbr .\Release\abcSeq.sbr
.\Debug\abcShow.sbr .\Release\abcSeqRetime.sbr
.\Debug\abcSop.sbr .\Release\abcShow.sbr
.\Debug\abcStrash.sbr .\Release\abcSop.sbr
.\Debug\abcSweep.sbr .\Release\abcStrash.sbr
.\Debug\abcTiming.sbr .\Release\abcSweep.sbr
.\Debug\abcUnreach.sbr .\Release\abcTiming.sbr
.\Debug\abcUtil.sbr .\Release\abcUnreach.sbr
.\Debug\abcVerify.sbr .\Release\abcUtil.sbr
.\Debug\cmd.sbr .\Release\abcVerify.sbr
.\Debug\cmdAlias.sbr .\Release\cmd.sbr
.\Debug\cmdApi.sbr .\Release\cmdAlias.sbr
.\Debug\cmdFlag.sbr .\Release\cmdApi.sbr
.\Debug\cmdHist.sbr .\Release\cmdFlag.sbr
.\Debug\cmdUtils.sbr .\Release\cmdHist.sbr
.\Debug\io.sbr .\Release\cmdUtils.sbr
.\Debug\ioRead.sbr .\Release\io.sbr
.\Debug\ioReadBench.sbr .\Release\ioRead.sbr
.\Debug\ioReadBlif.sbr .\Release\ioReadBench.sbr
.\Debug\ioReadEdif.sbr .\Release\ioReadBlif.sbr
.\Debug\ioReadPla.sbr .\Release\ioReadEdif.sbr
.\Debug\ioReadVerilog.sbr .\Release\ioReadPla.sbr
.\Debug\ioUtil.sbr .\Release\ioReadVerilog.sbr
.\Debug\ioWriteBench.sbr .\Release\ioUtil.sbr
.\Debug\ioWriteBlif.sbr .\Release\ioWriteBench.sbr
.\Debug\ioWriteCnf.sbr .\Release\ioWriteBlif.sbr
.\Debug\ioWritePla.sbr .\Release\ioWriteCnf.sbr
.\Debug\main.sbr .\Release\ioWritePla.sbr
.\Debug\mainFrame.sbr .\Release\main.sbr
.\Debug\mainInit.sbr .\Release\mainFrame.sbr
.\Debug\mainUtils.sbr .\Release\mainInit.sbr
.\Debug\cuddAddAbs.sbr .\Release\mainUtils.sbr
.\Debug\cuddAddApply.sbr .\Release\cuddAddAbs.sbr
.\Debug\cuddAddFind.sbr .\Release\cuddAddApply.sbr
.\Debug\cuddAddInv.sbr .\Release\cuddAddFind.sbr
.\Debug\cuddAddIte.sbr .\Release\cuddAddInv.sbr
.\Debug\cuddAddNeg.sbr .\Release\cuddAddIte.sbr
.\Debug\cuddAddWalsh.sbr .\Release\cuddAddNeg.sbr
.\Debug\cuddAndAbs.sbr .\Release\cuddAddWalsh.sbr
.\Debug\cuddAnneal.sbr .\Release\cuddAndAbs.sbr
.\Debug\cuddApa.sbr .\Release\cuddAnneal.sbr
.\Debug\cuddAPI.sbr .\Release\cuddApa.sbr
.\Debug\cuddApprox.sbr .\Release\cuddAPI.sbr
.\Debug\cuddBddAbs.sbr .\Release\cuddApprox.sbr
.\Debug\cuddBddCorr.sbr .\Release\cuddBddAbs.sbr
.\Debug\cuddBddIte.sbr .\Release\cuddBddCorr.sbr
.\Debug\cuddBridge.sbr .\Release\cuddBddIte.sbr
.\Debug\cuddCache.sbr .\Release\cuddBridge.sbr
.\Debug\cuddCheck.sbr .\Release\cuddCache.sbr
.\Debug\cuddClip.sbr .\Release\cuddCheck.sbr
.\Debug\cuddCof.sbr .\Release\cuddClip.sbr
.\Debug\cuddCompose.sbr .\Release\cuddCof.sbr
.\Debug\cuddDecomp.sbr .\Release\cuddCompose.sbr
.\Debug\cuddEssent.sbr .\Release\cuddDecomp.sbr
.\Debug\cuddExact.sbr .\Release\cuddEssent.sbr
.\Debug\cuddExport.sbr .\Release\cuddExact.sbr
.\Debug\cuddGenCof.sbr .\Release\cuddExport.sbr
.\Debug\cuddGenetic.sbr .\Release\cuddGenCof.sbr
.\Debug\cuddGroup.sbr .\Release\cuddGenetic.sbr
.\Debug\cuddHarwell.sbr .\Release\cuddGroup.sbr
.\Debug\cuddInit.sbr .\Release\cuddHarwell.sbr
.\Debug\cuddInteract.sbr .\Release\cuddInit.sbr
.\Debug\cuddLCache.sbr .\Release\cuddInteract.sbr
.\Debug\cuddLevelQ.sbr .\Release\cuddLCache.sbr
.\Debug\cuddLinear.sbr .\Release\cuddLevelQ.sbr
.\Debug\cuddLiteral.sbr .\Release\cuddLinear.sbr
.\Debug\cuddMatMult.sbr .\Release\cuddLiteral.sbr
.\Debug\cuddPriority.sbr .\Release\cuddMatMult.sbr
.\Debug\cuddRead.sbr .\Release\cuddPriority.sbr
.\Debug\cuddRef.sbr .\Release\cuddRead.sbr
.\Debug\cuddReorder.sbr .\Release\cuddRef.sbr
.\Debug\cuddSat.sbr .\Release\cuddReorder.sbr
.\Debug\cuddSign.sbr .\Release\cuddSat.sbr
.\Debug\cuddSolve.sbr .\Release\cuddSign.sbr
.\Debug\cuddSplit.sbr .\Release\cuddSolve.sbr
.\Debug\cuddSubsetHB.sbr .\Release\cuddSplit.sbr
.\Debug\cuddSubsetSP.sbr .\Release\cuddSubsetHB.sbr
.\Debug\cuddSymmetry.sbr .\Release\cuddSubsetSP.sbr
.\Debug\cuddTable.sbr .\Release\cuddSymmetry.sbr
.\Debug\cuddUtil.sbr .\Release\cuddTable.sbr
.\Debug\cuddWindow.sbr .\Release\cuddUtil.sbr
.\Debug\cuddZddCount.sbr .\Release\cuddWindow.sbr
.\Debug\cuddZddFuncs.sbr .\Release\cuddZddCount.sbr
.\Debug\cuddZddGroup.sbr .\Release\cuddZddFuncs.sbr
.\Debug\cuddZddIsop.sbr .\Release\cuddZddGroup.sbr
.\Debug\cuddZddLin.sbr .\Release\cuddZddIsop.sbr
.\Debug\cuddZddMisc.sbr .\Release\cuddZddLin.sbr
.\Debug\cuddZddPort.sbr .\Release\cuddZddMisc.sbr
.\Debug\cuddZddReord.sbr .\Release\cuddZddPort.sbr
.\Debug\cuddZddSetop.sbr .\Release\cuddZddReord.sbr
.\Debug\cuddZddSymm.sbr .\Release\cuddZddSetop.sbr
.\Debug\cuddZddUtil.sbr .\Release\cuddZddSymm.sbr
.\Debug\epd.sbr .\Release\cuddZddUtil.sbr
.\Debug\mtrBasic.sbr .\Release\epd.sbr
.\Debug\mtrGroup.sbr .\Release\mtrBasic.sbr
.\Debug\parseCore.sbr .\Release\mtrGroup.sbr
.\Debug\parseStack.sbr .\Release\parseCore.sbr
.\Debug\dsdApi.sbr .\Release\parseStack.sbr
.\Debug\dsdCheck.sbr .\Release\dsdApi.sbr
.\Debug\dsdLocal.sbr .\Release\dsdCheck.sbr
.\Debug\dsdMan.sbr .\Release\dsdLocal.sbr
.\Debug\dsdProc.sbr .\Release\dsdMan.sbr
.\Debug\dsdTree.sbr .\Release\dsdProc.sbr
.\Debug\reoApi.sbr .\Release\dsdTree.sbr
.\Debug\reoCore.sbr .\Release\reoApi.sbr
.\Debug\reoProfile.sbr .\Release\reoCore.sbr
.\Debug\reoSift.sbr .\Release\reoProfile.sbr
.\Debug\reoSwap.sbr .\Release\reoSift.sbr
.\Debug\reoTest.sbr .\Release\reoSwap.sbr
.\Debug\reoTransfer.sbr .\Release\reoTest.sbr
.\Debug\reoUnits.sbr .\Release\reoTransfer.sbr
.\Debug\mvc.sbr .\Release\reoUnits.sbr
.\Debug\mvcApi.sbr .\Release\mvc.sbr
.\Debug\mvcCompare.sbr .\Release\mvcApi.sbr
.\Debug\mvcContain.sbr .\Release\mvcCompare.sbr
.\Debug\mvcCover.sbr .\Release\mvcContain.sbr
.\Debug\mvcCube.sbr .\Release\mvcCover.sbr
.\Debug\mvcDivide.sbr .\Release\mvcCube.sbr
.\Debug\mvcDivisor.sbr .\Release\mvcDivide.sbr
.\Debug\mvcList.sbr .\Release\mvcDivisor.sbr
.\Debug\mvcLits.sbr .\Release\mvcList.sbr
.\Debug\mvcMan.sbr .\Release\mvcLits.sbr
.\Debug\mvcOpAlg.sbr .\Release\mvcMan.sbr
.\Debug\mvcOpBool.sbr .\Release\mvcOpAlg.sbr
.\Debug\mvcPrint.sbr .\Release\mvcOpBool.sbr
.\Debug\mvcSort.sbr .\Release\mvcPrint.sbr
.\Debug\mvcUtils.sbr .\Release\mvcSort.sbr
.\Debug\ftFactor.sbr .\Release\mvcUtils.sbr
.\Debug\ftPrint.sbr .\Release\ftFactor.sbr
.\Debug\added.sbr .\Release\ftPrint.sbr
.\Debug\solver.sbr .\Release\added.sbr
.\Debug\msatActivity.sbr .\Release\solver.sbr
.\Debug\msatClause.sbr .\Release\msatActivity.sbr
.\Debug\msatClauseVec.sbr .\Release\msatClause.sbr
.\Debug\msatMem.sbr .\Release\msatClauseVec.sbr
.\Debug\msatOrderJ.sbr .\Release\msatMem.sbr
.\Debug\msatQueue.sbr .\Release\msatOrderJ.sbr
.\Debug\msatRead.sbr .\Release\msatQueue.sbr
.\Debug\msatSolverApi.sbr .\Release\msatRead.sbr
.\Debug\msatSolverCore.sbr .\Release\msatSolverApi.sbr
.\Debug\msatSolverIo.sbr .\Release\msatSolverCore.sbr
.\Debug\msatSolverSearch.sbr .\Release\msatSolverIo.sbr
.\Debug\msatSort.sbr .\Release\msatSolverSearch.sbr
.\Debug\msatVec.sbr .\Release\msatSort.sbr
.\Debug\fraigApi.sbr .\Release\msatVec.sbr
.\Debug\fraigCanon.sbr .\Release\fraigApi.sbr
.\Debug\fraigFanout.sbr .\Release\fraigCanon.sbr
.\Debug\fraigFeed.sbr .\Release\fraigFanout.sbr
.\Debug\fraigMan.sbr .\Release\fraigFeed.sbr
.\Debug\fraigMem.sbr .\Release\fraigMan.sbr
.\Debug\fraigNode.sbr .\Release\fraigMem.sbr
.\Debug\fraigPrime.sbr .\Release\fraigNode.sbr
.\Debug\fraigSat.sbr .\Release\fraigPrime.sbr
.\Debug\fraigTable.sbr .\Release\fraigSat.sbr
.\Debug\fraigUtil.sbr .\Release\fraigTable.sbr
.\Debug\fraigVec.sbr .\Release\fraigUtil.sbr
.\Debug\simMan.sbr .\Release\fraigVec.sbr
.\Debug\simSat.sbr .\Release\simMan.sbr
.\Debug\simSupp.sbr .\Release\simSat.sbr
.\Debug\simSym.sbr .\Release\simSupp.sbr
.\Debug\simUnate.sbr .\Release\simSym.sbr
.\Debug\simUtils.sbr .\Release\simUnate.sbr
.\Debug\fxu.sbr .\Release\simUtils.sbr
.\Debug\fxuCreate.sbr .\Release\fxu.sbr
.\Debug\fxuHeapD.sbr .\Release\fxuCreate.sbr
.\Debug\fxuHeapS.sbr .\Release\fxuHeapD.sbr
.\Debug\fxuList.sbr .\Release\fxuHeapS.sbr
.\Debug\fxuMatrix.sbr .\Release\fxuList.sbr
.\Debug\fxuPair.sbr .\Release\fxuMatrix.sbr
.\Debug\fxuPrint.sbr .\Release\fxuPair.sbr
.\Debug\fxuReduce.sbr .\Release\fxuPrint.sbr
.\Debug\fxuSelect.sbr .\Release\fxuReduce.sbr
.\Debug\fxuSingle.sbr .\Release\fxuSelect.sbr
.\Debug\fxuUpdate.sbr .\Release\fxuSingle.sbr
.\Debug\rwrCut.sbr .\Release\fxuUpdate.sbr
.\Debug\rwrEva.sbr .\Release\rwrEva.sbr
.\Debug\rwrExp.sbr .\Release\rwrExp.sbr
.\Debug\rwrLib.sbr .\Release\rwrLib.sbr
.\Debug\rwrMan.sbr .\Release\rwrMan.sbr
.\Debug\rwrPrint.sbr .\Release\rwrPrint.sbr
.\Debug\rwrUtil.sbr .\Release\rwrUtil.sbr
.\Debug\cutMan.sbr .\Release\cutMan.sbr
.\Debug\cutMerge.sbr .\Release\cutMerge.sbr
.\Debug\cutNode.sbr .\Release\cutNode.sbr
.\Debug\cutSeq.sbr .\Release\cutSeq.sbr
.\Debug\cutTable.sbr .\Release\cutTable.sbr
.\Debug\cutTruth.sbr .\Release\cutTruth.sbr
.\Debug\fpga.sbr .\Release\fpga.sbr
.\Debug\fpgaCore.sbr .\Release\fpgaCore.sbr
.\Debug\fpgaCreate.sbr .\Release\fpgaCreate.sbr
.\Debug\fpgaCut.sbr .\Release\fpgaCut.sbr
.\Debug\fpgaCutUtils.sbr .\Release\fpgaCutUtils.sbr
.\Debug\fpgaFanout.sbr .\Release\fpgaFanout.sbr
.\Debug\fpgaLib.sbr .\Release\fpgaLib.sbr
.\Debug\fpgaMatch.sbr .\Release\fpgaMatch.sbr
.\Debug\fpgaTime.sbr .\Release\fpgaTime.sbr
.\Debug\fpgaTruth.sbr .\Release\fpgaTruth.sbr
.\Debug\fpgaUtils.sbr .\Release\fpgaUtils.sbr
.\Debug\fpgaVec.sbr .\Release\fpgaVec.sbr
.\Debug\mapper.sbr .\Release\mapper.sbr
.\Debug\mapperCanon.sbr .\Release\mapperCanon.sbr
.\Debug\mapperCore.sbr .\Release\mapperCore.sbr
.\Debug\mapperCreate.sbr .\Release\mapperCreate.sbr
.\Debug\mapperCut.sbr .\Release\mapperCut.sbr
.\Debug\mapperCutUtils.sbr .\Release\mapperCutUtils.sbr
.\Debug\mapperFanout.sbr .\Release\mapperFanout.sbr
.\Debug\mapperLib.sbr .\Release\mapperLib.sbr
.\Debug\mapperMatch.sbr .\Release\mapperMatch.sbr
.\Debug\mapperRefs.sbr .\Release\mapperRefs.sbr
.\Debug\mapperSuper.sbr .\Release\mapperSuper.sbr
.\Debug\mapperTable.sbr .\Release\mapperTable.sbr
.\Debug\mapperTime.sbr .\Release\mapperTime.sbr
.\Debug\mapperTree.sbr .\Release\mapperTree.sbr
.\Debug\mapperTruth.sbr .\Release\mapperTruth.sbr
.\Debug\mapperUtils.sbr .\Release\mapperUtils.sbr
.\Debug\mapperVec.sbr .\Release\mapperVec.sbr
.\Debug\mio.sbr .\Release\mio.sbr
.\Debug\mioApi.sbr .\Release\mioApi.sbr
.\Debug\mioFunc.sbr .\Release\mioFunc.sbr
.\Debug\mioRead.sbr .\Release\mioRead.sbr
.\Debug\mioUtils.sbr .\Release\mioUtils.sbr
.\Debug\super.sbr .\Release\super.sbr
.\Debug\superAnd.sbr .\Release\superAnd.sbr
.\Debug\superGate.sbr .\Release\superGate.sbr
.\Debug\superWrite.sbr .\Release\superWrite.sbr
.\Debug\extraUtilBdd.sbr .\Release\extraUtilBdd.sbr
.\Debug\extraUtilBitMatrix.sbr .\Release\extraUtilBitMatrix.sbr
.\Debug\extraUtilCanon.sbr .\Release\extraUtilCanon.sbr
.\Debug\extraUtilFile.sbr .\Release\extraUtilFile.sbr
.\Debug\extraUtilMemory.sbr .\Release\extraUtilMemory.sbr
.\Debug\extraUtilMisc.sbr .\Release\extraUtilMisc.sbr
.\Debug\extraUtilProgress.sbr .\Release\extraUtilProgress.sbr
.\Debug\extraUtilReader.sbr .\Release\extraUtilReader.sbr
.\Debug\st.sbr .\Release\st.sbr
.\Debug\stmm.sbr .\Release\stmm.sbr
.\Debug\cpu_stats.sbr .\Release\cpu_stats.sbr
.\Debug\cpu_time.sbr .\Release\cpu_time.sbr
.\Debug\datalimit.sbr .\Release\datalimit.sbr
.\Debug\getopt.sbr .\Release\getopt.sbr
.\Debug\pathsearch.sbr .\Release\pathsearch.sbr
.\Debug\safe_mem.sbr .\Release\safe_mem.sbr
.\Debug\strsav.sbr .\Release\strsav.sbr
.\Debug\texpand.sbr .\Release\texpand.sbr
.\Debug\abcBalance.sbr] .\Release\rwrDec.sbr]
Creating command line "bscmake.exe @C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2767.tmp" Creating command line "bscmake.exe @C:\DOCUME~1\alanmi\LOCALS~1\Temp\RSP2D59.tmp"
Creating browse info file... Creating browse info file...
<h3>Output Window</h3> <h3>Output Window</h3>
<h3>Results</h3> <h3>Results</h3>
abc.exe - 0 error(s), 0 warning(s) abc.exe - 0 error(s), 15 warning(s)
</pre> </pre>
</body> </body>
</html> </html>
...@@ -20,6 +20,7 @@ alias rv read_verilog ...@@ -20,6 +20,7 @@ alias rv read_verilog
alias rsup read_super mcnc5_old.super alias rsup read_super mcnc5_old.super
alias rlib read_library alias rlib read_library
alias rw rewrite alias rw rewrite
alias rwz rewrite -z
alias rf refactor alias rf refactor
alias rfz refactor -z alias rfz refactor -z
alias sa set autoexec ps alias sa set autoexec ps
...@@ -31,7 +32,7 @@ alias wl write_blif ...@@ -31,7 +32,7 @@ alias wl write_blif
alias wp write_pla alias wp write_pla
alias cnf "st; renode -c; write_cnf" alias cnf "st; renode -c; write_cnf"
alias prove "st; renode -c; sat" alias prove "st; renode -c; sat"
alias opt "st; b; renode; sop; ps" alias opt "b; renode; sop; b; ps"
alias opts "st; b; renode; sop; st; b; ps" alias share "b; renode -m; fx; b; ps"
alias share "st; b; renode -m; fx; st; b; ps" alias resyn "b; rwz; rfz; b; rwz; rfz; b; ps"
...@@ -848,7 +848,7 @@ usage: ...@@ -848,7 +848,7 @@ usage:
int Abc_CommandBalance( Abc_Frame_t * pAbc, int argc, char ** argv ) int Abc_CommandBalance( Abc_Frame_t * pAbc, int argc, char ** argv )
{ {
FILE * pOut, * pErr; FILE * pOut, * pErr;
Abc_Ntk_t * pNtk, * pNtkRes; Abc_Ntk_t * pNtk, * pNtkRes, * pNtkTemp;
int c; int c;
int fDuplicate; int fDuplicate;
...@@ -878,14 +878,25 @@ int Abc_CommandBalance( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -878,14 +878,25 @@ int Abc_CommandBalance( Abc_Frame_t * pAbc, int argc, char ** argv )
fprintf( pErr, "Empty network.\n" ); fprintf( pErr, "Empty network.\n" );
return 1; return 1;
} }
if ( !Abc_NtkIsAig(pNtk) )
// get the new network
if ( Abc_NtkIsAig(pNtk) )
{
pNtkRes = Abc_NtkBalance( pNtk, fDuplicate );
}
else
{
pNtkTemp = Abc_NtkStrash( pNtk, 0 );
if ( pNtkTemp == NULL )
{ {
fprintf( pErr, "Cannot balance a network that is not an AIG.\n" ); fprintf( pErr, "Strashing before balancing has failed.\n" );
return 1; return 1;
} }
pNtkRes = Abc_NtkBalance( pNtkTemp, fDuplicate );
Abc_NtkDelete( pNtkTemp );
}
// get the new network // check if balancing worked
pNtkRes = Abc_NtkBalance( pNtk, fDuplicate );
if ( pNtkRes == NULL ) if ( pNtkRes == NULL )
{ {
fprintf( pErr, "Balancing has failed.\n" ); fprintf( pErr, "Balancing has failed.\n" );
...@@ -897,7 +908,7 @@ int Abc_CommandBalance( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -897,7 +908,7 @@ int Abc_CommandBalance( Abc_Frame_t * pAbc, int argc, char ** argv )
usage: usage:
fprintf( pErr, "usage: balance [-dh]\n" ); fprintf( pErr, "usage: balance [-dh]\n" );
fprintf( pErr, "\t transforms an AIG into a well-balanced AIG\n" ); fprintf( pErr, "\t transforms the current network into a well-balanced AIG\n" );
fprintf( pErr, "\t-d : toggle duplication of logic [default = %s]\n", fDuplicate? "yes": "no" ); fprintf( pErr, "\t-d : toggle duplication of logic [default = %s]\n", fDuplicate? "yes": "no" );
fprintf( pErr, "\t-h : print the command usage\n"); fprintf( pErr, "\t-h : print the command usage\n");
return 1; return 1;
...@@ -1327,27 +1338,32 @@ int Abc_CommandRewrite( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1327,27 +1338,32 @@ int Abc_CommandRewrite( Abc_Frame_t * pAbc, int argc, char ** argv )
FILE * pOut, * pErr; FILE * pOut, * pErr;
Abc_Ntk_t * pNtk; Abc_Ntk_t * pNtk;
int c; int c;
bool fVerbose;
bool fPrecompute; bool fPrecompute;
bool fUseZeros;
bool fVerbose;
// external functions // external functions
extern void Rwr_Precompute(); extern void Rwr_Precompute();
extern int Abc_NtkRewrite( Abc_Ntk_t * pNtk ); extern int Abc_NtkRewrite( Abc_Ntk_t * pNtk, int fUseZeros, int fVerbose );
pNtk = Abc_FrameReadNet(pAbc); pNtk = Abc_FrameReadNet(pAbc);
pOut = Abc_FrameReadOut(pAbc); pOut = Abc_FrameReadOut(pAbc);
pErr = Abc_FrameReadErr(pAbc); pErr = Abc_FrameReadErr(pAbc);
// set defaults // set defaults
fVerbose = 0;
fPrecompute = 0; fPrecompute = 0;
fUseZeros = 0;
fVerbose = 0;
util_getopt_reset(); util_getopt_reset();
while ( ( c = util_getopt( argc, argv, "zvh" ) ) != EOF ) while ( ( c = util_getopt( argc, argv, "xzvh" ) ) != EOF )
{ {
switch ( c ) switch ( c )
{ {
case 'z': case 'x':
fPrecompute ^= 1; fPrecompute ^= 1;
break; break;
case 'z':
fUseZeros ^= 1;
break;
case 'v': case 'v':
fVerbose ^= 1; fVerbose ^= 1;
break; break;
...@@ -1381,7 +1397,7 @@ int Abc_CommandRewrite( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1381,7 +1397,7 @@ int Abc_CommandRewrite( Abc_Frame_t * pAbc, int argc, char ** argv )
} }
// modify the current network // modify the current network
if ( !Abc_NtkRewrite( pNtk ) ) if ( !Abc_NtkRewrite( pNtk, fUseZeros, fVerbose ) )
{ {
fprintf( pErr, "Rewriting has failed.\n" ); fprintf( pErr, "Rewriting has failed.\n" );
return 1; return 1;
...@@ -1389,8 +1405,9 @@ int Abc_CommandRewrite( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1389,8 +1405,9 @@ int Abc_CommandRewrite( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0; return 0;
usage: usage:
fprintf( pErr, "usage: rewrite [-vh]\n" ); fprintf( pErr, "usage: rewrite [-zvh]\n" );
fprintf( pErr, "\t performs technology-independent rewriting of the AIG\n" ); fprintf( pErr, "\t performs technology-independent rewriting of the AIG\n" );
fprintf( pErr, "\t-z : toggle using zero-cost replacements [default = %s]\n", fUseZeros? "yes": "no" );
fprintf( pErr, "\t-v : toggle verbose printout [default = %s]\n", fVerbose? "yes": "no" ); fprintf( pErr, "\t-v : toggle verbose printout [default = %s]\n", fVerbose? "yes": "no" );
fprintf( pErr, "\t-h : print the command usage\n"); fprintf( pErr, "\t-h : print the command usage\n");
return 1; return 1;
...@@ -1428,7 +1445,7 @@ int Abc_CommandRefactor( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1428,7 +1445,7 @@ int Abc_CommandRefactor( Abc_Frame_t * pAbc, int argc, char ** argv )
nConeSizeMax = 16; nConeSizeMax = 16;
fUseZeros = 0; fUseZeros = 0;
fUseDcs = 0; fUseDcs = 0;
fVerbose = 1; fVerbose = 0;
util_getopt_reset(); util_getopt_reset();
while ( ( c = util_getopt( argc, argv, "NCzdvh" ) ) != EOF ) while ( ( c = util_getopt( argc, argv, "NCzdvh" ) ) != EOF )
{ {
......
...@@ -144,8 +144,13 @@ struct Abc_Ntk_t_ ...@@ -144,8 +144,13 @@ struct Abc_Ntk_t_
int nPos; // the number of primary outputs int nPos; // the number of primary outputs
// the functionality manager // the functionality manager
void * pManFunc; // AIG manager, BDD manager, or memory manager for SOPs void * pManFunc; // AIG manager, BDD manager, or memory manager for SOPs
// the timing manager // the timing manager (for mapped networks)
Abc_ManTime_t * pManTime; // stores arrival/required times for all nodes Abc_ManTime_t * pManTime; // stores arrival/required times for all nodes
// the cut manager (for AIGs)
void * pManCut; // stores information about the cuts computed for the nodes
// level information (for AIGs)
int LevelMax; // maximum number of levels
Vec_Int_t * vLevelsR; // level in the reverse topological order
// the external don't-care if given // the external don't-care if given
Abc_Ntk_t * pExdc; // the EXDC network Abc_Ntk_t * pExdc; // the EXDC network
// miscellaneous data members // miscellaneous data members
...@@ -423,6 +428,11 @@ extern Abc_Obj_t * Abc_NodeCreateAnd( Abc_Ntk_t * pNtk, Vec_Ptr_t * vFani ...@@ -423,6 +428,11 @@ extern Abc_Obj_t * Abc_NodeCreateAnd( Abc_Ntk_t * pNtk, Vec_Ptr_t * vFani
extern Abc_Obj_t * Abc_NodeCreateOr( Abc_Ntk_t * pNtk, Vec_Ptr_t * vFanins ); extern Abc_Obj_t * Abc_NodeCreateOr( Abc_Ntk_t * pNtk, Vec_Ptr_t * vFanins );
extern Abc_Obj_t * Abc_NodeCreateMux( Abc_Ntk_t * pNtk, Abc_Obj_t * pNodeC, Abc_Obj_t * pNode1, Abc_Obj_t * pNode0 ); extern Abc_Obj_t * Abc_NodeCreateMux( Abc_Ntk_t * pNtk, Abc_Obj_t * pNodeC, Abc_Obj_t * pNode1, Abc_Obj_t * pNode0 );
extern Abc_Obj_t * Abc_NodeClone( Abc_Obj_t * pNode ); extern Abc_Obj_t * Abc_NodeClone( Abc_Obj_t * pNode );
/*=== abcCut.c ==========================================================*/
extern void * Abc_NodeGetCutsRecursive( void * p, Abc_Obj_t * pObj );
extern void * Abc_NodeGetCuts( void * p, Abc_Obj_t * pObj );
extern void * Abc_NodeReadCuts( void * p, Abc_Obj_t * pObj );
extern void Abc_NodeFreeCuts( void * p, Abc_Obj_t * pObj );
/*=== abcDfs.c ==========================================================*/ /*=== abcDfs.c ==========================================================*/
extern Vec_Ptr_t * Abc_NtkDfs( Abc_Ntk_t * pNtk, int fCollectAll ); extern Vec_Ptr_t * Abc_NtkDfs( Abc_Ntk_t * pNtk, int fCollectAll );
extern Vec_Ptr_t * Abc_NtkDfsNodes( Abc_Ntk_t * pNtk, Abc_Obj_t ** ppNodes, int nNodes ); extern Vec_Ptr_t * Abc_NtkDfsNodes( Abc_Ntk_t * pNtk, Abc_Obj_t ** ppNodes, int nNodes );
...@@ -572,7 +582,11 @@ extern void Abc_NtkSetNodeLevelsArrival( Abc_Ntk_t * pNtk ); ...@@ -572,7 +582,11 @@ extern void Abc_NtkSetNodeLevelsArrival( Abc_Ntk_t * pNtk );
extern float * Abc_NtkGetCiArrivalFloats( Abc_Ntk_t * pNtk ); extern float * Abc_NtkGetCiArrivalFloats( Abc_Ntk_t * pNtk );
extern Abc_Time_t * Abc_NtkGetCiArrivalTimes( Abc_Ntk_t * pNtk ); extern Abc_Time_t * Abc_NtkGetCiArrivalTimes( Abc_Ntk_t * pNtk );
extern float Abc_NtkDelayTrace( Abc_Ntk_t * pNtk ); extern float Abc_NtkDelayTrace( Abc_Ntk_t * pNtk );
extern Vec_Int_t * Abc_NtkGetRequiredLevels( Abc_Ntk_t * pNtk ); extern void Abc_NtkStartReverseLevels( Abc_Ntk_t * pNtk );
extern void Abc_NtkStopReverseLevels( Abc_Ntk_t * pNtk );
extern void Abc_NodeSetReverseLevel( Abc_Obj_t * pObj, int LevelR );
extern int Abc_NodeReadReverseLevel( Abc_Obj_t * pObj );
extern int Abc_NodeReadRequiredLevel( Abc_Obj_t * pObj );
/*=== abcTravId.c ==========================================================*/ /*=== abcTravId.c ==========================================================*/
extern void Abc_NtkIncrementTravId( Abc_Ntk_t * pNtk ); extern void Abc_NtkIncrementTravId( Abc_Ntk_t * pNtk );
extern void Abc_NodeSetTravId( Abc_Obj_t * pObj, int TravId ); extern void Abc_NodeSetTravId( Abc_Obj_t * pObj, int TravId );
...@@ -609,6 +623,7 @@ extern void Abc_NodeFreeFaninNames( Vec_Ptr_t * vNames ); ...@@ -609,6 +623,7 @@ extern void Abc_NodeFreeFaninNames( Vec_Ptr_t * vNames );
extern char ** Abc_NtkCollectCioNames( Abc_Ntk_t * pNtk, int fCollectCos ); extern char ** Abc_NtkCollectCioNames( Abc_Ntk_t * pNtk, int fCollectCos );
extern void Abc_NtkAlphaOrderSignals( Abc_Ntk_t * pNtk, int fComb ); extern void Abc_NtkAlphaOrderSignals( Abc_Ntk_t * pNtk, int fComb );
extern void Abc_NtkShortNames( Abc_Ntk_t * pNtk ); extern void Abc_NtkShortNames( Abc_Ntk_t * pNtk );
extern Vec_Int_t * Abc_NtkFanoutCounts( Abc_Ntk_t * pNtk );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// END OF FILE /// /// END OF FILE ///
......
...@@ -58,6 +58,7 @@ struct Abc_Aig_t_ ...@@ -58,6 +58,7 @@ struct Abc_Aig_t_
Vec_Ptr_t * vStackReplaceOld; // the nodes to be replaced Vec_Ptr_t * vStackReplaceOld; // the nodes to be replaced
Vec_Ptr_t * vStackReplaceNew; // the nodes to be used for replacement Vec_Ptr_t * vStackReplaceNew; // the nodes to be used for replacement
Vec_Vec_t * vLevels; // the nodes to be updated Vec_Vec_t * vLevels; // the nodes to be updated
Vec_Vec_t * vLevelsR; // the nodes to be updated
}; };
// iterators through the entries in the linked lists of nodes // iterators through the entries in the linked lists of nodes
...@@ -85,6 +86,9 @@ static void Abc_AigResize( Abc_Aig_t * pMan ); ...@@ -85,6 +86,9 @@ static void Abc_AigResize( Abc_Aig_t * pMan );
static void Abc_AigReplace_int( Abc_Aig_t * pMan ); static void Abc_AigReplace_int( Abc_Aig_t * pMan );
static void Abc_AigDelete_int( Abc_Aig_t * pMan ); static void Abc_AigDelete_int( Abc_Aig_t * pMan );
static void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan ); static void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan );
static void Abc_AigUpdateLevelR_int( Abc_Aig_t * pMan );
static void Abc_AigRemoveFromLevelStructure( Vec_Vec_t * vStruct, Abc_Obj_t * pNode );
static void Abc_AigRemoveFromLevelStructureR( Vec_Vec_t * vStruct, Abc_Obj_t * pNode );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFITIONS /// /// FUNCTION DEFITIONS ///
...@@ -116,6 +120,7 @@ Abc_Aig_t * Abc_AigAlloc( Abc_Ntk_t * pNtkAig ) ...@@ -116,6 +120,7 @@ Abc_Aig_t * Abc_AigAlloc( Abc_Ntk_t * pNtkAig )
pMan->vStackReplaceOld = Vec_PtrAlloc( 100 ); pMan->vStackReplaceOld = Vec_PtrAlloc( 100 );
pMan->vStackReplaceNew = Vec_PtrAlloc( 100 ); pMan->vStackReplaceNew = Vec_PtrAlloc( 100 );
pMan->vLevels = Vec_VecAlloc( 100 ); pMan->vLevels = Vec_VecAlloc( 100 );
pMan->vLevelsR = Vec_VecAlloc( 100 );
// save the current network // save the current network
pMan->pNtkAig = pNtkAig; pMan->pNtkAig = pNtkAig;
// allocate constant nodes // allocate constant nodes
...@@ -199,6 +204,7 @@ void Abc_AigFree( Abc_Aig_t * pMan ) ...@@ -199,6 +204,7 @@ void Abc_AigFree( Abc_Aig_t * pMan )
assert( Vec_PtrSize( pMan->vStackReplaceNew ) == 0 ); assert( Vec_PtrSize( pMan->vStackReplaceNew ) == 0 );
// free the table // free the table
Vec_VecFree( pMan->vLevels ); Vec_VecFree( pMan->vLevels );
Vec_VecFree( pMan->vLevelsR );
Vec_PtrFree( pMan->vStackDelete ); Vec_PtrFree( pMan->vStackDelete );
Vec_PtrFree( pMan->vStackReplaceOld ); Vec_PtrFree( pMan->vStackReplaceOld );
Vec_PtrFree( pMan->vStackReplaceNew ); Vec_PtrFree( pMan->vStackReplaceNew );
...@@ -381,6 +387,9 @@ Abc_Obj_t * Abc_AigAndCreate( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1 ) ...@@ -381,6 +387,9 @@ Abc_Obj_t * Abc_AigAndCreate( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * p1 )
pAnd->pNext = pMan->pBins[Key]; pAnd->pNext = pMan->pBins[Key];
pMan->pBins[Key] = pAnd; pMan->pBins[Key] = pAnd;
pMan->nEntries++; pMan->nEntries++;
// create the cuts if defined
// if ( pAnd->pNtk->pManCut )
// Abc_NodeGetCuts( pAnd->pNtk->pManCut, pAnd );
return pAnd; return pAnd;
} }
...@@ -399,6 +408,7 @@ Abc_Obj_t * Abc_AigAndCreateFrom( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * ...@@ -399,6 +408,7 @@ Abc_Obj_t * Abc_AigAndCreateFrom( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t *
{ {
Abc_Obj_t * pTemp; Abc_Obj_t * pTemp;
unsigned Key; unsigned Key;
assert( !Abc_ObjIsComplement(pAnd) );
// order the arguments // order the arguments
if ( Abc_ObjRegular(p0)->Id > Abc_ObjRegular(p1)->Id ) if ( Abc_ObjRegular(p0)->Id > Abc_ObjRegular(p1)->Id )
pTemp = p0, p0 = p1, p1 = pTemp; pTemp = p0, p0 = p1, p1 = pTemp;
...@@ -412,6 +422,9 @@ Abc_Obj_t * Abc_AigAndCreateFrom( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t * ...@@ -412,6 +422,9 @@ Abc_Obj_t * Abc_AigAndCreateFrom( Abc_Aig_t * pMan, Abc_Obj_t * p0, Abc_Obj_t *
Key = Abc_HashKey2( p0, p1, pMan->nBins ); Key = Abc_HashKey2( p0, p1, pMan->nBins );
pAnd->pNext = pMan->pBins[Key]; pAnd->pNext = pMan->pBins[Key];
pMan->pBins[Key] = pAnd; pMan->pBins[Key] = pAnd;
// create the cuts if defined
// if ( pAnd->pNtk->pManCut )
// Abc_NodeGetCuts( pAnd->pNtk->pManCut, pAnd );
return pAnd; return pAnd;
} }
...@@ -494,6 +507,9 @@ void Abc_AigAndDelete( Abc_Aig_t * pMan, Abc_Obj_t * pThis ) ...@@ -494,6 +507,9 @@ void Abc_AigAndDelete( Abc_Aig_t * pMan, Abc_Obj_t * pThis )
} }
assert( pAnd == pThis ); assert( pAnd == pThis );
pMan->nEntries--; pMan->nEntries--;
// delete the cuts if defined
if ( pThis->pNtk->pManCut )
Abc_NodeFreeCuts( pThis->pNtk->pManCut, pThis );
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -644,9 +660,8 @@ void Abc_AigReplace( Abc_Aig_t * pMan, Abc_Obj_t * pOld, Abc_Obj_t * pNew ) ...@@ -644,9 +660,8 @@ void Abc_AigReplace( Abc_Aig_t * pMan, Abc_Obj_t * pOld, Abc_Obj_t * pNew )
Vec_PtrPush( pMan->vStackReplaceNew, pNew ); Vec_PtrPush( pMan->vStackReplaceNew, pNew );
while ( Vec_PtrSize(pMan->vStackReplaceOld) ) while ( Vec_PtrSize(pMan->vStackReplaceOld) )
Abc_AigReplace_int( pMan ); Abc_AigReplace_int( pMan );
// while ( Vec_PtrSize(pMan->vStackDelete) )
// Abc_AigDelete_int( pMan );
Abc_AigUpdateLevel_int( pMan ); Abc_AigUpdateLevel_int( pMan );
Abc_AigUpdateLevelR_int( pMan );
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -705,8 +720,14 @@ void Abc_AigReplace_int( Abc_Aig_t * pMan ) ...@@ -705,8 +720,14 @@ void Abc_AigReplace_int( Abc_Aig_t * pMan )
Abc_ObjRemoveFanins( pFanout ); Abc_ObjRemoveFanins( pFanout );
// recreate the old fanout with new fanins and add it to the table // recreate the old fanout with new fanins and add it to the table
Abc_AigAndCreateFrom( pMan, pFanin1, pFanin2, pFanout ); Abc_AigAndCreateFrom( pMan, pFanin1, pFanin2, pFanout );
// schedule the updated fanout for updating level // schedule the updated fanout for updating direct level
assert( pFanout->fMarkA == 0 );
pFanout->fMarkA = 1;
Vec_VecPush( pMan->vLevels, pFanout->Level, pFanout ); Vec_VecPush( pMan->vLevels, pFanout->Level, pFanout );
// schedule the updated fanout for updating reverse level
assert( pFanout->fMarkB == 0 );
pFanout->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, Abc_NodeReadReverseLevel(pFanout), pFanout );
// the fanout has changed, update EXOR status of its fanouts // the fanout has changed, update EXOR status of its fanouts
Abc_ObjForEachFanout( pFanout, pFanoutFanout, v ) Abc_ObjForEachFanout( pFanout, pFanoutFanout, v )
if ( Abc_NodeIsAigAnd(pFanoutFanout) ) if ( Abc_NodeIsAigAnd(pFanoutFanout) )
...@@ -764,15 +785,47 @@ void Abc_AigDelete_int( Abc_Aig_t * pMan ) ...@@ -764,15 +785,47 @@ void Abc_AigDelete_int( Abc_Aig_t * pMan )
// collect the MFFC // collect the MFFC
vNodes = Abc_NodeMffcCollect( pRoot ); vNodes = Abc_NodeMffcCollect( pRoot );
// if reverse levels are specified, schedule fanins of MFFC for updating
// currently, we do not do it because we do not know the correct level of the fanins
// also, it is unlikely that this will make a difference since we are
// processing the network forward while at this point fanins are left behind...
/*
if ( pObj->pNtk->vLevelsR )
Vec_PtrForEachEntry( vNodes, pObj, k )
{
Abc_Obj_t * pFanin;
if ( Abc_ObjIsCi(pObj) )
continue;
pFanin = Abc_ObjFanin0(pObj);
if ( pFanin->fMarkB == 0 )
{
pFanin->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, Abc_NodeReadReverseLevel(pFanin), pFanin );
}
pFanin = Abc_ObjFanin1(pObj);
if ( pFanin->fMarkB == 0 )
{
pFanin->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, Abc_NodeReadReverseLevel(pFanin), pFanin );
}
}
*/
// delete the nodes in MFFC
Vec_PtrForEachEntry( vNodes, pObj, k ) Vec_PtrForEachEntry( vNodes, pObj, k )
{ {
if ( Abc_ObjIsCi(pObj) ) if ( Abc_ObjIsCi(pObj) )
continue; continue;
assert( pObj->fMarkA == 0 ); assert( Abc_ObjFanoutNum(pObj) == 0 );
// remove the node from the table // remove the node from the table
Abc_AigAndDelete( pMan, pObj ); Abc_AigAndDelete( pMan, pObj );
// if the node is in the level structure, remove it
if ( pObj->fMarkA )
Abc_AigRemoveFromLevelStructure( pMan->vLevels, pObj );
if ( pObj->fMarkB )
Abc_AigRemoveFromLevelStructureR( pMan->vLevelsR, pObj );
// remove the node from the network // remove the node from the network
//printf( "Removing " ); Abc_AigPrintNode( pObj );
Abc_NtkDeleteObj( pObj ); Abc_NtkDeleteObj( pObj );
} }
Vec_PtrFree( vNodes ); Vec_PtrFree( vNodes );
...@@ -782,7 +835,11 @@ void Abc_AigDelete_int( Abc_Aig_t * pMan ) ...@@ -782,7 +835,11 @@ void Abc_AigDelete_int( Abc_Aig_t * pMan )
Synopsis [Updates the level of the node after it has changed.] Synopsis [Updates the level of the node after it has changed.]
Description [] Description [This procedure is based on the observation that
after the node's level has changed, the fanouts levels can change too,
but the new fanout levels are always larger than the node's level.
As a result, we can accumulate the nodes to be updated in the queue
and process them in the increasing order of levels.]
SideEffects [] SideEffects []
...@@ -793,8 +850,7 @@ void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan ) ...@@ -793,8 +850,7 @@ void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan )
{ {
Abc_Obj_t * pNode, * pFanout; Abc_Obj_t * pNode, * pFanout;
Vec_Ptr_t * vVec; Vec_Ptr_t * vVec;
unsigned LevelNew; int LevelNew, i, k, v;
int i, k, v;
// go through the nodes and update the level of their fanouts // go through the nodes and update the level of their fanouts
Vec_VecForEachLevel( pMan->vLevels, vVec, i ) Vec_VecForEachLevel( pMan->vLevels, vVec, i )
...@@ -803,10 +859,12 @@ void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan ) ...@@ -803,10 +859,12 @@ void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan )
continue; continue;
Vec_PtrForEachEntry( vVec, pNode, k ) Vec_PtrForEachEntry( vVec, pNode, k )
{ {
// assert( Abc_ObjIsNode(pNode) ); if ( pNode == NULL )
// for some reason, deleted nodes are encountered here!!!
if ( !Abc_ObjIsNode(pNode) )
continue; continue;
assert( Abc_ObjIsNode(pNode) );
// clean the mark
assert( pNode->fMarkA == 1 );
pNode->fMarkA = 0;
// iterate through the fanouts // iterate through the fanouts
Abc_ObjForEachFanout( pNode, pFanout, v ) Abc_ObjForEachFanout( pNode, pFanout, v )
{ {
...@@ -814,11 +872,17 @@ void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan ) ...@@ -814,11 +872,17 @@ void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan )
continue; continue;
// get the new level of this fanout // get the new level of this fanout
LevelNew = 1 + ABC_MAX( Abc_ObjFanin0(pFanout)->Level, Abc_ObjFanin1(pFanout)->Level ); LevelNew = 1 + ABC_MAX( Abc_ObjFanin0(pFanout)->Level, Abc_ObjFanin1(pFanout)->Level );
if ( pFanout->Level == LevelNew ) // no change assert( LevelNew > i );
if ( (int)pFanout->Level == LevelNew ) // no change
continue; continue;
// if the fanout is present in the data structure, pull it out
if ( pFanout->fMarkA )
Abc_AigRemoveFromLevelStructure( pMan->vLevels, pFanout );
// update the fanout level // update the fanout level
pFanout->Level = LevelNew; pFanout->Level = LevelNew;
// add the fanout to be updated // add the fanout to the data structure to update its fanouts
assert( pFanout->fMarkA == 0 );
pFanout->fMarkA = 1;
Vec_VecPush( pMan->vLevels, pFanout->Level, pFanout ); Vec_VecPush( pMan->vLevels, pFanout->Level, pFanout );
} }
} }
...@@ -826,7 +890,122 @@ void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan ) ...@@ -826,7 +890,122 @@ void Abc_AigUpdateLevel_int( Abc_Aig_t * pMan )
} }
} }
/**Function*************************************************************
Synopsis [Updates the level of the node after it has changed.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigUpdateLevelR_int( Abc_Aig_t * pMan )
{
Abc_Obj_t * pNode, * pFanin, * pFanout;
Vec_Ptr_t * vVec;
int LevelNew, i, k, v, j;
// go through the nodes and update the level of their fanouts
Vec_VecForEachLevel( pMan->vLevelsR, vVec, i )
{
if ( Vec_PtrSize(vVec) == 0 )
continue;
Vec_PtrForEachEntry( vVec, pNode, k )
{
if ( pNode == NULL )
continue;
assert( Abc_ObjIsNode(pNode) );
// clean the mark
assert( pNode->fMarkB == 1 );
pNode->fMarkB = 0;
// iterate through the fanins
Abc_ObjForEachFanin( pNode, pFanin, v )
{
if ( Abc_ObjIsCi(pFanin) )
continue;
// get the new reverse level of this fanin
LevelNew = 0;
Abc_ObjForEachFanout( pFanin, pFanout, j )
if ( LevelNew < Abc_NodeReadReverseLevel(pFanout) )
LevelNew = Abc_NodeReadReverseLevel(pFanout);
LevelNew += 1;
assert( LevelNew > i );
if ( Abc_NodeReadReverseLevel(pFanin) == LevelNew ) // no change
continue;
// if the fanin is present in the data structure, pull it out
if ( pFanin->fMarkB )
Abc_AigRemoveFromLevelStructureR( pMan->vLevelsR, pFanin );
// update the reverse level
Abc_NodeSetReverseLevel( pFanin, LevelNew );
// add the fanin to the data structure to update its fanins
assert( pFanin->fMarkB == 0 );
pFanin->fMarkB = 1;
Vec_VecPush( pMan->vLevelsR, LevelNew, pFanin );
}
}
Vec_PtrClear( vVec );
}
}
/**Function*************************************************************
Synopsis [Removes the node from the level structure.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigRemoveFromLevelStructure( Vec_Vec_t * vStruct, Abc_Obj_t * pNode )
{
Vec_Ptr_t * vVecTemp;
Abc_Obj_t * pTemp;
int m;
assert( pNode->fMarkA );
vVecTemp = Vec_VecEntry( vStruct, pNode->Level );
Vec_PtrForEachEntry( vVecTemp, pTemp, m )
{
if ( pTemp != pNode )
continue;
Vec_PtrWriteEntry( vVecTemp, m, NULL );
break;
}
assert( m < Vec_PtrSize(vVecTemp) ); // found
pNode->fMarkA = 0;
}
/**Function*************************************************************
Synopsis [Removes the node from the level structure.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_AigRemoveFromLevelStructureR( Vec_Vec_t * vStruct, Abc_Obj_t * pNode )
{
Vec_Ptr_t * vVecTemp;
Abc_Obj_t * pTemp;
int m;
assert( pNode->fMarkB );
vVecTemp = Vec_VecEntry( vStruct, Abc_NodeReadReverseLevel(pNode) );
Vec_PtrForEachEntry( vVecTemp, pTemp, m )
{
if ( pTemp != pNode )
continue;
Vec_PtrWriteEntry( vVecTemp, m, NULL );
break;
}
assert( m < Vec_PtrSize(vVecTemp) ); // found
pNode->fMarkB = 0;
}
......
...@@ -404,6 +404,11 @@ bool Abc_NtkCheckObj( Abc_Ntk_t * pNtk, Abc_Obj_t * pObj ) ...@@ -404,6 +404,11 @@ bool Abc_NtkCheckObj( Abc_Ntk_t * pNtk, Abc_Obj_t * pObj )
printf( "Warning: Node %s has", Abc_ObjName(pObj) ); printf( "Warning: Node %s has", Abc_ObjName(pObj) );
printf( " duplicated fanin %s.\n", Abc_ObjName(Abc_ObjFanin(pObj,k)) ); printf( " duplicated fanin %s.\n", Abc_ObjName(Abc_ObjFanin(pObj,k)) );
} }
// save time: do not check large fanout lists
if ( pObj->vFanouts.nSize > 20 )
return Value;
// make sure fanouts are not duplicated // make sure fanouts are not duplicated
for ( i = 0; i < pObj->vFanouts.nSize; i++ ) for ( i = 0; i < pObj->vFanouts.nSize; i++ )
for ( k = i + 1; k < pObj->vFanouts.nSize; k++ ) for ( k = i + 1; k < pObj->vFanouts.nSize; k++ )
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
/// DECLARATIONS /// /// DECLARATIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
static Vec_Int_t * Abc_NtkFanoutCounts( Abc_Ntk_t * pNtk );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFITIONS /// /// FUNCTION DEFITIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
...@@ -78,8 +76,7 @@ Cut_Man_t * Abc_NtkCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams ) ...@@ -78,8 +76,7 @@ Cut_Man_t * Abc_NtkCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
if ( Abc_NodeIsConst(pObj) ) if ( Abc_NodeIsConst(pObj) )
continue; continue;
// compute the cuts to the internal node // compute the cuts to the internal node
Cut_NodeComputeCuts( p, pObj->Id, Abc_ObjFaninId0(pObj), Abc_ObjFaninId1(pObj), Abc_NodeGetCuts( p, pObj );
Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) );
// add cuts due to choices // add cuts due to choices
if ( Abc_NodeIsAigChoice(pObj) ) if ( Abc_NodeIsAigChoice(pObj) )
{ {
...@@ -118,7 +115,7 @@ PRT( "Total", clock() - clk ); ...@@ -118,7 +115,7 @@ PRT( "Total", clock() - clk );
/**Function************************************************************* /**Function*************************************************************
Synopsis [Creates the array of fanout counters.] Synopsis [Computes the cuts for the network.]
Description [] Description []
...@@ -127,27 +124,63 @@ PRT( "Total", clock() - clk ); ...@@ -127,27 +124,63 @@ PRT( "Total", clock() - clk );
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
Vec_Int_t * Abc_NtkFanoutCounts( Abc_Ntk_t * pNtk ) void * Abc_NodeGetCutsRecursive( void * p, Abc_Obj_t * pObj )
{ {
Vec_Int_t * vFanNums; void * pList;
Abc_Obj_t * pObj;//, * pFanout; if ( pList = Abc_NodeReadCuts( p, pObj ) )
int i;//, k, nFanouts; return pList;
vFanNums = Vec_IntAlloc( 0 ); Abc_NodeGetCutsRecursive( p, Abc_ObjFanin0(pObj) );
Vec_IntFill( vFanNums, Abc_NtkObjNumMax(pNtk), -1 ); Abc_NodeGetCutsRecursive( p, Abc_ObjFanin1(pObj) );
Abc_NtkForEachObj( pNtk, pObj, i ) return Abc_NodeGetCuts( p, pObj );
if ( Abc_ObjIsCi(pObj) || Abc_ObjIsNode(pObj) ) }
{
Vec_IntWriteEntry( vFanNums, i, Abc_ObjFanoutNum(pObj) ); /**Function*************************************************************
/*
// get the number of non-CO fanouts Synopsis [Computes the cuts for the network.]
nFanouts = 0;
Abc_ObjForEachFanout( pObj, pFanout, k ) Description []
if ( !Abc_ObjIsCo(pFanout) )
nFanouts++; SideEffects []
Vec_IntWriteEntry( vFanNums, i, nFanouts );
*/ SeeAlso []
}
return vFanNums; ***********************************************************************/
void * Abc_NodeGetCuts( void * p, Abc_Obj_t * pObj )
{
return Cut_NodeComputeCuts( p, pObj->Id, Abc_ObjFaninId0(pObj), Abc_ObjFaninId1(pObj),
Abc_ObjFaninC0(pObj), Abc_ObjFaninC1(pObj) );
}
/**Function*************************************************************
Synopsis [Computes the cuts for the network.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void * Abc_NodeReadCuts( void * p, Abc_Obj_t * pObj )
{
return Cut_NodeReadCuts( p, pObj->Id );
}
/**Function*************************************************************
Synopsis [Computes the cuts for the network.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_NodeFreeCuts( void * p, Abc_Obj_t * pObj )
{
Cut_NodeFreeCuts( p, pObj->Id );
} }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -34,7 +34,7 @@ struct Abc_ManRef_t_ ...@@ -34,7 +34,7 @@ struct Abc_ManRef_t_
int fVerbose; // the verbosity flag int fVerbose; // the verbosity flag
// internal data structures // internal data structures
DdManager * dd; // the BDD manager DdManager * dd; // the BDD manager
Vec_Int_t * vReqTimes; // required times for each node // Vec_Int_t * vReqTimes; // required times for each node
Vec_Str_t * vCube; // temporary Vec_Str_t * vCube; // temporary
Vec_Int_t * vForm; // temporary Vec_Int_t * vForm; // temporary
Vec_Int_t * vLevNums; // temporary Vec_Int_t * vLevNums; // temporary
...@@ -51,6 +51,7 @@ struct Abc_ManRef_t_ ...@@ -51,6 +51,7 @@ struct Abc_ManRef_t_
int timeDcs; int timeDcs;
int timeSop; int timeSop;
int timeFact; int timeFact;
int timeEval;
int timeRes; int timeRes;
int timeNtk; int timeNtk;
int timeTotal; int timeTotal;
...@@ -98,7 +99,7 @@ int Abc_NtkRefactor( Abc_Ntk_t * pNtk, int nNodeSizeMax, int nConeSizeMax, bool ...@@ -98,7 +99,7 @@ int Abc_NtkRefactor( Abc_Ntk_t * pNtk, int nNodeSizeMax, int nConeSizeMax, bool
pManCut = Abc_NtkManCutStart( nNodeSizeMax, nConeSizeMax ); pManCut = Abc_NtkManCutStart( nNodeSizeMax, nConeSizeMax );
pManRef = Abc_NtkManRefStart( nNodeSizeMax, nConeSizeMax, fUseDcs, fVerbose ); pManRef = Abc_NtkManRefStart( nNodeSizeMax, nConeSizeMax, fUseDcs, fVerbose );
pManRef->vLeaves = Abc_NtkManCutReadLeaves( pManCut ); pManRef->vLeaves = Abc_NtkManCutReadLeaves( pManCut );
pManRef->vReqTimes = Abc_NtkGetRequiredLevels( pNtk ); Abc_NtkStartReverseLevels( pNtk );
// resynthesize each node once // resynthesize each node once
nNodes = Abc_NtkObjNumMax(pNtk); nNodes = Abc_NtkObjNumMax(pNtk);
...@@ -137,6 +138,7 @@ pManRef->timeTotal = clock() - clkStart; ...@@ -137,6 +138,7 @@ pManRef->timeTotal = clock() - clkStart;
// delete the managers // delete the managers
Abc_NtkManCutStop( pManCut ); Abc_NtkManCutStop( pManCut );
Abc_NtkManRefStop( pManRef ); Abc_NtkManRefStop( pManRef );
Abc_NtkStopReverseLevels( pNtk );
// check // check
if ( fCheck && !Abc_NtkCheck( pNtk ) ) if ( fCheck && !Abc_NtkCheck( pNtk ) )
{ {
...@@ -165,10 +167,13 @@ Vec_Int_t * Abc_NodeRefactor( Abc_ManRef_t * p, Abc_Obj_t * pNode, Vec_Ptr_t * v ...@@ -165,10 +167,13 @@ Vec_Int_t * Abc_NodeRefactor( Abc_ManRef_t * p, Abc_Obj_t * pNode, Vec_Ptr_t * v
DdNode * bNodeFunc, * bNodeDc, * bNodeOn, * bNodeOnDc; DdNode * bNodeFunc, * bNodeDc, * bNodeOn, * bNodeOnDc;
char * pSop; char * pSop;
int nBddNodes, nFtNodes, nNodesSaved, nNodesAdded; int nBddNodes, nFtNodes, nNodesSaved, nNodesAdded;
int i, clk; int i, Required, clk;
p->nNodesConsidered++; p->nNodesConsidered++;
// get the required level of this node
Required = Abc_NodeReadRequiredLevel( pNode );
// get the function of the cut // get the function of the cut
clk = clock(); clk = clock();
bNodeFunc = Abc_NodeConeBdd( p->dd, p->dd->vars, pNode, vFanins, p->vVisited ); Cudd_Ref( bNodeFunc ); bNodeFunc = Abc_NodeConeBdd( p->dd, p->dd->vars, pNode, vFanins, p->vVisited ); Cudd_Ref( bNodeFunc );
...@@ -186,7 +191,7 @@ clk = clock(); ...@@ -186,7 +191,7 @@ clk = clock();
nMints = (1 << vFanins->nSize); nMints = (1 << vFanins->nSize);
nMintsDc = (int)Cudd_CountMinterm( p->dd, bNodeDc, vFanins->nSize ); nMintsDc = (int)Cudd_CountMinterm( p->dd, bNodeDc, vFanins->nSize );
printf( "Percentage of minterms = %5.2f.\n", 100.0 * nMintsDc / nMints ); // printf( "Percentage of minterms = %5.2f.\n", 100.0 * nMintsDc / nMints );
// get the ISF // get the ISF
bNodeOn = Cudd_bddAnd( p->dd, bNodeFunc, Cudd_Not(bNodeDc) ); Cudd_Ref( bNodeOn ); bNodeOn = Cudd_bddAnd( p->dd, bNodeFunc, Cudd_Not(bNodeDc) ); Cudd_Ref( bNodeOn );
...@@ -204,13 +209,16 @@ p->timeDcs += clock() - clk; ...@@ -204,13 +209,16 @@ p->timeDcs += clock() - clk;
// always accept the case of constant node // always accept the case of constant node
if ( Cudd_IsConstant(bNodeFunc) ) if ( Cudd_IsConstant(bNodeFunc) )
{ {
p->nNodesGained += Abc_NodeMffcSize( pNode ); p->nLastGain = Abc_NodeMffcSize( pNode );
p->nNodesGained += p->nLastGain;
p->nNodesRefactored++; p->nNodesRefactored++;
// get the costant node // get the constant node
pFanin = Abc_ObjNotCond( Abc_AigConst1(pNode->pNtk->pManFunc), Cudd_IsComplement(bNodeFunc) ); // pFanin = Abc_ObjNotCond( Abc_AigConst1(pNode->pNtk->pManFunc), Cudd_IsComplement(bNodeFunc) );
Abc_AigReplace( pNode->pNtk->pManFunc, pNode, pFanin ); // Abc_AigReplace( pNode->pNtk->pManFunc, pNode, pFanin );
// Cudd_RecursiveDeref( p->dd, bNodeFunc );
//printf( "Gain = %d.\n", p->nLastGain );
Cudd_RecursiveDeref( p->dd, bNodeFunc ); Cudd_RecursiveDeref( p->dd, bNodeFunc );
return NULL; return Ft_FactorConst( !Cudd_IsComplement(bNodeFunc) );
} }
// get the SOP of the cut // get the SOP of the cut
...@@ -241,8 +249,10 @@ p->timeFact += clock() - clk; ...@@ -241,8 +249,10 @@ p->timeFact += clock() - clk;
pFanin->vFanouts.nSize--; pFanin->vFanouts.nSize--;
// detect how many new nodes will be added (while taking into account reused nodes) // detect how many new nodes will be added (while taking into account reused nodes)
clk = clock();
nNodesAdded = Abc_NodeStrashDecCount( pNode->pNtk->pManFunc, pNode, vFanins, vForm, nNodesAdded = Abc_NodeStrashDecCount( pNode->pNtk->pManFunc, pNode, vFanins, vForm,
p->vLevNums, nNodesSaved, Vec_IntEntry( p->vReqTimes, pNode->Id ) ); p->vLevNums, nNodesSaved, Required );
p->timeEval += clock() - clk;
// quit if there is no improvement // quit if there is no improvement
if ( nNodesAdded == -1 || nNodesAdded == nNodesSaved && !fUseZeros ) if ( nNodesAdded == -1 || nNodesAdded == nNodesSaved && !fUseZeros )
{ {
...@@ -316,7 +326,7 @@ Abc_ManRef_t * Abc_NtkManRefStart( int nNodeSizeMax, int nConeSizeMax, bool fUse ...@@ -316,7 +326,7 @@ Abc_ManRef_t * Abc_NtkManRefStart( int nNodeSizeMax, int nConeSizeMax, bool fUse
void Abc_NtkManRefStop( Abc_ManRef_t * p ) void Abc_NtkManRefStop( Abc_ManRef_t * p )
{ {
Extra_StopManager( p->dd ); Extra_StopManager( p->dd );
Vec_IntFree( p->vReqTimes ); // Vec_IntFree( p->vReqTimes );
Vec_PtrFree( p->vVisited ); Vec_PtrFree( p->vVisited );
Vec_IntFree( p->vLevNums ); Vec_IntFree( p->vLevNums );
Vec_StrFree( p->vCube ); Vec_StrFree( p->vCube );
...@@ -337,15 +347,16 @@ void Abc_NtkManRefStop( Abc_ManRef_t * p ) ...@@ -337,15 +347,16 @@ void Abc_NtkManRefStop( Abc_ManRef_t * p )
void Abc_NtkManRefPrintStats( Abc_ManRef_t * p ) void Abc_NtkManRefPrintStats( Abc_ManRef_t * p )
{ {
printf( "Refactoring statistics:\n" ); printf( "Refactoring statistics:\n" );
printf( "Nodes considered = %6d.\n", p->nNodesConsidered ); printf( "Nodes considered = %8d.\n", p->nNodesConsidered );
printf( "Nodes refactored = %6d.\n", p->nNodesRefactored ); printf( "Nodes refactored = %8d.\n", p->nNodesRefactored );
printf( "Calculated gain = %6d.\n", p->nNodesGained ); printf( "Calculated gain = %8d.\n", p->nNodesGained );
PRT( "Cuts ", p->timeCut ); PRT( "Cuts ", p->timeCut );
PRT( "Resynthesis", p->timeRes ); PRT( "Resynthesis", p->timeRes );
PRT( " BDD ", p->timeBdd ); PRT( " BDD ", p->timeBdd );
PRT( " DCs ", p->timeDcs ); PRT( " DCs ", p->timeDcs );
PRT( " SOP ", p->timeSop ); PRT( " SOP ", p->timeSop );
PRT( " FF ", p->timeFact ); PRT( " FF ", p->timeFact );
PRT( " Eval ", p->timeEval );
PRT( "AIG update ", p->timeNtk ); PRT( "AIG update ", p->timeNtk );
PRT( "TOTAL ", p->timeTotal ); PRT( "TOTAL ", p->timeTotal );
} }
......
...@@ -124,10 +124,7 @@ int Abc_NodeRefDeref( Abc_Obj_t * pNode, bool fReference, bool fLabel, Vec_Ptr_t ...@@ -124,10 +124,7 @@ int Abc_NodeRefDeref( Abc_Obj_t * pNode, bool fReference, bool fLabel, Vec_Ptr_t
int Counter; int Counter;
// label visited nodes // label visited nodes
if ( fLabel ) if ( fLabel )
{
Abc_NodeSetTravIdCurrent( pNode ); Abc_NodeSetTravIdCurrent( pNode );
//printf( "Labeling " ); Abc_AigPrintNode( pNode );
}
// collect visited nodes // collect visited nodes
if ( vNodes ) if ( vNodes )
Vec_PtrPush( vNodes, pNode ); Vec_PtrPush( vNodes, pNode );
......
...@@ -20,11 +20,15 @@ ...@@ -20,11 +20,15 @@
#include "abc.h" #include "abc.h"
#include "rwr.h" #include "rwr.h"
#include "ft.h"
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// DECLARATIONS /// /// DECLARATIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
static Cut_Man_t * Abc_NtkStartCutManForRewrite( Abc_Ntk_t * pNtk, int fDrop );
static void Abc_NodePrintCuts( Abc_Obj_t * pNode );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFITIONS /// /// FUNCTION DEFITIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
...@@ -40,20 +44,28 @@ ...@@ -40,20 +44,28 @@
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
int Abc_NtkRewrite( Abc_Ntk_t * pNtk ) int Abc_NtkRewrite( Abc_Ntk_t * pNtk, int fUseZeros, int fVerbose )
{ {
int fCheck = 1; int fCheck = 1;
int fDrop = 0;
ProgressBar * pProgress; ProgressBar * pProgress;
Rwr_Man_t * p; Cut_Man_t * pManCut;
Rwr_Man_t * pManRwr;
Abc_Obj_t * pNode; Abc_Obj_t * pNode;
int i, nNodes, nGain; int i, nNodes, nGain;
int clk, clkStart = clock();
assert( Abc_NtkIsAig(pNtk) ); assert( Abc_NtkIsAig(pNtk) );
// start the rewriting manager // start the rewriting manager
p = Rwr_ManStart( 0 ); pManRwr = Rwr_ManStart( 0 );
if ( p == NULL ) if ( pManRwr == NULL )
return 0; return 0;
Rwr_ManPrepareNetwork( p, pNtk ); Abc_NtkStartReverseLevels( pNtk );
// start the cut manager
clk = clock();
pManCut = Abc_NtkStartCutManForRewrite( pNtk, fDrop );
Rwr_ManAddTimeCuts( pManRwr, clock() - clk );
pNtk->pManCut = pManCut;
// resynthesize each node once // resynthesize each node once
nNodes = Abc_NtkObjNumMax(pNtk); nNodes = Abc_NtkObjNumMax(pNtk);
...@@ -68,12 +80,28 @@ int Abc_NtkRewrite( Abc_Ntk_t * pNtk ) ...@@ -68,12 +80,28 @@ int Abc_NtkRewrite( Abc_Ntk_t * pNtk )
if ( Abc_NodeIsConst(pNode) ) if ( Abc_NodeIsConst(pNode) )
continue; continue;
// for each cut, try to resynthesize it // for each cut, try to resynthesize it
if ( (nGain = Rwr_NodeRewrite( p, pNode )) >= 0 ) nGain = Rwr_NodeRewrite( pManRwr, pManCut, pNode, fUseZeros );
Abc_NodeUpdate( pNode, Rwr_ManReadFanins(p), Rwr_ManReadDecs(p), nGain ); if ( nGain > 0 || nGain == 0 && fUseZeros )
{
Vec_Int_t * vForm = Rwr_ManReadDecs(pManRwr);
Vec_Ptr_t * vFanins = Rwr_ManReadFanins(pManRwr);
int fCompl = Rwr_ManReadCompl(pManRwr);
// complement the FF if needed
if ( fCompl ) Ft_FactorComplement( vForm );
Abc_NodeUpdate( pNode, vFanins, vForm, nGain );
if ( fCompl ) Ft_FactorComplement( vForm );
}
} }
Extra_ProgressBarStop( pProgress ); Extra_ProgressBarStop( pProgress );
// delete the manager Rwr_ManAddTimeTotal( pManRwr, clock() - clkStart );
Rwr_ManStop( p ); // print stats
if ( fVerbose )
Rwr_ManPrintStats( pManRwr );
// delete the managers
Rwr_ManStop( pManRwr );
Cut_ManStop( pManCut );
pNtk->pManCut = NULL;
Abc_NtkStopReverseLevels( pNtk );
// check // check
if ( fCheck && !Abc_NtkCheck( pNtk ) ) if ( fCheck && !Abc_NtkCheck( pNtk ) )
{ {
...@@ -84,6 +112,70 @@ int Abc_NtkRewrite( Abc_Ntk_t * pNtk ) ...@@ -84,6 +112,70 @@ int Abc_NtkRewrite( Abc_Ntk_t * pNtk )
} }
/**Function*************************************************************
Synopsis [Starts the cut manager for rewriting.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Cut_Man_t * Abc_NtkStartCutManForRewrite( Abc_Ntk_t * pNtk, int fDrop )
{
static Cut_Params_t Params, * pParams = &Params;
Cut_Man_t * pManCut;
Abc_Obj_t * pObj;
int i;
// start the cut manager
memset( pParams, 0, sizeof(Cut_Params_t) );
pParams->nVarsMax = 4; // the max cut size ("k" of the k-feasible cuts)
pParams->nKeepMax = 250; // the max number of cuts kept at a node
pParams->fTruth = 1; // compute truth tables
pParams->fHash = 1; // hash cuts to detect unique
pParams->fFilter = 0; // filter dominated cuts
pParams->fSeq = 0; // compute sequential cuts
pParams->fDrop = fDrop; // drop cuts on the fly
pParams->fVerbose = 0; // the verbosiness flag
pParams->nIdsMax = Abc_NtkObjNumMax( pNtk );
pManCut = Cut_ManStart( pParams );
if ( pParams->fDrop )
Cut_ManSetFanoutCounts( pManCut, Abc_NtkFanoutCounts(pNtk) );
// set cuts for PIs
Abc_NtkForEachCi( pNtk, pObj, i )
if ( Abc_ObjFanoutNum(pObj) > 0 )
Cut_NodeSetTriv( pManCut, pObj->Id );
return pManCut;
}
/**Function*************************************************************
Synopsis [Prints the cuts at the nodes.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_NodePrintCuts( Abc_Obj_t * pNode )
{
Cut_Cut_t * pCut;
unsigned uTruth;
printf( "\nNode %s\n", Abc_ObjName(pNode) );
for ( pCut = (Cut_Cut_t *)pNode->pCopy; pCut; pCut = pCut->pNext )
{
uTruth = pCut->uTruth;
Extra_PrintBinary( stdout, &uTruth, 16 );
printf( " " );
Cut_CutPrint( pCut );
printf( "\n" );
}
}
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// END OF FILE /// /// END OF FILE ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -318,12 +318,12 @@ Abc_Obj_t * Abc_NodeStrashDec( Abc_Aig_t * pMan, Vec_Ptr_t * vFanins, Vec_Int_t ...@@ -318,12 +318,12 @@ Abc_Obj_t * Abc_NodeStrashDec( Abc_Aig_t * pMan, Vec_Ptr_t * vFanins, Vec_Int_t
nVars = Ft_FactorGetNumVars( vForm ); nVars = Ft_FactorGetNumVars( vForm );
assert( nVars >= 0 ); assert( nVars >= 0 );
assert( vForm->nSize > nVars ); assert( vForm->nSize > nVars );
assert( nVars == vFanins->nSize );
// check for constant function // check for constant function
pFtNode = Ft_NodeRead( vForm, 0 ); pFtNode = Ft_NodeRead( vForm, 0 );
if ( pFtNode->fConst ) if ( pFtNode->fConst )
return Abc_ObjNotCond( Abc_AigConst1(pMan), pFtNode->fCompl ); return Abc_ObjNotCond( Abc_AigConst1(pMan), pFtNode->fCompl );
assert( nVars == vFanins->nSize );
// compute the function of other nodes // compute the function of other nodes
for ( i = nVars; i < vForm->nSize; i++ ) for ( i = nVars; i < vForm->nSize; i++ )
...@@ -365,17 +365,17 @@ int Abc_NodeStrashDecCount( Abc_Aig_t * pMan, Abc_Obj_t * pRoot, Vec_Ptr_t * vFa ...@@ -365,17 +365,17 @@ int Abc_NodeStrashDecCount( Abc_Aig_t * pMan, Abc_Obj_t * pRoot, Vec_Ptr_t * vFa
nVars = Ft_FactorGetNumVars( vForm ); nVars = Ft_FactorGetNumVars( vForm );
assert( nVars >= 0 ); assert( nVars >= 0 );
assert( vForm->nSize > nVars ); assert( vForm->nSize > nVars );
assert( nVars == vFanins->nSize ); // set the fanin number to nVars???
// check for constant function // check for constant function
pFtNode = Ft_NodeRead( vForm, 0 ); pFtNode = Ft_NodeRead( vForm, 0 );
if ( pFtNode->fConst ) if ( pFtNode->fConst )
return 0; return 0;
assert( nVars == vFanins->nSize );
// set the levels // set the levels
Vec_IntClear( vLevels ); Vec_IntClear( vLevels );
Vec_PtrForEachEntry( vFanins, pAnd, i ) Vec_PtrForEachEntry( vFanins, pAnd, i )
Vec_IntPush( vLevels, pAnd->Level ); Vec_IntPush( vLevels, Abc_ObjRegular(pAnd)->Level );
// compute the function of other nodes // compute the function of other nodes
Counter = 0; Counter = 0;
...@@ -422,9 +422,17 @@ int Abc_NodeStrashDecCount( Abc_Aig_t * pMan, Abc_Obj_t * pRoot, Vec_Ptr_t * vFa ...@@ -422,9 +422,17 @@ int Abc_NodeStrashDecCount( Abc_Aig_t * pMan, Abc_Obj_t * pRoot, Vec_Ptr_t * vFa
} }
// count the number of new levels // count the number of new levels
if ( pAnd && Abc_ObjRegular(pAnd) == Abc_AigConst1(pMan) ) LevelNew = -1;
if ( pAnd )
{
if ( Abc_ObjRegular(pAnd) == Abc_AigConst1(pMan) )
LevelNew = 0; LevelNew = 0;
else else if ( Abc_ObjRegular(pAnd) == Abc_ObjRegular(pAnd0) )
LevelNew = (int)Abc_ObjRegular(pAnd0)->Level;
else if ( Abc_ObjRegular(pAnd) == Abc_ObjRegular(pAnd1) )
LevelNew = (int)Abc_ObjRegular(pAnd1)->Level;
}
if ( LevelNew == -1 )
LevelNew = 1 + ABC_MAX( Vec_IntEntry(vLevels, pFtNode->iFanin0), Vec_IntEntry(vLevels, pFtNode->iFanin1) ); LevelNew = 1 + ABC_MAX( Vec_IntEntry(vLevels, pFtNode->iFanin0), Vec_IntEntry(vLevels, pFtNode->iFanin1) );
// assert( pAnd == NULL || LevelNew == LevelOld ); // assert( pAnd == NULL || LevelNew == LevelOld );
...@@ -434,6 +442,10 @@ int Abc_NodeStrashDecCount( Abc_Aig_t * pMan, Abc_Obj_t * pRoot, Vec_Ptr_t * vFa ...@@ -434,6 +442,10 @@ int Abc_NodeStrashDecCount( Abc_Aig_t * pMan, Abc_Obj_t * pRoot, Vec_Ptr_t * vFa
if ( LevelNew != LevelOld ) if ( LevelNew != LevelOld )
{ {
int x = 0; int x = 0;
Abc_Obj_t * pFanin0, * pFanin1;
pFanin0 = Abc_ObjFanin0( Abc_ObjRegular(pAnd) );
pFanin1 = Abc_ObjFanin1( Abc_ObjRegular(pAnd) );
x = 0;
} }
} }
......
...@@ -626,47 +626,126 @@ void Abc_NodeDelayTraceArrival( Abc_Obj_t * pNode ) ...@@ -626,47 +626,126 @@ void Abc_NodeDelayTraceArrival( Abc_Obj_t * pNode )
pTimeOut->Worst = ABC_MAX( pTimeOut->Rise, pTimeOut->Fall ); pTimeOut->Worst = ABC_MAX( pTimeOut->Rise, pTimeOut->Fall );
} }
/**Function************************************************************* /**Function*************************************************************
Synopsis [Creates the array of required times.] Synopsis [Prepares the AIG for the comptuation of required levels.]
Description [] Description [This procedure should be called before the required times
are used. It starts internal data structures, which records the level
from the COs of the AIG nodes in reverse topologogical order.]
SideEffects [] SideEffects []
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
Vec_Int_t * Abc_NtkGetRequiredLevels( Abc_Ntk_t * pNtk ) void Abc_NtkStartReverseLevels( Abc_Ntk_t * pNtk )
{ {
Vec_Int_t * vReqTimes;
Vec_Ptr_t * vNodes; Vec_Ptr_t * vNodes;
Abc_Obj_t * pObj, * pFanout; Abc_Obj_t * pObj, * pFanout;
int i, k, nLevelsMax, nLevelsCur; int i, k, nLevelsCur;
// start the required times assert( Abc_NtkIsAig(pNtk) );
vReqTimes = Vec_IntAlloc( 0 ); // remember the maximum number of direct levels
Vec_IntFill( vReqTimes, Abc_NtkObjNumMax(pNtk), ABC_INFINITY ); pNtk->LevelMax = Abc_AigGetLevelNum(pNtk);
// start the reverse levels
pNtk->vLevelsR = Vec_IntAlloc( 0 );
Vec_IntFill( pNtk->vLevelsR, Abc_NtkObjNumMax(pNtk), 0 );
// compute levels in reverse topological order // compute levels in reverse topological order
Abc_NtkForEachCo( pNtk, pObj, i )
Vec_IntWriteEntry( vReqTimes, pObj->Id, 0 );
vNodes = Abc_NtkDfsReverse( pNtk ); vNodes = Abc_NtkDfsReverse( pNtk );
Vec_PtrForEachEntry( vNodes, pObj, i ) Vec_PtrForEachEntry( vNodes, pObj, i )
{ {
nLevelsCur = 0; nLevelsCur = 0;
Abc_ObjForEachFanout( pObj, pFanout, k ) Abc_ObjForEachFanout( pObj, pFanout, k )
if ( nLevelsCur < Vec_IntEntry(vReqTimes, pFanout->Id) ) if ( nLevelsCur < Vec_IntEntry(pNtk->vLevelsR, pFanout->Id) )
nLevelsCur = Vec_IntEntry(vReqTimes, pFanout->Id); nLevelsCur = Vec_IntEntry(pNtk->vLevelsR, pFanout->Id);
Vec_IntWriteEntry( vReqTimes, pObj->Id, nLevelsCur + 1 ); Vec_IntWriteEntry( pNtk->vLevelsR, pObj->Id, nLevelsCur + 1 );
} }
Vec_PtrFree( vNodes ); Vec_PtrFree( vNodes );
// convert levels into required times: RetTime = NumLevels + 1 - Level }
nLevelsMax = Abc_AigGetLevelNum(pNtk) + 1;
Abc_NtkForEachNode( pNtk, pObj, i ) /**Function*************************************************************
Vec_IntWriteEntry( vReqTimes, pObj->Id, nLevelsMax - Vec_IntEntry(vReqTimes, pObj->Id) );
// Abc_NtkForEachNode( pNtk, pObj, i ) Synopsis [Cleans the data structures used to compute required levels.]
// printf( "(%d,%d)", pObj->Level, Vec_IntEntry(vReqTimes, pObj->Id) );
// printf( "\n" ); Description []
return vReqTimes;
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_NtkStopReverseLevels( Abc_Ntk_t * pNtk )
{
assert( pNtk->vLevelsR );
Vec_IntFree( pNtk->vLevelsR );
pNtk->vLevelsR = NULL;
pNtk->LevelMax = 0;
}
/**Function*************************************************************
Synopsis [Sets the reverse level of the node.]
Description [The reverse level is the level of the node in reverse
topological order, starting from the COs.]
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_NodeSetReverseLevel( Abc_Obj_t * pObj, int LevelR )
{
Abc_Ntk_t * pNtk = pObj->pNtk;
assert( Abc_NtkIsAig(pNtk) );
assert( pNtk->vLevelsR );
Vec_IntFillExtra( pNtk->vLevelsR, pObj->Id + 1, 0 );
Vec_IntWriteEntry( pNtk->vLevelsR, pObj->Id, LevelR );
}
/**Function*************************************************************
Synopsis [Returns the reverse level of the node.]
Description [The reverse level is the level of the node in reverse
topological order, starting from the COs.]
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_NodeReadReverseLevel( Abc_Obj_t * pObj )
{
Abc_Ntk_t * pNtk = pObj->pNtk;
assert( Abc_NtkIsAig(pNtk) );
assert( pNtk->vLevelsR );
Vec_IntFillExtra( pNtk->vLevelsR, pObj->Id + 1, 0 );
return Vec_IntEntry(pNtk->vLevelsR, pObj->Id);
}
/**Function*************************************************************
Synopsis [Returns required level of the node.]
Description [Converts the reverse levels of the node into its required
level as follows: ReqLevel(Node) = MaxLevels(Ntk) + 1 - LevelR(Node).]
SideEffects []
SeeAlso []
***********************************************************************/
int Abc_NodeReadRequiredLevel( Abc_Obj_t * pObj )
{
Abc_Ntk_t * pNtk = pObj->pNtk;
assert( Abc_NtkIsAig(pNtk) );
assert( pNtk->vLevelsR );
return pNtk->LevelMax + 1 - Vec_IntEntry(pNtk->vLevelsR, pObj->Id);
} }
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -1021,6 +1021,30 @@ void Abc_NtkShortNames( Abc_Ntk_t * pNtk ) ...@@ -1021,6 +1021,30 @@ void Abc_NtkShortNames( Abc_Ntk_t * pNtk )
pNtk->tObj2Name = tObj2NameNew; pNtk->tObj2Name = tObj2NameNew;
} }
/**Function*************************************************************
Synopsis [Creates the array of fanout counters.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Int_t * Abc_NtkFanoutCounts( Abc_Ntk_t * pNtk )
{
Vec_Int_t * vFanNums;
Abc_Obj_t * pObj;
int i;
vFanNums = Vec_IntAlloc( 0 );
Vec_IntFill( vFanNums, Abc_NtkObjNumMax(pNtk), -1 );
Abc_NtkForEachObj( pNtk, pObj, i )
if ( Abc_ObjIsCi(pObj) || Abc_ObjIsNode(pObj) )
Vec_IntWriteEntry( vFanNums, i, Abc_ObjFanoutNum(pObj) );
return vFanNums;
}
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// END OF FILE /// /// END OF FILE ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -674,7 +674,7 @@ void Extra_Truth4VarNPN( unsigned short ** puCanons, char ** puPhases, char ** p ...@@ -674,7 +674,7 @@ void Extra_Truth4VarNPN( unsigned short ** puCanons, char ** puPhases, char ** p
if ( uCanons[uTruth] ) if ( uCanons[uTruth] )
{ {
assert( uTruth > uCanons[uTruth] ); assert( uTruth > uCanons[uTruth] );
uMap[uTruth] = uMap[uCanons[uTruth]]; uMap[~uTruth & 0xFFFF] = uMap[uTruth] = uMap[uCanons[uTruth]];
continue; continue;
} }
uMap[uTruth] = nClasses++; uMap[uTruth] = nClasses++;
......
...@@ -47,8 +47,8 @@ struct Abc_Fan_t_ // 1 word ...@@ -47,8 +47,8 @@ struct Abc_Fan_t_ // 1 word
typedef struct Vec_Fan_t_ Vec_Fan_t; typedef struct Vec_Fan_t_ Vec_Fan_t;
struct Vec_Fan_t_ struct Vec_Fan_t_
{ {
int nSize;
int nCap; int nCap;
int nSize;
Abc_Fan_t * pArray; Abc_Fan_t * pArray;
}; };
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
typedef struct Vec_Int_t_ Vec_Int_t; typedef struct Vec_Int_t_ Vec_Int_t;
struct Vec_Int_t_ struct Vec_Int_t_
{ {
int nSize;
int nCap; int nCap;
int nSize;
int * pArray; int * pArray;
}; };
...@@ -322,9 +322,31 @@ static inline void Vec_IntFill( Vec_Int_t * p, int nSize, int Entry ) ...@@ -322,9 +322,31 @@ static inline void Vec_IntFill( Vec_Int_t * p, int nSize, int Entry )
{ {
int i; int i;
Vec_IntGrow( p, nSize ); Vec_IntGrow( p, nSize );
for ( i = 0; i < nSize; i++ )
p->pArray[i] = Entry;
p->nSize = nSize; p->nSize = nSize;
for ( i = 0; i < p->nSize; i++ ) }
/**Function*************************************************************
Synopsis [Fills the vector with given number of entries.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_IntFillExtra( Vec_Int_t * p, int nSize, int Entry )
{
int i;
if ( p->nSize >= nSize )
return;
Vec_IntGrow( p, nSize );
for ( i = p->nSize; i < nSize; i++ )
p->pArray[i] = Entry; p->pArray[i] = Entry;
p->nSize = nSize;
} }
/**Function************************************************************* /**Function*************************************************************
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
typedef struct Vec_Ptr_t_ Vec_Ptr_t; typedef struct Vec_Ptr_t_ Vec_Ptr_t;
struct Vec_Ptr_t_ struct Vec_Ptr_t_
{ {
int nSize;
int nCap; int nCap;
int nSize;
void ** pArray; void ** pArray;
}; };
...@@ -323,9 +323,31 @@ static inline void Vec_PtrFill( Vec_Ptr_t * p, int nSize, void * Entry ) ...@@ -323,9 +323,31 @@ static inline void Vec_PtrFill( Vec_Ptr_t * p, int nSize, void * Entry )
{ {
int i; int i;
Vec_PtrGrow( p, nSize ); Vec_PtrGrow( p, nSize );
for ( i = 0; i < nSize; i++ )
p->pArray[i] = Entry;
p->nSize = nSize; p->nSize = nSize;
for ( i = 0; i < p->nSize; i++ ) }
/**Function*************************************************************
Synopsis [Fills the vector with given number of entries.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline void Vec_PtrFillExtra( Vec_Ptr_t * p, int nSize, void * Entry )
{
int i;
if ( p->nSize >= nSize )
return;
Vec_PtrGrow( p, nSize );
for ( i = p->nSize; i < nSize; i++ )
p->pArray[i] = Entry; p->pArray[i] = Entry;
p->nSize = nSize;
} }
/**Function************************************************************* /**Function*************************************************************
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
typedef struct Vec_Str_t_ Vec_Str_t; typedef struct Vec_Str_t_ Vec_Str_t;
struct Vec_Str_t_ struct Vec_Str_t_
{ {
int nSize;
int nCap; int nCap;
int nSize;
char * pArray; char * pArray;
}; };
......
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
typedef struct Vec_Vec_t_ Vec_Vec_t; typedef struct Vec_Vec_t_ Vec_Vec_t;
struct Vec_Vec_t_ struct Vec_Vec_t_
{ {
int nSize;
int nCap; int nCap;
int nSize;
void ** pArray; void ** pArray;
}; };
...@@ -55,6 +55,8 @@ struct Vec_Vec_t_ ...@@ -55,6 +55,8 @@ struct Vec_Vec_t_
for ( i = LevelStart; (i < Vec_PtrSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ ) for ( i = LevelStart; (i < Vec_PtrSize(vGlob)) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
#define Vec_VecForEachLevelStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \ #define Vec_VecForEachLevelStartStop( vGlob, vVec, i, LevelStart, LevelStop ) \
for ( i = LevelStart; (i <= LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ ) for ( i = LevelStart; (i <= LevelStop) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i++ )
#define Vec_VecForEachLevelReverse( vGlob, vVec, i ) \
for ( i = Vec_VecSize(vGlob) - 1; (i >= 0) && (((vVec) = Vec_VecEntry(vGlob, i)), 1); i-- )
// iteratores through entries // iteratores through entries
#define Vec_VecForEachEntry( vGlob, pEntry, i, k ) \ #define Vec_VecForEachEntry( vGlob, pEntry, i, k ) \
...@@ -96,6 +98,28 @@ static inline Vec_Vec_t * Vec_VecAlloc( int nCap ) ...@@ -96,6 +98,28 @@ static inline Vec_Vec_t * Vec_VecAlloc( int nCap )
/**Function************************************************************* /**Function*************************************************************
Synopsis [Allocates a vector with the given capacity.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static inline Vec_Vec_t * Vec_VecStart( int nSize )
{
Vec_Vec_t * p;
int i;
p = Vec_VecAlloc( nSize );
for ( i = 0; i < nSize; i++ )
p->pArray[i] = Vec_PtrAlloc( 0 );
p->nSize = nSize;
return p;
}
/**Function*************************************************************
Synopsis [] Synopsis []
Description [] Description []
......
...@@ -99,6 +99,7 @@ extern void Cut_NodeWriteCuts( Cut_Man_t * p, int Node, Cut_Cut_t * ...@@ -99,6 +99,7 @@ extern void Cut_NodeWriteCuts( Cut_Man_t * p, int Node, Cut_Cut_t *
extern void Cut_NodeFreeCuts( Cut_Man_t * p, int Node ); extern void Cut_NodeFreeCuts( Cut_Man_t * p, int Node );
extern void Cut_NodeSetComputedAsNew( Cut_Man_t * p, int Node ); extern void Cut_NodeSetComputedAsNew( Cut_Man_t * p, int Node );
extern void Cut_NodeTryDroppingCuts( Cut_Man_t * p, int Node ); extern void Cut_NodeTryDroppingCuts( Cut_Man_t * p, int Node );
extern void Cut_CutPrint( Cut_Cut_t * pCut );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// END OF FILE /// /// END OF FILE ///
......
...@@ -70,6 +70,7 @@ struct Cut_ManStruct_t_ ...@@ -70,6 +70,7 @@ struct Cut_ManStruct_t_
int nCutsPeak; int nCutsPeak;
int nCutsTriv; int nCutsTriv;
int nCutsNode; int nCutsNode;
int nNodes;
// runtime // runtime
int timeMerge; int timeMerge;
int timeUnion; int timeUnion;
......
...@@ -141,8 +141,9 @@ void Cut_ManPrintStats( Cut_Man_t * p ) ...@@ -141,8 +141,9 @@ void Cut_ManPrintStats( Cut_Man_t * p )
printf( "Peak cuts = %8d.\n", p->nCutsPeak ); printf( "Peak cuts = %8d.\n", p->nCutsPeak );
printf( "Total allocated = %8d.\n", p->nCutsAlloc ); printf( "Total allocated = %8d.\n", p->nCutsAlloc );
printf( "Total deallocated = %8d.\n", p->nCutsDealloc ); printf( "Total deallocated = %8d.\n", p->nCutsDealloc );
printf( "The cut size = %3d bytes.\n", p->EntrySize ); printf( "Cuts per node = %8.1f\n", ((float)(p->nCutsCur-p->nCutsTriv))/p->nNodes );
printf( "Peak memory = %.2f Mb.\n", (float)p->nCutsPeak * p->EntrySize / (1<<20) ); printf( "The cut size = %8d bytes.\n", p->EntrySize );
printf( "Peak memory = %8.2f Mb.\n", (float)p->nCutsPeak * p->EntrySize / (1<<20) );
PRT( "Merge ", p->timeMerge ); PRT( "Merge ", p->timeMerge );
PRT( "Union ", p->timeUnion ); PRT( "Union ", p->timeUnion );
PRT( "Hash ", Cut_TableReadTime(p->tTable) ); PRT( "Hash ", Cut_TableReadTime(p->tTable) );
......
...@@ -65,6 +65,8 @@ static void Cut_CutFilter( Cut_Man_t * p, Cut_Cut_t * pList ); ...@@ -65,6 +65,8 @@ static void Cut_CutFilter( Cut_Man_t * p, Cut_Cut_t * pList );
***********************************************************************/ ***********************************************************************/
Cut_Cut_t * Cut_NodeReadCuts( Cut_Man_t * p, int Node ) Cut_Cut_t * Cut_NodeReadCuts( Cut_Man_t * p, int Node )
{ {
if ( Node >= p->vCuts->nSize )
return NULL;
return Vec_PtrEntry( p->vCuts, Node ); return Vec_PtrEntry( p->vCuts, Node );
} }
...@@ -209,6 +211,7 @@ Cut_Cut_t * Cut_NodeComputeCuts( Cut_Man_t * p, int Node, int Node0, int Node1, ...@@ -209,6 +211,7 @@ Cut_Cut_t * Cut_NodeComputeCuts( Cut_Man_t * p, int Node, int Node0, int Node1,
} }
finish : finish :
// set the list at the node // set the list at the node
Vec_PtrFillExtra( p->vCuts, Node + 1, NULL );
assert( Cut_NodeReadCuts(p, Node) == NULL ); assert( Cut_NodeReadCuts(p, Node) == NULL );
pList0 = Cut_ListFinish( &SuperList ); pList0 = Cut_ListFinish( &SuperList );
Cut_NodeWriteCuts( p, Node, pList0 ); Cut_NodeWriteCuts( p, Node, pList0 );
...@@ -227,6 +230,7 @@ clk = clock(); ...@@ -227,6 +230,7 @@ clk = clock();
if ( p->pParams->fFilter ) if ( p->pParams->fFilter )
Cut_CutFilter( p, pList0 ); Cut_CutFilter( p, pList0 );
p->timeFilter += clock() - clk; p->timeFilter += clock() - clk;
p->nNodes++;
return pList0; return pList0;
} }
...@@ -387,6 +391,7 @@ clk = clock(); ...@@ -387,6 +391,7 @@ clk = clock();
if ( p->pParams->fFilter ) if ( p->pParams->fFilter )
Cut_CutFilter( p, pList ); Cut_CutFilter( p, pList );
p->timeFilter += clock() - clk; p->timeFilter += clock() - clk;
p->nNodes -= vNodes->nSize - 1;
return pList; return pList;
} }
...@@ -498,7 +503,7 @@ void Cut_NodeTryDroppingCuts( Cut_Man_t * p, int Node ) ...@@ -498,7 +503,7 @@ void Cut_NodeTryDroppingCuts( Cut_Man_t * p, int Node )
void Cut_CutPrint( Cut_Cut_t * pCut ) void Cut_CutPrint( Cut_Cut_t * pCut )
{ {
int i; int i;
assert( pCut->nLeaves > 1 ); assert( pCut->nLeaves > 0 );
printf( "%d : {", pCut->nLeaves ); printf( "%d : {", pCut->nLeaves );
for ( i = 0; i < (int)pCut->nLeaves; i++ ) for ( i = 0; i < (int)pCut->nLeaves; i++ )
printf( " %d", pCut->pLeaves[i] ); printf( " %d", pCut->pLeaves[i] );
......
SRC += src/opt/rwr/rwrCut.c \ SRC += src/opt/rwr/rwrDec.c \
src/opt/rwr/rwrEva.c \ src/opt/rwr/rwrEva.c \
src/opt/rwr/rwrExp.c \ src/opt/rwr/rwrExp.c \
src/opt/rwr/rwrLib.c \ src/opt/rwr/rwrLib.c \
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
#include "abc.h" #include "abc.h"
#include "cut.h"
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// PARAMETERS /// /// PARAMETERS ///
...@@ -39,7 +40,6 @@ ...@@ -39,7 +40,6 @@
typedef struct Rwr_Man_t_ Rwr_Man_t; typedef struct Rwr_Man_t_ Rwr_Man_t;
typedef struct Rwr_Node_t_ Rwr_Node_t; typedef struct Rwr_Node_t_ Rwr_Node_t;
typedef struct Rwr_Cut_t_ Rwr_Cut_t;
struct Rwr_Man_t_ struct Rwr_Man_t_
{ {
...@@ -50,7 +50,7 @@ struct Rwr_Man_t_ ...@@ -50,7 +50,7 @@ struct Rwr_Man_t_
char * pPerms; // canonical permutations char * pPerms; // canonical permutations
unsigned char * pMap; // mapping of functions into class numbers unsigned char * pMap; // mapping of functions into class numbers
char * pPractical; // practical NPN classes char * pPractical; // practical NPN classes
unsigned short ** puPerms43; // four-var permutations for three var functions char ** pPerms4; // four-var permutations
// node space // node space
Vec_Ptr_t * vForest; // all the nodes Vec_Ptr_t * vForest; // all the nodes
Rwr_Node_t ** pTable; // the hash table of nodes by their canonical form Rwr_Node_t ** pTable; // the hash table of nodes by their canonical form
...@@ -61,19 +61,26 @@ struct Rwr_Man_t_ ...@@ -61,19 +61,26 @@ struct Rwr_Man_t_
int nConsidered; // the number of nodes considered int nConsidered; // the number of nodes considered
int nAdded; // the number of nodes added to lists int nAdded; // the number of nodes added to lists
int nClasses; // the number of NN classes int nClasses; // the number of NN classes
// intermediate data
Vec_Int_t * vFanNums; // the number of fanouts of each node (used to free cuts)
Vec_Int_t * vReqTimes; // the required times for each node (used for delay-driven evalution)
// the result of resynthesis // the result of resynthesis
int fCompl; // indicates if the output of FF should be complemented
Vec_Int_t * vForm; // the decomposition tree (temporary) Vec_Int_t * vForm; // the decomposition tree (temporary)
Vec_Int_t * vLevNums; // the array of levels (temporary)
Vec_Ptr_t * vFanins; // the fanins array (temporary) Vec_Ptr_t * vFanins; // the fanins array (temporary)
int nGainMax; Vec_Ptr_t * vFaninsCur; // the fanins array (temporary)
Vec_Int_t * vLevNums; // the array of levels (temporary)
// node statistics
int nNodesConsidered;
int nNodesRewritten;
int nNodesGained;
int nScores[222];
int nCutsGood;
int nCutsBad;
int nSubgraphs;
// runtime statistics // runtime statistics
int time1; int timeStart;
int time2; int timeCut;
int time3; int timeRes;
int time4; int timeEval;
int timeTotal;
}; };
struct Rwr_Node_t_ // 24 bytes struct Rwr_Node_t_ // 24 bytes
...@@ -90,18 +97,6 @@ struct Rwr_Node_t_ // 24 bytes ...@@ -90,18 +97,6 @@ struct Rwr_Node_t_ // 24 bytes
Rwr_Node_t * pNext; // next in the table Rwr_Node_t * pNext; // next in the table
}; };
struct Rwr_Cut_t_ // 24 bytes
{
unsigned nLeaves : 3; // the number of leaves
unsigned fTime : 1; // set to 1 if meets the required times
unsigned fGain : 1; // set to 1 if does not increase nodes
unsigned Volume : 11; // the gain in the number of nodes
unsigned uTruth : 16; // the truth table
Abc_Obj_t * ppLeaves[4]; // the leaves
Rwr_Cut_t * pNext; // the next cut in the list
};
// manipulation of complemented attributes // manipulation of complemented attributes
static inline bool Rwr_IsComplement( Rwr_Node_t * p ) { return (bool)(((unsigned)p) & 01); } static inline bool Rwr_IsComplement( Rwr_Node_t * p ) { return (bool)(((unsigned)p) & 01); }
static inline Rwr_Node_t * Rwr_Regular( Rwr_Node_t * p ) { return (Rwr_Node_t *)((unsigned)(p) & ~01); } static inline Rwr_Node_t * Rwr_Regular( Rwr_Node_t * p ) { return (Rwr_Node_t *)((unsigned)(p) & ~01); }
...@@ -116,12 +111,10 @@ static inline Rwr_Node_t * Rwr_NotCond( Rwr_Node_t * p, int c ) { return (Rwr_N ...@@ -116,12 +111,10 @@ static inline Rwr_Node_t * Rwr_NotCond( Rwr_Node_t * p, int c ) { return (Rwr_N
/// FUNCTION DECLARATIONS /// /// FUNCTION DECLARATIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/*=== rwrCut.c ========================================================*/ /*=== rwrDec.c ========================================================*/
extern void Rwr_NtkStartCuts( Rwr_Man_t * p, Abc_Ntk_t * pNtk );
extern void Rwr_NodeComputeCuts( Rwr_Man_t * p, Abc_Obj_t * pNode );
/*=== rwrEva.c ========================================================*/
extern int Rwr_NodeRewrite( Rwr_Man_t * p, Abc_Obj_t * pNode );
extern void Rwr_ManPreprocess( Rwr_Man_t * p ); extern void Rwr_ManPreprocess( Rwr_Man_t * p );
/*=== rwrEva.c ========================================================*/
extern int Rwr_NodeRewrite( Rwr_Man_t * p, Cut_Man_t * pManCut, Abc_Obj_t * pNode, int fUseZeros );
/*=== rwrLib.c ========================================================*/ /*=== rwrLib.c ========================================================*/
extern void Rwr_ManPrecompute( Rwr_Man_t * p ); extern void Rwr_ManPrecompute( Rwr_Man_t * p );
extern Rwr_Node_t * Rwr_ManAddVar( Rwr_Man_t * p, unsigned uTruth, int fPrecompute ); extern Rwr_Node_t * Rwr_ManAddVar( Rwr_Man_t * p, unsigned uTruth, int fPrecompute );
...@@ -131,14 +124,18 @@ extern void Rwr_ManIncTravId( Rwr_Man_t * p ); ...@@ -131,14 +124,18 @@ extern void Rwr_ManIncTravId( Rwr_Man_t * p );
/*=== rwrMan.c ========================================================*/ /*=== rwrMan.c ========================================================*/
extern Rwr_Man_t * Rwr_ManStart( bool fPrecompute ); extern Rwr_Man_t * Rwr_ManStart( bool fPrecompute );
extern void Rwr_ManStop( Rwr_Man_t * p ); extern void Rwr_ManStop( Rwr_Man_t * p );
extern void Rwr_ManPrintStats( Rwr_Man_t * p );
extern void Rwr_ManPrepareNetwork( Rwr_Man_t * p, Abc_Ntk_t * pNtk ); extern void Rwr_ManPrepareNetwork( Rwr_Man_t * p, Abc_Ntk_t * pNtk );
extern Vec_Ptr_t * Rwr_ManReadFanins( Rwr_Man_t * p ); extern Vec_Ptr_t * Rwr_ManReadFanins( Rwr_Man_t * p );
extern Vec_Int_t * Rwr_ManReadDecs( Rwr_Man_t * p ); extern Vec_Int_t * Rwr_ManReadDecs( Rwr_Man_t * p );
extern int Rwr_ManReadCompl( Rwr_Man_t * p );
extern void Rwr_ManAddTimeCuts( Rwr_Man_t * p, int Time );
extern void Rwr_ManAddTimeTotal( Rwr_Man_t * p, int Time );
/*=== rwrPrint.c ========================================================*/ /*=== rwrPrint.c ========================================================*/
extern void Rwr_ManPrint( Rwr_Man_t * p ); extern void Rwr_ManPrint( Rwr_Man_t * p );
/*=== rwrUtil.c ========================================================*/ /*=== rwrUtil.c ========================================================*/
extern void Rwr_ManWriteToArray( Rwr_Man_t * p ); extern void Rwr_ManWriteToArray( Rwr_Man_t * p );
extern void Rwr_ManLoadFromArray( Rwr_Man_t * p ); extern void Rwr_ManLoadFromArray( Rwr_Man_t * p, int fVerbose );
extern void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName ); extern void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName );
extern void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName ); extern void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName );
extern Vec_Int_t * Rwt_NtkFanoutCounters( Abc_Ntk_t * pNtk ); extern Vec_Int_t * Rwt_NtkFanoutCounters( Abc_Ntk_t * pNtk );
......
/**CFile****************************************************************
FileName [rwrCut.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [DAG-aware AIG rewriting package.]
Synopsis [Cut computation.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: rwrCut.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
#include "rwr.h"
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
static Rwr_Cut_t * Rwr_CutAlloc( Rwr_Man_t * p );
static Rwr_Cut_t * Rwr_CutCreateTriv( Rwr_Man_t * p, Abc_Obj_t * pNode );
static Rwr_Cut_t * Rwr_CutsMerge( Rwr_Man_t * p, Rwr_Cut_t * pCut0, Rwr_Cut_t * pCut1, int fCompl0, int fCompl1 );
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Computes cuts for one node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_NtkStartCuts( Rwr_Man_t * p, Abc_Ntk_t * pNtk )
{
Abc_Obj_t * pNode;
int i;
// set the trivial cuts
Abc_NtkCleanCopy( pNtk );
Abc_NtkForEachCi( pNtk, pNode, i )
pNode->pCopy = (Abc_Obj_t *)Rwr_CutCreateTriv( p, pNode );
}
/**Function*************************************************************
Synopsis [Computes cuts for one node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_NodeComputeCuts( Rwr_Man_t * p, Abc_Obj_t * pNode )
{
Rwr_Cut_t * pCuts0, * pCuts1, * pTemp0, * pTemp1, * pCut;
Rwr_Cut_t * pList = NULL, ** ppPlace = &pList; // linked list of cuts
assert( Abc_ObjIsNode(pNode) );
if ( Abc_NodeIsConst(pNode) )
return;
// create the elementary cut
pCut = Rwr_CutCreateTriv( p, pNode );
// add it to the linked list
*ppPlace = pCut; ppPlace = &pCut->pNext;
// create cuts by merging pairwise
pCuts0 = (Rwr_Cut_t *)Abc_ObjFanin0(pNode)->pCopy;
pCuts1 = (Rwr_Cut_t *)Abc_ObjFanin1(pNode)->pCopy;
assert( pCuts0 && pCuts1 );
for ( pTemp0 = pCuts0; pTemp0; pTemp0 = pTemp0->pNext )
for ( pTemp1 = pCuts1; pTemp1; pTemp1 = pTemp1->pNext )
{
pCut = Rwr_CutsMerge( p, pTemp0, pTemp1, Abc_ObjFaninC0(pNode), Abc_ObjFaninC1(pNode) );
if ( pCut == NULL )
continue;
// add it to the linked list
*ppPlace = pCut; ppPlace = &pCut->pNext;
}
// set the linked list
pNode->pCopy = (Abc_Obj_t *)pList;
}
/**Function*************************************************************
Synopsis [Start the cut computation.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Rwr_Cut_t * Rwr_CutsMerge( Rwr_Man_t * p, Rwr_Cut_t * pCut0, Rwr_Cut_t * pCut1, int fCompl0, int fCompl1 )
{
Abc_Obj_t * ppNodes[4], * pNodeTemp;
Rwr_Cut_t * pCut;
unsigned uPhase, uTruth0, uTruth1;
int i, k, min, nTotal;
// solve the most typical case: both cuts are four input
if ( pCut0->nLeaves == 4 && pCut1->nLeaves == 4 )
{
for ( i = 0; i < 4; i++ )
if ( pCut0->ppLeaves[i] != pCut1->ppLeaves[i] )
return NULL;
// create the cut
pCut = Rwr_CutAlloc( p );
pCut->nLeaves = 4;
for ( i = 0; i < 4; i++ )
pCut->ppLeaves[i] = pCut0->ppLeaves[i];
pCut->uTruth = (fCompl0? ~pCut0->uTruth : pCut0->uTruth) & (fCompl1? ~pCut1->uTruth : pCut1->uTruth) & 0xFFFF;
return pCut;
}
// create the set of new nodes
// count the number of unique entries in pCut1
nTotal = pCut0->nLeaves;
for ( i = 0; i < (int)pCut1->nLeaves; i++ )
{
// try to find this entry among the leaves of pCut0
for ( k = 0; k < (int)pCut0->nLeaves; k++ )
if ( pCut1->ppLeaves[i] == pCut0->ppLeaves[k] )
break;
if ( k < (int)pCut0->nLeaves ) // found
continue;
// we found a new entry to add
if ( nTotal == 4 )
return NULL;
ppNodes[nTotal++] = pCut1->ppLeaves[i];
}
// we know that the feasible cut exists
// add the starting entries
for ( k = 0; k < (int)pCut0->nLeaves; k++ )
ppNodes[k] = pCut0->ppLeaves[k];
// selection-sort the entries
for ( i = 0; i < nTotal - 1; i++ )
{
min = i;
for ( k = i+1; k < nTotal; k++ )
if ( ppNodes[k]->Id < ppNodes[min]->Id )
min = k;
pNodeTemp = ppNodes[i];
ppNodes[i] = ppNodes[min];
ppNodes[min] = pNodeTemp;
}
// find the mapping from the old nodes to the new
if ( pCut0->nLeaves == 4 )
uTruth0 = pCut0->uTruth;
else
{
uPhase = 0;
for ( i = 0; i < (int)pCut0->nLeaves; i++ )
{
for ( k = 0; k < nTotal; k++ )
if ( pCut0->ppLeaves[i] == ppNodes[k] )
break;
uPhase |= (1 << k);
}
assert( uPhase < 16 );
assert( pCut0->uTruth < 256 );
uTruth0 = p->puPerms43[pCut0->uTruth][uPhase];
}
// find the mapping from the old nodes to the new
if ( pCut1->nLeaves == 4 )
uTruth1 = pCut1->uTruth;
else
{
uPhase = 0;
for ( i = 0; i < (int)pCut1->nLeaves; i++ )
{
for ( k = 0; k < nTotal; k++ )
if ( pCut1->ppLeaves[i] == ppNodes[k] )
break;
uPhase |= (1 << k);
}
assert( uPhase < 16 );
assert( pCut1->uTruth < 256 );
uTruth1 = p->puPerms43[pCut1->uTruth][uPhase];
}
// create the cut
pCut = Rwr_CutAlloc( p );
pCut->nLeaves = nTotal;
for ( i = 0; i < nTotal; i++ )
pCut->ppLeaves[i] = ppNodes[i];
pCut->uTruth = (fCompl0? ~uTruth0 : uTruth0) & (fCompl1? ~uTruth1 : uTruth1) & 0xFFFF;
return pCut;
}
/**Function*************************************************************
Synopsis [Start the cut computation.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Rwr_Cut_t * Rwr_CutAlloc( Rwr_Man_t * p )
{
Rwr_Cut_t * pCut;
pCut = (Rwr_Cut_t *)Extra_MmFixedEntryFetch( p->pMmNode );
memset( pCut, 0, sizeof(Rwr_Cut_t) );
return pCut;
}
/**Function*************************************************************
Synopsis [Start the cut computation.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Rwr_Cut_t * Rwr_CutCreateTriv( Rwr_Man_t * p, Abc_Obj_t * pNode )
{
Rwr_Cut_t * pCut;
pCut = Rwr_CutAlloc( p );
pCut->nLeaves = 1;
pCut->ppLeaves[0] = pNode;
pCut->uTruth = 0xAAAA;
return pCut;
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
/**CFile****************************************************************
FileName [rwrDec.c]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [DAG-aware AIG rewriting package.]
Synopsis [Evaluation and decomposition procedures.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: rwrDec.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
#include "rwr.h"
#include "ft.h"
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
static Vec_Int_t * Rwr_NodePreprocess( Rwr_Man_t * p, Rwr_Node_t * pNode );
static int Rwr_TravCollect_rec( Rwr_Man_t * p, Rwr_Node_t * pNode, Vec_Int_t * vForm );
static void Rwr_FactorVerify( Vec_Int_t * vForm, unsigned uTruth );
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
Synopsis [Preprocesses computed library of subgraphs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_ManPreprocess( Rwr_Man_t * p )
{
Rwr_Node_t * pNode;
int i, k;
// put the nodes into the structure
p->vClasses = Vec_VecStart( 222 );
for ( i = 0; i < p->nFuncs; i++ )
{
if ( p->pTable[i] == NULL )
continue;
// consider all implementations of this function
for ( pNode = p->pTable[i]; pNode; pNode = pNode->pNext )
{
assert( pNode->uTruth == p->pTable[i]->uTruth );
assert( p->pMap[pNode->uTruth] >= 0 && p->pMap[pNode->uTruth] < 222 );
Vec_VecPush( p->vClasses, p->pMap[pNode->uTruth], pNode );
}
}
// compute decomposition forms for each node
Vec_VecForEachEntry( p->vClasses, pNode, i, k )
pNode->pNext = (Rwr_Node_t *)Rwr_NodePreprocess( p, pNode );
}
/**Function*************************************************************
Synopsis [Preprocesses subgraphs rooted at this node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Int_t * Rwr_NodePreprocess( Rwr_Man_t * p, Rwr_Node_t * pNode )
{
Vec_Int_t * vForm;
int i, Root;
// consider constant
if ( pNode->uTruth == 0 )
return Ft_FactorConst( 0 );
// consider the case of elementary var
if ( pNode->uTruth == 0x00FF )
return Ft_FactorVar( 3, 4, 1 );
// start the factored form
vForm = Vec_IntAlloc( 10 );
for ( i = 0; i < 4; i++ )
Vec_IntPush( vForm, 0 );
// collect the nodes
Rwr_ManIncTravId( p );
Root = Rwr_TravCollect_rec( p, pNode, vForm );
if ( Root & 1 )
Ft_FactorComplement( vForm );
// verify the factored form
Rwr_FactorVerify( vForm, pNode->uTruth );
return vForm;
}
/**Function*************************************************************
Synopsis [Adds one node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Rwr_TravCollect_rec( Rwr_Man_t * p, Rwr_Node_t * pNode, Vec_Int_t * vForm )
{
Ft_Node_t Node, NodeA, NodeB;
int Node0, Node1;
// elementary variable
if ( pNode->fUsed )
return ((pNode->Id - 1) << 1);
// previously visited node
if ( pNode->TravId == p->nTravIds )
return pNode->Volume;
pNode->TravId = p->nTravIds;
// solve for children
Node0 = Rwr_TravCollect_rec( p, Rwr_Regular(pNode->p0), vForm );
Node1 = Rwr_TravCollect_rec( p, Rwr_Regular(pNode->p1), vForm );
// create the decomposition node(s)
if ( pNode->fExor )
{
assert( !Rwr_IsComplement(pNode->p0) );
assert( !Rwr_IsComplement(pNode->p1) );
NodeA.fIntern = 1;
NodeA.fConst = 0;
NodeA.fCompl = 0;
NodeA.fCompl0 = !(Node0 & 1);
NodeA.fCompl1 = (Node1 & 1);
NodeA.iFanin0 = (Node0 >> 1);
NodeA.iFanin1 = (Node1 >> 1);
Vec_IntPush( vForm, Ft_Node2Int(NodeA) );
NodeB.fIntern = 1;
NodeB.fConst = 0;
NodeB.fCompl = 0;
NodeB.fCompl0 = (Node0 & 1);
NodeB.fCompl1 = !(Node1 & 1);
NodeB.iFanin0 = (Node0 >> 1);
NodeB.iFanin1 = (Node1 >> 1);
Vec_IntPush( vForm, Ft_Node2Int(NodeB) );
Node.fIntern = 1;
Node.fConst = 0;
Node.fCompl = 0;
Node.fCompl0 = 1;
Node.fCompl1 = 1;
Node.iFanin0 = vForm->nSize - 2;
Node.iFanin1 = vForm->nSize - 1;
Vec_IntPush( vForm, Ft_Node2Int(Node) );
}
else
{
Node.fIntern = 1;
Node.fConst = 0;
Node.fCompl = 0;
Node.fCompl0 = Rwr_IsComplement(pNode->p0) ^ (Node0 & 1);
Node.fCompl1 = Rwr_IsComplement(pNode->p1) ^ (Node1 & 1);
Node.iFanin0 = (Node0 >> 1);
Node.iFanin1 = (Node1 >> 1);
Vec_IntPush( vForm, Ft_Node2Int(Node) );
}
// save the number of this node
pNode->Volume = ((vForm->nSize - 1) << 1) | pNode->fExor;
return pNode->Volume;
}
/**Function*************************************************************
Synopsis [Verifies the factored form.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_FactorVerify( Vec_Int_t * vForm, unsigned uTruthGold )
{
Ft_Node_t * pFtNode;
Vec_Int_t * vTruths;
unsigned uTruth, uTruth0, uTruth1;
int i;
vTruths = Vec_IntAlloc( vForm->nSize );
Vec_IntPush( vTruths, 0xAAAA );
Vec_IntPush( vTruths, 0xCCCC );
Vec_IntPush( vTruths, 0xF0F0 );
Vec_IntPush( vTruths, 0xFF00 );
assert( Ft_FactorGetNumVars( vForm ) == 4 );
for ( i = 4; i < vForm->nSize; i++ )
{
pFtNode = Ft_NodeRead( vForm, i );
// make sure there are no elementary variables
assert( pFtNode->iFanin0 != pFtNode->iFanin1 );
uTruth0 = vTruths->pArray[pFtNode->iFanin0];
uTruth0 = pFtNode->fCompl0? ~uTruth0 : uTruth0;
uTruth1 = vTruths->pArray[pFtNode->iFanin1];
uTruth1 = pFtNode->fCompl1? ~uTruth1 : uTruth1;
uTruth = uTruth0 & uTruth1;
Vec_IntPush( vTruths, uTruth );
}
// complement if necessary
if ( pFtNode->fCompl )
uTruth = ~uTruth;
uTruth &= 0xFFFF;
if ( uTruth != uTruthGold )
printf( "Verification failed\n" );
Vec_IntFree( vTruths );
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
/// DECLARATIONS /// /// DECLARATIONS ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
static Vec_Int_t * Rwr_CutEvaluate( Rwr_Man_t * p, Abc_Obj_t * pRoot, Rwr_Cut_t * pCut, int NodeMax, int LevelMax ); static Vec_Int_t * Rwr_CutEvaluate( Rwr_Man_t * p, Abc_Obj_t * pRoot, Cut_Cut_t * pCut, Vec_Ptr_t * vFaninsCur, int nNodesSaved, int LevelMax, int * pGainBest );
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFITIONS /// /// FUNCTION DEFITIONS ///
...@@ -49,37 +49,101 @@ static Vec_Int_t * Rwr_CutEvaluate( Rwr_Man_t * p, Abc_Obj_t * pRoot, Rwr_Cut_t ...@@ -49,37 +49,101 @@ static Vec_Int_t * Rwr_CutEvaluate( Rwr_Man_t * p, Abc_Obj_t * pRoot, Rwr_Cut_t
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
int Rwr_NodeRewrite( Rwr_Man_t * p, Abc_Obj_t * pNode ) int Rwr_NodeRewrite( Rwr_Man_t * p, Cut_Man_t * pManCut, Abc_Obj_t * pNode, int fUseZeros )
{ {
int fVeryVerbose = 0;
Vec_Int_t * vForm; Vec_Int_t * vForm;
Rwr_Cut_t * pCut; Cut_Cut_t * pCut;
Abc_Obj_t * pFanin;
unsigned uPhase, uTruthBest;
char * pPerm;
int Required, nNodesSaved; int Required, nNodesSaved;
int i, BestGain = -1; int i, GainCur, GainBest = -1;
// compute the cuts for this node int clk;
Rwr_NodeComputeCuts( p, pNode );
p->nNodesConsidered++;
// get the required times // get the required times
Required = Vec_IntEntry( p->vReqTimes, pNode->Id ); Required = Abc_NodeReadRequiredLevel( pNode );
// label MFFC with current ID // get the node's cuts
nNodesSaved = Abc_NodeMffcLabel( pNode ); clk = clock();
pCut = (Cut_Cut_t *)Abc_NodeGetCutsRecursive( pManCut, pNode );
assert( pCut != NULL );
p->timeCut += clock() - clk;
// go through the cuts // go through the cuts
for ( pCut = (Rwr_Cut_t *)pNode->pCopy, pCut = pCut->pNext; pCut; pCut = pCut->pNext ) clk = clock();
for ( pCut = pCut->pNext; pCut; pCut = pCut->pNext )
{ {
// consider only 4-input cuts
if ( pCut->nLeaves < 4 )
continue;
// get the fanin permutation
pPerm = p->pPerms4[ p->pPerms[pCut->uTruth] ];
uPhase = p->pPhases[pCut->uTruth];
// collect fanins with the corresponding permutation/phase
Vec_PtrClear( p->vFaninsCur );
Vec_PtrFill( p->vFaninsCur, (int)pCut->nLeaves, 0 );
for ( i = 0; i < (int)pCut->nLeaves; i++ )
{
pFanin = Abc_NtkObj( pNode->pNtk, pCut->pLeaves[pPerm[i]] );
if ( pFanin == NULL )
break;
pFanin = Abc_ObjNotCond(pFanin, ((uPhase & (1<<i)) > 0) );
Vec_PtrWriteEntry( p->vFaninsCur, i, pFanin );
}
if ( i != (int)pCut->nLeaves )
{
p->nCutsBad++;
continue;
}
p->nCutsGood++;
// mark the fanin boundary
Vec_PtrForEachEntry( p->vFaninsCur, pFanin, i )
Abc_ObjRegular(pFanin)->vFanouts.nSize++;
// label MFFC with current ID
Abc_NtkIncrementTravId( pNode->pNtk );
nNodesSaved = Abc_NodeMffcLabel( pNode );
// unmark the fanin boundary
Vec_PtrForEachEntry( p->vFaninsCur, pFanin, i )
Abc_ObjRegular(pFanin)->vFanouts.nSize--;
// evaluate the cut // evaluate the cut
vForm = Rwr_CutEvaluate( p, pNode, pCut, nNodesSaved, Required ); vForm = Rwr_CutEvaluate( p, pNode, pCut, p->vFaninsCur, nNodesSaved, Required, &GainCur );
// check if the cut is better than the currently best one
if ( vForm != NULL && BestGain < (int)pCut->Volume ) // check if the cut is better than the current best one
if ( vForm != NULL && GainBest < GainCur )
{ {
assert( pCut->Volume >= 0 );
BestGain = pCut->Volume;
// save this form // save this form
GainBest = GainCur;
p->vForm = vForm; p->vForm = vForm;
// collect fanins p->fCompl = ((uPhase & (1<<4)) > 0);
uTruthBest = pCut->uTruth;
// collect fanins in the
Vec_PtrClear( p->vFanins ); Vec_PtrClear( p->vFanins );
for ( i = 0; i < (int)pCut->nLeaves; i++ ) Vec_PtrForEachEntry( p->vFaninsCur, pFanin, i )
Vec_PtrPush( p->vFanins, pCut->ppLeaves[i] ); Vec_PtrPush( p->vFanins, pFanin );
}
} }
p->timeRes += clock() - clk;
if ( GainBest == -1 || GainBest == 0 && !fUseZeros )
return GainBest;
p->nScores[p->pMap[uTruthBest]]++;
p->nNodesRewritten++;
p->nNodesGained += GainBest;
// report the progress
if ( fVeryVerbose )
{
printf( "Node %6s : ", Abc_ObjName(pNode) );
printf( "Fanins = %d. ", p->vFanins->nSize );
printf( "Cone = %2d. ", p->vForm->nSize - 4 );
printf( "GAIN = %2d. ", GainBest );
printf( "\n" );
} }
return BestGain; return GainBest;
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -93,161 +157,39 @@ int Rwr_NodeRewrite( Rwr_Man_t * p, Abc_Obj_t * pNode ) ...@@ -93,161 +157,39 @@ int Rwr_NodeRewrite( Rwr_Man_t * p, Abc_Obj_t * pNode )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
Vec_Int_t * Rwr_CutEvaluate( Rwr_Man_t * p, Abc_Obj_t * pRoot, Rwr_Cut_t * pCut, int NodeMax, int LevelMax ) Vec_Int_t * Rwr_CutEvaluate( Rwr_Man_t * p, Abc_Obj_t * pRoot, Cut_Cut_t * pCut, Vec_Ptr_t * vFaninsCur, int nNodesSaved, int LevelMax, int * pGainBest )
{ {
Vec_Ptr_t Vector = {0,0,0}, * vFanins = &Vector;
Vec_Ptr_t * vSubgraphs; Vec_Ptr_t * vSubgraphs;
Vec_Int_t * vFormBest; Vec_Int_t * vFormBest;
Rwr_Node_t * pNode; Rwr_Node_t * pNode;
int GainCur, GainBest = -1, i; int nNodesAdded, GainBest = -1, i;
int clk = clock();
// find the matching class of subgraphs // find the matching class of subgraphs
vSubgraphs = Vec_VecEntry( p->vClasses, p->pMap[pCut->uTruth] ); vSubgraphs = Vec_VecEntry( p->vClasses, p->pMap[pCut->uTruth] );
p->nSubgraphs += vSubgraphs->nSize;
// determine the best subgraph // determine the best subgraph
Vec_PtrForEachEntry( vSubgraphs, pNode, i ) Vec_PtrForEachEntry( vSubgraphs, pNode, i )
{ {
// create the fanin array
vFanins->nSize = pCut->nLeaves;
vFanins->pArray = pCut->ppLeaves;
// detect how many unlabeled nodes will be reused // detect how many unlabeled nodes will be reused
GainCur = Abc_NodeStrashDecCount( pRoot->pNtk->pManFunc, pRoot, vFanins, (Vec_Int_t *)pNode->pNext, nNodesAdded = Abc_NodeStrashDecCount( pRoot->pNtk->pManFunc, pRoot, vFaninsCur,
p->vLevNums, NodeMax, LevelMax ); (Vec_Int_t *)pNode->pNext, p->vLevNums, nNodesSaved, LevelMax );
if ( GainBest < GainCur ) if ( nNodesAdded == -1 )
continue;
assert( nNodesSaved >= nNodesAdded );
// count the gain at this node
if ( GainBest < nNodesSaved - nNodesAdded )
{ {
GainBest = GainCur; GainBest = nNodesSaved - nNodesAdded;
vFormBest = (Vec_Int_t *)pNode->pNext; vFormBest = (Vec_Int_t *)pNode->pNext;
} }
} }
p->timeEval += clock() - clk;
if ( GainBest == -1 ) if ( GainBest == -1 )
return NULL; return NULL;
pCut->Volume = GainBest; *pGainBest = GainBest;
return vFormBest; return vFormBest;
} }
/**Function*************************************************************
Synopsis [Adds one node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Rwr_TravCollect_rec( Rwr_Man_t * p, Rwr_Node_t * pNode, Vec_Int_t * vForm )
{
Ft_Node_t Node, NodeA, NodeB;
int Node0, Node1;
// elementary variable
if ( pNode->fUsed )
return ((pNode->Id - 1) << 1);
// previously visited node
if ( pNode->TravId == p->nTravIds )
return pNode->Volume;
pNode->TravId = p->nTravIds;
// solve for children
Node0 = Rwr_TravCollect_rec( p, Rwr_Regular(pNode->p0), vForm );
Node1 = Rwr_TravCollect_rec( p, Rwr_Regular(pNode->p1), vForm );
// create the decomposition node(s)
if ( pNode->fExor )
{
assert( !Rwr_IsComplement(pNode->p0) );
assert( !Rwr_IsComplement(pNode->p1) );
NodeA.fIntern = 1;
NodeA.fConst = 0;
NodeA.fCompl = 0;
NodeA.fCompl0 = !(Node0 & 1);
NodeA.fCompl1 = (Node1 & 1);
NodeA.iFanin0 = (Node0 >> 1);
NodeA.iFanin1 = (Node1 >> 1);
Vec_IntPush( vForm, Ft_Node2Int(NodeA) );
NodeB.fIntern = 1;
NodeB.fConst = 0;
NodeB.fCompl = 0;
NodeB.fCompl0 = (Node0 & 1);
NodeB.fCompl1 = !(Node1 & 1);
NodeB.iFanin0 = (Node0 >> 1);
NodeB.iFanin1 = (Node1 >> 1);
Vec_IntPush( vForm, Ft_Node2Int(NodeB) );
Node.fIntern = 1;
Node.fConst = 0;
Node.fCompl = 0;
Node.fCompl0 = 1;
Node.fCompl1 = 1;
Node.iFanin0 = vForm->nSize - 2;
Node.iFanin1 = vForm->nSize - 1;
Vec_IntPush( vForm, Ft_Node2Int(Node) );
}
else
{
Node.fIntern = 1;
Node.fConst = 0;
Node.fCompl = 0;
Node.fCompl0 = Rwr_IsComplement(pNode->p0) ^ (Node0 & 1);
Node.fCompl1 = Rwr_IsComplement(pNode->p1) ^ (Node1 & 1);
Node.iFanin0 = (Node0 >> 1);
Node.iFanin1 = (Node1 >> 1);
Vec_IntPush( vForm, Ft_Node2Int(Node) );
}
// save the number of this node
pNode->Volume = ((vForm->nSize - 1) << 1) | pNode->fExor;
return pNode->Volume;
}
/**Function*************************************************************
Synopsis [Preprocesses subgraphs rooted at this node.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_NodePreprocess( Rwr_Man_t * p, Rwr_Node_t * pNode )
{
Vec_Int_t * vForm;
int i, Root;
vForm = Vec_IntAlloc( 10 );
for ( i = 0; i < 5; i++ )
Vec_IntPush( vForm, 0 );
// collect the nodes
Rwr_ManIncTravId( p );
Root = Rwr_TravCollect_rec( p, pNode, vForm );
if ( Root & 1 )
Ft_FactorComplement( vForm );
pNode->pNext = (Rwr_Node_t *)vForm;
}
/**Function*************************************************************
Synopsis [Preprocesses computed library of subgraphs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_ManPreprocess( Rwr_Man_t * p )
{
Rwr_Node_t * pNode;
int i, k;
// put the nodes into the structure
p->vClasses = Vec_VecAlloc( 222 );
for ( i = 0; i < p->nFuncs; i++ )
for ( pNode = p->pTable[i]; pNode; pNode = pNode->pNext )
Vec_VecPush( p->vClasses, p->pMap[pNode->uTruth], pNode );
// compute decomposition forms for each node
Vec_VecForEachEntry( p->vClasses, pNode, i, k )
Rwr_NodePreprocess( p, pNode );
}
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
/// END OF FILE /// /// END OF FILE ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
...@@ -49,14 +49,13 @@ Rwr_Man_t * Rwr_ManStart( bool fPrecompute ) ...@@ -49,14 +49,13 @@ Rwr_Man_t * Rwr_ManStart( bool fPrecompute )
// canonical forms, phases, perms // canonical forms, phases, perms
clk = clock(); clk = clock();
Extra_Truth4VarNPN( &p->puCanons, &p->pPhases, &p->pPerms, &p->pMap ); Extra_Truth4VarNPN( &p->puCanons, &p->pPhases, &p->pPerms, &p->pMap );
PRT( "NPN classes precomputation time", clock() - clk ); //PRT( "NPN classes precomputation time", clock() - clk );
// initialize practical NPN classes // initialize practical NPN classes
p->pPractical = Rwr_ManGetPractical( p ); p->pPractical = Rwr_ManGetPractical( p );
// create the table // create the table
p->pTable = ALLOC( Rwr_Node_t *, p->nFuncs ); p->pTable = ALLOC( Rwr_Node_t *, p->nFuncs );
memset( p->pTable, 0, sizeof(Rwr_Node_t *) * p->nFuncs ); memset( p->pTable, 0, sizeof(Rwr_Node_t *) * p->nFuncs );
// create the elementary nodes // create the elementary nodes
assert( sizeof(Rwr_Node_t) == sizeof(Rwr_Cut_t) );
p->pMmNode = Extra_MmFixedStart( sizeof(Rwr_Node_t) ); p->pMmNode = Extra_MmFixedStart( sizeof(Rwr_Node_t) );
p->vForest = Vec_PtrAlloc( 100 ); p->vForest = Vec_PtrAlloc( 100 );
Rwr_ManAddVar( p, 0x0000, fPrecompute ); // constant 0 Rwr_ManAddVar( p, 0x0000, fPrecompute ); // constant 0
...@@ -67,9 +66,10 @@ PRT( "NPN classes precomputation time", clock() - clk ); ...@@ -67,9 +66,10 @@ PRT( "NPN classes precomputation time", clock() - clk );
p->nClasses = 5; p->nClasses = 5;
// other stuff // other stuff
p->nTravIds = 1; p->nTravIds = 1;
p->puPerms43 = Extra_TruthPerm43(); p->pPerms4 = Extra_Permutations( 4 );
p->vLevNums = Vec_IntAlloc( 50 ); p->vLevNums = Vec_IntAlloc( 50 );
p->vFanins = Vec_PtrAlloc( 50 ); p->vFanins = Vec_PtrAlloc( 50 );
p->vFaninsCur = Vec_PtrAlloc( 50 );
if ( fPrecompute ) if ( fPrecompute )
{ // precompute subgraphs { // precompute subgraphs
Rwr_ManPrecompute( p ); Rwr_ManPrecompute( p );
...@@ -78,11 +78,11 @@ PRT( "NPN classes precomputation time", clock() - clk ); ...@@ -78,11 +78,11 @@ PRT( "NPN classes precomputation time", clock() - clk );
} }
else else
{ // load saved subgraphs { // load saved subgraphs
Rwr_ManLoadFromArray( p ); Rwr_ManLoadFromArray( p, 0 );
// Rwr_ManPrint( p ); Rwr_ManPrint( p );
Rwr_ManPreprocess( p ); Rwr_ManPreprocess( p );
return NULL;
} }
p->timeStart = clock() - clk;
return p; return p;
} }
...@@ -106,16 +106,15 @@ void Rwr_ManStop( Rwr_Man_t * p ) ...@@ -106,16 +106,15 @@ void Rwr_ManStop( Rwr_Man_t * p )
Vec_VecForEachEntry( p->vClasses, pNode, i, k ) Vec_VecForEachEntry( p->vClasses, pNode, i, k )
Vec_IntFree( (Vec_Int_t *)pNode->pNext ); Vec_IntFree( (Vec_Int_t *)pNode->pNext );
} }
if ( p->vFanNums ) Vec_IntFree( p->vFanNums );
if ( p->vReqTimes ) Vec_IntFree( p->vReqTimes );
if ( p->vClasses ) Vec_VecFree( p->vClasses ); if ( p->vClasses ) Vec_VecFree( p->vClasses );
Vec_PtrFree( p->vForest ); Vec_PtrFree( p->vForest );
Vec_IntFree( p->vLevNums ); Vec_IntFree( p->vLevNums );
Vec_PtrFree( p->vFanins ); Vec_PtrFree( p->vFanins );
Vec_PtrFree( p->vFaninsCur );
Extra_MmFixedStop( p->pMmNode, 0 ); Extra_MmFixedStop( p->pMmNode, 0 );
free( p->pTable ); free( p->pTable );
free( p->pPractical ); free( p->pPractical );
free( p->puPerms43 ); free( p->pPerms4 );
free( p->puCanons ); free( p->puCanons );
free( p->pPhases ); free( p->pPhases );
free( p->pPerms ); free( p->pPerms );
...@@ -125,6 +124,46 @@ void Rwr_ManStop( Rwr_Man_t * p ) ...@@ -125,6 +124,46 @@ void Rwr_ManStop( Rwr_Man_t * p )
/**Function************************************************************* /**Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_ManPrintStats( Rwr_Man_t * p )
{
int i, Counter = 0;
for ( i = 0; i < 222; i++ )
Counter += (p->nScores[i] > 0);
printf( "Rewriting statistics:\n" );
printf( "Total cuts tries = %8d.\n", p->nCutsGood );
printf( "Bad cuts found = %8d.\n", p->nCutsBad );
printf( "Total subgraphs = %8d.\n", p->nSubgraphs );
printf( "Used NPN classes = %8d.\n", Counter );
printf( "Nodes considered = %8d.\n", p->nNodesConsidered );
printf( "Nodes rewritten = %8d.\n", p->nNodesRewritten );
printf( "Calculated gain = %8d.\n", p->nNodesGained );
PRT( "Start ", p->timeStart );
PRT( "Cuts ", p->timeCut );
PRT( "Resynthesis ", p->timeRes );
PRT( " Eval ", p->timeEval );
PRT( "TOTAL ", p->timeTotal );
/*
printf( "The scores are : " );
for ( i = 0; i < 222; i++ )
if ( p->nScores[i] > 0 )
printf( "%d=%d ", i, p->nScores[i] );
printf( "\n" );
*/
}
/**Function*************************************************************
Synopsis [Assigns elementary cuts to the PIs.] Synopsis [Assigns elementary cuts to the PIs.]
Description [] Description []
...@@ -137,11 +176,11 @@ void Rwr_ManStop( Rwr_Man_t * p ) ...@@ -137,11 +176,11 @@ void Rwr_ManStop( Rwr_Man_t * p )
void Rwr_ManPrepareNetwork( Rwr_Man_t * p, Abc_Ntk_t * pNtk ) void Rwr_ManPrepareNetwork( Rwr_Man_t * p, Abc_Ntk_t * pNtk )
{ {
// save the fanout counters for all internal nodes // save the fanout counters for all internal nodes
p->vFanNums = Rwt_NtkFanoutCounters( pNtk ); // p->vFanNums = Rwt_NtkFanoutCounters( pNtk );
// precompute the required times for all internal nodes // precompute the required times for all internal nodes
p->vReqTimes = Abc_NtkGetRequiredLevels( pNtk ); // p->vReqTimes = Abc_NtkGetRequiredLevels( pNtk );
// start the cut computation // start the cut computation
Rwr_NtkStartCuts( p, pNtk ); // Rwr_NtkStartCuts( p, pNtk );
} }
/**Function************************************************************* /**Function*************************************************************
...@@ -176,6 +215,54 @@ Vec_Int_t * Rwr_ManReadDecs( Rwr_Man_t * p ) ...@@ -176,6 +215,54 @@ Vec_Int_t * Rwr_ManReadDecs( Rwr_Man_t * p )
return p->vForm; return p->vForm;
} }
/**Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int Rwr_ManReadCompl( Rwr_Man_t * p )
{
return p->fCompl;
}
/**Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_ManAddTimeCuts( Rwr_Man_t * p, int Time )
{
p->timeCut += Time;
}
/**Function*************************************************************
Synopsis [Stops the resynthesis manager.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Rwr_ManAddTimeTotal( Rwr_Man_t * p, int Time )
{
p->timeTotal += Time;
}
/**Function************************************************************* /**Function*************************************************************
......
...@@ -209,17 +209,17 @@ void Rwr_ManPrint( Rwr_Man_t * p ) ...@@ -209,17 +209,17 @@ void Rwr_ManPrint( Rwr_Man_t * p )
FILE * pFile; FILE * pFile;
Rwr_Node_t * pNode; Rwr_Node_t * pNode;
unsigned uTruth; unsigned uTruth;
int Counter, Volume, nFuncs, i; int Limit, Counter, Volume, nFuncs, i;
pFile = fopen( "graph_lib.txt", "w" ); pFile = fopen( "graph_lib.txt", "w" );
Counter = 0; Counter = 0;
nFuncs = (1 << 16); Limit = (1 << 16);
for ( i = 0; i < nFuncs; i++ ) for ( i = 0; i < Limit; i++ )
{ {
if ( p->pTable[i] == NULL ) if ( p->pTable[i] == NULL )
continue; continue;
if ( i != p->puCanons[i] ) if ( i != p->puCanons[i] )
continue; continue;
fprintf( pFile, "\nClass %3d ", Counter++ ); fprintf( pFile, "\nClass %3d. Func %6d. ", p->pMap[i], Counter++ );
Rwr_GetBushVolume( p, i, &Volume, &nFuncs ); Rwr_GetBushVolume( p, i, &Volume, &nFuncs );
fprintf( pFile, "Functions = %2d. Volume = %2d. ", nFuncs, Volume ); fprintf( pFile, "Functions = %2d. Volume = %2d. ", nFuncs, Volume );
uTruth = i; uTruth = i;
......
...@@ -87,7 +87,7 @@ void Rwr_ManWriteToArray( Rwr_Man_t * p ) ...@@ -87,7 +87,7 @@ void Rwr_ManWriteToArray( Rwr_Man_t * p )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
void Rwr_ManLoadFromArray( Rwr_Man_t * p ) void Rwr_ManLoadFromArray( Rwr_Man_t * p, int fVerbose )
{ {
unsigned short * pArray = s_RwtAigSubgraphs; unsigned short * pArray = s_RwtAigSubgraphs;
Rwr_Node_t * p0, * p1; Rwr_Node_t * p0, * p1;
...@@ -119,8 +119,11 @@ void Rwr_ManLoadFromArray( Rwr_Man_t * p ) ...@@ -119,8 +119,11 @@ void Rwr_ManLoadFromArray( Rwr_Man_t * p )
Rwr_ManAddNode( p, p0, p1, fExor, Level, Volume + fExor ); Rwr_ManAddNode( p, p0, p1, fExor, Level, Volume + fExor );
} }
nEntries = i - 1; nEntries = i - 1;
if ( fVerbose )
{
printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded ); printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded );
printf( "The number of nodes loaded = %d. ", nEntries ); PRT( "Loading", clock() - clk ); printf( "The number of nodes loaded = %d. ", nEntries ); PRT( "Loading", clock() - clk );
}
} }
......
...@@ -95,6 +95,8 @@ extern Vec_Int_t * Ft_Factor( char * pSop ); ...@@ -95,6 +95,8 @@ extern Vec_Int_t * Ft_Factor( char * pSop );
extern int Ft_FactorGetNumNodes( Vec_Int_t * vForm ); extern int Ft_FactorGetNumNodes( Vec_Int_t * vForm );
extern int Ft_FactorGetNumVars( Vec_Int_t * vForm ); extern int Ft_FactorGetNumVars( Vec_Int_t * vForm );
extern void Ft_FactorComplement( Vec_Int_t * vForm ); extern void Ft_FactorComplement( Vec_Int_t * vForm );
extern Vec_Int_t * Ft_FactorConst( int fConst1 );
extern Vec_Int_t * Ft_FactorVar( int iVar, int nVars, int fCompl );
/*=== ftPrint.c =====================================================*/ /*=== ftPrint.c =====================================================*/
extern void Ft_FactorPrint( FILE * pFile, Vec_Int_t * vForm, char * pNamesIn[], char * pNameOut ); extern void Ft_FactorPrint( FILE * pFile, Vec_Int_t * vForm, char * pNamesIn[], char * pNameOut );
......
...@@ -39,7 +39,6 @@ static Ft_Node_t * Ft_FactorTrivialCubeCascade( Vec_Int_t * vForm, Mvc_Cov ...@@ -39,7 +39,6 @@ static Ft_Node_t * Ft_FactorTrivialCubeCascade( Vec_Int_t * vForm, Mvc_Cov
static Ft_Node_t * Ft_FactorNodeCreate( Vec_Int_t * vForm, int Type, Ft_Node_t * pNode1, Ft_Node_t * pNode2 ); static Ft_Node_t * Ft_FactorNodeCreate( Vec_Int_t * vForm, int Type, Ft_Node_t * pNode1, Ft_Node_t * pNode2 );
static Ft_Node_t * Ft_FactorLeafCreate( Vec_Int_t * vForm, int iLit ); static Ft_Node_t * Ft_FactorLeafCreate( Vec_Int_t * vForm, int iLit );
static void Ft_FactorFinalize( Vec_Int_t * vForm, Ft_Node_t * pNode, int nVars ); static void Ft_FactorFinalize( Vec_Int_t * vForm, Ft_Node_t * pNode, int nVars );
static Vec_Int_t * Ft_FactorConst( int fConst1 );
// temporary procedures that work with the covers // temporary procedures that work with the covers
static Mvc_Cover_t * Ft_ConvertSopToMvc( char * pSop ); static Mvc_Cover_t * Ft_ConvertSopToMvc( char * pSop );
...@@ -320,6 +319,8 @@ Ft_Node_t * Ft_FactorTrivialTree_rec( Vec_Int_t * vForm, Ft_Node_t ** ppNodes, i ...@@ -320,6 +319,8 @@ Ft_Node_t * Ft_FactorTrivialTree_rec( Vec_Int_t * vForm, Ft_Node_t ** ppNodes, i
return ppNodes[0]; return ppNodes[0];
// split the nodes into two parts // split the nodes into two parts
// nNodes1 = nNodes/2;
// nNodes2 = nNodes - nNodes1;
nNodes2 = nNodes/2; nNodes2 = nNodes/2;
nNodes1 = nNodes - nNodes2; nNodes1 = nNodes - nNodes2;
...@@ -613,6 +614,32 @@ Vec_Int_t * Ft_FactorConst( int fConst1 ) ...@@ -613,6 +614,32 @@ Vec_Int_t * Ft_FactorConst( int fConst1 )
return vForm; return vForm;
} }
/**Function*************************************************************
Synopsis [Creates a constant 0 or 1 factored form.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
Vec_Int_t * Ft_FactorVar( int iVar, int nVars, int fCompl )
{
Vec_Int_t * vForm;
Ft_Node_t * pNode;
// create the elementary variable node
vForm = Vec_IntAlloc( nVars + 1 );
Vec_IntFill( vForm, nVars + 1, 0 );
pNode = Ft_NodeReadLast( vForm );
pNode->iFanin0 = iVar;
pNode->iFanin1 = iVar;
pNode->fIntern = 1;
pNode->fCompl = fCompl;
return vForm;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment