summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2013-05-27 15:09:23 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2013-05-27 15:09:23 -0700
commit19c25fd6aab057b2373717f996fe538507c1b1e1 (patch)
tree7aa7cd7609a5de31d11b3455b6388fd9300c8d0f /src
parent94356f0d1fa8e671303299717f631ecf0ca2f17e (diff)
downloadabc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.gz
abc-19c25fd6aab057b2373717f996fe538507c1b1e1.tar.bz2
abc-19c25fd6aab057b2373717f996fe538507c1b1e1.zip
Adding a wrapper around clock() for more accurate time counting in ABC.
Diffstat (limited to 'src')
-rw-r--r--src/aig/aig/aig.h4
-rw-r--r--src/aig/aig/aigCanon.c6
-rw-r--r--src/aig/aig/aigCuts.c4
-rw-r--r--src/aig/aig/aigDfs.c4
-rw-r--r--src/aig/aig/aigDoms.c12
-rw-r--r--src/aig/aig/aigInter.c24
-rw-r--r--src/aig/aig/aigJust.c4
-rw-r--r--src/aig/aig/aigPart.c28
-rw-r--r--src/aig/aig/aigPartSat.c12
-rw-r--r--src/aig/aig/aigRet.c14
-rw-r--r--src/aig/aig/aigSplit.c4
-rw-r--r--src/aig/aig/aigTable.c6
-rw-r--r--src/aig/gia/giaAig.c4
-rw-r--r--src/aig/gia/giaBidec.c4
-rw-r--r--src/aig/gia/giaCCof.c14
-rw-r--r--src/aig/gia/giaCSat.c20
-rw-r--r--src/aig/gia/giaCSatOld.c20
-rw-r--r--src/aig/gia/giaCTas.c32
-rw-r--r--src/aig/gia/giaCof.c4
-rw-r--r--src/aig/gia/giaCone.c4
-rw-r--r--src/aig/gia/giaDfs.c12
-rw-r--r--src/aig/gia/giaEmbed.c50
-rw-r--r--src/aig/gia/giaEra.c6
-rw-r--r--src/aig/gia/giaEra2.c32
-rw-r--r--src/aig/gia/giaForce.c24
-rw-r--r--src/aig/gia/giaFrames.c8
-rw-r--r--src/aig/gia/giaFront.c4
-rw-r--r--src/aig/gia/giaGlitch.c4
-rw-r--r--src/aig/gia/giaIso.c70
-rw-r--r--src/aig/gia/giaIso2.c32
-rw-r--r--src/aig/gia/giaRetime.c10
-rw-r--r--src/aig/gia/giaShrink.c4
-rw-r--r--src/aig/gia/giaShrink6.c10
-rw-r--r--src/aig/gia/giaSim.c14
-rw-r--r--src/aig/gia/giaSim2.c10
-rw-r--r--src/aig/gia/giaSort.c14
-rw-r--r--src/aig/gia/giaSweeper.c64
-rw-r--r--src/aig/gia/giaSwitch.c8
-rw-r--r--src/aig/gia/giaTest.c12
-rw-r--r--src/aig/gia/giaTruth.c4
-rw-r--r--src/aig/gia/giaTsim.c8
-rw-r--r--src/aig/gia/giaUtil.c14
-rw-r--r--src/aig/hop/hop.h4
-rw-r--r--src/aig/hop/hopTable.c6
-rw-r--r--src/aig/ivy/ivy.h4
-rw-r--r--src/aig/ivy/ivyCut.c4
-rw-r--r--src/aig/ivy/ivyCutTrav.c4
-rw-r--r--src/aig/ivy/ivyFastMap.c26
-rw-r--r--src/aig/ivy/ivyFraig.c128
-rw-r--r--src/aig/ivy/ivyObj.c8
-rw-r--r--src/aig/ivy/ivyResyn.c62
-rw-r--r--src/aig/ivy/ivyRwr.c30
-rw-r--r--src/aig/ivy/ivySeq.c38
-rw-r--r--src/aig/ivy/ivyTable.c6
-rw-r--r--src/aig/saig/saigConstr2.c4
-rw-r--r--src/aig/saig/saigInd.c6
-rw-r--r--src/aig/saig/saigIso.c30
-rw-r--r--src/aig/saig/saigIsoFast.c16
-rw-r--r--src/aig/saig/saigIsoSlow.c38
-rw-r--r--src/aig/saig/saigMiter.c8
-rw-r--r--src/aig/saig/saigRetFwd.c10
-rw-r--r--src/aig/saig/saigSimFast.c16
-rw-r--r--src/aig/saig/saigSimMv.c8
-rw-r--r--src/aig/saig/saigSimSeq.c10
-rw-r--r--src/aig/saig/saigStrSim.c8
-rw-r--r--src/aig/saig/saigSwitch.c16
-rw-r--r--src/aig/saig/saigSynch.c20
-rw-r--r--src/aig/saig/saigTrans.c14
-rw-r--r--src/base/abc/abcAig.c6
-rw-r--r--src/base/abc/abcCheck.c4
-rw-r--r--src/base/abc/abcDfs.c4
-rw-r--r--src/base/abc/abcHieCec.c24
-rw-r--r--src/base/abc/abcHieNew.c40
-rw-r--r--src/base/abc/abcUtil.c8
-rw-r--r--src/base/abci/abc.c30
-rw-r--r--src/base/abci/abcAuto.c6
-rw-r--r--src/base/abci/abcBidec.c4
-rw-r--r--src/base/abci/abcBm.c26
-rw-r--r--src/base/abci/abcCas.c4
-rw-r--r--src/base/abci/abcCollapse.c4
-rw-r--r--src/base/abci/abcCut.c14
-rw-r--r--src/base/abci/abcDar.c116
-rw-r--r--src/base/abci/abcDebug.c8
-rw-r--r--src/base/abci/abcDec.c4
-rw-r--r--src/base/abci/abcDress2.c6
-rw-r--r--src/base/abci/abcFraig.c4
-rw-r--r--src/base/abci/abcFx.c12
-rw-r--r--src/base/abci/abcIf.c4
-rw-r--r--src/base/abci/abcIvy.c26
-rw-r--r--src/base/abci/abcLutmin.c4
-rw-r--r--src/base/abci/abcMap.c8
-rw-r--r--src/base/abci/abcMerge.c8
-rw-r--r--src/base/abci/abcMffc.c10
-rw-r--r--src/base/abci/abcNpn.c4
-rw-r--r--src/base/abci/abcNpnSave.c6
-rw-r--r--src/base/abci/abcNtbdd.c6
-rw-r--r--src/base/abci/abcOdc.c50
-rw-r--r--src/base/abci/abcPart.c22
-rw-r--r--src/base/abci/abcPrint.c10
-rw-r--r--src/base/abci/abcProve.c20
-rw-r--r--src/base/abci/abcQbf.c12
-rw-r--r--src/base/abci/abcQuant.c6
-rw-r--r--src/base/abci/abcReach.c4
-rw-r--r--src/base/abci/abcRec.c118
-rw-r--r--src/base/abci/abcRec2.c80
-rw-r--r--src/base/abci/abcRec3.c90
-rw-r--r--src/base/abci/abcRefactor.c56
-rw-r--r--src/base/abci/abcRestruct.c32
-rw-r--r--src/base/abci/abcResub.c94
-rw-r--r--src/base/abci/abcRewrite.c16
-rw-r--r--src/base/abci/abcRr.c44
-rw-r--r--src/base/abci/abcSat.c18
-rw-r--r--src/base/abci/abcStrash.c12
-rw-r--r--src/base/abci/abcSymm.c10
-rw-r--r--src/base/abci/abcUnate.c10
-rw-r--r--src/base/cmd/cmdPlugin.c6
-rw-r--r--src/base/cmd/cmdStarter.c4
-rw-r--r--src/base/io/ioReadBblif.c36
-rw-r--r--src/bdd/cas/casCore.c48
-rw-r--r--src/bdd/cas/casDec.c16
-rw-r--r--src/bdd/cudd/cuddAndAbs.c2
-rw-r--r--src/bdd/cudd/cuddBddIte.c2
-rw-r--r--src/bdd/cudd/cuddBridge.c4
-rw-r--r--src/bdd/cudd/cuddCompose.c2
-rw-r--r--src/bdd/cudd/cuddInt.h2
-rw-r--r--src/bdd/cudd/cuddSymmetry.c2
-rw-r--r--src/bdd/dsd/dsdProc.c12
-rw-r--r--src/bdd/reo/reoShuffle.c10
-rw-r--r--src/bdd/reo/reoTest.c12
-rw-r--r--src/bool/bdc/bdcCore.c4
-rw-r--r--src/bool/bdc/bdcDec.c32
-rw-r--r--src/bool/bdc/bdcInt.h10
-rw-r--r--src/bool/bdc/bdcSpfd.c48
-rw-r--r--src/bool/dec/decMan.c4
-rw-r--r--src/bool/kit/cloud.c6
-rw-r--r--src/bool/kit/kitPerm.c14
-rw-r--r--src/bool/lucky/luckyInt.h4
-rw-r--r--src/map/amap/amapCore.c4
-rw-r--r--src/map/amap/amapLib.c10
-rw-r--r--src/map/amap/amapLiberty.c8
-rw-r--r--src/map/amap/amapMatch.c4
-rw-r--r--src/map/amap/amapMerge.c4
-rw-r--r--src/map/amap/amapParse.c4
-rw-r--r--src/map/amap/amapRule.c2
-rw-r--r--src/map/cov/covCore.c8
-rw-r--r--src/map/if/if.h2
-rw-r--r--src/map/if/ifCore.c8
-rw-r--r--src/map/if/ifCut.c8
-rw-r--r--src/map/if/ifMan.c2
-rw-r--r--src/map/if/ifMap.c8
-rw-r--r--src/map/if/ifReduce.c14
-rw-r--r--src/map/if/ifSeq.c12
-rw-r--r--src/map/if/ifTime.c12
-rw-r--r--src/map/mapper/mapper.h2
-rw-r--r--src/map/mapper/mapperCore.c42
-rw-r--r--src/map/mapper/mapperCreate.c8
-rw-r--r--src/map/mapper/mapperCut.c16
-rw-r--r--src/map/mapper/mapperInt.h22
-rw-r--r--src/map/mapper/mapperLib.c6
-rw-r--r--src/map/scl/sclMan.h12
-rw-r--r--src/map/scl/sclUpsize.c28
-rw-r--r--src/map/super/superAnd.c12
-rw-r--r--src/map/super/superGate.c40
-rw-r--r--src/misc/extra/extra.h2
-rw-r--r--src/misc/extra/extraBddCas.c10
-rw-r--r--src/misc/extra/extraBddMisc.c18
-rw-r--r--src/misc/extra/extraBddTime.c10
-rw-r--r--src/misc/extra/extraUtilMisc.c4
-rw-r--r--src/misc/extra/extraUtilUtil.c6
-rw-r--r--src/misc/nm/nmTable.c6
-rw-r--r--src/misc/util/abc_global.h42
-rw-r--r--src/misc/util/utilNam.c4
-rw-r--r--src/misc/util/utilSort.c26
-rw-r--r--src/misc/util/util_hack.h2
-rw-r--r--src/opt/cgt/cgtCore.c16
-rw-r--r--src/opt/cgt/cgtDecide.c8
-rw-r--r--src/opt/cgt/cgtInt.h18
-rw-r--r--src/opt/cgt/cgtSat.c12
-rw-r--r--src/opt/csw/cswCore.c6
-rw-r--r--src/opt/csw/cswCut.c14
-rw-r--r--src/opt/csw/cswInt.h8
-rw-r--r--src/opt/cut/cut.h2
-rw-r--r--src/opt/cut/cutInt.h12
-rw-r--r--src/opt/cut/cutMan.c2
-rw-r--r--src/opt/cut/cutNode.c30
-rw-r--r--src/opt/cut/cutOracle.c6
-rw-r--r--src/opt/cut/cutPre22.c28
-rw-r--r--src/opt/cut/cutSeq.c6
-rw-r--r--src/opt/dar/darCore.c14
-rw-r--r--src/opt/dar/darInt.h12
-rw-r--r--src/opt/dar/darLib.c16
-rw-r--r--src/opt/dar/darRefact.c24
-rw-r--r--src/opt/dar/darScript.c34
-rw-r--r--src/opt/dau/dauDsd.c46
-rw-r--r--src/opt/dau/dauMerge.c12
-rw-r--r--src/opt/dau/dauTree.c60
-rw-r--r--src/opt/fxu/fxuReduce.c4
-rw-r--r--src/opt/lpk/lpkAbcDec.c22
-rw-r--r--src/opt/lpk/lpkCore.c54
-rw-r--r--src/opt/lpk/lpkInt.h26
-rw-r--r--src/opt/mfs/mfsCore.c56
-rw-r--r--src/opt/mfs/mfsInt.h16
-rw-r--r--src/opt/mfs/mfsInter.c4
-rw-r--r--src/opt/mfs/mfsResub.c24
-rw-r--r--src/opt/nwk/nwkBidec.c4
-rw-r--r--src/opt/nwk/nwkFlow.c8
-rw-r--r--src/opt/nwk/nwkMap.c4
-rw-r--r--src/opt/nwk/nwkMerge.c16
-rw-r--r--src/opt/nwk/nwkUtil.c4
-rw-r--r--src/opt/res/resCore.c66
-rw-r--r--src/opt/res/resInt.h2
-rw-r--r--src/opt/res/resSat.c4
-rw-r--r--src/opt/ret/retCore.c8
-rw-r--r--src/opt/ret/retFlow.c4
-rw-r--r--src/opt/ret/retInit.c6
-rw-r--r--src/opt/ret/retLvalue.c6
-rw-r--r--src/opt/rwr/rwr.h20
-rw-r--r--src/opt/rwr/rwrEva.c18
-rw-r--r--src/opt/rwr/rwrExp.c6
-rw-r--r--src/opt/rwr/rwrMan.c12
-rw-r--r--src/opt/rwr/rwrUtil.c16
-rw-r--r--src/opt/rwt/rwt.h22
-rw-r--r--src/opt/rwt/rwtMan.c12
-rw-r--r--src/opt/rwt/rwtUtil.c4
-rw-r--r--src/opt/sfm/sfmCore.c14
-rw-r--r--src/opt/sfm/sfmInt.h14
-rw-r--r--src/opt/sfm/sfmSat.c4
-rw-r--r--src/opt/sfm/sfmWin.c10
-rw-r--r--src/opt/sim/sim.h24
-rw-r--r--src/opt/sim/simSupp.c30
-rw-r--r--src/opt/sim/simSym.c8
-rw-r--r--src/opt/sim/simSymSat.c10
-rw-r--r--src/opt/sim/simSymSim.c10
-rw-r--r--src/opt/sim/simUtils.c12
-rw-r--r--src/proof/abs/absGla.c72
-rw-r--r--src/proof/abs/absGlaOld.c62
-rw-r--r--src/proof/abs/absIter.c8
-rw-r--r--src/proof/abs/absOldCex.c16
-rw-r--r--src/proof/abs/absOldRef.c6
-rw-r--r--src/proof/abs/absOldSat.c24
-rw-r--r--src/proof/abs/absOldSim.c6
-rw-r--r--src/proof/abs/absOut.c8
-rw-r--r--src/proof/abs/absRef.c18
-rw-r--r--src/proof/abs/absRef.h8
-rw-r--r--src/proof/abs/absRpm.c4
-rw-r--r--src/proof/abs/absVta.c58
-rw-r--r--src/proof/bbr/bbrCex.c4
-rw-r--r--src/proof/bbr/bbrReach.c10
-rw-r--r--src/proof/cec/cecCec.c28
-rw-r--r--src/proof/cec/cecChoice.c28
-rw-r--r--src/proof/cec/cecCore.c30
-rw-r--r--src/proof/cec/cecCorr.c34
-rw-r--r--src/proof/cec/cecInt.h24
-rw-r--r--src/proof/cec/cecPat.c28
-rw-r--r--src/proof/cec/cecSeq.c6
-rw-r--r--src/proof/cec/cecSolve.c62
-rw-r--r--src/proof/cec/cecSweep.c10
-rw-r--r--src/proof/cec/cecSynth.c4
-rw-r--r--src/proof/dch/dch.h2
-rw-r--r--src/proof/dch/dchCore.c16
-rw-r--r--src/proof/dch/dchInt.h18
-rw-r--r--src/proof/dch/dchSat.c22
-rw-r--r--src/proof/dch/dchSimSat.c8
-rw-r--r--src/proof/fra/fra.h22
-rw-r--r--src/proof/fra/fraBmc.c18
-rw-r--r--src/proof/fra/fraCec.c54
-rw-r--r--src/proof/fra/fraClaus.c90
-rw-r--r--src/proof/fra/fraCore.c10
-rw-r--r--src/proof/fra/fraHot.c4
-rw-r--r--src/proof/fra/fraImp.c4
-rw-r--r--src/proof/fra/fraInd.c38
-rw-r--r--src/proof/fra/fraIndVer.c4
-rw-r--r--src/proof/fra/fraLcr.c54
-rw-r--r--src/proof/fra/fraPart.c28
-rw-r--r--src/proof/fra/fraSat.c70
-rw-r--r--src/proof/fra/fraSec.c74
-rw-r--r--src/proof/fra/fraSim.c26
-rw-r--r--src/proof/fraig/fraigChoice.c2
-rw-r--r--src/proof/fraig/fraigFeed.c4
-rw-r--r--src/proof/fraig/fraigInt.h24
-rw-r--r--src/proof/fraig/fraigMan.c8
-rw-r--r--src/proof/fraig/fraigNode.c12
-rw-r--r--src/proof/fraig/fraigSat.c98
-rw-r--r--src/proof/fraig/fraigTable.c12
-rw-r--r--src/proof/fraig/fraigUtil.c6
-rw-r--r--src/proof/int/intCheck.c2
-rw-r--r--src/proof/int/intCore.c78
-rw-r--r--src/proof/int/intCtrex.c4
-rw-r--r--src/proof/int/intInt.h18
-rw-r--r--src/proof/int/intM114.c12
-rw-r--r--src/proof/int/intUtil.c8
-rw-r--r--src/proof/live/kliveness.c14
-rw-r--r--src/proof/llb/llb.h2
-rw-r--r--src/proof/llb/llb1Core.c4
-rw-r--r--src/proof/llb/llb1Hint.c4
-rw-r--r--src/proof/llb/llb1Reach.c24
-rw-r--r--src/proof/llb/llb2Bad.c4
-rw-r--r--src/proof/llb/llb2Core.c32
-rw-r--r--src/proof/llb/llb2Driver.c4
-rw-r--r--src/proof/llb/llb2Flow.c4
-rw-r--r--src/proof/llb/llb2Image.c18
-rw-r--r--src/proof/llb/llb3Image.c42
-rw-r--r--src/proof/llb/llb3Nonlin.c66
-rw-r--r--src/proof/llb/llb4Cex.c4
-rw-r--r--src/proof/llb/llb4Image.c10
-rw-r--r--src/proof/llb/llb4Nonlin.c48
-rw-r--r--src/proof/llb/llb4Sweep.c2
-rw-r--r--src/proof/llb/llbInt.h12
-rw-r--r--src/proof/pdr/pdr.h2
-rw-r--r--src/proof/pdr/pdrCore.c84
-rw-r--r--src/proof/pdr/pdrInt.h28
-rw-r--r--src/proof/pdr/pdrInv.c6
-rw-r--r--src/proof/pdr/pdrMan.c2
-rw-r--r--src/proof/pdr/pdrSat.c14
-rw-r--r--src/proof/pdr/pdrTsim.c4
-rw-r--r--src/proof/ssc/sscCore.c22
-rw-r--r--src/proof/ssc/sscInt.h18
-rw-r--r--src/proof/ssc/sscSat.c26
-rw-r--r--src/proof/ssw/sswBmc.c8
-rw-r--r--src/proof/ssw/sswClass.c14
-rw-r--r--src/proof/ssw/sswConstr.c18
-rw-r--r--src/proof/ssw/sswCore.c10
-rw-r--r--src/proof/ssw/sswDyn.c14
-rw-r--r--src/proof/ssw/sswFilter.c12
-rw-r--r--src/proof/ssw/sswInt.h20
-rw-r--r--src/proof/ssw/sswIslands.c4
-rw-r--r--src/proof/ssw/sswLcorr.c10
-rw-r--r--src/proof/ssw/sswPairs.c16
-rw-r--r--src/proof/ssw/sswPart.c4
-rw-r--r--src/proof/ssw/sswRarity.c48
-rw-r--r--src/proof/ssw/sswRarity2.c20
-rw-r--r--src/proof/ssw/sswSat.c22
-rw-r--r--src/proof/ssw/sswSemi.c12
-rw-r--r--src/proof/ssw/sswSim.c14
-rw-r--r--src/proof/ssw/sswSimSat.c8
-rw-r--r--src/proof/ssw/sswSweep.c18
-rw-r--r--src/sat/bmc/bmc.h2
-rw-r--r--src/sat/bmc/bmcBmc.c22
-rw-r--r--src/sat/bmc/bmcBmc2.c22
-rw-r--r--src/sat/bmc/bmcBmc3.c64
-rw-r--r--src/sat/bmc/bmcCexDepth.c12
-rw-r--r--src/sat/bmc/bmcCexTools.c26
-rw-r--r--src/sat/bmc/bmcUnroll.c4
-rw-r--r--src/sat/bsat/satInter.c20
-rw-r--r--src/sat/bsat/satInterA.c22
-rw-r--r--src/sat/bsat/satInterB.c22
-rw-r--r--src/sat/bsat/satInterP.c26
-rw-r--r--src/sat/bsat/satProof.c24
-rw-r--r--src/sat/bsat/satSolver.c24
-rw-r--r--src/sat/bsat/satSolver.h6
-rw-r--r--src/sat/bsat/satSolver2.c22
-rw-r--r--src/sat/bsat/satSolver2.h6
-rw-r--r--src/sat/cnf/cnf.h6
-rw-r--r--src/sat/cnf/cnfCore.c50
-rw-r--r--src/sat/cnf/cnfFast.c12
-rw-r--r--src/sat/msat/msatOrderH.c14
-rw-r--r--src/sat/msat/msatSolverCore.c8
-rw-r--r--src/sat/proof/pr.c26
358 files changed, 3291 insertions, 3273 deletions
diff --git a/src/aig/aig/aig.h b/src/aig/aig/aig.h
index 61ed26e4..697238ae 100644
--- a/src/aig/aig/aig.h
+++ b/src/aig/aig/aig.h
@@ -161,8 +161,8 @@ struct Aig_Man_t_
Vec_Int_t * vCiNumsOrig; // original CI names
int nComplEdges; // complemented edges
// timing statistics
- clock_t time1;
- clock_t time2;
+ abctime time1;
+ abctime time2;
};
// cut computation
diff --git a/src/aig/aig/aigCanon.c b/src/aig/aig/aigCanon.c
index f8a50fab..5ae3cd65 100644
--- a/src/aig/aig/aigCanon.c
+++ b/src/aig/aig/aigCanon.c
@@ -176,9 +176,9 @@ void Aig_RManTableResize( Aig_RMan_t * p )
Aig_Tru_t * pEntry, * pNext;
Aig_Tru_t ** pBinsOld, ** ppPlace;
int nBinsOld, Counter, i;
- clock_t clk;
+ abctime clk;
assert( p->pBins != NULL );
-clk = clock();
+clk = Abc_Clock();
// save the old Bins
pBinsOld = p->pBins;
nBinsOld = p->nBins;
@@ -200,7 +200,7 @@ clk = clock();
Counter++;
}
assert( Counter == p->nEntries );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
ABC_FREE( pBinsOld );
}
diff --git a/src/aig/aig/aigCuts.c b/src/aig/aig/aigCuts.c
index 1ab117f8..af4edcbb 100644
--- a/src/aig/aig/aigCuts.c
+++ b/src/aig/aig/aigCuts.c
@@ -633,7 +633,7 @@ Aig_ManCut_t * Aig_ComputeCuts( Aig_Man_t * pAig, int nCutsMax, int nLeafMax, in
Aig_ManCut_t * p;
Aig_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( pAig->pManCuts == NULL );
// start the manager
p = Aig_ManCutStart( pAig, nCutsMax, nLeafMax, fTruth, fVerbose );
@@ -652,7 +652,7 @@ Aig_ManCut_t * Aig_ComputeCuts( Aig_Man_t * pAig, int nCutsMax, int nLeafMax, in
Aig_ManObjNum(pAig), nCuts, nLeafMax, nCutsK );
printf( "Cut size = %2d. Truth size = %2d. Total mem = %5.2f MB ",
p->nCutSize, 4*p->nTruthWords, 1.0*Aig_MmFixedReadMemUsage(p->pMemCuts)/(1<<20) );
- ABC_PRT( "Runtime", clock() - clk );
+ ABC_PRT( "Runtime", Abc_Clock() - clk );
/*
Aig_ManForEachNode( pAig, pObj, i )
if ( i % 300 == 0 )
diff --git a/src/aig/aig/aigDfs.c b/src/aig/aig/aigDfs.c
index 5334aac0..834da0b2 100644
--- a/src/aig/aig/aigDfs.c
+++ b/src/aig/aig/aigDfs.c
@@ -781,12 +781,12 @@ int Aig_SupportSizeTest( Aig_Man_t * p )
{
Aig_Obj_t * pObj;
int i, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Aig_ManForEachObj( p, pObj, i )
if ( Aig_ObjIsNode(pObj) )
Counter += (Aig_SupportSize(p, pObj) <= 16);
printf( "Nodes with small support %d (out of %d)\n", Counter, Aig_ManNodeNum(p) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return Counter;
}
diff --git a/src/aig/aig/aigDoms.c b/src/aig/aig/aigDoms.c
index a537e2ab..7e3bc504 100644
--- a/src/aig/aig/aigDoms.c
+++ b/src/aig/aig/aigDoms.c
@@ -624,7 +624,7 @@ Aig_Sto_t * Aig_ManComputeDomsFlops( Aig_Man_t * pAig, int Limit )
Vec_Ptr_t * vNodes;
Aig_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pSto = Aig_ManDomStart( pAig, Limit );
// initialize flop inputs
Saig_ManForEachLi( pAig, pObj, i )
@@ -644,7 +644,7 @@ Aig_Sto_t * Aig_ManComputeDomsFlops( Aig_Man_t * pAig, int Limit )
pSto->nDomNodes, Aig_ManRegNum(pSto->pAig), pSto->nDomsTotal,
// pSto->nDomsFilter1, pSto->nDomsFilter2,
1.0 * pSto->nDomsTotal / (pSto->nDomNodes + Aig_ManRegNum(pSto->pAig)) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return pSto;
}
@@ -665,7 +665,7 @@ Aig_Sto_t * Aig_ManComputeDomsPis( Aig_Man_t * pAig, int Limit )
Vec_Ptr_t * vNodes;
Aig_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pSto = Aig_ManDomStart( pAig, Limit );
// initialize flop inputs
Aig_ManForEachCo( pAig, pObj, i )
@@ -685,7 +685,7 @@ Aig_Sto_t * Aig_ManComputeDomsPis( Aig_Man_t * pAig, int Limit )
pSto->nDomNodes, Saig_ManPiNum(pSto->pAig), pSto->nDomsTotal,
// pSto->nDomsFilter1, pSto->nDomsFilter2,
1.0 * pSto->nDomsTotal / (pSto->nDomNodes + Saig_ManPiNum(pSto->pAig)) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return pSto;
}
@@ -706,7 +706,7 @@ Aig_Sto_t * Aig_ManComputeDomsNodes( Aig_Man_t * pAig, int Limit )
Vec_Ptr_t * vNodes;
Aig_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pSto = Aig_ManDomStart( pAig, Limit );
// initialize flop inputs
Aig_ManForEachCo( pAig, pObj, i )
@@ -724,7 +724,7 @@ Aig_Sto_t * Aig_ManComputeDomsNodes( Aig_Man_t * pAig, int Limit )
pSto->nDomNodes, pSto->nDomsTotal,
// pSto->nDomsFilter1, pSto->nDomsFilter2,
1.0 * pSto->nDomsTotal / pSto->nDomNodes );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return pSto;
}
diff --git a/src/aig/aig/aigInter.c b/src/aig/aig/aigInter.c
index 636cb494..8f9318b3 100644
--- a/src/aig/aig/aigInter.c
+++ b/src/aig/aig/aigInter.c
@@ -29,9 +29,9 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-extern clock_t timeCnf;
-extern clock_t timeSat;
-extern clock_t timeInt;
+extern abctime timeCnf;
+extern abctime timeSat;
+extern abctime timeInt;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -54,7 +54,7 @@ void Aig_ManInterFast( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose )
Cnf_Dat_t * pCnfOn, * pCnfOff;
Aig_Obj_t * pObj, * pObj2;
int Lits[3], status, i;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
assert( Aig_ManCiNum(pManOn) == Aig_ManCiNum(pManOff) );
assert( Aig_ManCoNum(pManOn) == Aig_ManCoNum(pManOff) );
@@ -132,7 +132,7 @@ void Aig_ManInterFast( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fVerbose )
Cnf_DataFree( pCnfOn );
Cnf_DataFree( pCnfOff );
sat_solver_delete( pSat );
-// ABC_PRT( "Fast interpolation time", clock() - clk );
+// ABC_PRT( "Fast interpolation time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -156,21 +156,21 @@ Aig_Man_t * Aig_ManInter( Aig_Man_t * pManOn, Aig_Man_t * pManOff, int fRelation
Vec_Int_t * vVarsAB;
Aig_Obj_t * pObj, * pObj2;
int Lits[3], status, i;
- clock_t clk;
+ abctime clk;
int iLast = -1; // Suppress "might be used uninitialized"
assert( Aig_ManCiNum(pManOn) == Aig_ManCiNum(pManOff) );
-clk = clock();
+clk = Abc_Clock();
// derive CNFs
// pCnfOn = Cnf_Derive( pManOn, 0 );
// pCnfOff = Cnf_Derive( pManOff, 0 );
pCnfOn = Cnf_DeriveSimple( pManOn, 0 );
pCnfOff = Cnf_DeriveSimple( pManOff, 0 );
Cnf_DataLift( pCnfOff, pCnfOn->nVars );
-timeCnf += clock() - clk;
+timeCnf += Abc_Clock() - clk;
-clk = clock();
+clk = Abc_Clock();
// start the solver
pSat = sat_solver_new();
sat_solver_store_alloc( pSat );
@@ -246,7 +246,7 @@ clk = clock();
// solve the problem
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-timeSat += clock() - clk;
+timeSat += Abc_Clock() - clk;
if ( status == l_False )
{
pSatCnf = sat_solver_store_release( pSat );
@@ -269,11 +269,11 @@ timeSat += clock() - clk;
}
// create the resulting manager
-clk = clock();
+clk = Abc_Clock();
pManInter = Inta_ManAlloc();
pRes = (Aig_Man_t *)Inta_ManInterpolate( pManInter, (Sto_Man_t *)pSatCnf, vVarsAB, fVerbose );
Inta_ManFree( pManInter );
-timeInt += clock() - clk;
+timeInt += Abc_Clock() - clk;
/*
// test UNSAT core computation
{
diff --git a/src/aig/aig/aigJust.c b/src/aig/aig/aigJust.c
index 2ee60748..c420b2d9 100644
--- a/src/aig/aig/aigJust.c
+++ b/src/aig/aig/aigJust.c
@@ -254,7 +254,7 @@ void Aig_ManJustExperiment( Aig_Man_t * pAig )
Vec_Int_t * vSuppLits, * vNodes;
Aig_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int Count0 = 0, Count0f = 0, Count1 = 0, Count1f = 0;
int nTotalLits = 0;
vSuppLits = Vec_IntAlloc( 100 );
@@ -295,7 +295,7 @@ void Aig_ManJustExperiment( Aig_Man_t * pAig )
Vec_IntFree( vSuppLits );
printf( "PO =%6d. C0 =%6d. C0f =%6d. C1 =%6d. C1f =%6d. (%6.2f %%) Ave =%4.1f ",
Aig_ManCoNum(pAig), Count0, Count0f, Count1, Count1f, 100.0*(Count0+Count1)/Aig_ManCoNum(pAig), 1.0*nTotalLits/(Count0+Count1) );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
Aig_ManCleanMarkAB( pAig );
Aig_ManPackStop( pPack );
Vec_IntFree( vNodes );
diff --git a/src/aig/aig/aigPart.c b/src/aig/aig/aigPart.c
index 717f3192..9b978e3b 100644
--- a/src/aig/aig/aigPart.c
+++ b/src/aig/aig/aigPart.c
@@ -689,20 +689,20 @@ Vec_Ptr_t * Aig_ManPartitionSmart( Aig_Man_t * p, int nSuppSizeLimit, int fVerbo
Vec_Ptr_t * vSupports, * vPartsAll, * vPartsAll2, * vPartSuppsAll;//, * vPartPtr;
Vec_Int_t * vOne, * vPart, * vPartSupp, * vTemp;
int i, iPart, iOut;
- clock_t clk;
+ abctime clk;
// compute the supports for all outputs
-clk = clock();
+clk = Abc_Clock();
vSupports = Aig_ManSupports( p );
if ( fVerbose )
{
-ABC_PRT( "Supps", clock() - clk );
+ABC_PRT( "Supps", Abc_Clock() - clk );
}
// start char-based support representation
vPartSuppsBit = Vec_PtrAlloc( 1000 );
// create partitions
-clk = clock();
+clk = Abc_Clock();
vPartsAll = Vec_PtrAlloc( 256 );
vPartSuppsAll = Vec_PtrAlloc( 256 );
Vec_PtrForEachEntry( Vec_Int_t *, vSupports, vOne, i )
@@ -748,10 +748,10 @@ clk = clock();
//printf( "\n" );
if ( fVerbose )
{
-ABC_PRT( "Parts", clock() - clk );
+ABC_PRT( "Parts", Abc_Clock() - clk );
}
-clk = clock();
+clk = Abc_Clock();
// reorder partitions in the decreasing order of support sizes
// remember partition number in each partition support
Vec_PtrForEachEntry( Vec_Int_t *, vPartSuppsAll, vOne, i )
@@ -774,7 +774,7 @@ clk = clock();
if ( fVerbose )
{
-//ABC_PRT( "Comps", clock() - clk );
+//ABC_PRT( "Comps", Abc_Clock() - clk );
}
// cleanup
@@ -814,24 +814,24 @@ Vec_Ptr_t * Aig_ManPartitionSmartRegisters( Aig_Man_t * pAig, int nSuppSizeLimit
Vec_Ptr_t * vSupports, * vPartsAll, * vPartsAll2, * vPartSuppsAll;
Vec_Int_t * vOne, * vPart, * vPartSupp, * vTemp;
int i, iPart, iOut;
- clock_t clk;
+ abctime clk;
// add output number to each
-clk = clock();
+clk = Abc_Clock();
vSupports = Aig_ManSupportsRegisters( pAig );
assert( Vec_PtrSize(vSupports) == Aig_ManRegNum(pAig) );
Vec_PtrForEachEntry( Vec_Int_t *, vSupports, vOne, i )
Vec_IntPush( vOne, i );
if ( fVerbose )
{
-ABC_PRT( "Supps", clock() - clk );
+ABC_PRT( "Supps", Abc_Clock() - clk );
}
// start char-based support representation
vPartSuppsBit = Vec_PtrAlloc( 1000 );
// create partitions
-clk = clock();
+clk = Abc_Clock();
vPartsAll = Vec_PtrAlloc( 256 );
vPartSuppsAll = Vec_PtrAlloc( 256 );
Vec_PtrForEachEntry( Vec_Int_t *, vSupports, vOne, i )
@@ -877,10 +877,10 @@ clk = clock();
//printf( "\n" );
if ( fVerbose )
{
-ABC_PRT( "Parts", clock() - clk );
+ABC_PRT( "Parts", Abc_Clock() - clk );
}
-clk = clock();
+clk = Abc_Clock();
// reorder partitions in the decreasing order of support sizes
// remember partition number in each partition support
Vec_PtrForEachEntry( Vec_Int_t *, vPartSuppsAll, vOne, i )
@@ -903,7 +903,7 @@ clk = clock();
if ( fVerbose )
{
-//ABC_PRT( "Comps", clock() - clk );
+//ABC_PRT( "Comps", Abc_Clock() - clk );
}
// cleanup
diff --git a/src/aig/aig/aigPartSat.c b/src/aig/aig/aigPartSat.c
index ec6a6d73..2794e886 100644
--- a/src/aig/aig/aigPartSat.c
+++ b/src/aig/aig/aigPartSat.c
@@ -498,10 +498,10 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize,
Vec_Int_t * vNode2Part, * vNode2Var;
int nConfRemaining = nConfTotal, nNodes = 0;
int i, status, RetValue = -1;
- clock_t clk;
+ abctime clk;
// perform partitioning according to the selected algorithm
- clk = clock();
+ clk = Abc_Clock();
switch ( nAlgo )
{
case 0:
@@ -524,7 +524,7 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize,
if ( fVerbose )
{
printf( "Partitioning derived %d partitions. ", Vec_IntFindMax(vNode2Part) + 1 );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// split the original AIG into partition AIGs (vAigs)
@@ -536,7 +536,7 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize,
if ( fVerbose )
{
printf( "Partions were transformed into AIGs. " );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// synthesize partitions
@@ -557,7 +557,7 @@ int Aig_ManPartitionedSat( Aig_Man_t * p, int nAlgo, int nPartSize,
// add partitions, one at a time, and run the SAT solver
Vec_PtrForEachEntry( Aig_Man_t *, vAigs, pAig, i )
{
-clk = clock();
+clk = Abc_Clock();
// transform polarity of the AIG
if ( fAlignPol )
Aig_ManPartSetNodePolarity( p, pAig, Vec_VecEntryInt(vPio2Id,i) );
@@ -577,7 +577,7 @@ clk = clock();
printf( "%4d : Aig = %6d. Vs = %7d. RootCs = %7d. LearnCs = %6d. ",
i, nNodes += Aig_ManNodeNum(pAig), sat_solver_nvars(pSat),
(int)pSat->stats.clauses, (int)pSat->stats.learnts );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
// analize the result
if ( status == l_False )
diff --git a/src/aig/aig/aigRet.c b/src/aig/aig/aigRet.c
index c36e8709..fbdee61f 100644
--- a/src/aig/aig/aigRet.c
+++ b/src/aig/aig/aigRet.c
@@ -839,10 +839,10 @@ Aig_Man_t * Rtm_ManRetime( Aig_Man_t * p, int fForward, int nStepsMax, int fVerb
Rtm_Obj_t * pObj, * pNext;
Aig_Obj_t * pObjAig;
int i, k, nAutos, Degree, DegreeMax = 0;
- clock_t clk;
+ abctime clk;
// create the retiming manager
-clk = clock();
+clk = Abc_Clock();
pRtm = Rtm_ManFromAig( p );
// set registers
Aig_ManForEachLoSeq( p, pObjAig, i )
@@ -855,7 +855,7 @@ clk = clock();
if ( fVerbose )
{
printf( "Detected %d autonomous objects. ", nAutos );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// set the current retiming number
@@ -866,7 +866,7 @@ clk = clock();
pObj->Num = 0;
}
-clk = clock();
+clk = Abc_Clock();
// put the LOs on the queue
vQueue = Vec_PtrAlloc( 1000 );
if ( fForward )
@@ -946,7 +946,7 @@ clk = clock();
printf( "Performed %d %s latch moves of max depth %d and max latch count %d.\n",
Vec_PtrSize(vQueue), fForward? "fwd":"bwd", DegreeMax, Rtm_ManLatchMax(pRtm) );
printf( "Memory usage = %d. ", pRtm->nExtraCur );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
Vec_PtrFree( vQueue );
@@ -956,11 +956,11 @@ clk = clock();
pNew->pSpec = Abc_UtilStrsav( p->pSpec );
Rtm_ManFree( pRtm );
// group the registers
-clk = clock();
+clk = Abc_Clock();
pNew = Aig_ManReduceLaches( pNew, fVerbose );
if ( fVerbose )
{
- ABC_PRT( "Register sharing time", clock() - clk );
+ ABC_PRT( "Register sharing time", Abc_Clock() - clk );
}
return pNew;
}
diff --git a/src/aig/aig/aigSplit.c b/src/aig/aig/aigSplit.c
index 7f89638a..90884b8b 100644
--- a/src/aig/aig/aigSplit.c
+++ b/src/aig/aig/aigSplit.c
@@ -259,7 +259,7 @@ Aig_Man_t * Aig_ManSplit( Aig_Man_t * p, int nVars, int fVerbose )
DdManager * dd;
Vec_Ptr_t * vSupp, * vSubs, * vCofs;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Saig_ManPoNum(p) != 1 )
{
printf( "Currently works only for one primary output.\n" );
@@ -297,7 +297,7 @@ Aig_Man_t * Aig_ManSplit( Aig_Man_t * p, int nVars, int fVerbose )
if ( fVerbose )
printf( "Created %d cofactors (out of %d). ", Saig_ManPoNum(pRes), Vec_PtrSize(vCofs) );
if ( fVerbose )
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// dereference
Cudd_RecursiveDeref( dd, bFunc );
Vec_PtrForEachEntry( DdNode *, vCofs, bFunc, i )
diff --git a/src/aig/aig/aigTable.c b/src/aig/aig/aigTable.c
index abd9960a..2c7adee7 100644
--- a/src/aig/aig/aigTable.c
+++ b/src/aig/aig/aigTable.c
@@ -71,9 +71,9 @@ void Aig_TableResize( Aig_Man_t * p )
Aig_Obj_t * pEntry, * pNext;
Aig_Obj_t ** pTableOld, ** ppPlace;
int nTableSizeOld, Counter, i;
- clock_t clk;
+ abctime clk;
assert( p->pTable != NULL );
-clk = clock();
+clk = Abc_Clock();
// save the old table
pTableOld = p->pTable;
nTableSizeOld = p->nTableSize;
@@ -97,7 +97,7 @@ clk = clock();
}
assert( Counter == Aig_ManNodeNum(p) );
// printf( "Increasing the structural table size from %6d to %6d. ", nTableSizeOld, p->nTableSize );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( pTableOld );
}
diff --git a/src/aig/gia/giaAig.c b/src/aig/gia/giaAig.c
index 6256b7fd..0128ed91 100644
--- a/src/aig/gia/giaAig.c
+++ b/src/aig/gia/giaAig.c
@@ -629,7 +629,7 @@ int Gia_ManSolveSat( Gia_Man_t * p )
{
// extern int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int fFlipBits, int fAndOuts, int fNewSolver, int fVerbose );
Aig_Man_t * pNew;
- int RetValue;//, clk = clock();
+ int RetValue;//, clk = Abc_Clock();
pNew = Gia_ManToAig( p, 0 );
RetValue = Fra_FraigSat( pNew, 10000000, 0, 0, 0, 0, 1, 1, 0, 0 );
if ( RetValue == 0 )
@@ -657,7 +657,7 @@ int Gia_ManSolveSat( Gia_Man_t * p )
Abc_Print( 1, "The SAT problem is unsatisfiable. " );
else if ( RetValue == -1 )
Abc_Print( 1, "The SAT problem is undecided. " );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
*/
Aig_ManStop( pNew );
return RetValue;
diff --git a/src/aig/gia/giaBidec.c b/src/aig/gia/giaBidec.c
index 183f0e48..4c807cde 100644
--- a/src/aig/gia/giaBidec.c
+++ b/src/aig/gia/giaBidec.c
@@ -237,7 +237,7 @@ Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose )
Vec_Int_t * vLeaves, * vTruth, * vVisited;
Gia_Man_t * pNew, * pTemp;
Gia_Obj_t * pObj;
- int i;//, clk = clock();
+ int i;//, clk = Abc_Clock();
pPars->nVarsMax = Gia_ManLutSizeMax( p );
pPars->fVerbose = fVerbose;
if ( pPars->nVarsMax < 2 )
@@ -291,7 +291,7 @@ Gia_Man_t * Gia_ManPerformBidec( Gia_Man_t * p, int fVerbose )
if ( fVerbose )
{
// printf( "Total gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pNew) );
-// ABC_PRT( "Total runtime", clock() - clk );
+// ABC_PRT( "Total runtime", Abc_Clock() - clk );
}
return pNew;
}
diff --git a/src/aig/gia/giaCCof.c b/src/aig/gia/giaCCof.c
index fd704635..71a6547d 100644
--- a/src/aig/gia/giaCCof.c
+++ b/src/aig/gia/giaCCof.c
@@ -221,7 +221,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit )
{
int ObjPrev = 0, ConfPrev = 0;
int Count = 0, LitOut, RetValue;
- clock_t clk;
+ abctime clk;
// try solving for the first time and quit if converged
RetValue = sat_solver_solve( p->pSat, &Lit, &Lit + 1, p->nConfMax, 0, 0, 0 );
if ( RetValue == l_False )
@@ -229,7 +229,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit )
// iterate circuit cofactoring
while ( RetValue == l_True )
{
- clk = clock();
+ clk = Abc_Clock();
// derive cofactor
LitOut = Gia_ManCofOneDerive( p, Lit );
// add the blocking clause
@@ -242,7 +242,7 @@ int Gia_ManCofGetReachable( Ccf_Man_t * p, int Lit )
{
printf( "%3d : AIG =%7d Conf =%7d. ", Count++,
Gia_ManObjNum(p->pFrames) - ObjPrev, sat_solver_nconflicts(p->pSat) - ConfPrev );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
ObjPrev = Gia_ManObjNum(p->pFrames);
ConfPrev = sat_solver_nconflicts(p->pSat);
}
@@ -269,8 +269,8 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n
Ccf_Man_t * p;
Gia_Obj_t * pObj;
int f, i, Lit, RetValue = -1, fFailed = 0;
- clock_t nTimeToStop = clock() + nTimeMax * CLOCKS_PER_SEC;
- clock_t clk = clock();
+ abctime nTimeToStop = Abc_Clock() + nTimeMax * CLOCKS_PER_SEC;
+ abctime clk = Abc_Clock();
assert( Gia_ManPoNum(pGia) == 1 );
// create reachability manager
@@ -310,7 +310,7 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n
}
// report the result
- if ( nTimeToStop && clock() > nTimeToStop )
+ if ( nTimeToStop && Abc_Clock() > nTimeToStop )
printf( "Runtime limit (%d sec) is reached after %d frames. ", nTimeMax, f );
else if ( f == nFrameMax )
printf( "Completed %d frames without converging. ", f );
@@ -318,7 +318,7 @@ Gia_Man_t * Gia_ManCofTest( Gia_Man_t * pGia, int nFrameMax, int nConfMax, int n
printf( "Backward reachability converged after %d iterations. ", f-1 );
else if ( RetValue == -1 )
printf( "Conflict limit or timeout is reached after %d frames. ", f-1 );
- Abc_PrintTime( 1, "Runtime", clock() - clk );
+ Abc_PrintTime( 1, "Runtime", Abc_Clock() - clk );
if ( !fFailed && RetValue == 1 )
printf( "Property holds.\n" );
diff --git a/src/aig/gia/giaCSat.c b/src/aig/gia/giaCSat.c
index 6d7df6b5..65cf2961 100644
--- a/src/aig/gia/giaCSat.c
+++ b/src/aig/gia/giaCSat.c
@@ -81,10 +81,10 @@ struct Cbs_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
- clock_t timeSatUnsat; // unsat
- clock_t timeSatSat; // sat
- clock_t timeSatUndec; // undecided
- clock_t timeTotal; // total runtime
+ abctime timeSatUnsat; // unsat
+ abctime timeSatSat; // sat
+ abctime timeSatUndec; // undecided
+ abctime timeTotal; // total runtime
};
static inline int Cbs_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@@ -1004,7 +1004,7 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot;
int i, status;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );
// prepare AIG
@@ -1043,7 +1043,7 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
}
continue;
}
- clk = clock();
+ clk = Abc_Clock();
p->Pars.fUseHighest = 1;
p->Pars.fUseLowest = 0;
status = Cbs_ManSolve( p, Gia_ObjChild0(pRoot) );
@@ -1062,25 +1062,25 @@ Vec_Int_t * Cbs_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
p->nSatUndec++;
p->nConfUndec += p->Pars.nBTThis;
Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
continue;
}
if ( status == 1 )
{
p->nSatUnsat++;
p->nConfUnsat += p->Pars.nBTThis;
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
continue;
}
p->nSatSat++;
p->nConfSat += p->Pars.nBTThis;
// Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
Cec_ManSatAddToStore( vCexStore, vCex, i );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
}
Vec_IntFree( vVisit );
p->nSatTotal = Gia_ManPoNum(pAig);
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Cbs_ManSatPrintStats( p );
// printf( "RecCalls = %8d. RecClause = %8d. RecNonChro = %8d.\n", p->nRecCall, p->nRecClause, p->nRecNonChro );
diff --git a/src/aig/gia/giaCSatOld.c b/src/aig/gia/giaCSatOld.c
index 75b4c3e0..a562c8ae 100644
--- a/src/aig/gia/giaCSatOld.c
+++ b/src/aig/gia/giaCSatOld.c
@@ -73,10 +73,10 @@ struct Cbs0_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
- clock_t timeSatUnsat; // unsat
- clock_t timeSatSat; // sat
- clock_t timeSatUndec; // undecided
- clock_t timeTotal; // total runtime
+ abctime timeSatUnsat; // unsat
+ abctime timeSatSat; // sat
+ abctime timeSatUndec; // undecided
+ abctime timeTotal; // total runtime
};
static inline int Cbs0_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@@ -713,7 +713,7 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot;
int i, status;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManRegNum(pAig) == 0 );
// prepare AIG
Gia_ManCreateRefs( pAig );
@@ -747,7 +747,7 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat
}
continue;
}
- clk = clock();
+ clk = Abc_Clock();
p->Pars.fUseHighest = 1;
p->Pars.fUseLowest = 0;
status = Cbs0_ManSolve( p, Gia_ObjChild0(pRoot) );
@@ -765,25 +765,25 @@ Vec_Int_t * Cbs_ManSolveMiter( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvStat
p->nSatUndec++;
p->nConfUndec += p->Pars.nBTThis;
Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
continue;
}
if ( status == 1 )
{
p->nSatUnsat++;
p->nConfUnsat += p->Pars.nBTThis;
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
continue;
}
p->nSatSat++;
p->nConfSat += p->Pars.nBTThis;
// Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
Cec_ManSatAddToStore( vCexStore, vCex, i );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
}
Vec_IntFree( vVisit );
p->nSatTotal = Gia_ManPoNum(pAig);
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Cbs0_ManSatPrintStats( p );
Cbs0_ManStop( p );
diff --git a/src/aig/gia/giaCTas.c b/src/aig/gia/giaCTas.c
index 79b42c66..73575733 100644
--- a/src/aig/gia/giaCTas.c
+++ b/src/aig/gia/giaCTas.c
@@ -108,10 +108,10 @@ struct Tas_Man_t_
int nConfSat; // conflicts in sat problems
int nConfUndec; // conflicts in undec problems
// runtime stats
- clock_t timeSatUnsat; // unsat
- clock_t timeSatSat; // sat
- clock_t timeSatUndec; // undecided
- clock_t timeTotal; // total runtime
+ abctime timeSatUnsat; // unsat
+ abctime timeSatSat; // sat
+ abctime timeSatUndec; // undecided
+ abctime timeTotal; // total runtime
};
static inline int Tas_VarIsAssigned( Gia_Obj_t * pVar ) { return pVar->fMark0; }
@@ -1525,7 +1525,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
// Gia_Man_t * pAigCopy = Gia_ManDup( pAig ), * pAigTemp;
int i, status;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );
// prepare AIG
@@ -1563,7 +1563,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
}
continue;
}
- clk = clock();
+ clk = Abc_Clock();
// p->Pars.fUseActive = 1;
p->Pars.fUseHighest = 1;
p->Pars.fUseLowest = 0;
@@ -1585,7 +1585,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
p->nSatUndec++;
p->nConfUndec += p->Pars.nBTThis;
Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
continue;
}
@@ -1597,14 +1597,14 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
{
p->nSatUnsat++;
p->nConfUnsat += p->Pars.nBTThis;
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
continue;
}
p->nSatSat++;
p->nConfSat += p->Pars.nBTThis;
// Gia_SatVerifyPattern( pAig, pRoot, vCex, vVisit );
Cec_ManSatAddToStore( vCexStore, vCex, i );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
// printf( "%d ", Vec_IntSize(vCex) );
}
@@ -1615,7 +1615,7 @@ Vec_Int_t * Tas_ManSolveMiterNc( Gia_Man_t * pAig, int nConfs, Vec_Str_t ** pvSt
Vec_IntFree( vVisit );
p->nSatTotal = Gia_ManPoNum(pAig);
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Tas_ManSatPrintStats( p );
// printf( "RecCalls = %8d. RecClause = %8d. RecNonChro = %8d.\n", p->nRecCall, p->nRecClause, p->nRecNonChro );
@@ -1705,7 +1705,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
Vec_Str_t * vStatus;
Gia_Obj_t * pRoot, * pOldRoot;
int i, status;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
int Tried = 0, Stored = 0, Step = Gia_ManCoNum(pAig) / nPatMax;
assert( Gia_ManRegNum(pAig) == 0 );
// Gia_ManCollectTest( pAig );
@@ -1731,7 +1731,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
{
assert( !Gia_ObjIsConst0(Gia_ObjFanin0(pRoot)) );
Vec_IntClear( vCex );
- clk = clock();
+ clk = Abc_Clock();
p->Pars.fUseHighest = 1;
p->Pars.fUseLowest = 0;
status = Tas_ManSolve( p, Gia_ObjChild0(pRoot), NULL );
@@ -1741,7 +1741,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
p->nSatUndec++;
p->nConfUndec += p->Pars.nBTThis;
// Cec_ManSatAddToStore( vCexStore, NULL, i ); // timeout
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
i += Step;
continue;
@@ -1750,7 +1750,7 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
{
p->nSatUnsat++;
p->nConfUnsat += p->Pars.nBTThis;
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
// record proved
pOldRoot = (Gia_Obj_t *)Vec_PtrEntry( vOldRoots, i );
assert( !Gia_ObjProved( pAigOld, Gia_ObjId(pAigOld, pOldRoot) ) );
@@ -1767,13 +1767,13 @@ void Tas_ManSolveMiterNc2( Gia_Man_t * pAig, int nConfs, Gia_Man_t * pAigOld, Ve
// save pattern
Tried++;
Stored += Tas_StorePattern( vSimInfo, vPres, vCex );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
i += Step;
}
printf( "Tried = %d Stored = %d\n", Tried, Stored );
Vec_IntFree( vVisit );
p->nSatTotal = Gia_ManPoNum(pAig);
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Tas_ManSatPrintStats( p );
Tas_ManStop( p );
diff --git a/src/aig/gia/giaCof.c b/src/aig/gia/giaCof.c
index 522589aa..ceaa8daa 100644
--- a/src/aig/gia/giaCof.c
+++ b/src/aig/gia/giaCof.c
@@ -672,7 +672,7 @@ void Cof_ManPrintFanio( Cof_Man_t * p )
void Gia_ManPrintFanio( Gia_Man_t * pGia, int nNodes )
{
Cof_Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Cof_ManCreateLogicSimple( pGia );
p->nLevels = 1 + Gia_ManLevelNum( pGia );
p->pLevels = ABC_CALLOC( int, p->nLevels );
@@ -683,7 +683,7 @@ void Gia_ManPrintFanio( Gia_Man_t * pGia, int nNodes )
Cof_ManPrintHighFanout( p, nNodes );
Gia_ManHashStop( pGia );
ABC_PRMn( "Memory for logic network", 4*p->nObjData );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
Cof_ManStop( p );
}
diff --git a/src/aig/gia/giaCone.c b/src/aig/gia/giaCone.c
index ba0a8a2e..cd43a65e 100644
--- a/src/aig/gia/giaCone.c
+++ b/src/aig/gia/giaCone.c
@@ -559,7 +559,7 @@ Gia_Man_t * Gia_ManFindPoPartition( Gia_Man_t * p, int SelectShift, int fOnlyCis
Vec_Wrd_t * vSigns;
Vec_Ptr_t * vParts;
Vec_Int_t * vPart;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vPivots = Gia_ManFindPivots( p, SelectShift, fOnlyCis, fVerbose );
vSigns = Gia_ManDeriveSigns( p, vPivots, fVerbose );
Vec_IntFree( vPivots );
@@ -574,7 +574,7 @@ Gia_Man_t * Gia_ManFindPoPartition( Gia_Man_t * p, int SelectShift, int fOnlyCis
{
*pvPosEquivs = vParts;
printf( "The algorithm divided %d POs into %d partitions. ", Gia_ManPoNum(p), Vec_PtrSize(vParts) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
else
Vec_VecFree( (Vec_Vec_t *)vParts );
diff --git a/src/aig/gia/giaDfs.c b/src/aig/gia/giaDfs.c
index bb79337f..940eaf46 100644
--- a/src/aig/gia/giaDfs.c
+++ b/src/aig/gia/giaDfs.c
@@ -210,7 +210,7 @@ void Gia_ManCollectTest( Gia_Man_t * p )
Vec_Int_t * vNodes;
Gia_Obj_t * pObj;
int i, iNode;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vNodes = Vec_IntAlloc( 100 );
Gia_ManIncrementTravId( p );
Gia_ManForEachCo( p, pObj, i )
@@ -219,7 +219,7 @@ void Gia_ManCollectTest( Gia_Man_t * p )
Gia_ManCollectAnds( p, &iNode, 1, vNodes );
}
Vec_IntFree( vNodes );
- ABC_PRT( "DFS from each output", clock() - clk );
+ ABC_PRT( "DFS from each output", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -277,12 +277,12 @@ int Gia_ManSuppSizeTest( Gia_Man_t * p )
{
Gia_Obj_t * pObj;
int i, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Gia_ManForEachObj( p, pObj, i )
if ( Gia_ObjIsAnd(pObj) )
Counter += (Gia_ManSuppSizeOne(p, pObj) <= 16);
printf( "Nodes with small support %d (out of %d)\n", Counter, Gia_ManAndNum(p) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return Counter;
}
@@ -487,7 +487,7 @@ void Gia_ManCollectSeqTest( Gia_Man_t * p )
{
Vec_Int_t * vObjs;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for ( i = 0; i < Gia_ManPoNum(p); i++ )
{
if ( i % 10000 == 0 )
@@ -497,7 +497,7 @@ void Gia_ManCollectSeqTest( Gia_Man_t * p )
// printf( "%d ", Vec_IntSize(vObjs) );
Vec_IntFree( vObjs );
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
diff --git a/src/aig/gia/giaEmbed.c b/src/aig/gia/giaEmbed.c
index b6c4655e..b646a311 100644
--- a/src/aig/gia/giaEmbed.c
+++ b/src/aig/gia/giaEmbed.c
@@ -839,12 +839,12 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
{
int nAttempts = 20;
int i, iNode, Dist;
- clock_t clk;
+ abctime clk;
Emb_Obj_t * pPivot, * pNext;
Gia_ManRandom( 1 );
Emb_ManResetTravId( p );
// compute distances from several randomly selected PIs
- clk = clock();
+ clk = Abc_Clock();
printf( "From inputs: " );
for ( i = 0; i < nAttempts; i++ )
{
@@ -858,9 +858,9 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
Dist = Emb_ManComputeDistance_old( p, pPivot );
printf( "%d ", Dist );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// compute distances from several randomly selected POs
- clk = clock();
+ clk = Abc_Clock();
printf( "From outputs: " );
for ( i = 0; i < nAttempts; i++ )
{
@@ -872,9 +872,9 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
Dist = Emb_ManComputeDistance_old( p, pPivot );
printf( "%d ", Dist );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// compute distances from several randomly selected nodes
- clk = clock();
+ clk = Abc_Clock();
printf( "From nodes: " );
for ( i = 0; i < nAttempts; i++ )
{
@@ -887,7 +887,7 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
Dist = Emb_ManComputeDistance_old( p, pPivot );
printf( "%d ", Dist );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -904,11 +904,11 @@ void Gia_ManTestDistanceInternal( Emb_Man_t * p )
void Gia_ManTestDistance( Gia_Man_t * pGia )
{
Emb_Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Emb_ManStart( pGia );
// Emb_ManPrintFanio( p );
Emb_ManPrintStats( p );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
Gia_ManTestDistanceInternal( p );
Emb_ManStop( p );
}
@@ -1530,7 +1530,7 @@ void Emb_ManPlacementRefine( Emb_Man_t * p, int nIters, int fVerbose )
float VertX, VertY;
int * pPermX, * pPermY;
int i, k, Iter, iMinX, iMaxX, iMinY, iMaxY;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( p->pPlacement == NULL )
return;
pEdgeX = ABC_ALLOC( float, p->nObjs );
@@ -1585,7 +1585,7 @@ void Emb_ManPlacementRefine( Emb_Man_t * p, int nIters, int fVerbose )
if ( fVerbose )
{
printf( "%2d : HPWL = %e ", Iter+1, CostThis );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
}
ABC_FREE( pEdgeX );
@@ -1792,12 +1792,12 @@ void Gia_ManSolveProblem( Gia_Man_t * pGia, Emb_Par_t * pPars )
{
Emb_Man_t * p;
int i;
- clock_t clkSetup;
- clock_t clk;
+ abctime clkSetup;
+ abctime clk;
// Gia_ManTestDistance( pGia );
// transform AIG into internal data-structure
-clk = clock();
+clk = Abc_Clock();
if ( pPars->fCluster )
{
p = Emb_ManStart( pGia );
@@ -1816,41 +1816,41 @@ clk = clock();
Gia_ManRandom( 1 ); // reset random numbers for deterministic behavior
Emb_ManResetTravId( p );
Emb_ManSetValue( p );
-clkSetup = clock() - clk;
+clkSetup = Abc_Clock() - clk;
-clk = clock();
+clk = Abc_Clock();
Emb_ManComputeDimensions( p, pPars->nDims );
if ( pPars->fVerbose )
ABC_PRT( "Setup ", clkSetup );
if ( pPars->fVerbose )
-ABC_PRT( "Dimensions", clock() - clk );
+ABC_PRT( "Dimensions", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
Emb_ManComputeCovariance( p, pPars->nDims );
if ( pPars->fVerbose )
-ABC_PRT( "Matrix ", clock() - clk );
+ABC_PRT( "Matrix ", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
Emb_ManComputeEigenvectors( p, pPars->nDims, pPars->nSols );
Emb_ManComputeSolutions( p, pPars->nDims, pPars->nSols );
Emb_ManDerivePlacement( p, pPars->nSols );
if ( pPars->fVerbose )
-ABC_PRT( "Eigenvecs ", clock() - clk );
+ABC_PRT( "Eigenvecs ", Abc_Clock() - clk );
if ( pPars->fRefine )
{
-clk = clock();
+clk = Abc_Clock();
Emb_ManPlacementRefine( p, pPars->nIters, pPars->fVerbose );
if ( pPars->fVerbose )
-ABC_PRT( "Refinement", clock() - clk );
+ABC_PRT( "Refinement", Abc_Clock() - clk );
}
if ( (pPars->fDump || pPars->fDumpLarge) && pPars->nSols == 2 )
{
-clk = clock();
+clk = Abc_Clock();
Emb_ManDumpGnuplot( p, pGia->pName, pPars->fDumpLarge, pPars->fShowImage );
if ( pPars->fVerbose )
-ABC_PRT( "Image dump", clock() - clk );
+ABC_PRT( "Image dump", Abc_Clock() - clk );
}
// transfer placement
diff --git a/src/aig/gia/giaEra.c b/src/aig/gia/giaEra.c
index 8f0e2b07..b5b94cb5 100644
--- a/src/aig/gia/giaEra.c
+++ b/src/aig/gia/giaEra.c
@@ -529,7 +529,7 @@ int Gia_ManCollectReachable( Gia_Man_t * pAig, int nStatesMax, int fMiter, int f
Gia_ManEra_t * p;
Gia_ObjEra_t * pState;
int Hash;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue = 1;
assert( Gia_ManPiNum(pAig) <= 12 );
assert( Gia_ManRegNum(pAig) > 0 );
@@ -571,11 +571,11 @@ int Gia_ManCollectReachable( Gia_Man_t * pAig, int nStatesMax, int fMiter, int f
p->iCurState, Vec_PtrSize(p->vStates), 1.0*p->iCurState/Vec_PtrSize(p->vStates), Gia_ManCountDepth(p),
(1.0/(1<<20))*(1.0*Vec_PtrSize(p->vStates)*(sizeof(Gia_ObjEra_t) + sizeof(unsigned) * p->nWordsDat) +
1.0*p->nBins*sizeof(unsigned) + 1.0*p->vStates->nCap * sizeof(void*)) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
}
printf( "Reachability analysis traversed %d states with depth %d. ", p->iCurState-1, Gia_ManCountDepth(p) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( fDumpFile )
{
char * pFileName = "test.stg";
diff --git a/src/aig/gia/giaEra2.c b/src/aig/gia/giaEra2.c
index 060c83a5..b8ca65cc 100644
--- a/src/aig/gia/giaEra2.c
+++ b/src/aig/gia/giaEra2.c
@@ -1537,13 +1537,13 @@ int Gia_ManAreDeriveNexts_rec( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
Vec_Int_t * vLits, * vTfos;
Gia_Obj_t * pObj;
int i;
- clock_t clk;
+ abctime clk;
if ( ++p->nRecCalls == MAX_CALL_NUM )
return 0;
if ( (pPivot = Gia_ManAreMostUsedPi(p)) == NULL )
{
Gia_StaAre_t * pNew;
- clk = clock();
+ clk = Abc_Clock();
pNew = Gia_ManAreCreateStaNew( p );
pNew->iPrev = Sta;
p->fStopped = (p->fMiter && (Gia_ManCheckPOstatus(p) & 1));
@@ -1554,7 +1554,7 @@ int Gia_ManAreDeriveNexts_rec( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
return 1;
}
Gia_ManAreCubeProcess( p, pNew );
- p->timeCube += clock() - clk;
+ p->timeCube += Abc_Clock() - clk;
return p->fStopped;
}
// remember values in the cone and perform update
@@ -1613,7 +1613,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
Gia_StaAre_t * pSta;
Gia_Obj_t * pObj;
int i, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pSta = Gia_ManAreSta( p, Sta );
if ( Gia_StaIsUnused(pSta) )
return 0;
@@ -1657,7 +1657,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
}
// printf( "%d ", p->nRecCalls );
//printf( "%d ", Gia_ManObjNum(p->pNew) );
- p->timeAig += clock() - clk;
+ p->timeAig += Abc_Clock() - clk;
return RetValue;
}
@@ -1673,7 +1673,7 @@ int Gia_ManAreDeriveNexts( Gia_ManAre_t * p, Gia_PtrAre_t Sta )
SeeAlso []
***********************************************************************/
-void Gia_ManArePrintReport( Gia_ManAre_t * p, clock_t Time, int fFinal )
+void Gia_ManArePrintReport( Gia_ManAre_t * p, abctime Time, int fFinal )
{
printf( "States =%10d. Reached =%10d. R = %5.3f. Depth =%6d. Mem =%9.2f MB. ",
p->iStaCur, p->nStas, 1.0*p->iStaCur/p->nStas, Gia_ManAreDepth(p, p->iStaCur),
@@ -1681,11 +1681,11 @@ void Gia_ManArePrintReport( Gia_ManAre_t * p, clock_t Time, int fFinal )
4.0*p->nStaPages*p->nSize*MAX_ITEM_NUM + 16.0*p->nObjPages*MAX_ITEM_NUM)/(1<<20) );
if ( fFinal )
{
- ABC_PRT( "Time", clock() - Time );
+ ABC_PRT( "Time", Abc_Clock() - Time );
}
else
{
- ABC_PRTr( "Time", clock() - Time );
+ ABC_PRTr( "Time", Abc_Clock() - Time );
}
}
@@ -1705,7 +1705,7 @@ int Gia_ManArePerform( Gia_Man_t * pAig, int nStatesMax, int fMiter, int fVerbos
// extern Gia_Man_t * Gia_ManCompress2( Gia_Man_t * p, int fUpdateLevel, int fVerbose );
extern Abc_Cex_t * Gia_ManAreDeriveCex( Gia_ManAre_t * p, Gia_StaAre_t * pLast );
Gia_ManAre_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue = 1;
if ( Gia_ManRegNum(pAig) > MAX_VARS_NUM )
{
@@ -1734,22 +1734,22 @@ int Gia_ManArePerform( Gia_Man_t * pAig, int nStatesMax, int fMiter, int fVerbos
p->fStopped ? "Stopped" : "Completed",
p->nStas, Gia_ManAreListCountUsed(p),
Gia_ManAreDepth(p, p->iStaCur-1) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( pAig->pCexSeq != NULL )
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d.\n",
p->iStaCur, pAig->pName, Gia_ManAreDepth(p, p->iStaCur)-1 );
if ( fVerbose )
{
- ABC_PRTP( "Cofactoring", p->timeAig - p->timeCube, clock() - clk );
- ABC_PRTP( "Containment", p->timeCube, clock() - clk );
- ABC_PRTP( "Other ", clock() - clk - p->timeAig, clock() - clk );
- ABC_PRTP( "TOTAL ", clock() - clk, clock() - clk );
+ ABC_PRTP( "Cofactoring", p->timeAig - p->timeCube, Abc_Clock() - clk );
+ ABC_PRTP( "Containment", p->timeCube, Abc_Clock() - clk );
+ ABC_PRTP( "Other ", Abc_Clock() - clk - p->timeAig, Abc_Clock() - clk );
+ ABC_PRTP( "TOTAL ", Abc_Clock() - clk, Abc_Clock() - clk );
}
if ( Gia_ManRegNum(pAig) <= 30 )
{
- clk = clock();
+ clk = Abc_Clock();
printf( "The number of unique state minterms in computed state cubes is %d. ", Gia_ManCountMinterms(p) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// printf( "Compares = %d. Equals = %d. Disj = %d. Disj2 = %d. Disj3 = %d.\n",
// p->nCompares, p->nEquals, p->nDisjs, p->nDisjs2, p->nDisjs3 );
diff --git a/src/aig/gia/giaForce.c b/src/aig/gia/giaForce.c
index d37fa455..0b3003a8 100644
--- a/src/aig/gia/giaForce.c
+++ b/src/aig/gia/giaForce.c
@@ -714,7 +714,7 @@ Vec_Int_t * Frc_ManCollectCos( Frc_Man_t * p )
void Frc_ManCrossCutTest( Frc_Man_t * p, Vec_Int_t * vOrderInit )
{
Vec_Int_t * vOrder;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
vOrder = vOrderInit? vOrderInit : Frc_ManCollectCos( p );
printf( "CrossCut = %6d\n", Frc_ManCrossCut( p, vOrder, 0 ) );
printf( "CrossCut = %6d\n", Frc_ManCrossCut( p, vOrder, 1 ) );
@@ -724,7 +724,7 @@ void Frc_ManCrossCutTest( Frc_Man_t * p, Vec_Int_t * vOrderInit )
Vec_IntReverseOrder( vOrder );
if ( vOrder != vOrderInit )
Vec_IntFree( vOrder );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
}
@@ -892,7 +892,7 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose )
float * pVertX, VertX;
int * pPermX, * pHandles;
int k, h, Iter, iMinX, iMaxX, Counter, nCutStart, nCutCur, nCutCur2, nCutPrev;
- clock_t clk = clock(), clk2, clk2Total = 0;
+ abctime clk = Abc_Clock(), clk2, clk2Total = 0;
// create starting one-dimensional placement
vCoOrder = Frc_ManCollectCos( p );
if ( fRandomize )
@@ -930,9 +930,9 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose )
}
assert( Counter == Frc_ManObjNum(p) );
// sort these numbers
- clk2 = clock();
+ clk2 = Abc_Clock();
pPermX = Gia_SortFloats( pVertX, pHandles, p->nObjs );
- clk2Total += clock() - clk2;
+ clk2Total += Abc_Clock() - clk2;
assert( pPermX == pHandles );
Vec_IntClear( vCoOrder );
for ( k = 0; k < p->nObjs; k++ )
@@ -954,7 +954,7 @@ void Frc_ManPlacementRefine( Frc_Man_t * p, int nIters, int fVerbose )
{
printf( "%2d : Span = %e ", Iter+1, CostThis );
printf( "Cut = %6d (%5.2f %%) CutR = %6d ", nCutCur, 100.0*(nCutStart-nCutCur)/nCutStart, nCutCur2 );
- ABC_PRTn( "Total", clock() - clk );
+ ABC_PRTn( "Total", Abc_Clock() - clk );
ABC_PRT( "Sort", clk2Total );
// Frc_ManCrossCutTest( p, vCoOrder );
}
@@ -1068,7 +1068,7 @@ void For_ManFileExperiment()
FILE * pFile;
int * pBuffer;
int i, Size, Exp = 25;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue;
Size = (1 << Exp);
@@ -1077,19 +1077,19 @@ void For_ManFileExperiment()
pBuffer = ABC_ALLOC( int, Size );
for ( i = 0; i < Size; i++ )
pBuffer[i] = i;
-ABC_PRT( "Fillup", clock() - clk );
+ABC_PRT( "Fillup", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
pFile = fopen( "test.txt", "rb" );
RetValue = fread( pBuffer, 1, sizeof(int) * Size, pFile );
fclose( pFile );
-ABC_PRT( "Read ", clock() - clk );
+ABC_PRT( "Read ", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
pFile = fopen( "test.txt", "wb" );
fwrite( pBuffer, 1, sizeof(int) * Size, pFile );
fclose( pFile );
-ABC_PRT( "Write ", clock() - clk );
+ABC_PRT( "Write ", Abc_Clock() - clk );
/*
2^25 machine words (134217728 bytes).
Fillup = 0.06 sec
diff --git a/src/aig/gia/giaFrames.c b/src/aig/gia/giaFrames.c
index 23caacc4..ae832af9 100644
--- a/src/aig/gia/giaFrames.c
+++ b/src/aig/gia/giaFrames.c
@@ -227,7 +227,7 @@ Gia_ManUnr_t * Gia_ManUnrStart( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
Gia_ManUnr_t * p;
Gia_Obj_t * pObj;
int i, k, iRank, iFanin, Degree, Shift;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = ABC_CALLOC( Gia_ManUnr_t, 1 );
p->pAig = pAig;
@@ -291,7 +291,7 @@ Gia_ManUnr_t * Gia_ManUnrStart( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
Vec_IntSize(p->vLimit) - 1,
Gia_ManObjNum(pAig) - Gia_ManObjNum(p->pOrder),
1.0*Vec_IntSize(p->vStore)/Gia_ManObjNum(p->pOrder) - 1.0 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
return p;
}
@@ -608,10 +608,10 @@ Gia_Man_t * Gia_ManUnroll( Gia_ManUnr_t * p )
Gia_Man_t * Gia_ManFrames2( Gia_Man_t * pAig, Gia_ParFra_t * pPars )
{
Gia_Man_t * pNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pNew = Gia_ManUnroll( pAig, pPars );
if ( pPars->fVerbose )
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return pNew;
}
diff --git a/src/aig/gia/giaFront.c b/src/aig/gia/giaFront.c
index fc99cfe9..8c7e06e5 100644
--- a/src/aig/gia/giaFront.c
+++ b/src/aig/gia/giaFront.c
@@ -151,7 +151,7 @@ Gia_Man_t * Gia_ManFront( Gia_Man_t * p )
char * pFront; // places used for the frontier
int i, iLit, nCrossCut = 0, nCrossCutMax = 0;
int nCrossCutMaxInit = Gia_ManCrossCutSimple( p );
- int iFront = 0;//, clk = clock();
+ int iFront = 0;//, clk = Abc_Clock();
// set references for all objects
Gia_ManCreateValueRefs( p );
// start the new manager
@@ -243,7 +243,7 @@ Gia_Man_t * Gia_ManFront( Gia_Man_t * p )
assert( pFront[i] == 0 );
ABC_FREE( pFront );
//printf( "Crosscut = %6d. Frontier = %6d. ", nCrossCutMaxInit, pNew->nFront );
-//ABC_PRT( "Time", clock() - clk );
+//ABC_PRT( "Time", Abc_Clock() - clk );
Gia_ManSetRegNum( pNew, Gia_ManRegNum(p) );
return pNew;
}
diff --git a/src/aig/gia/giaGlitch.c b/src/aig/gia/giaGlitch.c
index 2b958cba..cc69f6b3 100644
--- a/src/aig/gia/giaGlitch.c
+++ b/src/aig/gia/giaGlitch.c
@@ -741,7 +741,7 @@ void Gli_ManSetPiRandomSeq( Gli_Man_t * p, float PiTransProb )
void Gli_ManSwitchesAndGlitches( Gli_Man_t * p, int nPatterns, float PiTransProb, int fVerbose )
{
int i, k;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Gia_ManRandom( 1 );
Gli_ManFinalize( p );
if ( p->nRegs == 0 )
@@ -774,7 +774,7 @@ void Gli_ManSwitchesAndGlitches( Gli_Man_t * p, int nPatterns, float PiTransProb
{
printf( "\nSimulated %d patterns. ", nPatterns );
ABC_PRMn( "Memory", 4*p->nObjData );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
}
diff --git a/src/aig/gia/giaIso.c b/src/aig/gia/giaIso.c
index fcb7f363..5c03d1d2 100644
--- a/src/aig/gia/giaIso.c
+++ b/src/aig/gia/giaIso.c
@@ -82,12 +82,12 @@ struct Gia_IsoMan_t_
Vec_Int_t * vClasses;
Vec_Int_t * vClasses2;
// statistics
- clock_t timeStart;
- clock_t timeSim;
- clock_t timeRefine;
- clock_t timeSort;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeStart;
+ abctime timeSim;
+ abctime timeRefine;
+ abctime timeSort;
+ abctime timeOther;
+ abctime timeTotal;
};
static inline unsigned Gia_IsoGetValue( Gia_IsoMan_t * p, int i ) { return (unsigned)(p->pStoreW[i]); }
@@ -178,7 +178,7 @@ void Gia_IsoPrintClasses( Gia_IsoMan_t * p )
printf( "\n" );
}
}
-void Gia_IsoPrint( Gia_IsoMan_t * p, int Iter, clock_t Time )
+void Gia_IsoPrint( Gia_IsoMan_t * p, int Iter, abctime Time )
{
printf( "Iter %4d : ", Iter );
printf( "Entries =%8d. ", p->nEntries );
@@ -301,7 +301,7 @@ int Gia_IsoSort( Gia_IsoMan_t * p )
Gia_Obj_t * pObj, * pObj0;
int i, k, fSameValue, iBegin, iBeginOld, nSize, nSizeNew;
int fRefined = 0;
- clock_t clk;
+ abctime clk;
// go through the equiv classes
p->nSingles = 0;
@@ -326,9 +326,9 @@ int Gia_IsoSort( Gia_IsoMan_t * p )
}
fRefined = 1;
// sort objects
- clk = clock();
+ clk = Abc_Clock();
Abc_QuickSort3( p->pStoreW + iBegin, nSize, 0 );
- p->timeSort += clock() - clk;
+ p->timeSort += Abc_Clock() - clk;
// divide into new classes
iBeginOld = iBegin;
pObj0 = Gia_ManObj( p->pGia, Gia_IsoGetItem(p,iBegin) );
@@ -725,7 +725,7 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
Vec_Ptr_t * vEquivs = NULL;
int fRefined, fRefinedAll;
int i, c;
- clock_t clk = clock(), clkTotal = clock();
+ abctime clk = Abc_Clock(), clkTotal = Abc_Clock();
assert( Gia_ManCiNum(pGia) > 0 );
assert( Gia_ManPoNum(pGia) > 0 );
@@ -733,9 +733,9 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
p = Gia_IsoManStart( pGia );
Gia_IsoPrepare( p );
Gia_IsoAssignUnique( p );
- p->timeStart = clock() - clk;
+ p->timeStart = Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, 0, clock() - clkTotal );
+ Gia_IsoPrint( p, 0, Abc_Clock() - clkTotal );
// Gia_IsoRecognizeMuxes( pGia );
@@ -744,10 +744,10 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
{
for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
}
}
else
@@ -759,18 +759,18 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
fRefinedAll = 0;
for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
fRefinedAll |= fRefined;
}
for ( c = 0; i < nIterMax && c < nFixedPoint+1; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
fRefinedAll |= fRefined;
}
}
@@ -788,18 +788,18 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
fRefinedAll = 0;
for ( c = 0; i < nIterMax && c < nFixedPoint; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulateBack( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
fRefinedAll |= fRefined;
}
for ( c = 0; i < nIterMax && c < nFixedPoint; i++, c = fRefined ? 0 : c+1 )
{
- clk = clock(); Gia_IsoSimulate( p, i ); p->timeSim += clock() - clk;
- clk = clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += clock() - clk;
+ clk = Abc_Clock(); Gia_IsoSimulate( p, i ); p->timeSim += Abc_Clock() - clk;
+ clk = Abc_Clock(); fRefined = Gia_IsoSort( p ); p->timeRefine += Abc_Clock() - clk;
if ( fVerbose )
- Gia_IsoPrint( p, i+1, clock() - clkTotal );
+ Gia_IsoPrint( p, i+1, Abc_Clock() - clkTotal );
fRefinedAll |= fRefined;
// if ( fRefined )
// printf( "Refinedment happened.\n" );
@@ -808,12 +808,12 @@ Vec_Ptr_t * Gia_IsoDeriveEquivPos( Gia_Man_t * pGia, int fForward, int fVerbose
}
if ( fVerbose )
- Gia_IsoPrint( p, i+2, clock() - clkTotal );
+ Gia_IsoPrint( p, i+2, Abc_Clock() - clkTotal );
}
// Gia_IsoPrintClasses( p );
if ( fVerbose )
{
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
p->timeOther = p->timeTotal - p->timeStart - p->timeSim - p->timeRefine;
ABC_PRTP( "Start ", p->timeStart, p->timeTotal );
ABC_PRTP( "Simulate ", p->timeSim, p->timeTotal );
@@ -1080,7 +1080,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
Vec_Str_t * vStr, * vStr2;
int i, k, s, sStart, iPo, Counter;
int nClasses, nUsedPos;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( pvPosEquivs )
*pvPosEquivs = NULL;
if ( pvPiPerms )
@@ -1113,7 +1113,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
nClasses = Vec_IntCountNonTrivial( vEquivs, &nUsedPos );
printf( "Reduced %d outputs to %d candidate classes (%d outputs are in %d non-trivial classes). ",
Gia_ManPoNum(p), Vec_PtrSize(vEquivs), nUsedPos, nClasses );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fEstimate )
{
Vec_VecFree( (Vec_Vec_t *)vEquivs );
@@ -1212,7 +1212,7 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
Gia_ManPoNum(p), Vec_PtrSize(vEquivs), nUsedPos, nClasses );
else
printf( "Reduced %d dual outputs to %d dual outputs. ", Gia_ManPoNum(p)/2, Gia_ManPoNum(pPart)/2 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fVerbose )
{
printf( "Nontrivial classes:\n" );
@@ -1241,10 +1241,10 @@ Gia_Man_t * Gia_ManIsoReduce( Gia_Man_t * pInit, Vec_Ptr_t ** pvPosEquivs, Vec_P
void Gia_IsoTestOld( Gia_Man_t * p, int fVerbose )
{
Vec_Ptr_t * vEquivs;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vEquivs = Gia_IsoDeriveEquivPos( p, 0, fVerbose );
printf( "Reduced %d outputs to %d. ", Gia_ManPoNum(p), vEquivs ? Vec_PtrSize(vEquivs) : 1 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fVerbose && vEquivs && Gia_ManPoNum(p) != Vec_PtrSize(vEquivs) )
{
printf( "Nontrivial classes:\n" );
diff --git a/src/aig/gia/giaIso2.c b/src/aig/gia/giaIso2.c
index 17b3ec40..79e0bb10 100644
--- a/src/aig/gia/giaIso2.c
+++ b/src/aig/gia/giaIso2.c
@@ -89,12 +89,12 @@ struct Gia_Iso2Man_t_
Vec_Int_t * vMap1; // isomorphism map
// statistics
int nIters;
- clock_t timeStart;
- clock_t timeSim;
- clock_t timeRefine;
- clock_t timeSort;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeStart;
+ abctime timeSim;
+ abctime timeRefine;
+ abctime timeSort;
+ abctime timeOther;
+ abctime timeTotal;
};
////////////////////////////////////////////////////////////////////////
@@ -245,7 +245,7 @@ void Gia_Iso2ManStop( Gia_Iso2Man_t * p )
Vec_IntFree( p->vVec1 );
ABC_FREE( p );
}
-void Gia_Iso2ManPrint( Gia_Iso2Man_t * p, clock_t Time, int fVerbose )
+void Gia_Iso2ManPrint( Gia_Iso2Man_t * p, abctime Time, int fVerbose )
{
if ( !fVerbose )
return;
@@ -611,25 +611,25 @@ Vec_Wec_t * Gia_Iso2ManCheckIsoClasses( Gia_Man_t * p, Vec_Wec_t * vEquivs )
Vec_Wec_t * Gia_Iso2ManPerform( Gia_Man_t * pGia, int fVerbose )
{
Gia_Iso2Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Gia_Iso2ManStart( pGia );
Gia_Iso2ManPrepare( pGia );
Gia_Iso2ManPropagate( pGia );
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
while ( Gia_Iso2ManUniqify( p ) )
{
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
Gia_Iso2ManPropagate( pGia );
}
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
/*
Gia_Iso2ManUpdate( p, 20 );
while ( Gia_Iso2ManUniqify( p ) )
{
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
Gia_Iso2ManPropagate( pGia );
}
- Gia_Iso2ManPrint( p, clock() - clk, fVerbose );
+ Gia_Iso2ManPrint( p, Abc_Clock() - clk, fVerbose );
*/
Gia_Iso2ManStop( p );
return Gia_Iso2ManDerivePoClasses( pGia );
@@ -652,13 +652,13 @@ Gia_Man_t * Gia_ManIsoReduce2( Gia_Man_t * pGia, Vec_Ptr_t ** pvPosEquivs, Vec_P
Vec_Wec_t * vEquivs, * vEquivs2;
Vec_Int_t * vRemains;
int nClasses, nUsedPos;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vEquivs = Gia_Iso2ManPerform( pGia, fVeryVerbose );
// report class stats
nClasses = Vec_WecCountNonTrivial( vEquivs, &nUsedPos );
printf( "Reduced %d outputs to %d candidate classes (%d outputs are in %d non-trivial classes). ",
Gia_ManPoNum(pGia), Vec_WecSize(vEquivs), nUsedPos, nClasses );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fEstimate )
{
Vec_WecFree( vEquivs );
@@ -677,7 +677,7 @@ Gia_Man_t * Gia_ManIsoReduce2( Gia_Man_t * pGia, Vec_Ptr_t ** pvPosEquivs, Vec_P
nClasses = Vec_WecCountNonTrivial( vEquivs, &nUsedPos );
printf( "Reduced %d outputs to %d equivalence classes (%d outputs are in %d non-trivial classes). ",
Gia_ManPoNum(pGia), Vec_WecSize(vEquivs), nUsedPos, nClasses );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fVerbose )
{
printf( "Nontrivial classes:\n" );
diff --git a/src/aig/gia/giaRetime.c b/src/aig/gia/giaRetime.c
index 3f68c0d1..c229adae 100644
--- a/src/aig/gia/giaRetime.c
+++ b/src/aig/gia/giaRetime.c
@@ -268,27 +268,27 @@ Gia_Man_t * Gia_ManRetimeForward( Gia_Man_t * p, int nMaxIters, int fVerbose )
{
Gia_Man_t * pNew, * pTemp;
int i, nRegFixed, nRegMoves = 1;
- clock_t clk;
+ abctime clk;
pNew = p;
for ( i = 0; i < nMaxIters && nRegMoves > 0; i++ )
{
- clk = clock();
+ clk = Abc_Clock();
pNew = Gia_ManRetimeForwardOne( pTemp = pNew, &nRegFixed, &nRegMoves );
if ( fVerbose )
{
printf( "%2d : And = %6d. Reg = %5d. Unret = %5d. Move = %6d. ",
i + 1, Gia_ManAndNum(pTemp), Gia_ManRegNum(pTemp), nRegFixed, nRegMoves );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( pTemp != p )
Gia_ManStop( pTemp );
}
/*
- clk = clock();
+ clk = Abc_Clock();
pNew = Gia_ManReduceLaches( pNew, fVerbose );
if ( fVerbose )
{
- ABC_PRT( "Register sharing time", clock() - clk );
+ ABC_PRT( "Register sharing time", Abc_Clock() - clk );
}
*/
return pNew;
diff --git a/src/aig/gia/giaShrink.c b/src/aig/gia/giaShrink.c
index 65fed129..af727726 100644
--- a/src/aig/gia/giaShrink.c
+++ b/src/aig/gia/giaShrink.c
@@ -53,7 +53,7 @@ Gia_Man_t * Gia_ManMapShrink4( Gia_Man_t * p, int fKeepLevel, int fVerbose )
Gia_Obj_t * pObj, * pFanin;
unsigned * pTruth;
int i, k, iFan;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// int ClassCounts[222] = {0};
int * pLutClass, Counter = 0;
assert( p->pMapping != NULL );
@@ -139,7 +139,7 @@ Gia_Man_t * Gia_ManMapShrink4( Gia_Man_t * p, int fKeepLevel, int fVerbose )
if ( fVerbose )
{
printf( "Total gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pNew) );
- ABC_PRT( "Total runtime", clock() - clk );
+ ABC_PRT( "Total runtime", Abc_Clock() - clk );
}
ABC_FREE( pLutClass );
return pNew;
diff --git a/src/aig/gia/giaShrink6.c b/src/aig/gia/giaShrink6.c
index e7873d91..5ca95fd3 100644
--- a/src/aig/gia/giaShrink6.c
+++ b/src/aig/gia/giaShrink6.c
@@ -402,8 +402,8 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in
word uTruth, uTruth0, uTruth1;
int i, k, nDivs, iNode;
int RetValue, Counter1 = 0, Counter2 = 0;
- clock_t clk2, clk = clock();
- clock_t timeFanout = 0;
+ abctime clk2, clk = Abc_Clock();
+ abctime timeFanout = 0;
assert( p->pMapping != NULL );
pMan = Shr_ManAlloc( p );
Gia_ManFillValue( p );
@@ -446,10 +446,10 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in
Vec_IntWriteEntry( pMan->vLeaves, k, Abc_Lit2Var(pFanin->Value) );
}
// compute divisors
- clk2 = clock();
+ clk2 = Abc_Clock();
nDivs = Shr_ManCollectDivisors( pMan, pMan->vLeaves, pMan->nDivMax, nFanoutMax );
assert( nDivs <= pMan->nDivMax );
- timeFanout += clock() - clk2;
+ timeFanout += Abc_Clock() - clk2;
// compute truth tables
Shr_ManComputeTruths( pMan->pNew, Vec_IntSize(pMan->vLeaves), pMan->vDivs, pMan->vDivTruths, pMan->vTruths );
// perform resubstitution
@@ -474,7 +474,7 @@ Gia_Man_t * Gia_ManMapShrink6( Gia_Man_t * p, int nFanoutMax, int fKeepLevel, in
{
printf( "Performed %d resubs and %d decomps. ", Counter1, Counter2 );
printf( "Gain in AIG nodes = %d. ", Gia_ManObjNum(p)-Gia_ManObjNum(pMan->pNew) );
- ABC_PRT( "Runtime", clock() - clk );
+ ABC_PRT( "Runtime", Abc_Clock() - clk );
// ABC_PRT( "Divisors", timeFanout );
}
return Shr_ManFree( pMan );
diff --git a/src/aig/gia/giaSim.c b/src/aig/gia/giaSim.c
index 52ffd6e1..4871f17d 100644
--- a/src/aig/gia/giaSim.c
+++ b/src/aig/gia/giaSim.c
@@ -109,7 +109,7 @@ Vec_Int_t * Gia_ManSimDeriveResets( Gia_Man_t * pGia )
int i, k, Lit, Count;
int Counter0 = 0, Counter1 = 0;
int CounterPi0 = 0, CounterPi1 = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// create reset counters for each literal
vCountLits = Vec_IntStart( 2 * Gia_ManObjNum(pGia) );
@@ -155,7 +155,7 @@ Vec_Int_t * Gia_ManSimDeriveResets( Gia_Man_t * pGia )
Vec_IntFree( vCountLits );
printf( "Logic0 = %d (%d). Logic1 = %d (%d). ", Counter0, CounterPi0, Counter1, CounterPi1 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return vResult;
}
@@ -609,9 +609,9 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
{
extern int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars );
Gia_ManSim_t * p;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int i, iOut, iPat, RetValue = 0;
- clock_t nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ abctime nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
if ( pAig->pReprs && pAig->pNexts )
return Gia_ManSimSimulateEquiv( pAig, pPars );
ABC_FREE( pAig->pCexSeq );
@@ -624,7 +624,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
if ( pPars->fVerbose )
{
Abc_Print( 1, "Frame %4d out of %4d and timeout %3d sec. ", i+1, pPars->nIters, pPars->TimeLimit );
- Abc_Print( 1, "Time = %7.2f sec\r", (1.0*clock()-clkTotal)/CLOCKS_PER_SEC );
+ Abc_Print( 1, "Time = %7.2f sec\r", (1.0*Abc_Clock()-clkTotal)/CLOCKS_PER_SEC );
}
if ( pPars->fCheckMiter && Gia_ManCheckPos( p, &iOut, &iPat ) )
{
@@ -648,7 +648,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
RetValue = 1;
break;
}
- if ( clock() > nTimeToStop )
+ if ( Abc_Clock() > nTimeToStop )
{
i++;
break;
@@ -659,7 +659,7 @@ int Gia_ManSimSimulate( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
Gia_ManSimDelete( p );
if ( pAig->pCexSeq == NULL )
Abc_Print( 1, "No bug detected after simulating %d frames with %d words. ", i, pPars->nWords );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
return RetValue;
}
diff --git a/src/aig/gia/giaSim2.c b/src/aig/gia/giaSim2.c
index 85428769..349f8732 100644
--- a/src/aig/gia/giaSim2.c
+++ b/src/aig/gia/giaSim2.c
@@ -639,9 +639,9 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
{
Gia_Sim2_t * p;
Gia_Obj_t * pObj;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int i, RetValue = 0, iOut, iPat;
- clock_t nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ abctime nTimeToStop = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
assert( pAig->pReprs && pAig->pNexts );
ABC_FREE( pAig->pCexSeq );
p = Gia_Sim2Create( pAig, pPars );
@@ -656,7 +656,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
Abc_Print( 1, "Frame %4d out of %4d and timeout %3d sec. ", i+1, pPars->nIters, pPars->TimeLimit );
if ( pAig->pReprs && pAig->pNexts )
Abc_Print( 1, "Lits = %4d. ", Gia_ManEquivCountLitsAll(pAig) );
- Abc_Print( 1, "Time = %7.2f sec\r", (1.0*clock()-clkTotal)/CLOCKS_PER_SEC );
+ Abc_Print( 1, "Time = %7.2f sec\r", (1.0*Abc_Clock()-clkTotal)/CLOCKS_PER_SEC );
}
if ( pPars->fCheckMiter && Gia_Sim2CheckPos( p, &iOut, &iPat ) )
{
@@ -682,7 +682,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
}
if ( pAig->pReprs && pAig->pNexts )
Gia_Sim2InfoRefineEquivs( p );
- if ( clock() > nTimeToStop )
+ if ( Abc_Clock() > nTimeToStop )
{
i++;
break;
@@ -693,7 +693,7 @@ int Gia_ManSimSimulateEquiv( Gia_Man_t * pAig, Gia_ParSim_t * pPars )
Gia_Sim2Delete( p );
if ( pAig->pCexSeq == NULL )
Abc_Print( 1, "No bug detected after simulating %d frames with %d words. ", i, pPars->nWords );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
return RetValue;
}
diff --git a/src/aig/gia/giaSort.c b/src/aig/gia/giaSort.c
index 5183c441..7586be65 100644
--- a/src/aig/gia/giaSort.c
+++ b/src/aig/gia/giaSort.c
@@ -160,27 +160,27 @@ void Gia_SortTest()
{
int nSize = 100000000;
int * pArray;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
printf( "Sorting %d integers\n", nSize );
pArray = Gia_SortGetTest( nSize );
-clk = clock();
+clk = Abc_Clock();
qsort( pArray, nSize, 4, (int (*)(const void *, const void *)) num_cmp1 );
-ABC_PRT( "qsort ", clock() - clk );
+ABC_PRT( "qsort ", Abc_Clock() - clk );
Gia_SortVerifySorted( pArray, nSize );
ABC_FREE( pArray );
pArray = Gia_SortGetTest( nSize );
-clk = clock();
+clk = Abc_Clock();
minisat_sort( pArray, nSize, (int (*)(const void *, const void *)) num_cmp2 );
-ABC_PRT( "minisat", clock() - clk );
+ABC_PRT( "minisat", Abc_Clock() - clk );
Gia_SortVerifySorted( pArray, nSize );
ABC_FREE( pArray );
pArray = Gia_SortGetTest( nSize );
-clk = clock();
+clk = Abc_Clock();
minisat_sort2( pArray, nSize );
-ABC_PRT( "minisat with inlined comparison", clock() - clk );
+ABC_PRT( "minisat with inlined comparison", Abc_Clock() - clk );
Gia_SortVerifySorted( pArray, nSize );
ABC_FREE( pArray );
}
diff --git a/src/aig/gia/giaSweeper.c b/src/aig/gia/giaSweeper.c
index 5ff05a37..f1295990 100644
--- a/src/aig/gia/giaSweeper.c
+++ b/src/aig/gia/giaSweeper.c
@@ -83,13 +83,13 @@ struct Swp_Man_t_
int nSatCallsUnsat;
int nSatCallsUndec;
int nSatProofs;
- clock_t timeStart;
- clock_t timeTotal;
- clock_t timeCnf;
- clock_t timeSat;
- clock_t timeSatSat;
- clock_t timeSatUnsat;
- clock_t timeSatUndec;
+ abctime timeStart;
+ abctime timeTotal;
+ abctime timeCnf;
+ abctime timeSat;
+ abctime timeSatSat;
+ abctime timeSatUnsat;
+ abctime timeSatUndec;
};
static inline int Swp_ManObj2Lit( Swp_Man_t * p, int Id ) { return Vec_IntGetEntry( p->vId2Lit, Id ); }
@@ -134,7 +134,7 @@ static inline Swp_Man_t * Swp_ManStart( Gia_Man_t * pGia )
Swp_ManSetObj2Lit( p, 0, (Lit = Abc_Var2Lit(p->nSatVars++, 0)) );
Lit = Abc_LitNot(Lit);
sat_solver_addclause( p->pSat, &Lit, &Lit + 1 );
- p->timeStart = clock();
+ p->timeStart = Abc_Clock();
return p;
}
static inline void Swp_ManStop( Gia_Man_t * pGia )
@@ -205,7 +205,7 @@ void Gia_SweeperPrintStats( Gia_Man_t * pGia )
ABC_PRMP( "SAT solver ", nMemSat, nMemTot );
ABC_PRMP( "TOTAL ", nMemTot, nMemTot );
printf( "Runtime usage:\n" );
- p->timeTotal = clock() - p->timeStart;
+ p->timeTotal = Abc_Clock() - p->timeStart;
ABC_PRTP( "CNF construction", p->timeCnf, p->timeTotal );
ABC_PRTP( "SAT solving ", p->timeSat, p->timeTotal );
ABC_PRTP( " Sat ", p->timeSatSat, p->timeTotal );
@@ -492,7 +492,7 @@ Gia_Man_t * Gia_SweeperCleanup( Gia_Man_t * p, char * pCommLime )
Swp_ManSetObj2Lit( pSwp, 0, (iLit = Abc_Var2Lit(pSwp->nSatVars++, 0)) );
iLit = Abc_LitNot(iLit);
sat_solver_addclause( pSwp->pSat, &iLit, &iLit + 1 );
- pSwp->timeStart = clock();
+ pSwp->timeStart = Abc_Clock();
// return the result
pNew->pData = p->pData; p->pData = NULL;
Gia_ManStop( p );
@@ -673,11 +673,11 @@ static void Gia_ManCnfNodeAddToSolver( Swp_Man_t * p, int NodeId )
{
Gia_Obj_t * pNode;
int i, k, Id, Lit;
- clock_t clk;
+ abctime clk;
// quit if CNF is ready
if ( NodeId == 0 || Swp_ManObj2Lit(p, NodeId) )
return;
-clk = clock();
+clk = Abc_Clock();
// start the frontier
Vec_IntClear( p->vFront );
Gia_ManObjAddToFrontier( p, NodeId, p->vFront );
@@ -706,7 +706,7 @@ clk = clock();
}
assert( Vec_IntSize(p->vFanins) > 1 );
}
-p->timeCnf += clock() - clk;
+p->timeCnf += Abc_Clock() - clk;
}
@@ -756,7 +756,7 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 )
{
Swp_Man_t * p = (Swp_Man_t *)pGia->pData;
int iLitOld, iLitNew, iLitAig, pLitsSat[2], RetValue, RetValue1, ProbeId, i;
- clock_t clk;
+ abctime clk;
p->nSatCalls++;
assert( p->pSat != NULL );
p->vCexUser = NULL;
@@ -802,32 +802,32 @@ int Gia_SweeperCheckEquiv( Gia_Man_t * pGia, int Probe1, int Probe2 )
// set runtime limit for this call
if ( p->nTimeOut )
- sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + clock() );
+ sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() );
-clk = clock();
+clk = Abc_Clock();
RetValue1 = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump),
(ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
Vec_IntShrink( p->vCondAssump, Vec_IntSize(p->vCondAssump) - 2 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
pLitsSat[0] = Abc_LitNot( pLitsSat[0] );
RetValue = sat_solver_addclause( p->pSat, pLitsSat, pLitsSat + 2 );
assert( RetValue );
pLitsSat[0] = Abc_LitNot( pLitsSat[0] );
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
p->nSatCallsUnsat++;
}
else if ( RetValue1 == l_True )
{
p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp );
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatCallsUndec++;
return -1;
}
@@ -844,30 +844,30 @@ p->timeSatUndec += clock() - clk;
Vec_IntPush( p->vCondAssump, Abc_LitNot(pLitsSat[0]) );
Vec_IntPush( p->vCondAssump, pLitsSat[1] );
-clk = clock();
+clk = Abc_Clock();
RetValue1 = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump),
(ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
Vec_IntShrink( p->vCondAssump, Vec_IntSize(p->vCondAssump) - 2 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
pLitsSat[1] = Abc_LitNot( pLitsSat[1] );
RetValue = sat_solver_addclause( p->pSat, pLitsSat, pLitsSat + 2 );
assert( RetValue );
pLitsSat[1] = Abc_LitNot( pLitsSat[1] );
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
p->nSatCallsUnsat++;
}
else if ( RetValue1 == l_True )
{
p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp );
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatCallsUndec++;
return -1;
}
@@ -891,7 +891,7 @@ int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia )
{
Swp_Man_t * p = (Swp_Man_t *)pGia->pData;
int RetValue, ProbeId, iLitAig, i;
- clock_t clk;
+ abctime clk;
assert( p->pSat != NULL );
p->nSatCalls++;
p->vCexUser = NULL;
@@ -908,16 +908,16 @@ int Gia_SweeperCondCheckUnsat( Gia_Man_t * pGia )
// set runtime limit for this call
if ( p->nTimeOut )
- sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + clock() );
+ sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() );
-clk = clock();
+clk = Abc_Clock();
RetValue = sat_solver_solve( p->pSat, Vec_IntArray(p->vCondAssump), Vec_IntArray(p->vCondAssump) + Vec_IntSize(p->vCondAssump),
(ABC_INT64_T)p->nConfMax, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue == l_False )
{
assert( Vec_IntSize(p->vCondProbes) > 0 );
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
p->nSatCallsUnsat++;
p->nSatProofs++;
return 1;
@@ -925,13 +925,13 @@ p->timeSatUnsat += clock() - clk;
else if ( RetValue == l_True )
{
p->vCexUser = Gia_ManGetCex( p->pGia, p->vId2Lit, p->pSat, p->vCexSwp );
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatCallsUndec++;
return -1;
}
diff --git a/src/aig/gia/giaSwitch.c b/src/aig/gia/giaSwitch.c
index 8bf027a4..d5307461 100644
--- a/src/aig/gia/giaSwitch.c
+++ b/src/aig/gia/giaSwitch.c
@@ -560,11 +560,11 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars )
Vec_Int_t * vSwitching;
float * pSwitching;
int i;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
if ( pPars->fProbOne && pPars->fProbTrans )
printf( "Conflict of options: Can either compute probability of 1, or probability of switching by observing transitions.\n" );
// create manager
- clk = clock();
+ clk = Abc_Clock();
p = Gia_ManSwiCreate( pAig, pPars );
if ( pPars->fVerbose )
{
@@ -574,7 +574,7 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars )
12.0*Gia_ManObjNum(p->pAig)/(1<<20),
4.0*p->nWords*p->pAig->nFront/(1<<20),
4.0*p->nWords*(Gia_ManCiNum(p->pAig) + Gia_ManCoNum(p->pAig))/(1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// perform simulation
Gia_ManRandom( 1 );
@@ -592,7 +592,7 @@ Vec_Int_t * Gia_ManSwiSimulate( Gia_Man_t * pAig, Gia_ParSwi_t * pPars )
if ( pPars->fVerbose )
{
printf( "Simulated %d frames with %d words. ", pPars->nIters, pPars->nWords );
- ABC_PRT( "Simulation time", clock() - clkTotal );
+ ABC_PRT( "Simulation time", Abc_Clock() - clkTotal );
}
// derive the result
vSwitching = Vec_IntStart( Gia_ManObjNum(pAig) );
diff --git a/src/aig/gia/giaTest.c b/src/aig/gia/giaTest.c
index c41e5013..d662382d 100644
--- a/src/aig/gia/giaTest.c
+++ b/src/aig/gia/giaTest.c
@@ -379,7 +379,7 @@ void Mig_ManSetRefs( Mig_Man_t * p )
{
Mig_Obj_t * pObj;
int i, iFanin;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_IntFill( &p->vRefs, Mig_ManObjNum(p), 0 );
// increment references
Mig_ManForEachObj( p, pObj )
@@ -389,7 +389,7 @@ void Mig_ManSetRefs( Mig_Man_t * p )
// check that internal nodes have fanins
Mig_ManForEachNode( p, pObj )
assert( Vec_IntEntry(&p->vRefs, Mig_ObjId(pObj)) > 0 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -443,12 +443,12 @@ int Mig_ManSuppSizeTest( Mig_Man_t * p )
{
Mig_Obj_t * pObj;
int Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Mig_ManForEachObj( p, pObj )
if ( Mig_ObjIsNode(pObj) )
Counter += (Mig_ManSuppSizeOne(pObj) <= 16);
printf( "Nodes with small support %d (out of %d)\n", Counter, Mig_ManNodeNum(p) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return Counter;
}
@@ -1343,13 +1343,13 @@ finish:
void Mpm_ManPerform( Mpm_Man_t * p )
{
Mig_Obj_t * pObj;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
Mig_ManForEachCi( p->pMig, pObj, i )
Mpm_ManObj(p, pObj)->iCutList = Mpm_CutCreateUnit( p, pObj );
Mig_ManForEachNode( p->pMig, pObj )
Mpm_ManDeriveCuts( p, pObj );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
void Mpm_ManPerformTest( Mig_Man_t * pMig )
{
diff --git a/src/aig/gia/giaTruth.c b/src/aig/gia/giaTruth.c
index 3f09d480..26a380d7 100644
--- a/src/aig/gia/giaTruth.c
+++ b/src/aig/gia/giaTruth.c
@@ -223,14 +223,14 @@ void Gia_ObjComputeTruthTableTest( Gia_Man_t * p )
{
Gia_Obj_t * pObj;
unsigned * pTruth;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
Gia_ManForEachPo( p, pObj, i )
{
pTruth = (unsigned *)Gia_ObjComputeTruthTable( p, pObj );
// Extra_PrintHex( stdout, pTruth, Gia_ManPiNum(p) ); printf( "\n" );
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
diff --git a/src/aig/gia/giaTsim.c b/src/aig/gia/giaTsim.c
index 4a3d5342..7f93c542 100644
--- a/src/aig/gia/giaTsim.c
+++ b/src/aig/gia/giaTsim.c
@@ -670,10 +670,10 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose )
Gia_ManTer_t * p;
unsigned * pState, * pPrev, * pLoop;
int i, Counter;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManRegNum(pAig) > 0 );
// create manager
- clk = clock();
+ clk = Abc_Clock();
p = Gia_ManTerCreate( pAig );
if ( 0 )
{
@@ -683,7 +683,7 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose )
12.0*Gia_ManObjNum(p->pAig)/(1<<20),
4.0*Abc_BitWordNum(2 * p->pAig->nFront)/(1<<20),
4.0*Abc_BitWordNum(2 * (Gia_ManCiNum(pAig) + Gia_ManCoNum(pAig)))/(1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// perform simulation
Gia_ManTerSimInfoInit( p );
@@ -718,7 +718,7 @@ Gia_ManTer_t * Gia_ManTerSimulate( Gia_Man_t * pAig, int fVerbose )
if ( fVerbose )
{
printf( "Ternary simulation saturated after %d iterations. ", i+1 );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
return p;
}
diff --git a/src/aig/gia/giaUtil.c b/src/aig/gia/giaUtil.c
index 10bfa154..bec23f8c 100644
--- a/src/aig/gia/giaUtil.c
+++ b/src/aig/gia/giaUtil.c
@@ -1255,7 +1255,7 @@ unsigned * Gia_ManComputePoTruthTables( Gia_Man_t * p, int nBytesMax )
int nTotalNodes = 0, nRounds = 0;
Vec_Int_t * vObjs;
Gia_Obj_t * pObj;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
printf( "Var = %d. Words = %d. Truths = %d.\n", nVars, nTruthWords, nTruths );
vObjs = Vec_IntAlloc( nTruths );
@@ -1277,7 +1277,7 @@ unsigned * Gia_ManComputePoTruthTables( Gia_Man_t * p, int nBytesMax )
Vec_IntFree( vObjs );
printf( "Rounds = %d. Objects = %d. Total = %d. ", nRounds, Gia_ManObjNum(p), nTotalNodes );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return NULL;
}
@@ -1427,8 +1427,8 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi
Vec_Int_t * vOutMap;
Vec_Ptr_t * vCexes;
int i, k, nGroupCur, nGroups;
- clock_t clk, timeComm = 0;
- clock_t timeStart = clock();
+ abctime clk, timeComm = 0;
+ abctime timeStart = Abc_Clock();
// pre-conditions
assert( nGroupSize > 0 );
assert( pCommLine != NULL );
@@ -1448,9 +1448,9 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi
// set the current GIA
Abc_FrameUpdateGia( pAbc, pGroup );
// solve the group
- clk = clock();
+ clk = Abc_Clock();
Cmd_CommandExecute( pAbc, pCommLine );
- timeComm += clock() - clk;
+ timeComm += Abc_Clock() - clk;
// get the solution status
if ( nGroupSize == 1 )
{
@@ -1485,7 +1485,7 @@ Vec_Int_t * Gia_ManMultiProve( Gia_Man_t * pInit, char * pCommLine, int nGroupSi
Abc_Print( 1, "UNDEC = %6d. ", Vec_IntCountEntry(vOutMap, -1) );
Abc_Print( 1, "\n" );
Abc_PrintTime( 1, "Command time", timeComm );
- Abc_PrintTime( 1, "Total time ", clock() - timeStart );
+ Abc_PrintTime( 1, "Total time ", Abc_Clock() - timeStart );
// cleanup
Vec_IntFree( vOuts );
Gia_ManStop( p );
diff --git a/src/aig/hop/hop.h b/src/aig/hop/hop.h
index d8ce8062..7d9be165 100644
--- a/src/aig/hop/hop.h
+++ b/src/aig/hop/hop.h
@@ -106,8 +106,8 @@ struct Hop_Man_t_
Vec_Ptr_t * vPages; // memory pages used by nodes
Hop_Obj_t * pListFree; // the list of free nodes
// timing statistics
- clock_t time1;
- clock_t time2;
+ abctime time1;
+ abctime time2;
};
////////////////////////////////////////////////////////////////////////
diff --git a/src/aig/hop/hopTable.c b/src/aig/hop/hopTable.c
index 1adab015..14e87699 100644
--- a/src/aig/hop/hopTable.c
+++ b/src/aig/hop/hopTable.c
@@ -168,8 +168,8 @@ void Hop_TableResize( Hop_Man_t * p )
Hop_Obj_t * pEntry, * pNext;
Hop_Obj_t ** pTableOld, ** ppPlace;
int nTableSizeOld, Counter, nEntries, i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// save the old table
pTableOld = p->pTable;
nTableSizeOld = p->nTableSize;
@@ -193,7 +193,7 @@ clk = clock();
nEntries = Hop_ManNodeNum(p);
assert( Counter == nEntries );
// printf( "Increasing the structural table size from %6d to %6d. ", nTableSizeOld, p->nTableSize );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( pTableOld );
}
diff --git a/src/aig/ivy/ivy.h b/src/aig/ivy/ivy.h
index 1cce1217..c2bbd5ab 100644
--- a/src/aig/ivy/ivy.h
+++ b/src/aig/ivy/ivy.h
@@ -125,8 +125,8 @@ struct Ivy_Man_t_
Vec_Ptr_t * vPages; // memory pages used by nodes
Ivy_Obj_t * pListFree; // the list of free nodes
// timing statistics
- clock_t time1;
- clock_t time2;
+ abctime time1;
+ abctime time2;
};
struct Ivy_FraigParams_t_
diff --git a/src/aig/ivy/ivyCut.c b/src/aig/ivy/ivyCut.c
index 19d37bb2..5b5957ed 100644
--- a/src/aig/ivy/ivyCut.c
+++ b/src/aig/ivy/ivyCut.c
@@ -969,7 +969,7 @@ void Ivy_ManTestCutsAll( Ivy_Man_t * p )
{
Ivy_Obj_t * pObj;
int i, nCutsCut, nCutsTotal, nNodeTotal, nNodeOver;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
nNodeTotal = nNodeOver = 0;
nCutsTotal = -Ivy_ManNodeNum(p);
Ivy_ManForEachObj( p, pObj, i )
@@ -983,7 +983,7 @@ void Ivy_ManTestCutsAll( Ivy_Man_t * p )
}
printf( "Total cuts = %6d. Trivial = %6d. Nodes = %6d. Satur = %6d. ",
nCutsTotal, Ivy_ManPiNum(p) + Ivy_ManNodeNum(p), nNodeTotal, nNodeOver );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/aig/ivy/ivyCutTrav.c b/src/aig/ivy/ivyCutTrav.c
index 5834a6fc..75acd260 100644
--- a/src/aig/ivy/ivyCutTrav.c
+++ b/src/aig/ivy/ivyCutTrav.c
@@ -439,7 +439,7 @@ void Ivy_ManTestCutsTravAll( Ivy_Man_t * p )
Vec_Int_t * vStore;
Vec_Vec_t * vBitCuts;
int i, nCutsCut, nCutsTotal, nNodeTotal, nNodeOver;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vNodes = Vec_PtrAlloc( 100 );
vFront = Vec_PtrAlloc( 100 );
@@ -460,7 +460,7 @@ void Ivy_ManTestCutsTravAll( Ivy_Man_t * p )
}
printf( "Total cuts = %6d. Trivial = %6d. Nodes = %6d. Satur = %6d. ",
nCutsTotal, Ivy_ManPiNum(p) + Ivy_ManNodeNum(p), nNodeTotal, nNodeOver );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
Vec_PtrFree( vNodes );
Vec_PtrFree( vFront );
diff --git a/src/aig/ivy/ivyFastMap.c b/src/aig/ivy/ivyFastMap.c
index 34d2796e..b8322b3f 100644
--- a/src/aig/ivy/ivyFastMap.c
+++ b/src/aig/ivy/ivyFastMap.c
@@ -67,7 +67,7 @@ static inline Ivy_Supp_t * Ivy_ObjSuppStart( Ivy_Man_t * pAig, Ivy_Obj_t * pObj
return pSupp;
}
-static void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, clock_t Time, char * pStr );
+static void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, abctime Time, char * pStr );
static int Ivy_FastMapDelay( Ivy_Man_t * pAig );
static int Ivy_FastMapArea( Ivy_Man_t * pAig );
static void Ivy_FastMapNode( Ivy_Man_t * pAig, Ivy_Obj_t * pObj, int nLimit );
@@ -83,7 +83,7 @@ static int Ivy_FastMapNodeRef( Ivy_Man_t * pAig, Ivy_Obj_t * pObj );
static int Ivy_FastMapNodeDeref( Ivy_Man_t * pAig, Ivy_Obj_t * pObj );
-extern clock_t s_MappingTime;
+extern abctime s_MappingTime;
extern int s_MappingMem;
@@ -107,7 +107,7 @@ void Ivy_FastMapPerform( Ivy_Man_t * pAig, int nLimit, int fRecovery, int fVerbo
Ivy_SuppMan_t * pMan;
Ivy_Obj_t * pObj;
int i, Delay, Area;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
// start the memory for supports
pMan = ABC_ALLOC( Ivy_SuppMan_t, 1 );
memset( pMan, 0, sizeof(Ivy_SuppMan_t) );
@@ -118,7 +118,7 @@ void Ivy_FastMapPerform( Ivy_Man_t * pAig, int nLimit, int fRecovery, int fVerbo
memset( pMan->pMem, 0, pMan->nObjs * pMan->nSize );
pMan->vLuts = Vec_VecAlloc( 100 );
pAig->pData = pMan;
-clk = clock();
+clk = Abc_Clock();
// set the PI mapping
Ivy_ObjSuppStart( pAig, Ivy_ManConst1(pAig) );
Ivy_ManForEachPi( pAig, pObj, i )
@@ -130,22 +130,22 @@ clk = clock();
Delay = Ivy_FastMapDelay( pAig );
Area = Ivy_FastMapArea(pAig);
if ( fVerbose )
- Ivy_FastMapPrint( pAig, Delay, Area, clock() - clk, "Delay oriented mapping: " );
+ Ivy_FastMapPrint( pAig, Delay, Area, Abc_Clock() - clk, "Delay oriented mapping: " );
// 2-1-2 (doing 2-1-2-1-2 improves 0.5%)
if ( fRecovery )
{
-clk = clock();
+clk = Abc_Clock();
Ivy_FastMapRequired( pAig, Delay, 0 );
// remap the nodes
Ivy_FastMapRecover( pAig, nLimit );
Delay = Ivy_FastMapDelay( pAig );
Area = Ivy_FastMapArea(pAig);
if ( fVerbose )
- Ivy_FastMapPrint( pAig, Delay, Area, clock() - clk, "Area recovery 2 : " );
+ Ivy_FastMapPrint( pAig, Delay, Area, Abc_Clock() - clk, "Area recovery 2 : " );
-clk = clock();
+clk = Abc_Clock();
Ivy_FastMapRequired( pAig, Delay, 0 );
// iterate through all nodes in the topological order
Ivy_ManForEachNode( pAig, pObj, i )
@@ -153,20 +153,20 @@ clk = clock();
Delay = Ivy_FastMapDelay( pAig );
Area = Ivy_FastMapArea(pAig);
if ( fVerbose )
- Ivy_FastMapPrint( pAig, Delay, Area, clock() - clk, "Area recovery 1 : " );
+ Ivy_FastMapPrint( pAig, Delay, Area, Abc_Clock() - clk, "Area recovery 1 : " );
-clk = clock();
+clk = Abc_Clock();
Ivy_FastMapRequired( pAig, Delay, 0 );
// remap the nodes
Ivy_FastMapRecover( pAig, nLimit );
Delay = Ivy_FastMapDelay( pAig );
Area = Ivy_FastMapArea(pAig);
if ( fVerbose )
- Ivy_FastMapPrint( pAig, Delay, Area, clock() - clk, "Area recovery 2 : " );
+ Ivy_FastMapPrint( pAig, Delay, Area, Abc_Clock() - clk, "Area recovery 2 : " );
}
- s_MappingTime = clock() - clkTotal;
+ s_MappingTime = Abc_Clock() - clkTotal;
s_MappingMem = pMan->nObjs * pMan->nSize;
/*
{
@@ -211,7 +211,7 @@ void Ivy_FastMapStop( Ivy_Man_t * pAig )
SeeAlso []
***********************************************************************/
-void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, clock_t Time, char * pStr )
+void Ivy_FastMapPrint( Ivy_Man_t * pAig, int Delay, int Area, abctime Time, char * pStr )
{
printf( "%s : Delay = %3d. Area = %6d. ", pStr, Delay, Area );
ABC_PRT( "Time", Time );
diff --git a/src/aig/ivy/ivyFraig.c b/src/aig/ivy/ivyFraig.c
index 776a41b3..4a1487e7 100644
--- a/src/aig/ivy/ivyFraig.c
+++ b/src/aig/ivy/ivyFraig.c
@@ -93,16 +93,16 @@ struct Ivy_FraigMan_t_
int nSatFails;
int nSatFailsReal;
// runtime
- clock_t timeSim;
- clock_t timeTrav;
- clock_t timeSat;
- clock_t timeSatUnsat;
- clock_t timeSatSat;
- clock_t timeSatFail;
- clock_t timeRef;
- clock_t timeTotal;
- clock_t time1;
- clock_t time2;
+ abctime timeSim;
+ abctime timeTrav;
+ abctime timeSat;
+ abctime timeSatUnsat;
+ abctime timeSatSat;
+ abctime timeSatFail;
+ abctime timeRef;
+ abctime timeTotal;
+ abctime time1;
+ abctime time2;
};
typedef struct Prove_ParamsStruct_t_ Prove_Params_t;
@@ -198,7 +198,7 @@ static int Ivy_FraigSetActivityFactors( Ivy_FraigMan_t * p, Ivy_Obj_t
static void Ivy_FraigAddToPatScores( Ivy_FraigMan_t * p, Ivy_Obj_t * pClass, Ivy_Obj_t * pClassNew );
static int Ivy_FraigMiterStatus( Ivy_Man_t * pMan );
static void Ivy_FraigMiterProve( Ivy_FraigMan_t * p );
-static void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, clock_t clk, int fVerbose );
+static void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, abctime clk, int fVerbose );
static int * Ivy_FraigCreateModel( Ivy_FraigMan_t * p );
static int Ivy_FraigNodesAreEquivBdd( Ivy_Obj_t * pObj1, Ivy_Obj_t * pObj2 );
@@ -258,7 +258,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars )
Ivy_FraigParams_t Params, * pIvyParams = &Params;
Ivy_Man_t * pManAig, * pManTemp;
int RetValue, nIter;
- clock_t clk;//, Counter;
+ abctime clk;//, Counter;
ABC_INT64_T nSatConfs = 0, nSatInspects = 0;
// start the network and parameters
@@ -280,7 +280,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars )
// if SAT only, solve without iteration
if ( !pParams->fUseRewriting && !pParams->fUseFraiging )
{
- clk = clock();
+ clk = Abc_Clock();
pIvyParams->nBTLimitMiter = pParams->nMiteringLimitLast / Ivy_ManPoNum(pManAig);
pManAig = Ivy_FraigMiter( pManTemp = pManAig, pIvyParams ); Ivy_ManStop( pManTemp );
RetValue = Ivy_FraigMiterStatus( pManAig );
@@ -292,7 +292,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars )
if ( Ivy_ManNodeNum(pManAig) < 500 )
{
// run the first mitering
- clk = clock();
+ clk = Abc_Clock();
pIvyParams->nBTLimitMiter = pParams->nMiteringLimitStart / Ivy_ManPoNum(pManAig);
pManAig = Ivy_FraigMiter( pManTemp = pManAig, pIvyParams ); Ivy_ManStop( pManTemp );
RetValue = Ivy_FraigMiterStatus( pManAig );
@@ -320,7 +320,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars )
if ( pParams->fUseRewriting )
{ // bug in Ivy_NodeFindCutsAll() when leaves are identical!
/*
- clk = clock();
+ clk = Abc_Clock();
Counter = (int)(pParams->nRewritingLimitStart * pow(pParams->nRewritingLimitMulti,nIter));
pManAig = Ivy_ManRwsat( pManAig, 0 );
RetValue = Ivy_FraigMiterStatus( pManAig );
@@ -338,7 +338,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars )
// try fraiging followed by mitering
if ( pParams->fUseFraiging )
{
- clk = clock();
+ clk = Abc_Clock();
pIvyParams->nBTLimitNode = (int)(pParams->nFraigingLimitStart * pow(pParams->nFraigingLimitMulti,nIter));
pIvyParams->nBTLimitMiter = 1 + (int)(pParams->nMiteringLimitStart * pow(pParams->nMiteringLimitMulti,nIter)) / Ivy_ManPoNum(pManAig);
pManAig = Ivy_FraigPerform_int( pManTemp = pManAig, pIvyParams, pParams->nTotalBacktrackLimit, pParams->nTotalInspectLimit, &nSatConfs, &nSatInspects ); Ivy_ManStop( pManTemp );
@@ -368,7 +368,7 @@ int Ivy_FraigProve( Ivy_Man_t ** ppManAig, void * pPars )
printf( "Attempting SAT with conflict limit %d ...\n", pParams->nMiteringLimitLast );
fflush( stdout );
}
- clk = clock();
+ clk = Abc_Clock();
pIvyParams->nBTLimitMiter = pParams->nMiteringLimitLast / Ivy_ManPoNum(pManAig);
if ( pParams->nTotalBacktrackLimit )
s_nBTLimitGlobal = pParams->nTotalBacktrackLimit - pParams->nTotalBacktracksMade;
@@ -415,10 +415,10 @@ Ivy_Man_t * Ivy_FraigPerform_int( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pPara
{
Ivy_FraigMan_t * p;
Ivy_Man_t * pManAigNew;
- clock_t clk;
+ abctime clk;
if ( Ivy_ManNodeNum(pManAig) == 0 )
return Ivy_ManDup(pManAig);
-clk = clock();
+clk = Abc_Clock();
assert( Ivy_ManLatchNum(pManAig) == 0 );
p = Ivy_FraigStart( pManAig, pParams );
// set global limits
@@ -428,7 +428,7 @@ clk = clock();
Ivy_FraigSimulate( p );
Ivy_FraigSweep( p );
pManAigNew = p->pManFraig;
-p->timeTotal = clock() - clk;
+p->timeTotal = Abc_Clock() - clk;
if ( pnSatConfs )
*pnSatConfs = p->pSat? p->pSat->stats.conflicts : 0;
if ( pnSatInspects )
@@ -452,16 +452,16 @@ Ivy_Man_t * Ivy_FraigPerform( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pParams )
{
Ivy_FraigMan_t * p;
Ivy_Man_t * pManAigNew;
- clock_t clk;
+ abctime clk;
if ( Ivy_ManNodeNum(pManAig) == 0 )
return Ivy_ManDup(pManAig);
-clk = clock();
+clk = Abc_Clock();
assert( Ivy_ManLatchNum(pManAig) == 0 );
p = Ivy_FraigStart( pManAig, pParams );
Ivy_FraigSimulate( p );
Ivy_FraigSweep( p );
pManAigNew = p->pManFraig;
-p->timeTotal = clock() - clk;
+p->timeTotal = Abc_Clock() - clk;
Ivy_FraigStop( p );
return pManAigNew;
}
@@ -483,8 +483,8 @@ Ivy_Man_t * Ivy_FraigMiter( Ivy_Man_t * pManAig, Ivy_FraigParams_t * pParams )
Ivy_Man_t * pManAigNew;
Ivy_Obj_t * pObj;
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
assert( Ivy_ManLatchNum(pManAig) == 0 );
p = Ivy_FraigStartSimple( pManAig, pParams );
// set global limits
@@ -508,7 +508,7 @@ clk = clock();
// remove dangling nodes
Ivy_ManCleanup( p->pManFraig );
pManAigNew = p->pManFraig;
-p->timeTotal = clock() - clk;
+p->timeTotal = Abc_Clock() - clk;
//printf( "Final nodes = %6d. ", Ivy_ManNodeNum(pManAigNew) );
//ABC_PRT( "Time", p->timeTotal );
@@ -991,8 +991,8 @@ void Ivy_FraigSimulateOne( Ivy_FraigMan_t * p )
{
Ivy_Obj_t * pObj;
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
Ivy_ManForEachNode( p->pManAig, pObj, i )
{
Ivy_NodeSimulate( p, pObj );
@@ -1005,7 +1005,7 @@ clk = clock();
printf( "\n" );
*/
}
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
p->nSimRounds++;
}
@@ -1023,11 +1023,11 @@ p->nSimRounds++;
void Ivy_FraigSimulateOneSim( Ivy_FraigMan_t * p )
{
Ivy_FraigSim_t * pSims;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
for ( pSims = p->pSimStart; pSims; pSims = pSims->pNext )
Ivy_NodeSimulateSim( p, pSims );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
p->nSimRounds++;
}
@@ -1388,7 +1388,7 @@ int Ivy_FraigRefineClasses( Ivy_FraigMan_t * p )
{
Ivy_Obj_t * pClass, * pClass2;
int RetValue, Counter = 0;
- clock_t clk;
+ abctime clk;
// check if some outputs already became non-constant
// this is a special case when computation can be stopped!!!
if ( p->pParams->fProve )
@@ -1396,7 +1396,7 @@ int Ivy_FraigRefineClasses( Ivy_FraigMan_t * p )
if ( p->pManFraig->pData )
return 0;
// refine the classed
-clk = clock();
+clk = Abc_Clock();
Ivy_FraigForEachEquivClassSafe( p->lClasses.pHead, pClass, pClass2 )
{
if ( pClass->fMarkA )
@@ -1406,9 +1406,9 @@ clk = clock();
//if ( Ivy_ObjIsConst1(pClass) )
//printf( "%d ", RetValue );
//if ( Ivy_ObjIsConst1(pClass) )
-// p->time1 += clock() - clk;
+// p->time1 += Abc_Clock() - clk;
}
-p->timeRef += clock() - clk;
+p->timeRef += Abc_Clock() - clk;
return Counter;
}
@@ -1793,12 +1793,12 @@ void Ivy_FraigResimulate( Ivy_FraigMan_t * p )
SeeAlso []
***********************************************************************/
-void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, clock_t clk, int fVerbose )
+void Ivy_FraigMiterPrint( Ivy_Man_t * pNtk, char * pString, abctime clk, int fVerbose )
{
if ( !fVerbose )
return;
printf( "Nodes = %7d. Levels = %4d. ", Ivy_ManNodeNum(pNtk), Ivy_ManLevels(pNtk) );
- ABC_PRT( pString, clock() - clk );
+ ABC_PRT( pString, Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -1881,13 +1881,13 @@ void Ivy_FraigMiterProve( Ivy_FraigMan_t * p )
{
Ivy_Obj_t * pObj, * pObjNew;
int i, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int fVerbose = 0;
Ivy_ManForEachPo( p->pManAig, pObj, i )
{
if ( i && fVerbose )
{
- ABC_PRT( "Time", clock() -clk );
+ ABC_PRT( "Time", Abc_Clock() -clk );
}
pObjNew = Ivy_ObjChild0Equiv(pObj);
// check if the output is constant 1
@@ -1950,7 +1950,7 @@ void Ivy_FraigMiterProve( Ivy_FraigMan_t * p )
}
if ( fVerbose )
{
- ABC_PRT( "Time", clock() -clk );
+ ABC_PRT( "Time", Abc_Clock() -clk );
}
}
@@ -2099,7 +2099,7 @@ void Ivy_FraigPrintActivity( Ivy_FraigMan_t * p )
int Ivy_FraigNodesAreEquiv( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pNew )
{
int pLits[4], RetValue, RetValue1, nBTLimit;
- clock_t clk; //, clk2 = clock();
+ abctime clk; //, clk2 = Abc_Clock();
// make sure the nodes are not complemented
assert( !Ivy_IsComplement(pNew) );
@@ -2141,17 +2141,17 @@ int Ivy_FraigNodesAreEquiv( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pN
// solve under assumptions
// A = 1; B = 0 OR A = 1; B = 1
-clk = clock();
+clk = Abc_Clock();
pLits[0] = toLitCond( Ivy_ObjSatNum(pOld), 0 );
pLits[1] = toLitCond( Ivy_ObjSatNum(pNew), pOld->fPhase == pNew->fPhase );
//Sat_SolverWriteDimacs( p->pSat, "temp.cnf", pLits, pLits + 2, 1 );
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0,
p->nBTLimitGlobal, p->nInsLimitGlobal );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -2161,14 +2161,14 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
Ivy_FraigSavePattern( p );
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatFail += clock() - clk;
+p->timeSatFail += Abc_Clock() - clk;
/*
if ( nBTLimit > 1000 )
{
@@ -2194,16 +2194,16 @@ p->timeSatFail += clock() - clk;
// solve under assumptions
// A = 0; B = 1 OR A = 0; B = 0
-clk = clock();
+clk = Abc_Clock();
pLits[0] = toLitCond( Ivy_ObjSatNum(pOld), 1 );
pLits[1] = toLitCond( Ivy_ObjSatNum(pNew), pOld->fPhase ^ pNew->fPhase );
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0,
p->nBTLimitGlobal, p->nInsLimitGlobal );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -2212,14 +2212,14 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
Ivy_FraigSavePattern( p );
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatFail += clock() - clk;
+p->timeSatFail += Abc_Clock() - clk;
/*
if ( nBTLimit > 1000 )
{
@@ -2238,12 +2238,12 @@ p->timeSatFail += clock() - clk;
// check BDD proof
{
int RetVal;
- ABC_PRT( "Sat", clock() - clk2 );
- clk2 = clock();
+ ABC_PRT( "Sat", Abc_Clock() - clk2 );
+ clk2 = Abc_Clock();
RetVal = Ivy_FraigNodesAreEquivBdd( pOld, pNew );
// printf( "%d ", RetVal );
assert( RetVal );
- ABC_PRT( "Bdd", clock() - clk2 );
+ ABC_PRT( "Bdd", Abc_Clock() - clk2 );
printf( "\n" );
}
*/
@@ -2266,7 +2266,7 @@ p->timeSatFail += clock() - clk;
int Ivy_FraigNodeIsConst( Ivy_FraigMan_t * p, Ivy_Obj_t * pNew )
{
int pLits[2], RetValue1;
- clock_t clk;
+ abctime clk;
int RetValue;
// make sure the nodes are not complemented
@@ -2293,15 +2293,15 @@ int Ivy_FraigNodeIsConst( Ivy_FraigMan_t * p, Ivy_Obj_t * pNew )
Ivy_FraigSetActivityFactors( p, NULL, pNew );
// solve under assumptions
-clk = clock();
+clk = Abc_Clock();
pLits[0] = toLitCond( Ivy_ObjSatNum(pNew), pNew->fPhase );
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 1,
(ABC_INT64_T)p->pParams->nBTLimitMiter, (ABC_INT64_T)0,
p->nBTLimitGlobal, p->nInsLimitGlobal );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 1 );
assert( RetValue );
@@ -2310,7 +2310,7 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
if ( p->pPatWords )
Ivy_FraigSavePattern( p );
p->nSatCallsSat++;
@@ -2318,7 +2318,7 @@ p->timeSatSat += clock() - clk;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatFail += clock() - clk;
+p->timeSatFail += Abc_Clock() - clk;
/*
if ( p->pParams->nBTLimitMiter > 1000 )
{
@@ -2636,9 +2636,9 @@ int Ivy_FraigSetActivityFactors_rec( Ivy_FraigMan_t * p, Ivy_Obj_t * pObj, int L
int Ivy_FraigSetActivityFactors( Ivy_FraigMan_t * p, Ivy_Obj_t * pOld, Ivy_Obj_t * pNew )
{
int LevelMin, LevelMax;
- clock_t clk;
+ abctime clk;
assert( pOld || pNew );
-clk = clock();
+clk = Abc_Clock();
// reset the active variables
veci_resize(&p->pSat->act_vars, 0);
// prepare for traversal
@@ -2653,7 +2653,7 @@ clk = clock();
if ( pNew && !Ivy_ObjIsConst1(pNew) )
Ivy_FraigSetActivityFactors_rec( p, pNew, LevelMin, LevelMax );
//Ivy_FraigPrintActivity( p );
-p->timeTrav += clock() - clk;
+p->timeTrav += Abc_Clock() - clk;
return 1;
}
diff --git a/src/aig/ivy/ivyObj.c b/src/aig/ivy/ivyObj.c
index becf69d1..2829fd38 100644
--- a/src/aig/ivy/ivyObj.c
+++ b/src/aig/ivy/ivyObj.c
@@ -354,7 +354,7 @@ void Ivy_ObjReplace( Ivy_Man_t * p, Ivy_Obj_t * pObjOld, Ivy_Obj_t * pObjNew, in
assert( !Ivy_IsComplement(pObjNew) );
if ( fUpdateLevel )
{
-//clk = clock();
+//clk = Abc_Clock();
// if the new node's arrival time is different, recursively update arrival time of the fanouts
if ( p->fFanout && !Ivy_ObjIsBuf(pObjNew) && pObjOld->Level != pObjNew->Level )
{
@@ -362,9 +362,9 @@ void Ivy_ObjReplace( Ivy_Man_t * p, Ivy_Obj_t * pObjOld, Ivy_Obj_t * pObjNew, in
pObjOld->Level = pObjNew->Level;
Ivy_ObjUpdateLevel_rec( p, pObjOld );
}
-//p->time1 += clock() - clk;
+//p->time1 += Abc_Clock() - clk;
// if the new node's required time has changed, recursively update required time of the fanins
-//clk = clock();
+//clk = Abc_Clock();
if ( p->vRequired )
{
int ReqNew = Vec_IntEntry(p->vRequired, pObjOld->Id);
@@ -374,7 +374,7 @@ void Ivy_ObjReplace( Ivy_Man_t * p, Ivy_Obj_t * pObjOld, Ivy_Obj_t * pObjNew, in
Ivy_ObjUpdateLevelR_rec( p, pObjNew, ReqNew );
}
}
-//p->time2 += clock() - clk;
+//p->time2 += Abc_Clock() - clk;
}
// delete the old object
if ( fDeleteOld )
diff --git a/src/aig/ivy/ivyResyn.c b/src/aig/ivy/ivyResyn.c
index dc483bf6..1eacbe5e 100644
--- a/src/aig/ivy/ivyResyn.c
+++ b/src/aig/ivy/ivyResyn.c
@@ -44,30 +44,30 @@ ABC_NAMESPACE_IMPL_START
***********************************************************************/
Ivy_Man_t * Ivy_ManResyn0( Ivy_Man_t * pMan, int fUpdateLevel, int fVerbose )
{
- clock_t clk;
+ abctime clk;
Ivy_Man_t * pTemp;
if ( fVerbose ) { printf( "Original:\n" ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Ivy_ManBalance( pMan, fUpdateLevel );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
// Ivy_ManRewriteAlg( pMan, fUpdateLevel, 0 );
-clk = clock();
+clk = Abc_Clock();
Ivy_ManRewritePre( pMan, fUpdateLevel, 0, 0 );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Ivy_ManBalance( pTemp = pMan, fUpdateLevel );
Ivy_ManStop( pTemp );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
return pMan;
}
@@ -85,58 +85,58 @@ if ( fVerbose ) Ivy_ManPrintStats( pMan );
***********************************************************************/
Ivy_Man_t * Ivy_ManResyn( Ivy_Man_t * pMan, int fUpdateLevel, int fVerbose )
{
- clock_t clk;
+ abctime clk;
Ivy_Man_t * pTemp;
if ( fVerbose ) { printf( "Original:\n" ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Ivy_ManBalance( pMan, fUpdateLevel );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
// Ivy_ManRewriteAlg( pMan, fUpdateLevel, 0 );
-clk = clock();
+clk = Abc_Clock();
Ivy_ManRewritePre( pMan, fUpdateLevel, 0, 0 );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Ivy_ManBalance( pTemp = pMan, fUpdateLevel );
Ivy_ManStop( pTemp );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
// Ivy_ManRewriteAlg( pMan, fUpdateLevel, 1 );
-clk = clock();
+clk = Abc_Clock();
Ivy_ManRewritePre( pMan, fUpdateLevel, 1, 0 );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Ivy_ManBalance( pTemp = pMan, fUpdateLevel );
Ivy_ManStop( pTemp );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
// Ivy_ManRewriteAlg( pMan, fUpdateLevel, 1 );
-clk = clock();
+clk = Abc_Clock();
Ivy_ManRewritePre( pMan, fUpdateLevel, 1, 0 );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Ivy_ManBalance( pTemp = pMan, fUpdateLevel );
Ivy_ManStop( pTemp );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
return pMan;
}
@@ -154,38 +154,38 @@ if ( fVerbose ) Ivy_ManPrintStats( pMan );
***********************************************************************/
Ivy_Man_t * Ivy_ManRwsat( Ivy_Man_t * pMan, int fVerbose )
{
- clock_t clk;
+ abctime clk;
Ivy_Man_t * pTemp;
if ( fVerbose ) { printf( "Original:\n" ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
Ivy_ManRewritePre( pMan, 0, 0, 0 );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Ivy_ManBalance( pTemp = pMan, 0 );
// pMan = Ivy_ManDup( pTemp = pMan );
Ivy_ManStop( pTemp );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
/*
-clk = clock();
+clk = Abc_Clock();
Ivy_ManRewritePre( pMan, 0, 0, 0 );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Rewrite", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Rewrite", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Ivy_ManBalance( pTemp = pMan, 0 );
Ivy_ManStop( pTemp );
if ( fVerbose ) { printf( "\n" ); }
-if ( fVerbose ) { ABC_PRT( "Balance", clock() - clk ); }
+if ( fVerbose ) { ABC_PRT( "Balance", Abc_Clock() - clk ); }
if ( fVerbose ) Ivy_ManPrintStats( pMan );
*/
return pMan;
diff --git a/src/aig/ivy/ivyRwr.c b/src/aig/ivy/ivyRwr.c
index 2e3689c1..a4bfe54b 100644
--- a/src/aig/ivy/ivyRwr.c
+++ b/src/aig/ivy/ivyRwr.c
@@ -57,7 +57,7 @@ int Ivy_ManRewritePre( Ivy_Man_t * p, int fUpdateLevel, int fUseZeroCost, int fV
Rwt_Man_t * pManRwt;
Ivy_Obj_t * pNode;
int i, nNodes, nGain;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
// start the rewriting manager
pManRwt = Rwt_ManStart( 0 );
p->pData = pManRwt;
@@ -105,14 +105,14 @@ int Ivy_ManRewritePre( Ivy_Man_t * p, int fUpdateLevel, int fUseZeroCost, int fV
}
*/
// complement the FF if needed
-clk = clock();
+clk = Abc_Clock();
if ( fCompl ) Dec_GraphComplement( pGraph );
Ivy_GraphUpdateNetwork( p, pNode, pGraph, fUpdateLevel, nGain );
if ( fCompl ) Dec_GraphComplement( pGraph );
-Rwt_ManAddTimeUpdate( pManRwt, clock() - clk );
+Rwt_ManAddTimeUpdate( pManRwt, Abc_Clock() - clk );
}
}
-Rwt_ManAddTimeTotal( pManRwt, clock() - clkStart );
+Rwt_ManAddTimeTotal( pManRwt, Abc_Clock() - clkStart );
// print stats
if ( fVerbose )
Rwt_ManPrintStats( pManRwt );
@@ -164,18 +164,18 @@ int Ivy_NodeRewrite( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pNode, int fUp
int Required, nNodesSaved;
int nNodesSaveCur = -1; // Suppress "might be used uninitialized"
int i, c, GainCur, GainBest = -1;
- clock_t clk, clk2;
+ abctime clk, clk2;
p->nNodesConsidered++;
// get the required times
Required = fUpdateLevel? Vec_IntEntry( pMan->vRequired, pNode->Id ) : 1000000;
// get the node's cuts
-clk = clock();
+clk = Abc_Clock();
pStore = Ivy_NodeFindCutsAll( pMan, pNode, 5 );
-p->timeCut += clock() - clk;
+p->timeCut += Abc_Clock() - clk;
// go through the cuts
-clk = clock();
+clk = Abc_Clock();
for ( c = 1; c < pStore->nCuts; c++ )
{
pCut = pStore->pCuts + c;
@@ -193,9 +193,9 @@ clk = clock();
}
p->nCutsGood++;
// get the fanin permutation
-clk2 = clock();
+clk2 = Abc_Clock();
uTruth = 0xFFFF & Ivy_NodeGetTruth( pNode, pCut->pArray, pCut->nSize ); // truth table
-p->timeTruth += clock() - clk2;
+p->timeTruth += Abc_Clock() - clk2;
pPerm = p->pPerms4[ (int) p->pPerms[uTruth] ];
uPhase = p->pPhases[uTruth];
// collect fanins with the corresponding permutation/phase
@@ -208,7 +208,7 @@ p->timeTruth += clock() - clk2;
pFanin = Ivy_NotCond(pFanin, ((uPhase & (1<<i)) > 0) );
Vec_PtrWriteEntry( p->vFaninsCur, i, pFanin );
}
-clk2 = clock();
+clk2 = Abc_Clock();
/*
printf( "Considering: (" );
Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i )
@@ -224,12 +224,12 @@ clk2 = clock();
// unmark the fanin boundary
Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i )
Ivy_ObjRefsDec( Ivy_Regular(pFanin) );
-p->timeMffc += clock() - clk2;
+p->timeMffc += Abc_Clock() - clk2;
// evaluate the cut
-clk2 = clock();
+clk2 = Abc_Clock();
pGraph = Rwt_CutEvaluate( pMan, p, pNode, p->vFaninsCur, nNodesSaved, Required, &GainCur, uTruth );
-p->timeEval += clock() - clk2;
+p->timeEval += Abc_Clock() - clk2;
// check if the cut is better than the current best one
if ( pGraph != NULL && GainBest < GainCur )
@@ -246,7 +246,7 @@ p->timeEval += clock() - clk2;
Vec_PtrPush( p->vFanins, pFanin );
}
}
-p->timeRes += clock() - clk;
+p->timeRes += Abc_Clock() - clk;
if ( GainBest == -1 )
return -1;
diff --git a/src/aig/ivy/ivySeq.c b/src/aig/ivy/ivySeq.c
index c905fa62..c231dea6 100644
--- a/src/aig/ivy/ivySeq.c
+++ b/src/aig/ivy/ivySeq.c
@@ -65,7 +65,7 @@ int Ivy_ManRewriteSeq( Ivy_Man_t * p, int fUseZeroCost, int fVerbose )
Rwt_Man_t * pManRwt;
Ivy_Obj_t * pNode;
int i, nNodes, nGain;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
// set the DC latch values
Ivy_ManForEachLatch( p, pNode, i )
@@ -99,14 +99,14 @@ int Ivy_ManRewriteSeq( Ivy_Man_t * p, int fUseZeroCost, int fVerbose )
Dec_Graph_t * pGraph = (Dec_Graph_t *)Rwt_ManReadDecs(pManRwt);
int fCompl = Rwt_ManReadCompl(pManRwt);
// complement the FF if needed
-clk = clock();
+clk = Abc_Clock();
if ( fCompl ) Dec_GraphComplement( pGraph );
Ivy_GraphUpdateNetworkSeq( p, pNode, pGraph, nGain );
if ( fCompl ) Dec_GraphComplement( pGraph );
-Rwt_ManAddTimeUpdate( pManRwt, clock() - clk );
+Rwt_ManAddTimeUpdate( pManRwt, Abc_Clock() - clk );
}
}
-Rwt_ManAddTimeTotal( pManRwt, clock() - clkStart );
+Rwt_ManAddTimeTotal( pManRwt, Abc_Clock() - clkStart );
// print stats
if ( fVerbose )
Rwt_ManPrintStats( pManRwt );
@@ -157,16 +157,16 @@ int Ivy_NodeRewriteSeq( Ivy_Man_t * pMan, Rwt_Man_t * p, Ivy_Obj_t * pNode, int
int nNodesSaved;
int nNodesSaveCur = -1; // Suppress "might be used uninitialized"
int i, c, GainCur, GainBest = -1;
- clock_t clk, clk2;//, clk3;
+ abctime clk, clk2;//, clk3;
p->nNodesConsidered++;
// get the node's cuts
-clk = clock();
+clk = Abc_Clock();
pStore = Ivy_CutComputeForNode( pMan, pNode, 5 );
-p->timeCut += clock() - clk;
+p->timeCut += Abc_Clock() - clk;
// go through the cuts
-clk = clock();
+clk = Abc_Clock();
vFanout = Vec_PtrAlloc( 100 );
for ( c = 1; c < pStore->nCuts; c++ )
{
@@ -185,9 +185,9 @@ clk = clock();
}
p->nCutsGood++;
// get the fanin permutation
-clk2 = clock();
+clk2 = Abc_Clock();
uTruth = 0xFFFF & Ivy_CutGetTruth( pMan, pNode, pCut->pArray, pCut->nSize ); // truth table
-p->timeTruth += clock() - clk2;
+p->timeTruth += Abc_Clock() - clk2;
pPerm = p->pPerms4[ (int)p->pPerms[uTruth] ];
uPhase = p->pPhases[uTruth];
// collect fanins with the corresponding permutation/phase
@@ -200,7 +200,7 @@ p->timeTruth += clock() - clk2;
pFanin = Ivy_NotCond(pFanin, ((uPhase & (1<<i)) > 0) );
Vec_PtrWriteEntry( p->vFaninsCur, i, pFanin );
}
-clk2 = clock();
+clk2 = Abc_Clock();
// mark the fanin boundary
Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i )
Ivy_ObjRefsInc( Ivy_Regular(pFanin) );
@@ -213,12 +213,12 @@ clk2 = clock();
// unmark the fanin boundary
Vec_PtrForEachEntry( Ivy_Obj_t *, p->vFaninsCur, pFanin, i )
Ivy_ObjRefsDec( Ivy_Regular(pFanin) );
-p->timeMffc += clock() - clk2;
+p->timeMffc += Abc_Clock() - clk2;
// evaluate the cut
-clk2 = clock();
+clk2 = Abc_Clock();
pGraph = Rwt_CutEvaluateSeq( pMan, p, pNode, pCut, pPerm, p->vFaninsCur, nNodesSaved, &GainCur, uTruth );
-p->timeEval += clock() - clk2;
+p->timeEval += Abc_Clock() - clk2;
// check if the cut is better than the current best one
@@ -239,7 +239,7 @@ p->timeEval += clock() - clk2;
}
}
Vec_PtrFree( vFanout );
-p->timeRes += clock() - clk;
+p->timeRes += Abc_Clock() - clk;
if ( GainBest == -1 )
return -1;
@@ -253,9 +253,9 @@ p->timeRes += clock() - clk;
}
*/
-//clk3 = clock();
+//clk3 = Abc_Clock();
//nNewClauses = Ivy_CutTruthPrint( pMan, p->pCut, uTruth );
-//timeInv += clock() - clk;
+//timeInv += Abc_Clock() - clk;
// nClauses += nNewClauses;
// nMoves++;
@@ -1110,7 +1110,7 @@ void Ivy_CutComputeAll( Ivy_Man_t * p, int nInputs )
Ivy_Store_t * pStore;
Ivy_Obj_t * pObj;
int i, nCutsTotal, nCutsTotalM, nNodeTotal, nNodeOver;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( nInputs > IVY_CUT_INPUT )
{
printf( "Cannot compute cuts for more than %d inputs.\n", IVY_CUT_INPUT );
@@ -1130,7 +1130,7 @@ void Ivy_CutComputeAll( Ivy_Man_t * p, int nInputs )
}
printf( "All = %6d. Minus = %6d. Triv = %6d. Node = %6d. Satur = %6d. ",
nCutsTotal, nCutsTotalM, Ivy_ManPiNum(p) + Ivy_ManNodeNum(p), nNodeTotal, nNodeOver );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/aig/ivy/ivyTable.c b/src/aig/ivy/ivyTable.c
index d2753aa8..7d8590d8 100644
--- a/src/aig/ivy/ivyTable.c
+++ b/src/aig/ivy/ivyTable.c
@@ -207,8 +207,8 @@ void Ivy_TableResize( Ivy_Man_t * p )
{
int * pTableOld, * pPlace;
int nTableSizeOld, Counter, nEntries, e;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// save the old table
pTableOld = p->pTable;
nTableSizeOld = p->nTableSize;
@@ -231,7 +231,7 @@ clk = clock();
nEntries = Ivy_ManHashObjNum(p);
// assert( Counter == nEntries );
// printf( "Increasing the structural table size from %6d to %6d. ", nTableSizeOld, p->nTableSize );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( pTableOld );
}
diff --git a/src/aig/saig/saigConstr2.c b/src/aig/saig/saigConstr2.c
index 7213bdff..8ab5df51 100644
--- a/src/aig/saig/saigConstr2.c
+++ b/src/aig/saig/saigConstr2.c
@@ -60,7 +60,7 @@ int Ssw_ManProfileConstraints( Aig_Man_t * p, int nWords, int nFrames, int fVerb
Aig_Obj_t * pObj, * pObjLi;
unsigned * pInfo, * pInfo0, * pInfo1, * pInfoMask, * pInfoMask2;
int i, w, f, RetValue = 1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( fVerbose )
printf( "Simulating %d nodes and %d flops for %d frames with %d words... ",
Aig_ManNodeNum(p), Aig_ManRegNum(p), nFrames, nWords );
@@ -196,7 +196,7 @@ int Ssw_ManProfileConstraints( Aig_Man_t * p, int nWords, int nFrames, int fVerb
}
}
if ( fVerbose )
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
// print the state
if ( fVerbose )
{
diff --git a/src/aig/saig/saigInd.c b/src/aig/saig/saigInd.c
index f9cccae8..114db997 100644
--- a/src/aig/saig/saigInd.c
+++ b/src/aig/saig/saigInd.c
@@ -152,7 +152,7 @@ int Saig_ManInduction( Aig_Man_t * p, int nFramesMax, int nConfMax, int fUnique,
Aig_Obj_t * pObjPi, * pObjPiCopy, * pObjPo;
int i, k, f, Lits[2], status = -1, RetValue, nSatVarNum, nConfPrev;
int nOldSize, iReg, iLast, fAdded, nConstrs = 0, nClauses = 0;
- clock_t clk;
+ abctime clk;
assert( fUnique == 0 || fUniqueAll == 0 );
assert( Saig_ManPoNum(p) == 1 );
Aig_ManSetCioIds( p );
@@ -180,7 +180,7 @@ int Saig_ManInduction( Aig_Man_t * p, int nFramesMax, int nConfMax, int fUnique,
Aig_ManStop( pAigPart );
Cnf_DataFree( pCnfPart );
}
- clk = clock();
+ clk = Abc_Clock();
// get the bottom
Aig_SupportNodes( p, (Aig_Obj_t **)Vec_PtrArray(vTop), Vec_PtrSize(vTop), vBot );
// derive AIG for the part between top and bottom
@@ -289,7 +289,7 @@ nextrun:
printf( "%4d : PI =%5d. PO =%5d. AIG =%5d. Var =%7d. Clau =%7d. Conf =%7d. ",
f, Aig_ManCiNum(pAigPart), Aig_ManCoNum(pAigPart), Aig_ManNodeNum(pAigPart),
nSatVarNum, nClauses, (int)pSat->stats.conflicts-nConfPrev );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( status == l_Undef )
break;
diff --git a/src/aig/saig/saigIso.c b/src/aig/saig/saigIso.c
index 14a488ad..1f931eae 100644
--- a/src/aig/saig/saigIso.c
+++ b/src/aig/saig/saigIso.c
@@ -427,8 +427,8 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
Vec_Int_t * vLevel, * vRemain;
Vec_Str_t * vStr, * vPrev;
int i, nPos;
- clock_t clk = clock();
- clock_t clkDup = 0, clkAig = 0, clkIso = 0, clk2;
+ abctime clk = Abc_Clock();
+ abctime clkDup = 0, clkAig = 0, clkIso = 0, clk2;
*pvPosEquivs = NULL;
// derive AIG for each PO
@@ -439,17 +439,17 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
if ( i % 100 == 0 )
printf( "%6d finished...\r", i );
- clk2 = clock();
+ clk2 = Abc_Clock();
pPart = Saig_ManDupCones( pAig, &i, 1 );
- clkDup += clock() - clk2;
+ clkDup += Abc_Clock() - clk2;
- clk2 = clock();
+ clk2 = Abc_Clock();
pTemp = Saig_ManDupIsoCanonical( pPart, 0 );
- clkIso += clock() - clk2;
+ clkIso += Abc_Clock() - clk2;
- clk2 = clock();
+ clk2 = Abc_Clock();
vStr = Ioa_WriteAigerIntoMemoryStr( pTemp );
- clkAig += clock() - clk2;
+ clkAig += Abc_Clock() - clk2;
Vec_PtrPush( vBuffers, vStr );
Aig_ManStop( pTemp );
@@ -466,11 +466,11 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
}
// sort the infos
- clk = clock();
+ clk = Abc_Clock();
Vec_PtrSort( vBuffers, (int (*)(void))Iso_StoCompareVecStr );
// create classes
- clk = clock();
+ clk = Abc_Clock();
vClasses = Vec_PtrAlloc( Saig_ManPoNum(pAig) );
// start the first class
Vec_PtrPush( vClasses, (vLevel = Vec_IntAlloc(4)) );
@@ -488,7 +488,7 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
Vec_VecFree( (Vec_Vec_t *)vBuffers );
if ( fVerbose )
- Abc_PrintTime( 1, "Sorting time", clock() - clk );
+ Abc_PrintTime( 1, "Sorting time", Abc_Clock() - clk );
// Abc_PrintTime( 1, "Traversal time", time_Trav );
// report the results
@@ -540,10 +540,10 @@ Aig_Man_t * Iso_ManFilterPos( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fV
Aig_Man_t * Iso_ManTest( Aig_Man_t * pAig, int fVerbose )
{
Vec_Int_t * vPerm;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vPerm = Saig_ManFindIsoPerm( pAig, fVerbose );
Vec_IntFree( vPerm );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return NULL;
}
@@ -561,10 +561,10 @@ Aig_Man_t * Iso_ManTest( Aig_Man_t * pAig, int fVerbose )
Aig_Man_t * Saig_ManIsoReduce( Aig_Man_t * pAig, Vec_Ptr_t ** pvPosEquivs, int fVerbose )
{
Aig_Man_t * pPart;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pPart = Iso_ManFilterPos( pAig, pvPosEquivs, fVerbose );
printf( "Reduced %d outputs to %d outputs. ", Saig_ManPoNum(pAig), Saig_ManPoNum(pPart) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( fVerbose && *pvPosEquivs && Saig_ManPoNum(pAig) != Vec_PtrSize(*pvPosEquivs) )
{
printf( "Nontrivial classes:\n" );
diff --git a/src/aig/saig/saigIsoFast.c b/src/aig/saig/saigIsoFast.c
index 08718fa8..6378e4db 100644
--- a/src/aig/saig/saigIsoFast.c
+++ b/src/aig/saig/saigIsoFast.c
@@ -160,7 +160,7 @@ void Iso_StoCollectInfo_rec( Aig_Man_t * p, Aig_Obj_t * pObj, int fCompl, Vec_In
Vec_IntPush( vVisited, Aig_ObjId(pObj) );
}
-//static clock_t time_Trav = 0;
+//static abctime time_Trav = 0;
/**Function*************************************************************
@@ -181,7 +181,7 @@ Vec_Int_t * Iso_StoCollectInfo( Iso_Sto_t * p, Aig_Obj_t * pPo )
Aig_Man_t * pAig = p->pAig;
Aig_Obj_t * pObj;
int i, Value, Entry, * pPerm;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
assert( Aig_ObjIsCo(pPo) );
@@ -194,7 +194,7 @@ Vec_Int_t * Iso_StoCollectInfo( Iso_Sto_t * p, Aig_Obj_t * pPo )
Vec_PtrForEachEntry( Aig_Obj_t *, p->vRoots, pObj, i )
if ( !Aig_ObjIsConst1(Aig_ObjFanin0(pObj)) )
Iso_StoCollectInfo_rec( pAig, Aig_ObjFanin0(pObj), Aig_ObjFaninC0(pObj), p->vVisited, p->pData, p->vRoots );
-// time_Trav += clock() - clk;
+// time_Trav += Abc_Clock() - clk;
// count how many times each data entry appears
Vec_IntClear( p->vPlaces );
@@ -287,7 +287,7 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig )
Vec_Ptr_t * vClasses, * vInfos;
Vec_Int_t * vInfo, * vPrev, * vLevel;
int i, Number, nUnique = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect infos and remember their number
pMan = Iso_StoStart( pAig );
@@ -299,14 +299,14 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig )
Vec_PtrPush( vInfos, vInfo );
}
Iso_StoStop( pMan );
- Abc_PrintTime( 1, "Info computation time", clock() - clk );
+ Abc_PrintTime( 1, "Info computation time", Abc_Clock() - clk );
// sort the infos
- clk = clock();
+ clk = Abc_Clock();
Vec_PtrSort( vInfos, (int (*)(void))Iso_StoCompareVecInt );
// create classes
- clk = clock();
+ clk = Abc_Clock();
vClasses = Vec_PtrAlloc( Saig_ManPoNum(pAig) );
// start the first class
Vec_PtrPush( vClasses, (vLevel = Vec_IntAlloc(4)) );
@@ -323,7 +323,7 @@ Vec_Vec_t * Saig_IsoDetectFast( Aig_Man_t * pAig )
vPrev = vInfo;
}
Vec_VecFree( (Vec_Vec_t *)vInfos );
- Abc_PrintTime( 1, "Sorting time", clock() - clk );
+ Abc_PrintTime( 1, "Sorting time", Abc_Clock() - clk );
// Abc_PrintTime( 1, "Traversal time", time_Trav );
// report the results
diff --git a/src/aig/saig/saigIsoSlow.c b/src/aig/saig/saigIsoSlow.c
index 25cd68f0..58dc6596 100644
--- a/src/aig/saig/saigIsoSlow.c
+++ b/src/aig/saig/saigIsoSlow.c
@@ -290,11 +290,11 @@ struct Iso_Man_t_
Vec_Ptr_t * vClasses; // other classes
Vec_Ptr_t * vTemp1; // other classes
Vec_Ptr_t * vTemp2; // other classes
- clock_t timeHash;
- clock_t timeFout;
- clock_t timeSort;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeHash;
+ abctime timeFout;
+ abctime timeSort;
+ abctime timeOther;
+ abctime timeTotal;
};
static inline Iso_Obj_t * Iso_ManObj( Iso_Man_t * p, int i ) { assert( i >= 0 && i < p->nObjs ); return i ? p->pObjs + i : NULL; }
@@ -557,7 +557,7 @@ void Iso_ManCollectClasses( Iso_Man_t * p )
{
Iso_Obj_t * pIso;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_PtrClear( p->vSingles );
Vec_PtrClear( p->vClasses );
for ( i = 0; i < p->nBins; i++ )
@@ -571,10 +571,10 @@ void Iso_ManCollectClasses( Iso_Man_t * p )
Vec_PtrPush( p->vSingles, pIso );
}
}
- clk = clock();
+ clk = Abc_Clock();
Vec_PtrSort( p->vSingles, (int (*)(void))Iso_ObjCompare );
Vec_PtrSort( p->vClasses, (int (*)(void))Iso_ObjCompare );
- p->timeSort += clock() - clk;
+ p->timeSort += Abc_Clock() - clk;
assert( Vec_PtrSize(p->vSingles) == p->nSingles );
assert( Vec_PtrSize(p->vClasses) == p->nClasses );
// assign IDs to singletons
@@ -1172,20 +1172,20 @@ Vec_Int_t * Saig_ManFindIsoPerm( Aig_Man_t * pAig, int fVerbose )
int fVeryVerbose = 0;
Vec_Int_t * vRes;
Iso_Man_t * p;
- clock_t clk = clock(), clk2 = clock();
+ abctime clk = Abc_Clock(), clk2 = Abc_Clock();
p = Iso_ManCreate( pAig );
- p->timeFout += clock() - clk;
+ p->timeFout += Abc_Clock() - clk;
Iso_ManPrintClasses( p, fVerbose, fVeryVerbose );
while ( p->nClasses )
{
// assign adjacency to classes
- clk = clock();
+ clk = Abc_Clock();
Iso_ManAssignAdjacency( p );
- p->timeFout += clock() - clk;
+ p->timeFout += Abc_Clock() - clk;
// rehash the class nodes
- clk = clock();
+ clk = Abc_Clock();
Iso_ManRehashClassNodes( p );
- p->timeHash += clock() - clk;
+ p->timeHash += Abc_Clock() - clk;
Iso_ManPrintClasses( p, fVerbose, fVeryVerbose );
// force refinement
while ( p->nSingles == 0 && p->nClasses )
@@ -1194,17 +1194,17 @@ Vec_Int_t * Saig_ManFindIsoPerm( Aig_Man_t * pAig, int fVerbose )
// assign IDs to the topmost level of classes
Iso_ManBreakTies( p, fVerbose );
// assign adjacency to classes
- clk = clock();
+ clk = Abc_Clock();
Iso_ManAssignAdjacency( p );
- p->timeFout += clock() - clk;
+ p->timeFout += Abc_Clock() - clk;
// rehash the class nodes
- clk = clock();
+ clk = Abc_Clock();
Iso_ManRehashClassNodes( p );
- p->timeHash += clock() - clk;
+ p->timeHash += Abc_Clock() - clk;
Iso_ManPrintClasses( p, fVerbose, fVeryVerbose );
}
}
- p->timeTotal = clock() - clk2;
+ p->timeTotal = Abc_Clock() - clk2;
// printf( "IDs assigned = %d. Objects = %d.\n", p->nObjIds, 1+Aig_ManCiNum(p->pAig)+Aig_ManNodeNum(p->pAig) );
assert( p->nObjIds == 1+Aig_ManCiNum(p->pAig)+Aig_ManNodeNum(p->pAig) );
// if ( p->nClasses )
diff --git a/src/aig/saig/saigMiter.c b/src/aig/saig/saigMiter.c
index 8ebb81dd..67aed490 100644
--- a/src/aig/saig/saigMiter.c
+++ b/src/aig/saig/saigMiter.c
@@ -1077,7 +1077,7 @@ int Ssw_SecSpecial( Aig_Man_t * pPart0, Aig_Man_t * pPart1, int nFrames, int fVe
int iOut, nOuts;
Aig_Man_t * pMiterCec;
int RetValue;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
if ( fVerbose )
{
Aig_ManPrintStats( pPart0 );
@@ -1112,12 +1112,12 @@ int Ssw_SecSpecial( Aig_Man_t * pPart0, Aig_Man_t * pPart1, int nFrames, int fVe
if ( RetValue == 1 )
{
printf( "Networks are equivalent. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else if ( RetValue == 0 )
{
printf( "Networks are NOT EQUIVALENT. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
if ( pMiterCec->pData == NULL )
printf( "Counter-example is not available.\n" );
else
@@ -1140,7 +1140,7 @@ ABC_PRT( "Time", clock() - clkTotal );
else
{
printf( "Networks are UNDECIDED. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
fflush( stdout );
Aig_ManStop( pMiterCec );
diff --git a/src/aig/saig/saigRetFwd.c b/src/aig/saig/saigRetFwd.c
index 006167d5..bac2ee4a 100644
--- a/src/aig/saig/saigRetFwd.c
+++ b/src/aig/saig/saigRetFwd.c
@@ -214,26 +214,26 @@ Aig_Man_t * Saig_ManRetimeForward( Aig_Man_t * p, int nMaxIters, int fVerbose )
{
Aig_Man_t * pNew, * pTemp;
int i, nRegFixed, nRegMoves = 1;
- clock_t clk;
+ abctime clk;
pNew = p;
for ( i = 0; i < nMaxIters && nRegMoves > 0; i++ )
{
- clk = clock();
+ clk = Abc_Clock();
pNew = Saig_ManRetimeForwardOne( pTemp = pNew, &nRegFixed, &nRegMoves );
if ( fVerbose )
{
printf( "%2d : And = %6d. Reg = %5d. Unret = %5d. Move = %6d. ",
i + 1, Aig_ManNodeNum(pTemp), Aig_ManRegNum(pTemp), nRegFixed, nRegMoves );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( pTemp != p )
Aig_ManStop( pTemp );
}
- clk = clock();
+ clk = Abc_Clock();
pNew = Aig_ManReduceLaches( pNew, fVerbose );
if ( fVerbose )
{
- ABC_PRT( "Register sharing time", clock() - clk );
+ ABC_PRT( "Register sharing time", Abc_Clock() - clk );
}
return pNew;
}
diff --git a/src/aig/saig/saigSimFast.c b/src/aig/saig/saigSimFast.c
index 39456c63..fef83675 100644
--- a/src/aig/saig/saigSimFast.c
+++ b/src/aig/saig/saigSimFast.c
@@ -349,14 +349,14 @@ Vec_Int_t * Faig_ManComputeSwitchProbs4( Aig_Man_t * p, int nFrames, int nPref,
int * pProbs;
float * pSwitching;
int nFramesReal;
- clock_t clk;//, clkTotal = clock();
+ abctime clk;//, clkTotal = Abc_Clock();
if ( fProbOne )
fTrans = 0;
vSwitching = Vec_IntStart( Aig_ManObjNumMax(p) );
pSwitching = (float *)vSwitching->pArray;
-clk = clock();
+clk = Abc_Clock();
pAig = Faig_ManCreate( p );
-//ABC_PRT( "\nCreation ", clock() - clk );
+//ABC_PRT( "\nCreation ", Abc_Clock() - clk );
Aig_ManRandom( 1 );
// get the number of frames to simulate
// if the parameter "seqsimframes" is defined, use it
@@ -371,10 +371,10 @@ clk = clock();
nFramesReal = nFrames;
}
//printf( "Simulating %d frames.\n", nFramesReal );
-clk = clock();
+clk = Abc_Clock();
pProbs = Faig_ManSimulateFrames( pAig, nFramesReal, nPref, fTrans );
-//ABC_PRT( "Simulation", clock() - clk );
-clk = clock();
+//ABC_PRT( "Simulation", Abc_Clock() - clk );
+clk = Abc_Clock();
if ( fTrans )
{
Aig_Obj_t * pObj;
@@ -419,8 +419,8 @@ clk = clock();
}
ABC_FREE( pProbs );
ABC_FREE( pAig );
-//ABC_PRT( "Switch ", clock() - clk );
-//ABC_PRT( "TOTAL ", clock() - clkTotal );
+//ABC_PRT( "Switch ", Abc_Clock() - clk );
+//ABC_PRT( "TOTAL ", Abc_Clock() - clkTotal );
return vSwitching;
}
diff --git a/src/aig/saig/saigSimMv.c b/src/aig/saig/saigSimMv.c
index 71259930..3621cdd3 100644
--- a/src/aig/saig/saigSimMv.c
+++ b/src/aig/saig/saigSimMv.c
@@ -882,13 +882,13 @@ Vec_Ptr_t * Saig_MvManSimulate( Aig_Man_t * pAig, int nFramesSymb, int nFramesSa
Saig_MvMan_t * p;
Saig_MvObj_t * pEntry;
int f, i, iState;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( nFramesSymb >= 1 && nFramesSymb <= nFramesSatur );
// start manager
p = Saig_MvManStart( pAig, nFramesSatur );
if ( fVerbose )
-ABC_PRT( "Constructing the problem", clock() - clk );
+ABC_PRT( "Constructing the problem", Abc_Clock() - clk );
// initialize registers
Vec_PtrForEachEntry( Saig_MvObj_t *, p->vFlops, pEntry, i )
@@ -897,7 +897,7 @@ ABC_PRT( "Constructing the problem", clock() - clk );
if ( fVeryVerbose )
Saig_MvPrintState( 0, p );
// simulate until convergence
- clk = clock();
+ clk = Abc_Clock();
for ( f = 0; ; f++ )
{
if ( f == nFramesSatur )
@@ -937,7 +937,7 @@ ABC_PRT( "Constructing the problem", clock() - clk );
}
// printf( "Coverged after %d frames.\n", f );
if ( fVerbose )
-ABC_PRT( "Multi-valued simulation", clock() - clk );
+ABC_PRT( "Multi-valued simulation", Abc_Clock() - clk );
// implement equivalences
// Saig_MvManPostProcess( p, iState-1 );
vMap = Saig_MvManDeriveMap( p, fVerbose );
diff --git a/src/aig/saig/saigSimSeq.c b/src/aig/saig/saigSimSeq.c
index d92461c8..ba414680 100644
--- a/src/aig/saig/saigSimSeq.c
+++ b/src/aig/saig/saigSimSeq.c
@@ -456,7 +456,7 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i
Raig_Man_t * p;
Sec_MtrStatus_t Status;
int i, iPat, RetValue = 0;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Aig_ManRegNum(pAig) > 0 );
Status = Sec_MiterStatus( pAig );
if ( Status.nSat > 0 )
@@ -475,12 +475,12 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i
// iterate through objects
for ( i = 0; i < nIters; i++ )
{
- clk = clock();
+ clk = Abc_Clock();
RetValue = Raig_ManSimulateRound( p, fMiter, i==0, &iPat );
if ( fVerbose )
{
printf( "Frame %4d out of %4d and timeout %3d sec. ", i+1, nIters, TimeLimit );
- printf("Time = %7.2f sec\r", (1.0*clock()-clkTotal)/CLOCKS_PER_SEC);
+ printf("Time = %7.2f sec\r", (1.0*Abc_Clock()-clkTotal)/CLOCKS_PER_SEC);
}
if ( RetValue > 0 )
{
@@ -491,7 +491,7 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i
printf( "Miter is satisfiable after simulation (output %d).\n", iOut );
break;
}
- if ( (clock() - clk)/CLOCKS_PER_SEC >= TimeLimit )
+ if ( (Abc_Clock() - clk)/CLOCKS_PER_SEC >= TimeLimit )
{
printf( "No bug detected after %d frames with time limit %d seconds.\n", i+1, TimeLimit );
break;
@@ -503,7 +503,7 @@ int Raig_ManSimulate( Aig_Man_t * pAig, int nWords, int nIters, int TimeLimit, i
p->nMemsMax,
1.0*(p->nObjs * 16)/(1<<20),
1.0*(p->nMemsMax * 4 * (nWords+1))/(1<<20) );
- ABC_PRT( "Total time", clock() - clkTotal );
+ ABC_PRT( "Total time", Abc_Clock() - clkTotal );
}
Raig_ManDelete( p );
return RetValue > 0;
diff --git a/src/aig/saig/saigStrSim.c b/src/aig/saig/saigStrSim.c
index 72cf9bbe..6c4ffa8e 100644
--- a/src/aig/saig/saigStrSim.c
+++ b/src/aig/saig/saigStrSim.c
@@ -878,7 +878,7 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis
Aig_Man_t * pPart0, * pPart1;
Aig_Obj_t * pObj0, * pObj1;
int i, nMatches;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
Aig_ManRandom( 1 );
// consider the case when a miter is given
if ( p1 == NULL )
@@ -919,7 +919,7 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis
nMatches = 1;
for ( i = 0; nMatches > 0; i++ )
{
- clk = clock();
+ clk = Abc_Clock();
Saig_StrSimulateRound( pPart0, pPart1 );
nMatches = Saig_StrSimDetectUnique( pPart0, pPart1 );
if ( fVerbose )
@@ -930,7 +930,7 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis
i, nMatches,
nFlops, 100.0*nFlops/Aig_ManRegNum(pPart0),
nNodes, 100.0*nNodes/Aig_ManNodeNum(pPart0) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( i == 20 )
break;
@@ -963,7 +963,7 @@ Vec_Int_t * Saig_StrSimPerformMatching( Aig_Man_t * p0, Aig_Man_t * p1, int nDis
Aig_ManFanoutStop( pPart1 );
Aig_ManStop( pPart0 );
Aig_ManStop( pPart1 );
- ABC_PRT( "Total runtime", clock() - clkTotal );
+ ABC_PRT( "Total runtime", Abc_Clock() - clkTotal );
return vPairs;
}
diff --git a/src/aig/saig/saigSwitch.c b/src/aig/saig/saigSwitch.c
index 9217dd53..b18ca803 100644
--- a/src/aig/saig/saigSwitch.c
+++ b/src/aig/saig/saigSwitch.c
@@ -269,12 +269,12 @@ Vec_Int_t * Saig_ManComputeSwitchProb4s( Aig_Man_t * p, int nFrames, int nPref,
Vec_Int_t * vSwitching;
float * pSwitching;
int nFramesReal;
- clock_t clk;//, clkTotal = clock();
+ abctime clk;//, clkTotal = Abc_Clock();
vSwitching = Vec_IntStart( Aig_ManObjNumMax(p) );
pSwitching = (float *)vSwitching->pArray;
-clk = clock();
+clk = Abc_Clock();
pAig = Saig_ManCreateMan( p );
-//ABC_PRT( "\nCreation ", clock() - clk );
+//ABC_PRT( "\nCreation ", Abc_Clock() - clk );
Aig_ManRandom( 1 );
// get the number of frames to simulate
@@ -290,10 +290,10 @@ clk = clock();
nFramesReal = nFrames;
}
//printf( "Simulating %d frames.\n", nFramesReal );
-clk = clock();
+clk = Abc_Clock();
Saig_ManSimulateFrames( pAig, nFramesReal, nPref );
-//ABC_PRT( "Simulation", clock() - clk );
-clk = clock();
+//ABC_PRT( "Simulation", Abc_Clock() - clk );
+clk = Abc_Clock();
for ( pEntry = pAig; pEntry->Type != AIG_OBJ_VOID; pEntry++ )
{
/*
@@ -318,8 +318,8 @@ clk = clock();
//printf( "%3d : %7.2f\n", pEntry-pAig, pSwitching[pEntry-pAig] );
}
ABC_FREE( pAig );
-//ABC_PRT( "Switch ", clock() - clk );
-//ABC_PRT( "TOTAL ", clock() - clkTotal );
+//ABC_PRT( "Switch ", Abc_Clock() - clk );
+//ABC_PRT( "TOTAL ", Abc_Clock() - clkTotal );
// Aig_CManCreate( p );
return vSwitching;
diff --git a/src/aig/saig/saigSynch.c b/src/aig/saig/saigSynch.c
index 28c8150f..02b8ed12 100644
--- a/src/aig/saig/saigSynch.c
+++ b/src/aig/saig/saigSynch.c
@@ -505,9 +505,9 @@ Aig_Man_t * Saig_SynchSequenceApply( Aig_Man_t * pAig, int nWords, int fVerbose
Vec_Str_t * vSequence;
Vec_Ptr_t * vSimInfo;
int RetValue;
- clock_t clk;
+ abctime clk;
-clk = clock();
+clk = Abc_Clock();
// derive synchronization sequence
vSequence = Saig_SynchSequence( pAig, nWords );
if ( vSequence == NULL )
@@ -516,7 +516,7 @@ clk = clock();
printf( "Design 1: Synchronizing sequence of length %4d is found. ", Vec_StrSize(vSequence) / Saig_ManPiNum(pAig) );
if ( fVerbose )
{
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
else
printf( "\n" );
@@ -559,7 +559,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords,
Vec_Str_t * vSeq1, * vSeq2;
Vec_Ptr_t * vSimInfo;
int RetValue;
- clock_t clk;
+ abctime clk;
/*
{
unsigned u = Saig_SynchRandomTernary();
@@ -585,7 +585,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords,
}
// synchronize the first design
- clk = clock();
+ clk = Abc_Clock();
vSeq1 = Saig_SynchSequence( pAig1, nWords );
if ( vSeq1 == NULL )
printf( "Design 1: Synchronizing sequence is not found. " );
@@ -593,13 +593,13 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords,
printf( "Design 1: Synchronizing sequence of length %4d is found. ", Vec_StrSize(vSeq1) / Saig_ManPiNum(pAig1) );
if ( fVerbose )
{
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
else
printf( "\n" );
// synchronize the first design
- clk = clock();
+ clk = Abc_Clock();
vSeq2 = Saig_SynchSequence( pAig2, nWords );
if ( vSeq2 == NULL )
printf( "Design 2: Synchronizing sequence is not found. " );
@@ -607,7 +607,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords,
printf( "Design 2: Synchronizing sequence of length %4d is found. ", Vec_StrSize(vSeq2) / Saig_ManPiNum(pAig2) );
if ( fVerbose )
{
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
else
printf( "\n" );
@@ -620,7 +620,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords,
if ( vSeq2 ) Vec_StrFree( vSeq2 );
return NULL;
}
- clk = clock();
+ clk = Abc_Clock();
vSimInfo = Vec_PtrAllocSimInfo( Abc_MaxInt( Aig_ManObjNumMax(pAig1), Aig_ManObjNumMax(pAig2) ), 1 );
// process Design 1
@@ -651,7 +651,7 @@ Aig_Man_t * Saig_Synchronize( Aig_Man_t * pAig1, Aig_Man_t * pAig2, int nWords,
if ( fVerbose )
{
printf( "Miter of the synchronized designs is constructed. " );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
return pMiter;
}
diff --git a/src/aig/saig/saigTrans.c b/src/aig/saig/saigTrans.c
index 5e7b719b..217d3269 100644
--- a/src/aig/saig/saigTrans.c
+++ b/src/aig/saig/saigTrans.c
@@ -379,18 +379,18 @@ Aig_Man_t * Saig_ManTimeframeSimplify( Aig_Man_t * pAig, int nFrames, int nFrame
{
// extern Aig_Man_t * Fra_FraigEquivence( Aig_Man_t * pManAig, int nConfMax, int fProve );
Aig_Man_t * pFrames, * pFraig, * pRes1, * pRes2;
- clock_t clk;
+ abctime clk;
// create uninitialized timeframes with map1
pFrames = Saig_ManFramesNonInitial( pAig, nFrames );
// perform fraiging for the unrolled timeframes
-clk = clock();
+clk = Abc_Clock();
pFraig = Fra_FraigEquivence( pFrames, 1000, 0 );
// report the results
if ( fVerbose )
{
Aig_ManPrintStats( pFrames );
Aig_ManPrintStats( pFraig );
-ABC_PRT( "Fraiging", clock() - clk );
+ABC_PRT( "Fraiging", Abc_Clock() - clk );
}
Aig_ManStop( pFraig );
assert( pFrames->pReprs != NULL );
@@ -399,14 +399,14 @@ ABC_PRT( "Fraiging", clock() - clk );
Aig_ManStop( pFrames );
Saig_ManStopMap1( pAig );
// create reduced initialized timeframes
-clk = clock();
+clk = Abc_Clock();
pRes2 = Saig_ManFramesInitialMapped( pAig, nFrames, nFramesMax, fInit );
-ABC_PRT( "Mapped", clock() - clk );
+ABC_PRT( "Mapped", Abc_Clock() - clk );
// free mapping
Saig_ManStopMap2( pAig );
-clk = clock();
+clk = Abc_Clock();
pRes1 = Saig_ManFramesInitialMapped( pAig, nFrames, nFramesMax, fInit );
-ABC_PRT( "Normal", clock() - clk );
+ABC_PRT( "Normal", Abc_Clock() - clk );
// report the results
if ( fVerbose )
{
diff --git a/src/base/abc/abcAig.c b/src/base/abc/abcAig.c
index 5fc3ffd3..7bd44932 100644
--- a/src/base/abc/abcAig.c
+++ b/src/base/abc/abcAig.c
@@ -584,10 +584,10 @@ void Abc_AigResize( Abc_Aig_t * pMan )
Abc_Obj_t ** pBinsNew;
Abc_Obj_t * pEnt, * pEnt2;
int nBinsNew, Counter, i;
- clock_t clk;
+ abctime clk;
unsigned Key;
-clk = clock();
+clk = Abc_Clock();
// get the new table size
nBinsNew = Abc_PrimeCudd( 3 * pMan->nBins );
// allocate a new array
@@ -605,7 +605,7 @@ clk = clock();
}
assert( Counter == pMan->nEntries );
// printf( "Increasing the structural table size from %6d to %6d. ", pMan->nBins, nBinsNew );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( pMan->pBins );
pMan->pBins = pBinsNew;
diff --git a/src/base/abc/abcCheck.c b/src/base/abc/abcCheck.c
index 6dc06f19..99fcae4a 100644
--- a/src/base/abc/abcCheck.c
+++ b/src/base/abc/abcCheck.c
@@ -188,13 +188,13 @@ int Abc_NtkDoCheck( Abc_Ntk_t * pNtk )
return 0;
// finally, check for combinational loops
-// clk = clock();
+// clk = Abc_Clock();
if ( !Abc_NtkIsAcyclic( pNtk ) )
{
fprintf( stdout, "NetworkCheck: Network contains a combinational loop.\n" );
return 0;
}
-// ABC_PRT( "Acyclic ", clock() - clk );
+// ABC_PRT( "Acyclic ", Abc_Clock() - clk );
// check the EXDC network if present
if ( pNtk->pExdc )
diff --git a/src/base/abc/abcDfs.c b/src/base/abc/abcDfs.c
index a96263c1..8b168a9a 100644
--- a/src/base/abc/abcDfs.c
+++ b/src/base/abc/abcDfs.c
@@ -836,12 +836,12 @@ int Abc_NtkSuppSizeTest( Abc_Ntk_t * p )
{
Abc_Obj_t * pObj;
int i, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Abc_NtkForEachObj( p, pObj, i )
if ( Abc_ObjIsNode(pObj) )
Counter += (Abc_ObjSuppSize(pObj) <= 16);
printf( "Nodes with small support %d (out of %d)\n", Counter, Abc_NtkNodeNum(p) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return Counter;
}
diff --git a/src/base/abc/abcHieCec.c b/src/base/abc/abcHieCec.c
index ed4594cd..44958287 100644
--- a/src/base/abc/abcHieCec.c
+++ b/src/base/abc/abcHieCec.c
@@ -670,7 +670,7 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
Abc_Ntk_t * pNtk, * pModel;
Gia_Man_t * pGia;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// read hierarchical netlist
pNtk = Io_ReadBlifMv( pFileName, 0, fCheck );
@@ -685,16 +685,16 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
// Abc_NtkDelete( pNtk );
// return NULL;
}
- Abc_PrintTime( 1, "Reading file", clock() - clk );
+ Abc_PrintTime( 1, "Reading file", Abc_Clock() - clk );
assert( Abc_NtkIsNetlist(pNtk) );
assert( !Abc_NtkLatchNum(pNtk) );
/*
if ( pNtk->pDesign != NULL )
{
- clk = clock();
+ clk = Abc_Clock();
Abc_NtkCountNodes( pNtk );
- Abc_PrintTime( 1, "Count nodes", clock() - clk );
+ Abc_PrintTime( 1, "Count nodes", Abc_Clock() - clk );
}
*/
// print stats
@@ -716,14 +716,14 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
if ( fUseNew )
{
- clk = clock();
+ clk = Abc_Clock();
vOrder = Abc_NtkCollectHie( pNtk );
- Abc_PrintTime( 1, "Collect DFS ", clock() - clk );
+ Abc_PrintTime( 1, "Collect DFS ", Abc_Clock() - clk );
// derive GIA
- clk = clock();
+ clk = Abc_Clock();
pGia = Abc_NtkDeriveFlatGia2( pNtk, vOrder );
- Abc_PrintTime( 1, "Deriving GIA", clock() - clk );
+ Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk );
Gia_ManPrintStats( pGia, 0, 0, 0 );
// Gia_ManStop( pGia );
@@ -737,9 +737,9 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
pModel->pData = Abc_NtkDfsBoxes( pModel );
// derive GIA
- clk = clock();
+ clk = Abc_Clock();
pGia = Abc_NtkDeriveFlatGia( pNtk );
- Abc_PrintTime( 1, "Deriving GIA", clock() - clk );
+ Abc_PrintTime( 1, "Deriving GIA", Abc_Clock() - clk );
Gia_ManPrintStats( pGia, 0, 0, 0 );
// clean nodes/boxes of all nodes
@@ -747,9 +747,9 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
Vec_PtrFree( (Vec_Ptr_t *)pModel->pData );
}
- clk = clock();
+ clk = Abc_Clock();
Abc_NtkCountInst( pNtk );
- Abc_PrintTime( 1, "Gather stats", clock() - clk );
+ Abc_PrintTime( 1, "Gather stats", Abc_Clock() - clk );
Abc_NtkDelete( pNtk );
return pGia;
diff --git a/src/base/abc/abcHieNew.c b/src/base/abc/abcHieNew.c
index afea09c3..3e370431 100644
--- a/src/base/abc/abcHieNew.c
+++ b/src/base/abc/abcHieNew.c
@@ -493,7 +493,7 @@ void Au_ManCountThings( Au_Man_t * p )
{
Au_Ntk_t * pNtk, * pBoxModel;
Au_Obj_t * pBox;
- int i, k;//, clk = clock();
+ int i, k;//, clk = Abc_Clock();
Au_ManForEachNtkReverse( p, pNtk, i )
{
pNtk->nBoxes = Au_NtkBoxNum(pNtk);
@@ -533,7 +533,7 @@ void Au_ManCountThings( Au_Man_t * p )
printf( "Total ANDs = %15.0f.\n", pNtk->nNodeAnds );
printf( "Total XORs = %15.0f.\n", pNtk->nNodeXors );
printf( "Total MUXes = %15.0f.\n", pNtk->nNodeMuxs );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
int Au_NtkCompareNames( Au_Ntk_t ** p1, Au_Ntk_t ** p2 )
@@ -1494,24 +1494,24 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot )
Abc_Ntk_t * pMod;
Au_Man_t * pMan;
Au_Ntk_t * pNtk = NULL;
- clock_t clk1, clk2 = 0, clk3 = 0, clk = clock();
+ abctime clk1, clk2 = 0, clk3 = 0, clk = Abc_Clock();
int i;
- clk1 = clock();
+ clk1 = Abc_Clock();
pMan = Au_ManAlloc( pRoot->pDesign ? pRoot->pDesign->pName : pRoot->pName );
pMan->pFuncs = Abc_NamStart( 100, 16 );
- clk2 += clock() - clk1;
+ clk2 += Abc_Clock() - clk1;
vModels = Abc_NtkCollectHie( pRoot );
Vec_PtrForEachEntry( Abc_Ntk_t *, vModels, pMod, i )
{
vOrder = Abc_NtkDfsBoxes( pMod );
- clk1 = clock();
+ clk1 = Abc_Clock();
pNtk = Au_NtkDerive( pMan, pMod, vOrder );
pMod->iStep = pNtk->Id;
pMod->pData = pNtk;
- clk2 += clock() - clk1;
+ clk2 += Abc_Clock() - clk1;
Vec_PtrFree( vOrder );
}
@@ -1536,21 +1536,21 @@ Gia_Man_t * Au_ManDeriveTest( Abc_Ntk_t * pRoot )
// if ( !Abc_NtkCheckRecursive(pRoot) )
{
- clk1 = clock();
+ clk1 = Abc_Clock();
pGia = Au_NtkDeriveFlatGia( pNtk );
- clk3 = clock() - clk1;
+ clk3 = Abc_Clock() - clk1;
// printf( "GIA objects max = %d.\n", pMan->nGiaObjMax );
}
-// clk1 = clock();
+// clk1 = Abc_Clock();
// Au_NtkSuppSizeTest( (Au_Ntk_t *)pRoot->pData );
-// clk4 = clock() - clk1;
+// clk4 = Abc_Clock() - clk1;
- clk1 = clock();
+ clk1 = Abc_Clock();
Au_ManDelete( pMan );
- clk2 += clock() - clk1;
+ clk2 += Abc_Clock() - clk1;
- Abc_PrintTime( 1, "Time all ", clock() - clk );
+ Abc_PrintTime( 1, "Time all ", Abc_Clock() - clk );
Abc_PrintTime( 1, "Time new ", clk2 );
Abc_PrintTime( 1, "Time GIA ", clk3 );
// Abc_PrintTime( 1, "Time supp", clk4 );
@@ -1573,7 +1573,7 @@ Gia_Man_t * Abc_NtkHieCecTest2( char * pFileName, char * pModelName, int fVerbos
int fSimulation = 0;
Gia_Man_t * pGia = NULL;
Au_Ntk_t * pNtk, * pNtkClp = NULL;
- clock_t clk1 = 0, clk = clock();
+ abctime clk1 = 0, clk = Abc_Clock();
// read hierarchical netlist
pNtk = Au_NtkParseCBlif( pFileName );
@@ -1588,7 +1588,7 @@ Gia_Man_t * Abc_NtkHieCecTest2( char * pFileName, char * pModelName, int fVerbos
Au_NtkFree( pNtk );
return NULL;
}
- Abc_PrintTime( 1, "Reading file", clock() - clk );
+ Abc_PrintTime( 1, "Reading file", Abc_Clock() - clk );
if ( fVerbose )
{
@@ -1608,21 +1608,21 @@ Gia_Man_t * Abc_NtkHieCecTest2( char * pFileName, char * pModelName, int fVerbos
Au_NtkCheckRecursive( pNtkClp );
// collapse
- clk1 = clock();
+ clk1 = Abc_Clock();
if ( fSimulation )
{
Au_NtkTerSimulate( pNtkClp );
- Abc_PrintTime( 1, "Time sim ", clock() - clk1 );
+ Abc_PrintTime( 1, "Time sim ", Abc_Clock() - clk1 );
}
else
{
pGia = Au_NtkDeriveFlatGia( pNtkClp );
- Abc_PrintTime( 1, "Time GIA ", clock() - clk1 );
+ Abc_PrintTime( 1, "Time GIA ", Abc_Clock() - clk1 );
}
// delete
Au_ManDelete( pNtk->pMan );
- Abc_PrintTime( 1, "Time all ", clock() - clk );
+ Abc_PrintTime( 1, "Time all ", Abc_Clock() - clk );
return pGia;
}
diff --git a/src/base/abc/abcUtil.c b/src/base/abc/abcUtil.c
index 8909a15d..20b18c4f 100644
--- a/src/base/abc/abcUtil.c
+++ b/src/base/abc/abcUtil.c
@@ -2543,7 +2543,7 @@ void Abc_NtkReverseTopoOrderTest( Abc_Ntk_t * p )
Vec_Int_t * vVisited;
Abc_Obj_t * pObj;
int i;//, k, iBeg, iEnd;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Abc_NtkReverseTopoOrder( p );
/*
printf( "Reverse topological order for nodes:\n" );
@@ -2558,9 +2558,9 @@ void Abc_NtkReverseTopoOrderTest( Abc_Ntk_t * p )
}
*/
Vec_IntFreeP( &p->vTopo );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// compute regular fanout orders
- clk = clock();
+ clk = Abc_Clock();
vVisited = Vec_IntAlloc( 1000 );
Abc_NtkForEachNode( p, pObj, i )
{
@@ -2569,7 +2569,7 @@ void Abc_NtkReverseTopoOrderTest( Abc_Ntk_t * p )
Abc_NtkReverse_rec( pObj, vVisited );
}
Vec_IntFree( vVisited );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index d5bcb48f..e02ee525 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -11692,7 +11692,7 @@ int Abc_CommandIProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Prove_Params_t Params, * pParams = &Params;
Abc_Ntk_t * pNtk, * pNtkTemp;
int c, RetValue, iOut = -1;
- clock_t clk;
+ abctime clk;
extern int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars );
@@ -11802,7 +11802,7 @@ int Abc_CommandIProve( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1;
}
- clk = clock();
+ clk = Abc_Clock();
if ( Abc_NtkIsStrash(pNtk) )
pNtkTemp = Abc_NtkDup( pNtk );
@@ -11836,7 +11836,7 @@ int Abc_CommandIProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// replace the current network
Abc_FrameReplaceCurrentNetwork( pAbc, pNtkTemp );
// update counter example
@@ -20308,7 +20308,7 @@ int Abc_CommandSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int fVerbose;
int nConfLimit;
int nInsLimit;
- clock_t clk;
+ abctime clk;
// set defaults
fVerbose = 0;
nConfLimit = 0;
@@ -20361,7 +20361,7 @@ int Abc_CommandSat( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
}
- clk = clock();
+ clk = Abc_Clock();
if ( Abc_NtkIsStrash(pNtk) )
{
RetValue = Abc_NtkMiterSat( pNtk, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, fVerbose, NULL, NULL );
@@ -20401,7 +20401,7 @@ int Abc_CommandSat( Abc_Frame_t * pAbc, int argc, char ** argv )
else
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 0;
usage:
@@ -20441,7 +20441,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int nLearnedDelta;
int nLearnedPerce;
int nInsLimit;
- clock_t clk;
+ abctime clk;
extern int Abc_NtkDSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int nLearnedStart, int nLearnedDelta, int nLearnedPerce, int fAlignPol, int fAndOuts, int fNewSolver, int fVerbose );
// set defaults
@@ -20556,7 +20556,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
}
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkDSat( pNtk, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, nLearnedStart, nLearnedDelta, nLearnedPerce, fAlignPol, fAndOuts, fNewSolver, fVerbose );
// verify that the pattern is correct
if ( RetValue == 0 && Abc_NtkPoNum(pNtk) == 1 )
@@ -20575,7 +20575,7 @@ int Abc_CommandDSat( Abc_Frame_t * pAbc, int argc, char ** argv )
else
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 0;
usage:
@@ -20618,7 +20618,7 @@ int Abc_CommandPSat( Abc_Frame_t * pAbc, int argc, char ** argv )
int fAlignPol;
int fSynthesize;
int fVerbose;
- clock_t clk;
+ abctime clk;
extern int Abc_NtkPartitionedSat( Abc_Ntk_t * pNtk, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose );
// set defaults
@@ -20699,7 +20699,7 @@ int Abc_CommandPSat( Abc_Frame_t * pAbc, int argc, char ** argv )
return 0;
}
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkPartitionedSat( pNtk, nAlgo, nPartSize, nConfPart, nConfTotal, fAlignPol, fSynthesize, fVerbose );
// verify that the pattern is correct
if ( RetValue == 0 && Abc_NtkPoNum(pNtk) == 1 )
@@ -20729,7 +20729,7 @@ int Abc_CommandPSat( Abc_Frame_t * pAbc, int argc, char ** argv )
else
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 0;
usage:
@@ -20770,7 +20770,7 @@ int Abc_CommandProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Ntk_t * pNtk, * pNtkTemp;
Prove_Params_t Params, * pParams = &Params;
int c, RetValue;
- clock_t clk;
+ abctime clk;
pNtk = Abc_FrameReadNtk(pAbc);
// set defaults
@@ -20880,7 +20880,7 @@ int Abc_CommandProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "Currently can only solve the miter with one output.\n" );
return 0;
}
- clk = clock();
+ clk = Abc_Clock();
if ( Abc_NtkIsStrash(pNtk) )
pNtkTemp = Abc_NtkDup( pNtk );
@@ -20906,7 +20906,7 @@ int Abc_CommandProve( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( 1, "UNSATISFIABLE " );
//Abc_Print( -1, "\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// replace the current network
Abc_FrameReplaceCurrentNetwork( pAbc, pNtkTemp );
return 0;
diff --git a/src/base/abci/abcAuto.c b/src/base/abci/abcAuto.c
index 3d723b1c..390442fe 100644
--- a/src/base/abci/abcAuto.c
+++ b/src/base/abci/abcAuto.c
@@ -128,14 +128,14 @@ void Abc_NtkAutoPrintAll( DdManager * dd, int nInputs, DdNode * pbOutputs[], int
int nAutoSymsMaxSupp;
int nAutoSymOuts;
int nSuppSizeMax;
- clock_t clk;
+ abctime clk;
nAutoSymOuts = 0;
nAutoSyms = 0;
nAutoSymsMax = 0;
nAutoSymsMaxSupp = 0;
nSuppSizeMax = 0;
- clk = clock();
+ clk = Abc_Clock();
SigCounter = 0;
for ( o = 0; o < nOutputs; o++ )
@@ -196,7 +196,7 @@ void Abc_NtkAutoPrintAll( DdManager * dd, int nInputs, DdNode * pbOutputs[], int
printf( "SumK=%3d ", nAutoSyms );
printf( "KMax=%2d ", nAutoSymsMax );
printf( "Supp=%3d ", nAutoSymsMaxSupp );
- printf( "Time=%4.2f ", (float)(clock() - clk)/(float)(CLOCKS_PER_SEC) );
+ printf( "Time=%4.2f ", (float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC) );
printf( "\n" );
}
diff --git a/src/base/abci/abcBidec.c b/src/base/abci/abcBidec.c
index 22564195..c1d5270c 100644
--- a/src/base/abci/abcBidec.c
+++ b/src/base/abci/abcBidec.c
@@ -114,7 +114,7 @@ void Abc_NtkBidecResyn( Abc_Ntk_t * pNtk, int fVerbose )
Abc_Obj_t * pObj;
Vec_Int_t * vTruth;
int i, nGainTotal = 0, nNodes1, nNodes2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsLogic(pNtk) );
if ( !Abc_NtkToAig(pNtk) )
return;
@@ -142,7 +142,7 @@ void Abc_NtkBidecResyn( Abc_Ntk_t * pNtk, int fVerbose )
if ( fVerbose )
{
printf( "Total gain in AIG nodes = %d. ", nGainTotal );
- ABC_PRT( "Total runtime", clock() - clk );
+ ABC_PRT( "Total runtime", Abc_Clock() - clk );
}
}
diff --git a/src/base/abci/abcBm.c b/src/base/abci/abcBm.c
index 741c6a9e..e39ccf03 100644
--- a/src/base/abci/abcBm.c
+++ b/src/base/abci/abcBm.c
@@ -871,7 +871,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
static sat_solver * pSat = NULL;
lbool status;
int RetValue;
- clock_t clk;
+ abctime clk;
extern int Abc_NodeAddClausesTop( sat_solver * pSat, Abc_Obj_t * pNode, Vec_Int_t * vVars );
extern Vec_Int_t * Abc_NtkGetCiSatVarNums( Abc_Ntk_t * pNtk );
@@ -887,7 +887,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
// fprintf( stdout, "Warning: The miter has %d outputs. SAT will try to prove all of them.\n", Abc_NtkPoNum(pNtk) );
// load clauses into the sat_solver
- clk = clock();
+ clk = Abc_Clock();
@@ -900,13 +900,13 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
//return 1;
// printf( "Created SAT problem with %d variable and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
-// PRT( "Time", clock() - clk );
+// PRT( "Time", Abc_Clock() - clk );
// simplify the problem
- clk = clock();
+ clk = Abc_Clock();
status = sat_solver_simplify(pSat);
// printf( "Simplified the problem to %d variables and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
-// PRT( "Time", clock() - clk );
+// PRT( "Time", Abc_Clock() - clk );
if ( status == 0 )
{
sat_solver_delete( pSat );
@@ -915,7 +915,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
}
// solve the miter
- clk = clock();
+ clk = Abc_Clock();
if ( fVerbose )
pSat->verbosity = 1;
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
@@ -936,7 +936,7 @@ int Abc_NtkMiterSatBm( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nIn
}
else
assert( 0 );
-// PRT( "SAT sat_solver time", clock() - clk );
+// PRT( "SAT sat_solver time", Abc_Clock() - clk );
// printf( "The number of conflicts = %d.\n", (int)pSat->sat_solver_stats.conflicts );
// if the problem is SAT, get the counterexample
@@ -1583,7 +1583,7 @@ float refineBySAT(Abc_Ntk_t * pNtk1, Vec_Int_t ** iMatch1, int * iGroup1, Vec_In
Vec_Int_t * oMatchedGroups;
FILE *result;
int matchFound;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
float satTime = 0.0;
/*matchFile = fopen("satmatch.txt", "w");*/
@@ -1712,7 +1712,7 @@ float refineBySAT(Abc_Ntk_t * pNtk1, Vec_Int_t ** iMatch1, int * iGroup1, Vec_In
Abc_NtkDelete(subNtk2);
}
- satTime = (float)(clock() - clk)/(float)(CLOCKS_PER_SEC);
+ satTime = (float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC);
if( matchFound )
{
@@ -1788,7 +1788,7 @@ void bmGateWay( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int p_equivalence )
char * vPiValues1, * vPiValues2;
int * observability1, * observability2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
float initTime;
float simulTime;
float satTime;
@@ -1930,8 +1930,8 @@ void bmGateWay( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int p_equivalence )
printf(" done!\n");
- initTime = ((float)(clock() - clk)/(float)(CLOCKS_PER_SEC));
- clk = clock();
+ initTime = ((float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC));
+ clk = Abc_Clock();
topOrder1 = findTopologicalOrder(pNtk1);
topOrder2 = findTopologicalOrder(pNtk2);
@@ -1982,7 +1982,7 @@ void bmGateWay( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int p_equivalence )
printf(" done!\n");
- simulTime = (float)(clock() - clk)/(float)(CLOCKS_PER_SEC);
+ simulTime = (float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC);
printf("SAT-based search started ...\n");
satTime = refineBySAT(pNtk1, iMatch1, iGroup1, iDep1, &iLastItem1, oMatch1, oGroup1, oDep1, &oLastItem1, observability1,
diff --git a/src/base/abci/abcCas.c b/src/base/abci/abcCas.c
index f9fae27f..1ded2f27 100644
--- a/src/base/abci/abcCas.c
+++ b/src/base/abci/abcCas.c
@@ -61,7 +61,7 @@ Abc_Ntk_t * Abc_NtkCascade( Abc_Ntk_t * pNtk, int nLutSize, int fCheck, int fVer
char * pFileGeneric;
int fBddSizeMax = 500000;
int i, fReorder = 1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
// compute the global BDDs
@@ -72,7 +72,7 @@ Abc_Ntk_t * Abc_NtkCascade( Abc_Ntk_t * pNtk, int nLutSize, int fCheck, int fVer
{
DdManager * dd = (DdManager *)Abc_NtkGlobalBddMan( pNtk );
printf( "Shared BDD size = %6d nodes. ", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
- ABC_PRT( "BDD construction time", clock() - clk );
+ ABC_PRT( "BDD construction time", Abc_Clock() - clk );
}
// collect global BDDs
diff --git a/src/base/abci/abcCollapse.c b/src/base/abci/abcCollapse.c
index 6d3fbbce..20fe04b5 100644
--- a/src/base/abci/abcCollapse.c
+++ b/src/base/abci/abcCollapse.c
@@ -49,7 +49,7 @@ static Abc_Obj_t * Abc_NodeFromGlobalBdds( Abc_Ntk_t * pNtkNew, DdManager * dd,
Abc_Ntk_t * Abc_NtkCollapse( Abc_Ntk_t * pNtk, int fBddSizeMax, int fDualRail, int fReorder, int fVerbose )
{
Abc_Ntk_t * pNtkNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
// compute the global BDDs
@@ -59,7 +59,7 @@ Abc_Ntk_t * Abc_NtkCollapse( Abc_Ntk_t * pNtk, int fBddSizeMax, int fDualRail, i
{
DdManager * dd = (DdManager *)Abc_NtkGlobalBddMan( pNtk );
printf( "Shared BDD size = %6d nodes. ", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
- ABC_PRT( "BDD construction time", clock() - clk );
+ ABC_PRT( "BDD construction time", Abc_Clock() - clk );
}
// create the new network
diff --git a/src/base/abci/abcCut.c b/src/base/abci/abcCut.c
index bf64ce99..abf5b55a 100644
--- a/src/base/abci/abcCut.c
+++ b/src/base/abci/abcCut.c
@@ -128,7 +128,7 @@ Cut_Man_t * Abc_NtkCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
Vec_Ptr_t * vNodes;
Vec_Int_t * vChoices;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
extern void Abc_NtkBalanceAttach( Abc_Ntk_t * pNtk );
extern void Abc_NtkBalanceDetach( Abc_Ntk_t * pNtk );
@@ -201,10 +201,10 @@ Cut_Man_t * Abc_NtkCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
Vec_PtrFree( vNodes );
Vec_IntFree( vChoices );
Cut_ManPrintStats( p );
-ABC_PRT( "TOTAL", clock() - clk );
+ABC_PRT( "TOTAL", Abc_Clock() - clk );
// printf( "Area = %d.\n", Abc_NtkComputeArea( pNtk, p ) );
//Abc_NtkPrintCuts( p, pNtk, 0 );
-// Cut_ManPrintStatsToFile( p, pNtk->pSpec, clock() - clk );
+// Cut_ManPrintStatsToFile( p, pNtk->pSpec, Abc_Clock() - clk );
// temporary printout of stats
if ( nTotal )
@@ -229,7 +229,7 @@ void Abc_NtkCutsOracle( Abc_Ntk_t * pNtk, Cut_Oracle_t * p )
{
Abc_Obj_t * pObj;
Vec_Ptr_t * vNodes;
- int i; //, clk = clock();
+ int i; //, clk = Abc_Clock();
int fDrop = Cut_OracleReadDrop(p);
assert( Abc_NtkIsStrash(pNtk) );
@@ -268,7 +268,7 @@ void Abc_NtkCutsOracle( Abc_Ntk_t * pNtk, Cut_Oracle_t * p )
}
}
Vec_PtrFree( vNodes );
-//ABC_PRT( "Total", clock() - clk );
+//ABC_PRT( "Total", Abc_Clock() - clk );
//Abc_NtkPrintCuts_( p, pNtk, 0 );
}
@@ -291,7 +291,7 @@ Cut_Man_t * Abc_NtkSeqCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
Abc_Obj_t * pObj, * pNode;
int i, nIters, fStatus;
Vec_Int_t * vChoices;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsSeq(pNtk) );
assert( pParams->fSeq );
@@ -368,7 +368,7 @@ Cut_Man_t * Abc_NtkSeqCuts( Abc_Ntk_t * pNtk, Cut_Params_t * pParams )
if ( pParams->fVerbose )
{
Cut_ManPrintStats( p );
-ABC_PRT( "TOTAL ", clock() - clk );
+ABC_PRT( "TOTAL ", Abc_Clock() - clk );
printf( "Converged after %d iterations.\n", nIters );
}
//Abc_NtkPrintCuts( p, pNtk, 1 );
diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c
index c351df45..de750146 100644
--- a/src/base/abci/abcDar.c
+++ b/src/base/abci/abcDar.c
@@ -1225,7 +1225,7 @@ Abc_Ntk_t * Abc_NtkDRewrite( Abc_Ntk_t * pNtk, Dar_RwrPar_t * pPars )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@@ -1243,10 +1243,10 @@ Abc_Ntk_t * Abc_NtkDRewrite( Abc_Ntk_t * pNtk, Dar_RwrPar_t * pPars )
// pMan = Dar_ManBalance( pTemp = pMan, pPars->fUpdateLevel );
// Aig_ManStop( pTemp );
-clk = clock();
+clk = Abc_Clock();
pMan = Aig_ManDupDfs( pTemp = pMan );
Aig_ManStop( pTemp );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
// Aig_ManPrintStats( pMan );
pNtkAig = Abc_NtkFromDar( pNtk, pMan );
@@ -1269,7 +1269,7 @@ Abc_Ntk_t * Abc_NtkDRefactor( Abc_Ntk_t * pNtk, Dar_RefPar_t * pPars )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
@@ -1280,10 +1280,10 @@ Abc_Ntk_t * Abc_NtkDRefactor( Abc_Ntk_t * pNtk, Dar_RefPar_t * pPars )
// pMan = Dar_ManBalance( pTemp = pMan, pPars->fUpdateLevel );
// Aig_ManStop( pTemp );
-clk = clock();
+clk = Abc_Clock();
pMan = Aig_ManDupDfs( pTemp = pMan );
Aig_ManStop( pTemp );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
// Aig_ManPrintStats( pMan );
pNtkAig = Abc_NtkFromDar( pNtk, pMan );
@@ -1306,17 +1306,17 @@ Abc_Ntk_t * Abc_NtkDC2( Abc_Ntk_t * pNtk, int fBalance, int fUpdateLevel, int fF
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
return NULL;
// Aig_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Dar_ManCompress2( pTemp = pMan, fBalance, fUpdateLevel, fFanout, fPower, fVerbose );
Aig_ManStop( pTemp );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
// Aig_ManPrintStats( pMan );
pNtkAig = Abc_NtkFromDar( pNtk, pMan );
@@ -1369,12 +1369,12 @@ Abc_Ntk_t * Abc_NtkDch( Abc_Ntk_t * pNtk, Dch_Pars_t * pPars )
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
Gia_Man_t * pGia;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
return NULL;
-clk = clock();
+clk = Abc_Clock();
if ( pPars->fSynthesis )
pGia = Dar_NewChoiceSynthesis( pMan, 1, 1, pPars->fPower, pPars->fLightSynth, pPars->fVerbose );
else
@@ -1382,7 +1382,7 @@ clk = clock();
pGia = Gia_ManFromAig( pMan );
Aig_ManStop( pMan );
}
-pPars->timeSynth = clock() - clk;
+pPars->timeSynth = Abc_Clock() - clk;
if ( pPars->fUseGia )
pMan = Cec_ComputeChoices( pGia, pPars );
else
@@ -1412,17 +1412,17 @@ Abc_Ntk_t * Abc_NtkDrwsat( Abc_Ntk_t * pNtk, int fBalance, int fVerbose )
{
Aig_Man_t * pMan, * pTemp;
Abc_Ntk_t * pNtkAig;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtk) );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
if ( pMan == NULL )
return NULL;
// Aig_ManPrintStats( pMan );
-clk = clock();
+clk = Abc_Clock();
pMan = Dar_ManRwsat( pTemp = pMan, fBalance, fVerbose );
Aig_ManStop( pTemp );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
// Aig_ManPrintStats( pMan );
pNtkAig = Abc_NtkFromDar( pNtk, pMan );
@@ -1520,7 +1520,7 @@ Abc_Ntk_t * Abc_NtkDarToCnf( Abc_Ntk_t * pNtk, char * pFileName, int fFastAlgo,
// Cnf_Man_t * pManCnf = NULL;
Cnf_Dat_t * pCnf;
Abc_Ntk_t * pNtkNew = NULL;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
// convert to the AIG manager
@@ -1551,7 +1551,7 @@ Abc_Ntk_t * Abc_NtkDarToCnf( Abc_Ntk_t * pNtk, char * pFileName, int fFastAlgo,
if ( fVerbose )
{
Abc_Print( 1, "Vars = %6d. Clauses = %7d. Literals = %8d. ", pCnf->nVars, pCnf->nClauses, pCnf->nLiterals );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/*
@@ -1584,7 +1584,7 @@ Abc_Ntk_t * Abc_NtkDarToCnf( Abc_Ntk_t * pNtk, char * pFileName, int fFastAlgo,
int Abc_NtkDSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimit, int nLearnedStart, int nLearnedDelta, int nLearnedPerce, int fAlignPol, int fAndOuts, int fNewSolver, int fVerbose )
{
Aig_Man_t * pMan;
- int RetValue;//, clk = clock();
+ int RetValue;//, clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
assert( Abc_NtkLatchNum(pNtk) == 0 );
// assert( Abc_NtkPoNum(pNtk) == 1 );
@@ -1610,7 +1610,7 @@ int Abc_NtkPartitionedSat( Abc_Ntk_t * pNtk, int nAlgo, int nPartSize, int nConf
{
extern int Aig_ManPartitionedSat( Aig_Man_t * pNtk, int nAlgo, int nPartSize, int nConfPart, int nConfTotal, int fAlignPol, int fSynthesize, int fVerbose );
Aig_Man_t * pMan;
- int RetValue;//, clk = clock();
+ int RetValue;//, clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
assert( Abc_NtkLatchNum(pNtk) == 0 );
pMan = Abc_NtkToDar( pNtk, 0, 0 );
@@ -1636,7 +1636,7 @@ int Abc_NtkDarCec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConfLimit, int fPa
Aig_Man_t * pMan, * pMan1, * pMan2;
Abc_Ntk_t * pMiter;
int RetValue;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
/*
{
extern void Cec_ManVerifyTwoAigs( Aig_Man_t * pAig0, Aig_Man_t * pAig1, int fVerbose );
@@ -1721,17 +1721,17 @@ finish:
if ( RetValue == 1 )
{
Abc_Print( 1, "Networks are equivalent. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else if ( RetValue == 0 )
{
Abc_Print( 1, "Networks are NOT EQUIVALENT. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else
{
Abc_Print( 1, "Networks are UNDECIDED. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
fflush( stdout );
return RetValue;
@@ -1753,7 +1753,7 @@ Abc_Ntk_t * Abc_NtkDarSeqSweep( Abc_Ntk_t * pNtk, Fra_Ssw_t * pPars )
Fraig_Params_t Params;
Abc_Ntk_t * pNtkAig = NULL, * pNtkFraig;
Aig_Man_t * pMan, * pTemp;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// preprocess the miter by fraiging it
// (note that for each functional class, fraiging leaves one representative;
@@ -1765,7 +1765,7 @@ Abc_Ntk_t * Abc_NtkDarSeqSweep( Abc_Ntk_t * pNtk, Fra_Ssw_t * pPars )
pNtkFraig = Abc_NtkFraig( pNtk, &Params, 0, 0 );
if ( pPars->fVerbose )
{
-ABC_PRT( "Initial fraiging time", clock() - clk );
+ABC_PRT( "Initial fraiging time", Abc_Clock() - clk );
}
}
else
@@ -2037,8 +2037,8 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
Aig_Man_t * pMan;
Vec_Int_t * vMap = NULL;
int status, RetValue = -1;
- clock_t clk = clock();
- clock_t nTimeLimit = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + clock(): 0;
+ abctime clk = Abc_Clock();
+ abctime nTimeLimit = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
// derive the AIG manager
if ( fOrDecomp )
pMan = Abc_NtkToDarBmc( pNtk, &vMap );
@@ -2069,7 +2069,7 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
else if ( RetValue == -1 )
{
Abc_Print( 1, "No output asserted in %d frames. Resource limit reached ", Abc_MaxInt(iFrame,0) );
- if ( nTimeLimit && clock() > nTimeLimit )
+ if ( nTimeLimit && Abc_Clock() > nTimeLimit )
Abc_Print( 1, "(timeout %d sec). ", nTimeLimit );
else
Abc_Print( 1, "(conf limit %d). ", nBTLimit );
@@ -2079,7 +2079,7 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
Abc_Cex_t * pCex = pNtk->pSeqModel;
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", pCex->iPo, pNtk->pName, pCex->iFrame );
}
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
else
{
@@ -2119,8 +2119,8 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
Aig_Man_t * pMan;
Vec_Int_t * vMap = NULL;
int status, RetValue = -1;
- clock_t clk = clock();
- clock_t nTimeOut = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + clock(): 0;
+ abctime clk = Abc_Clock();
+ abctime nTimeOut = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
if ( fOrDecomp && !pPars->fSolveAll )
pMan = Abc_NtkToDarBmc( pNtk, &vMap );
else
@@ -2147,7 +2147,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
if ( pPars->nFailOuts == 0 )
{
Abc_Print( 1, "No output asserted in %d frames. Resource limit reached ", Abc_MaxInt(pPars->iFrame,0) );
- if ( nTimeOut && clock() > nTimeOut )
+ if ( nTimeOut && Abc_Clock() > nTimeOut )
Abc_Print( 1, "(timeout %d sec). ", pPars->nTimeOut );
else
Abc_Print( 1, "(conf limit %d). ", pPars->nConfLimit );
@@ -2155,7 +2155,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
else
{
Abc_Print( 1, "The total of %d outputs asserted in %d frames. Resource limit reached ", pPars->nFailOuts, pPars->iFrame );
- if ( clock() > nTimeOut )
+ if ( Abc_Clock() > nTimeOut )
Abc_Print( 1, "(timeout %d sec). ", pPars->nTimeOut );
else
Abc_Print( 1, "(conf limit %d). ", pPars->nConfLimit );
@@ -2187,7 +2187,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
pNtk->vSeqModelVec = pMan->vSeqModelVec; pMan->vSeqModelVec = NULL;
}
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( pNtk->pSeqModel )
{
status = Saig_ManVerifyCex( pMan, pNtk->pSeqModel );
@@ -2216,7 +2216,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars, int fOrDecomp )
int Abc_NtkDarBmcInter_int( Aig_Man_t * pMan, Inter_ManParams_t * pPars, Aig_Man_t ** ppNtkRes )
{
int RetValue = -1, iFrame;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int nTotalProvedSat = 0;
assert( pMan->nRegs > 0 );
if ( ppNtkRes )
@@ -2307,7 +2307,7 @@ int Abc_NtkDarBmcInter_int( Aig_Man_t * pMan, Inter_ManParams_t * pPars, Aig_Man
Abc_Print( 1, "Property UNDECIDED. " );
else
assert( 0 );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
return RetValue;
}
@@ -2541,13 +2541,13 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i
{
Aig_Man_t * pMan;
int iFrame = -1, RetValue = -1;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
if ( pSecPar->fTryComb || Abc_NtkLatchNum(pNtk) == 0 )
{
Prove_Params_t Params, * pParams = &Params;
Abc_Ntk_t * pNtkComb;
int RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Abc_NtkLatchNum(pNtk) == 0 )
Abc_Print( 1, "The network has no latches. Running CEC.\n" );
// create combinational network
@@ -2563,11 +2563,11 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i
{
pNtk->pModel = pNtkComb->pModel; pNtkComb->pModel = NULL;
Abc_Print( 1, "Networks are not equivalent.\n" );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( pSecPar->fReportSolution )
{
Abc_Print( 1, "SOLUTION: FAIL " );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
return RetValue;
}
@@ -2576,11 +2576,11 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i
if ( RetValue == 1 )
{
Abc_Print( 1, "Networks are equivalent after CEC. " );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( pSecPar->fReportSolution )
{
Abc_Print( 1, "SOLUTION: PASS " );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
return RetValue;
}
@@ -2603,7 +2603,7 @@ int Abc_NtkDarProve( Abc_Ntk_t * pNtk, Fra_Sec_t * pSecPar, int nBmcFramesMax, i
if ( pSecPar->fReportSolution )
{
Abc_Print( 1, "SOLUTION: FAIL " );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
// return the counter-example generated
ABC_FREE( pNtk->pModel );
@@ -2738,7 +2738,7 @@ int Abc_NtkDarSec( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, Fra_Sec_t * pSecPar )
int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Pdr_Par_t * pPars )
{
int RetValue = -1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Aig_Man_t * pMan;
pMan = Abc_NtkToDar( pNtk, 0, 1 );
if ( pMan == NULL )
@@ -2773,7 +2773,7 @@ int Abc_NtkDarPdr( Abc_Ntk_t * pNtk, Pdr_Par_t * pPars )
else
assert( 0 );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
/*
Abc_Print( 1, "Status: " );
if ( pPars->pOutMap )
@@ -3219,7 +3219,7 @@ int Abc_NtkDarSeqSim( Abc_Ntk_t * pNtk, int nFrames, int nWords, int TimeOut, in
Aig_Man_t * pMan;
Abc_Cex_t * pCex;
int status, RetValue = -1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum(pNtk) )
{
Abc_Print( 1, "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
@@ -3296,7 +3296,7 @@ int Abc_NtkDarSeqSim( Abc_Ntk_t * pNtk, int nFrames, int nWords, int TimeOut, in
}
Fra_SmlStop( pSml );
}
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
Aig_ManStop( pMan );
return RetValue;
}
@@ -3316,7 +3316,7 @@ int Abc_NtkDarSeqSim3( Abc_Ntk_t * pNtk, Ssw_RarPars_t * pPars )
{
Aig_Man_t * pMan;
int status, RetValue = -1;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum(pNtk) )
{
Abc_Print( 1, "Removing %d choices from the AIG.\n", Abc_NtkGetChoiceNum(pNtk) );
@@ -3346,7 +3346,7 @@ int Abc_NtkDarSeqSim3( Abc_Ntk_t * pNtk, Ssw_RarPars_t * pPars )
if ( pNtk->vSeqModelVec )
Vec_PtrFreeFree( pNtk->vSeqModelVec );
pNtk->vSeqModelVec = pMan->vSeqModelVec; pMan->vSeqModelVec = NULL;
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
pNtk->pData = pMan->pData; pMan->pData = NULL;
Aig_ManStop( pMan );
return RetValue;
@@ -3454,7 +3454,7 @@ Abc_Ntk_t * Abc_NtkDarTempor( Abc_Ntk_t * pNtk, int nFrames, int TimeOut, int nC
int Abc_NtkDarInduction( Abc_Ntk_t * pNtk, int nFramesMax, int nConfMax, int fUnique, int fUniqueAll, int fGetCex, int fVerbose, int fVeryVerbose )
{
Aig_Man_t * pMan;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int RetValue;
pMan = Abc_NtkToDar( pNtk, 0, 1 );
if ( pMan == NULL )
@@ -3463,17 +3463,17 @@ int Abc_NtkDarInduction( Abc_Ntk_t * pNtk, int nFramesMax, int nConfMax, int fUn
if ( RetValue == 1 )
{
Abc_Print( 1, "Networks are equivalent. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else if ( RetValue == 0 )
{
Abc_Print( 1, "Networks are NOT EQUIVALENT. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else
{
Abc_Print( 1, "Networks are UNDECIDED. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
if ( fGetCex )
{
@@ -3568,9 +3568,9 @@ void Abc_NtkInterFast( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fVerbose )
Aig_ManStop( pManOff );
}
-clock_t timeCnf;
-clock_t timeSat;
-clock_t timeInt;
+abctime timeCnf;
+abctime timeSat;
+abctime timeInt;
/**Function*************************************************************
@@ -3587,7 +3587,7 @@ Abc_Ntk_t * Abc_NtkInter( Abc_Ntk_t * pNtkOn, Abc_Ntk_t * pNtkOff, int fRelation
{
Abc_Ntk_t * pNtkOn1, * pNtkOff1, * pNtkInter1, * pNtkInter;
Abc_Obj_t * pObj;
- int i; //, clk = clock();
+ int i; //, clk = Abc_Clock();
if ( Abc_NtkCoNum(pNtkOn) != Abc_NtkCoNum(pNtkOff) )
{
Abc_Print( 1, "Currently works only for networks with equal number of POs.\n" );
@@ -3639,7 +3639,7 @@ timeInt = 0;
// ABC_PRT( "CNF", timeCnf );
// ABC_PRT( "SAT", timeSat );
// ABC_PRT( "Int", timeInt );
-// ABC_PRT( "Slow interpolation time", clock() - clk );
+// ABC_PRT( "Slow interpolation time", Abc_Clock() - clk );
// return the network
if ( !Abc_NtkCheck( pNtkInter ) )
diff --git a/src/base/abci/abcDebug.c b/src/base/abci/abcDebug.c
index 7dae346c..db795c60 100644
--- a/src/base/abci/abcDebug.c
+++ b/src/base/abci/abcDebug.c
@@ -52,7 +52,7 @@ void Abc_NtkAutoDebug( Abc_Ntk_t * pNtk, int (*pFuncError) (Abc_Ntk_t *) )
Abc_Ntk_t * pNtkMod;
char * pFileName = "bug_found.blif";
int i, nSteps, nIter, ModNum, RandNum = 1;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Abc_NtkIsLogic(pNtk) );
srand( 0x123123 );
// create internal copy of the network
@@ -66,7 +66,7 @@ void Abc_NtkAutoDebug( Abc_Ntk_t * pNtk, int (*pFuncError) (Abc_Ntk_t *) )
// perform incremental modifications
for ( nIter = 0; ; nIter++ )
{
- clk = clock();
+ clk = Abc_Clock();
// count how many ways of modifying the network exists
nSteps = 2 * Abc_NtkCountFaninsTotal(pNtk);
// try modifying the network as many times
@@ -91,14 +91,14 @@ void Abc_NtkAutoDebug( Abc_Ntk_t * pNtk, int (*pFuncError) (Abc_Ntk_t *) )
}
printf( "Iter %6d : Latches = %6d. Nodes = %6d. Steps = %6d. Error step = %3d. ",
nIter, Abc_NtkLatchNum(pNtk), Abc_NtkNodeNum(pNtk), nSteps, i );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( i == nSteps ) // could not modify it while preserving the bug
break;
}
// write out the final network
Io_WriteBlifLogic( pNtk, pFileName, 1 );
printf( "Final network written into file \"%s\". ", pFileName );
- ABC_PRT( "Total time", clock() - clkTotal );
+ ABC_PRT( "Total time", Abc_Clock() - clkTotal );
Abc_NtkDelete( pNtk );
}
diff --git a/src/base/abci/abcDec.c b/src/base/abci/abcDec.c
index d232d5aa..57a17ffe 100644
--- a/src/base/abci/abcDec.c
+++ b/src/base/abci/abcDec.c
@@ -464,7 +464,7 @@ void Abc_TtStoreTest( char * pFileName )
***********************************************************************/
void Abc_TruthDecPerform( Abc_TtStore_t * p, int DecType, int fVerbose )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i, nNodes = 0;
char * pAlgoName = NULL;
@@ -556,7 +556,7 @@ void Abc_TruthDecPerform( Abc_TtStore_t * p, int DecType, int fVerbose )
else assert( 0 );
printf( "AIG nodes =%9d ", nNodes );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/base/abci/abcDress2.c b/src/base/abci/abcDress2.c
index 9f8cc568..4aedf253 100644
--- a/src/base/abci/abcDress2.c
+++ b/src/base/abci/abcDress2.c
@@ -358,7 +358,7 @@ void Abc_NtkDressPrintEquivs( Vec_Ptr_t * vRes )
SeeAlso []
***********************************************************************/
-void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, clock_t Time )
+void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, abctime Time )
{
Vec_Int_t * vClass;
int i, k, Entry;
@@ -419,10 +419,10 @@ void Abc_NtkDressPrintStats( Vec_Ptr_t * vRes, int nNodes0, int nNodes1, clock_t
void Abc_NtkDress2( Abc_Ntk_t * pNtk1, Abc_Ntk_t * pNtk2, int nConflictLimit, int fVerbose )
{
Vec_Ptr_t * vRes;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vRes = Abc_NtkDressComputeEquivs( pNtk1, pNtk2, nConflictLimit, fVerbose );
// Abc_NtkDressPrintEquivs( vRes );
- Abc_NtkDressPrintStats( vRes, Abc_NtkNodeNum(pNtk1), Abc_NtkNodeNum(pNtk1), clock() - clk );
+ Abc_NtkDressPrintStats( vRes, Abc_NtkNodeNum(pNtk1), Abc_NtkNodeNum(pNtk1), Abc_Clock() - clk );
Vec_VecFree( (Vec_Vec_t *)vRes );
}
diff --git a/src/base/abci/abcFraig.c b/src/base/abci/abcFraig.c
index 60b8d662..4621f508 100644
--- a/src/base/abci/abcFraig.c
+++ b/src/base/abci/abcFraig.c
@@ -698,7 +698,7 @@ Abc_Ntk_t * Abc_NtkFraigRestore()
Vec_Ptr_t * vStore;
Abc_Ntk_t * pNtk, * pFraig;
int nWords1, nWords2, nWordsMin;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
// get the stored network
vStore = Abc_FrameReadStore();
@@ -744,7 +744,7 @@ Abc_Ntk_t * Abc_NtkFraigRestore()
// perform partitioned computation of structural choices
pFraig = Abc_NtkFraigPartitioned( vStore, &Params );
Abc_NtkFraigStoreClean();
-//ABC_PRT( "Total choicing time", clock() - clk );
+//ABC_PRT( "Total choicing time", Abc_Clock() - clk );
return pFraig;
}
diff --git a/src/base/abci/abcFx.c b/src/base/abci/abcFx.c
index 83136118..be6192f0 100644
--- a/src/base/abci/abcFx.c
+++ b/src/base/abci/abcFx.c
@@ -102,7 +102,7 @@ struct Fx_Man_t_
Vec_Int_t * vCubeFree; // cube-free divisor
Vec_Int_t * vDiv; // selected divisor
// statistics
- clock_t timeStart; // starting time
+ abctime timeStart; // starting time
int nVars; // original problem variables
int nLits; // the number of SOP literals
int nDivs; // the number of extracted divisors
@@ -435,7 +435,7 @@ static inline void Fx_PrintDiv( Fx_Man_t * p, int iDiv )
printf( " " );
printf( "Lits =%7d ", p->nLits );
printf( "Divs =%8d ", Hsh_VecSize(p->pHash) );
- Abc_PrintTime( 1, "Time", clock() - p->timeStart );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - p->timeStart );
}
static void Fx_PrintDivisors( Fx_Man_t * p )
{
@@ -480,7 +480,7 @@ static void Fx_PrintMatrix( Fx_Man_t * p )
Fx_PrintLiterals( p );
Fx_PrintDivisors( p );
}
-static void Fx_PrintStats( Fx_Man_t * p, clock_t clk )
+static void Fx_PrintStats( Fx_Man_t * p, abctime clk )
{
printf( "Cubes =%7d ", Vec_WecSizeUsed(p->vCubes) );
printf( "Lits =%7d ", Vec_WecSizeUsed(p->vLits) );
@@ -1116,7 +1116,7 @@ int Fx_FastExtract( Vec_Wec_t * vCubes, int ObjIdMax, int nNewNodesMax, int LitC
int fVeryVerbose = 0;
int i, iDiv;
Fx_Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// initialize the data-structure
p = Fx_ManStart( vCubes );
p->LitCountMax = LitCountMax;
@@ -1125,9 +1125,9 @@ int Fx_FastExtract( Vec_Wec_t * vCubes, int ObjIdMax, int nNewNodesMax, int LitC
if ( fVeryVerbose )
Fx_PrintMatrix( p );
if ( fVerbose )
- Fx_PrintStats( p, clock() - clk );
+ Fx_PrintStats( p, Abc_Clock() - clk );
// perform extraction
- p->timeStart = clock();
+ p->timeStart = Abc_Clock();
for ( i = 0; i < nNewNodesMax && Vec_QueTopCost(p->vPrio) > 0.0; i++ )
{
iDiv = Vec_QuePop(p->vPrio);
diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c
index 926f3e74..82b45248 100644
--- a/src/base/abci/abcIf.c
+++ b/src/base/abci/abcIf.c
@@ -71,7 +71,7 @@ void Abc_NtkIfComputeSwitching( Abc_Ntk_t * pNtk, If_Man_t * pIfMan )
Aig_Man_t * pAig;
If_Obj_t * pObjIf;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// map IF objects into old network
Abc_NtkForEachObj( pNtk, pObjAbc, i )
if ( (pObjIf = (If_Obj_t *)pObjAbc->pTemp) )
@@ -99,7 +99,7 @@ void Abc_NtkIfComputeSwitching( Abc_Ntk_t * pNtk, If_Man_t * pIfMan )
pSwitching[i] = pObjAbc->dTemp;
if ( pIfMan->pPars->fVerbose )
{
- ABC_PRT( "Computing switching activity", clock() - clk );
+ ABC_PRT( "Computing switching activity", Abc_Clock() - clk );
}
}
diff --git a/src/base/abci/abcIvy.c b/src/base/abci/abcIvy.c
index ae75e9fc..fd4f7d1c 100644
--- a/src/base/abci/abcIvy.c
+++ b/src/base/abci/abcIvy.c
@@ -84,7 +84,7 @@ extern int timeRetime;
Ivy_Man_t * Abc_NtkIvyBefore( Abc_Ntk_t * pNtk, int fSeq, int fUseDc )
{
Ivy_Man_t * pMan;
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
assert( !Abc_NtkIsNetlist(pNtk) );
if ( Abc_NtkIsBddLogic(pNtk) )
{
@@ -119,7 +119,7 @@ Ivy_Man_t * Abc_NtkIvyBefore( Abc_Ntk_t * pNtk, int fSeq, int fUseDc )
Vec_IntFree( vInit );
// Ivy_ManPrintStats( pMan );
}
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
return pMan;
}
@@ -197,7 +197,7 @@ Abc_Ntk_t * Abc_NtkIvyHaig( Abc_Ntk_t * pNtk, int nIters, int fUseZeroCost, int
{
Abc_Ntk_t * pNtkAig;
Ivy_Man_t * pMan;
- clock_t clk;
+ abctime clk;
// int i;
/*
extern int nMoves;
@@ -213,9 +213,9 @@ timeInv = 0;
pMan = Abc_NtkIvyBefore( pNtk, 1, 1 );
if ( pMan == NULL )
return NULL;
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
-clk = clock();
+clk = Abc_Clock();
Ivy_ManHaigStart( pMan, fVerbose );
// Ivy_ManRewriteSeq( pMan, 0, 0 );
// for ( i = 0; i < nIters; i++ )
@@ -227,7 +227,7 @@ clk = clock();
Ivy_ManRewriteSeq( pMan, 1, 0 );
//printf( "%d ", Ivy_ManNodeNum(pMan) );
//printf( "%d ", Ivy_ManNodeNum(pMan->pHaig) );
-//ABC_PRT( " ", clock() - clk );
+//ABC_PRT( " ", Abc_Clock() - clk );
//printf( "\n" );
/*
printf( "Moves = %d. ", nMoves );
@@ -238,7 +238,7 @@ clk = clock();
// Ivy_ManRewriteSeq( pMan, 1, 0 );
//printf( "Haig size = %d.\n", Ivy_ManNodeNum(pMan->pHaig) );
// Ivy_ManHaigPostprocess( pMan, fVerbose );
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
// write working AIG into the current network
// pNtkAig = Abc_NtkIvyAfter( pNtk, pMan, 1, 0 );
@@ -289,9 +289,9 @@ Abc_Ntk_t * Abc_NtkIvyRewrite( Abc_Ntk_t * pNtk, int fUpdateLevel, int fUseZeroC
pMan = Abc_NtkIvyBefore( pNtk, 0, 0 );
if ( pMan == NULL )
return NULL;
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
Ivy_ManRewritePre( pMan, fUpdateLevel, fUseZeroCost, fVerbose );
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
pNtkAig = Abc_NtkIvyAfter( pNtk, pMan, 0, 0 );
Ivy_ManStop( pMan );
return pNtkAig;
@@ -315,9 +315,9 @@ Abc_Ntk_t * Abc_NtkIvyRewriteSeq( Abc_Ntk_t * pNtk, int fUseZeroCost, int fVerbo
pMan = Abc_NtkIvyBefore( pNtk, 1, 1 );
if ( pMan == NULL )
return NULL;
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
Ivy_ManRewriteSeq( pMan, fUseZeroCost, fVerbose );
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
// Ivy_ManRewriteSeq( pMan, 1, 0 );
// Ivy_ManRewriteSeq( pMan, 1, 0 );
pNtkAig = Abc_NtkIvyAfter( pNtk, pMan, 1, 0 );
@@ -543,7 +543,7 @@ int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars )
// apply AIG rewriting
if ( pParams->fUseRewriting && Abc_NtkNodeNum(pNtk) > 500 )
{
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
//printf( "Before rwsat = %d. ", Abc_NtkNodeNum(pNtk) );
pParams->fUseRewriting = 0;
pNtk = Abc_NtkBalance( pNtkTemp = pNtk, 0, 0, 0 );
@@ -554,7 +554,7 @@ int Abc_NtkIvyProve( Abc_Ntk_t ** ppNtk, void * pPars )
Abc_NtkRewrite( pNtk, 0, 0, 0, 0, 0 );
Abc_NtkRefactor( pNtk, 10, 16, 0, 0, 0, 0 );
//printf( "After rwsat = %d. ", Abc_NtkNodeNum(pNtk) );
-//ABC_PRT( "Time", clock() - clk );
+//ABC_PRT( "Time", Abc_Clock() - clk );
}
// convert ABC network into IVY network
diff --git a/src/base/abci/abcLutmin.c b/src/base/abci/abcLutmin.c
index b4856779..acbeee70 100644
--- a/src/base/abci/abcLutmin.c
+++ b/src/base/abci/abcLutmin.c
@@ -86,7 +86,7 @@ void Abc_NtkCheckAbsorb( Abc_Ntk_t * pNtk, int nLutSize )
Vec_Ptr_t * vFanins;
Abc_Obj_t * pObj, * pFanin;
int i, k, Counter = 0, Counter2 = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vCounts = Vec_IntStart( Abc_NtkObjNumMax(pNtk) );
vFanins = Vec_PtrAlloc( 100 );
Abc_NtkForEachNode( pNtk, pObj, i )
@@ -106,7 +106,7 @@ void Abc_NtkCheckAbsorb( Abc_Ntk_t * pNtk, int nLutSize )
printf( "Absorted = %6d. (%6.2f %%) Fully = %6d. (%6.2f %%) ",
Counter, 100.0 * Counter / Abc_NtkNodeNum(pNtk),
Counter2, 100.0 * Counter2 / Abc_NtkNodeNum(pNtk) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/base/abci/abcMap.c b/src/base/abci/abcMap.c
index 0476ec92..8ceb463e 100644
--- a/src/base/abci/abcMap.c
+++ b/src/base/abci/abcMap.c
@@ -65,7 +65,7 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti,
Map_Man_t * pMan;
Vec_Int_t * vSwitching = NULL;
float * pSwitching = NULL;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
Mio_Library_t * pLib = (Mio_Library_t *)Abc_FrameReadLibGen();
assert( Abc_NtkIsStrash(pNtk) );
@@ -124,14 +124,14 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti,
if ( pSwitching ) Vec_IntFree( vSwitching );
if ( pMan == NULL )
return NULL;
-clk = clock();
+clk = Abc_Clock();
Map_ManSetSwitching( pMan, fSwitching );
if ( !Map_Mapping( pMan ) )
{
Map_ManFree( pMan );
return NULL;
}
-// Map_ManPrintStatsToFile( pNtk->pSpec, Map_ManReadAreaFinal(pMan), Map_ManReadRequiredGlo(pMan), clock()-clk );
+// Map_ManPrintStatsToFile( pNtk->pSpec, Map_ManReadAreaFinal(pMan), Map_ManReadRequiredGlo(pMan), Abc_Clock()-clk );
// reconstruct the network after mapping
pNtkNew = Abc_NtkFromMap( pMan, pNtk );
@@ -143,7 +143,7 @@ clk = clock();
pNtkNew->pExdc = Abc_NtkDup( pNtk->pExdc );
if ( fVerbose )
{
-ABC_PRT( "Total runtime", clock() - clkTotal );
+ABC_PRT( "Total runtime", Abc_Clock() - clkTotal );
}
// make sure that everything is okay
diff --git a/src/base/abci/abcMerge.c b/src/base/abci/abcMerge.c
index 52fa817b..d5b58340 100644
--- a/src/base/abci/abcMerge.c
+++ b/src/base/abci/abcMerge.c
@@ -286,7 +286,7 @@ Vec_Int_t * Abc_NtkLutMerge( Abc_Ntk_t * pNtk, Nwk_LMPars_t * pPars )
Vec_Ptr_t * vStart, * vNext, * vCands1, * vCands2;
Abc_Obj_t * pLut, * pCand;
int i, k, nVertsMax, nCands;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// count the number of vertices
nVertsMax = 0;
Abc_NtkForEachNode( pNtk, pLut, i )
@@ -326,16 +326,16 @@ Vec_Int_t * Abc_NtkLutMerge( Abc_Ntk_t * pNtk, Nwk_LMPars_t * pPars )
if ( pPars->fVerbose )
{
printf( "Mergable LUTs = %6d. Total cands = %6d. ", p->nVertsMax, nCands );
- ABC_PRT( "Deriving graph", clock() - clk );
+ ABC_PRT( "Deriving graph", Abc_Clock() - clk );
}
// solve the graph problem
- clk = clock();
+ clk = Abc_Clock();
Nwk_ManGraphSolve( p );
if ( pPars->fVerbose )
{
printf( "GRAPH: Nodes = %6d. Edges = %6d. Pairs = %6d. ",
p->nVerts, p->nEdges, Vec_IntSize(p->vPairs)/2 );
- ABC_PRT( "Solving", clock() - clk );
+ ABC_PRT( "Solving", Abc_Clock() - clk );
Nwk_ManGraphReportMemoryUsage( p );
}
vResult = p->vPairs; p->vPairs = NULL;
diff --git a/src/base/abci/abcMffc.c b/src/base/abci/abcMffc.c
index f55b3b52..ad55ce04 100644
--- a/src/base/abci/abcMffc.c
+++ b/src/base/abci/abcMffc.c
@@ -546,7 +546,7 @@ void Abc_NktMffcTestSuper( Abc_Ntk_t * pNtk )
Vec_Int_t * vCounts, * vNumbers, * vSizes, * vMarks;
Vec_Int_t * vNode1, * vNode2;
int i, k, Entry, nSizes;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vRoots = Abc_NktMffcMarkRoots( pNtk, 1 );
vFanins = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) );
vFanouts = Vec_PtrStart( Abc_NtkObjNumMax(pNtk) );
@@ -658,7 +658,7 @@ if ( Entry == 2 )
if ( Vec_IntEntry(vNumbers,31) )
printf( " n > 1000 %6d\n", Vec_IntEntry(vNumbers,30) );
printf( "Total MFFCs = %d. ", Vec_PtrSize(vRoots) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
Vec_IntFree( vNumbers );
Vec_PtrFree( vNodes );
Vec_PtrFree( vLeaves );
@@ -894,7 +894,7 @@ Vec_Ptr_t * Abc_NktMffcDerive( Abc_Ntk_t * pNtk, Vec_Ptr_t ** pvFanins, Vec_Ptr_
Vec_Ptr_t * vRoots, * vFanins, * vFanouts, * vVolumes, * vNodes, * vLeaves;
Abc_Obj_t * pObj, * pFanin;
int i, k;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// create roots
vRoots = Abc_NktMffcMarkRoots( pNtk, 0 );
// create fanins/fanouts/volumes
@@ -1208,7 +1208,7 @@ void Abc_NktMffcServerTest( Abc_Ntk_t * pNtk )
Vec_Int_t * vGlob, * vLeaves, * vRoots;
double Cost, CostAll = 0.0;
int i, k, Entry, nNodes = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vGlobs = Abc_NktMffcServer( pNtk, 18, 3 );
vLeaves = Vec_IntAlloc( 100 );
vRoots = Vec_IntAlloc( 100 );
@@ -1240,7 +1240,7 @@ void Abc_NktMffcServerTest( Abc_Ntk_t * pNtk )
Vec_PtrFree( vGlobs );
printf( "Total = %6d. Nodes = %6d. ", Abc_NtkNodeNum(pNtk), nNodes );
printf( "Cost = %6.2f ", CostAll );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
ABC_NAMESPACE_IMPL_END
diff --git a/src/base/abci/abcNpn.c b/src/base/abci/abcNpn.c
index ffcf00f7..7157b856 100644
--- a/src/base/abci/abcNpn.c
+++ b/src/base/abci/abcNpn.c
@@ -177,7 +177,7 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
word pAuxWord[1024], pAuxWord1[1024];
char pCanonPerm[16];
unsigned uCanonPhase=0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
char * pAlgoName = NULL;
@@ -274,7 +274,7 @@ void Abc_TruthNpnPerform( Abc_TtStore_t * p, int NpnType, int fVerbose )
}
}
else assert( 0 );
- clk = clock() - clk;
+ clk = Abc_Clock() - clk;
printf( "Classes =%9d ", Abc_TruthNpnCountUnique(p) );
Abc_PrintTime( 1, "Time", clk );
}
diff --git a/src/base/abci/abcNpnSave.c b/src/base/abci/abcNpnSave.c
index 80ce10bc..a96b578e 100644
--- a/src/base/abci/abcNpnSave.c
+++ b/src/base/abci/abcNpnSave.c
@@ -393,9 +393,9 @@ void Npn_ManResize( Npn_Man_t * p )
Npn_Obj_t * pEntry, * pNext;
int * pBinsOld, * ppPlace;
int nBinsOld, Counter, i;
- clock_t clk;
+ abctime clk;
assert( p->pBins != NULL );
-clk = clock();
+clk = Abc_Clock();
// save the old Bins
pBinsOld = p->pBins;
nBinsOld = p->nBins;
@@ -420,7 +420,7 @@ clk = clock();
}
assert( Counter == p->nEntries );
ABC_FREE( pBinsOld );
-//ABC_PRT( "Hash table resizing time", clock() - clk );
+//ABC_PRT( "Hash table resizing time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/base/abci/abcNtbdd.c b/src/base/abci/abcNtbdd.c
index 3fe42053..9eedfde6 100644
--- a/src/base/abci/abcNtbdd.c
+++ b/src/base/abci/abcNtbdd.c
@@ -572,8 +572,8 @@ void Abc_NtkBddImplicationTest()
int nVars = 200;
int nImps = 200;
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
dd = Cudd_Init( nVars, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 );
Cudd_AutodynEnable( dd, CUDD_REORDER_SIFT );
bSum = b0; Cudd_Ref( bSum );
@@ -588,7 +588,7 @@ clk = clock();
printf( "The BDD before = %d.\n", Cudd_DagSize(bSum) );
Cudd_ReduceHeap( dd, CUDD_REORDER_SIFT, 1 );
printf( "The BDD after = %d.\n", Cudd_DagSize(bSum) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
Cudd_RecursiveDeref( dd, bSum );
Cudd_Quit( dd );
}
diff --git a/src/base/abci/abcOdc.c b/src/base/abci/abcOdc.c
index 31f64732..b66592f6 100644
--- a/src/base/abci/abcOdc.c
+++ b/src/base/abci/abcOdc.c
@@ -86,14 +86,14 @@ struct Odc_Man_t_
int nTotalDcs; // total percentage of DCs
// runtime
- clock_t timeClean; // windowing
- clock_t timeWin; // windowing
- clock_t timeMiter; // computing the miter
- clock_t timeSim; // simulation
- clock_t timeQuant; // quantification
- clock_t timeTruth; // truth table
- clock_t timeTotal; // useful runtime
- clock_t timeAbort; // aborted runtime
+ abctime timeClean; // windowing
+ abctime timeWin; // windowing
+ abctime timeMiter; // computing the miter
+ abctime timeSim; // simulation
+ abctime timeQuant; // quantification
+ abctime timeTruth; // truth table
+ abctime timeTotal; // useful runtime
+ abctime timeAbort; // aborted runtime
};
@@ -241,7 +241,7 @@ Odc_Man_t * Abc_NtkDontCareAlloc( int nVarsMax, int nLevels, int fVerbose, int f
***********************************************************************/
void Abc_NtkDontCareClear( Odc_Man_t * p )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// clean the structural hashing table
if ( Vec_IntSize(p->vUsedSpots) > p->nTableSize/3 ) // more than one third
memset( p->pTable, 0, sizeof(Odc_Lit_t) * p->nTableSize );
@@ -257,7 +257,7 @@ void Abc_NtkDontCareClear( Odc_Man_t * p )
// reset the root node
p->iRoot = 0xffff;
-p->timeClean += clock() - clk;
+p->timeClean += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -1033,7 +1033,7 @@ int Abc_NtkDontCareSimulateBefore( Odc_Man_t * p, unsigned * puTruth )
int Abc_NtkDontCareCompute( Odc_Man_t * p, Abc_Obj_t * pNode, Vec_Ptr_t * vLeaves, unsigned * puTruth )
{
int nMints, RetValue;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
p->nWins++;
@@ -1045,12 +1045,12 @@ int Abc_NtkDontCareCompute( Odc_Man_t * p, Abc_Obj_t * pNode, Vec_Ptr_t * vLeave
p->pNode = pNode;
// compute the window
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkDontCareWindow( p );
-p->timeWin += clock() - clk;
+p->timeWin += Abc_Clock() - clk;
if ( !RetValue )
{
-p->timeAbort += clock() - clkTotal;
+p->timeAbort += Abc_Clock() - clkTotal;
Abc_InfoFill( puTruth, p->nWords );
p->nWinsEmpty++;
return 0;
@@ -1066,14 +1066,14 @@ p->timeAbort += clock() - clkTotal;
}
// transfer the window into the AIG package
-clk = clock();
+clk = Abc_Clock();
Abc_NtkDontCareTransfer( p );
-p->timeMiter += clock() - clk;
+p->timeMiter += Abc_Clock() - clk;
// simulate to estimate the amount of don't-cares
-clk = clock();
+clk = Abc_Clock();
nMints = Abc_NtkDontCareSimulateBefore( p, puTruth );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
if ( p->fVeryVerbose )
{
printf( "AIG = %5d ", Odc_NodeNum(p) );
@@ -1083,7 +1083,7 @@ p->timeSim += clock() - clk;
// if there is less then the given percentage of don't-cares, skip
if ( 100.0 * (p->nBits - nMints) / p->nBits < 1.0 * p->nPercCutoff )
{
-p->timeAbort += clock() - clkTotal;
+p->timeAbort += Abc_Clock() - clkTotal;
if ( p->fVeryVerbose )
printf( "Simulation cutoff.\n" );
Abc_InfoFill( puTruth, p->nWords );
@@ -1092,12 +1092,12 @@ p->timeAbort += clock() - clkTotal;
}
// quantify external variables
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkDontCareQuantify( p );
-p->timeQuant += clock() - clk;
+p->timeQuant += Abc_Clock() - clk;
if ( !RetValue )
{
-p->timeAbort += clock() - clkTotal;
+p->timeAbort += Abc_Clock() - clkTotal;
if ( p->fVeryVerbose )
printf( "=== Overflow! ===\n" );
Abc_InfoFill( puTruth, p->nWords );
@@ -1106,17 +1106,17 @@ p->timeAbort += clock() - clkTotal;
}
// get the truth table
-clk = clock();
+clk = Abc_Clock();
Abc_NtkDontCareSimulateSetElem( p );
nMints = Abc_NtkDontCareSimulate( p, puTruth );
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
if ( p->fVeryVerbose )
{
printf( "AIG = %5d ", Odc_NodeNum(p) );
printf( "%6.2f %% ", 100.0 * (p->nBits - nMints) / p->nBits );
printf( "\n" );
}
-p->timeTotal += clock() - clkTotal;
+p->timeTotal += Abc_Clock() - clkTotal;
p->nWinsFinish++;
p->nTotalDcs += (int)(100.0 * (p->nBits - nMints) / p->nBits);
return nMints;
diff --git a/src/base/abci/abcPart.c b/src/base/abci/abcPart.c
index c68e0729..fc654bc9 100644
--- a/src/base/abci/abcPart.c
+++ b/src/base/abci/abcPart.c
@@ -726,21 +726,21 @@ Vec_Ptr_t * Abc_NtkPartitionSmart( Abc_Ntk_t * pNtk, int nSuppSizeLimit, int fVe
Vec_Ptr_t * vSupps, * vPartsAll, * vPartsAll2, * vPartSuppsAll;
Vec_Int_t * vOne, * vPart, * vPartSupp, * vTemp;
int i, iPart, iOut, timeFind = 0;
- clock_t clk, clk2;
+ abctime clk, clk2;
// compute the supports for all outputs
-clk = clock();
+clk = Abc_Clock();
// vSupps = Abc_NtkComputeSupportsNaive( pNtk );
vSupps = Abc_NtkComputeSupportsSmart( pNtk );
if ( fVerbose )
{
-ABC_PRT( "Supps", clock() - clk );
+ABC_PRT( "Supps", Abc_Clock() - clk );
}
// start char-based support representation
vPartSuppsChar = Vec_PtrAlloc( 1000 );
// create partitions
-clk = clock();
+clk = Abc_Clock();
vPartsAll = Vec_PtrAlloc( 256 );
vPartSuppsAll = Vec_PtrAlloc( 256 );
pProgress = Extra_ProgressBarStart( stdout, Vec_PtrSize(vSupps) );
@@ -753,9 +753,9 @@ clk = clock();
// get the output number
iOut = Vec_IntPop(vOne);
// find closely matching part
-clk2 = clock();
+clk2 = Abc_Clock();
iPart = Abc_NtkPartitionSmartFindPart( vPartSuppsAll, vPartsAll, vPartSuppsChar, nSuppSizeLimit, vOne );
-timeFind += clock() - clk2;
+timeFind += Abc_Clock() - clk2;
if ( iPart == -1 )
{
// create new partition
@@ -794,11 +794,11 @@ timeFind += clock() - clk2;
//printf( "\n" );
if ( fVerbose )
{
-ABC_PRT( "Parts", clock() - clk );
+ABC_PRT( "Parts", Abc_Clock() - clk );
//ABC_PRT( "Find ", timeFind );
}
-clk = clock();
+clk = Abc_Clock();
// remember number of supports
Vec_PtrForEachEntry( Vec_Int_t *, vPartSuppsAll, vOne, i )
Vec_IntPush( vOne, i );
@@ -817,7 +817,7 @@ clk = clock();
if ( fVerbose )
{
-ABC_PRT( "Comps", clock() - clk );
+ABC_PRT( "Comps", Abc_Clock() - clk );
}
if ( fVerbose )
printf( "Created %d partitions.\n", Vec_PtrSize(vPartsAll) );
@@ -1163,7 +1163,7 @@ void Abc_NtkFraigPartitionedTime( Abc_Ntk_t * pNtk, void * pParams )
Vec_Int_t * vOne;
Abc_Ntk_t * pNtkAig, * pNtkFraig;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// perform partitioning
assert( Abc_NtkIsStrash(pNtk) );
@@ -1194,7 +1194,7 @@ void Abc_NtkFraigPartitionedTime( Abc_Ntk_t * pNtk, void * pParams )
Abc_NtkDelete( pNtkAig );
Vec_PtrFree( vFraigs );
Vec_PtrFree( vOnePtr );
- ABC_PRT( "Partitioned fraiging time", clock() - clk );
+ ABC_PRT( "Partitioned fraiging time", Abc_Clock() - clk );
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/base/abci/abcPrint.c b/src/base/abci/abcPrint.c
index e27ae492..1ee30aad 100644
--- a/src/base/abci/abcPrint.c
+++ b/src/base/abci/abcPrint.c
@@ -37,10 +37,10 @@ ABC_NAMESPACE_IMPL_START
//extern int s_TotalNodes = 0;
//extern int s_TotalChanges = 0;
-clock_t s_MappingTime = 0;
+abctime s_MappingTime = 0;
int s_MappingMem = 0;
-clock_t s_ResubTime = 0;
-clock_t s_ResynTime = 0;
+abctime s_ResubTime = 0;
+abctime s_ResynTime = 0;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -1303,7 +1303,7 @@ void Abc_NtkPrintMiter( Abc_Ntk_t * pNtk )
{
Abc_Obj_t * pObj, * pChild, * pConst1 = Abc_AigConst1(pNtk);
int i, iOut = -1;
- clock_t Time = clock();
+ abctime Time = Abc_Clock();
int nUnsat = 0;
int nSat = 0;
int nUndec = 0;
@@ -1345,7 +1345,7 @@ void Abc_NtkPrintMiter( Abc_Ntk_t * pNtk )
printf( " ? =%7d", nUndec );
printf( " U =%6d", nUnsat );
printf( " S =%6d", nSat );
- Time = clock() - Time;
+ Time = Abc_Clock() - Time;
printf(" %7.2f sec\n", (float)(Time)/(float)(CLOCKS_PER_SEC));
if ( iOut >= 0 )
printf( "The first satisfiable output is number %d (%s).\n", iOut, Abc_ObjName( Abc_NtkPo(pNtk, iOut) ) );
diff --git a/src/base/abci/abcProve.c b/src/base/abci/abcProve.c
index c61777fa..909cc46b 100644
--- a/src/base/abci/abcProve.c
+++ b/src/base/abci/abcProve.c
@@ -35,7 +35,7 @@ extern int Abc_NtkRefactor( Abc_Ntk_t * pNtk, int nNodeSizeMax, int nConeSizeMa
extern Abc_Ntk_t * Abc_NtkFromFraig( Fraig_Man_t * pMan, Abc_Ntk_t * pNtk );
static Abc_Ntk_t * Abc_NtkMiterFraig( Abc_Ntk_t * pNtk, int nBTLimit, ABC_INT64_T nInspLimit, int * pRetValue, int * pNumFails, ABC_INT64_T * pNumConfs, ABC_INT64_T * pNumInspects );
-static void Abc_NtkMiterPrint( Abc_Ntk_t * pNtk, char * pString, clock_t clk, int fVerbose );
+static void Abc_NtkMiterPrint( Abc_Ntk_t * pNtk, char * pString, abctime clk, int fVerbose );
////////////////////////////////////////////////////////////////////////
@@ -61,7 +61,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
Prove_Params_t * pParams = (Prove_Params_t *)pPars;
Abc_Ntk_t * pNtk, * pNtkTemp;
int RetValue = -1, nIter, nSatFails, Counter;
- clock_t clk; //, timeStart = clock();
+ abctime clk; //, timeStart = Abc_Clock();
ABC_INT64_T nSatConfs, nSatInspects, nInspectLimit;
// get the starting network
@@ -82,7 +82,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
// if SAT only, solve without iteration
if ( !pParams->fUseRewriting && !pParams->fUseFraiging )
{
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkMiterSat( pNtk, (ABC_INT64_T)pParams->nMiteringLimitLast, (ABC_INT64_T)0, 0, NULL, NULL );
Abc_NtkMiterPrint( pNtk, "SAT solving", clk, pParams->fVerbose );
*ppNtk = pNtk;
@@ -101,7 +101,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
}
// try brute-force SAT
- clk = clock();
+ clk = Abc_Clock();
nInspectLimit = pParams->nTotalInspectLimit? pParams->nTotalInspectLimit - pParams->nTotalInspectsMade : 0;
RetValue = Abc_NtkMiterSat( pNtk, (ABC_INT64_T)(pParams->nMiteringLimitStart * pow(pParams->nMiteringLimitMulti,nIter)), (ABC_INT64_T)nInspectLimit, 0, &nSatConfs, &nSatInspects );
Abc_NtkMiterPrint( pNtk, "SAT solving", clk, pParams->fVerbose );
@@ -123,7 +123,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
// try rewriting
if ( pParams->fUseRewriting )
{
- clk = clock();
+ clk = Abc_Clock();
Counter = (int)(pParams->nRewritingLimitStart * pow(pParams->nRewritingLimitMulti,nIter));
// Counter = 1;
while ( 1 )
@@ -165,7 +165,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
if ( pParams->fUseFraiging )
{
// try FRAIGing
- clk = clock();
+ clk = Abc_Clock();
nInspectLimit = pParams->nTotalInspectLimit? pParams->nTotalInspectLimit - pParams->nTotalInspectsMade : 0;
pNtk = Abc_NtkMiterFraig( pNtkTemp = pNtk, (int)(pParams->nFraigingLimitStart * pow(pParams->nFraigingLimitMulti,nIter)), nInspectLimit, &RetValue, &nSatFails, &nSatConfs, &nSatInspects ); Abc_NtkDelete( pNtkTemp );
Abc_NtkMiterPrint( pNtk, "FRAIGing ", clk, pParams->fVerbose );
@@ -196,7 +196,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
printf( "Attempting BDDs with node limit %d ...\n", pParams->nBddSizeLimit );
fflush( stdout );
}
- clk = clock();
+ clk = Abc_Clock();
pNtk = Abc_NtkCollapse( pNtkTemp = pNtk, pParams->nBddSizeLimit, 0, pParams->fBddReorder, 0 );
if ( pNtk )
{
@@ -215,7 +215,7 @@ int Abc_NtkMiterProve( Abc_Ntk_t ** ppNtk, void * pPars )
printf( "Attempting SAT with conflict limit %d ...\n", pParams->nMiteringLimitLast );
fflush( stdout );
}
- clk = clock();
+ clk = Abc_Clock();
nInspectLimit = pParams->nTotalInspectLimit? pParams->nTotalInspectLimit - pParams->nTotalInspectsMade : 0;
RetValue = Abc_NtkMiterSat( pNtk, (ABC_INT64_T)pParams->nMiteringLimitLast, (ABC_INT64_T)nInspectLimit, 0, NULL, NULL );
Abc_NtkMiterPrint( pNtk, "SAT solving", clk, pParams->fVerbose );
@@ -308,13 +308,13 @@ Abc_Ntk_t * Abc_NtkMiterFraig( Abc_Ntk_t * pNtk, int nBTLimit, ABC_INT64_T nInsp
SeeAlso []
***********************************************************************/
-void Abc_NtkMiterPrint( Abc_Ntk_t * pNtk, char * pString, clock_t clk, int fVerbose )
+void Abc_NtkMiterPrint( Abc_Ntk_t * pNtk, char * pString, abctime clk, int fVerbose )
{
if ( !fVerbose )
return;
printf( "Nodes = %7d. Levels = %4d. ", Abc_NtkNodeNum(pNtk),
Abc_NtkIsStrash(pNtk)? Abc_AigLevel(pNtk) : Abc_NtkLevel(pNtk) );
- ABC_PRT( pString, clock() - clk );
+ ABC_PRT( pString, Abc_Clock() - clk );
}
diff --git a/src/base/abci/abcQbf.c b/src/base/abci/abcQbf.c
index e64871ff..81c80b13 100644
--- a/src/base/abci/abcQbf.c
+++ b/src/base/abci/abcQbf.c
@@ -65,7 +65,7 @@ void Abc_NtkQbf( Abc_Ntk_t * pNtk, int nPars, int nItersMax, int fDumpCnf, int f
{
Abc_Ntk_t * pNtkVer, * pNtkSyn, * pNtkSyn2, * pNtkTemp;
Vec_Int_t * vPiValues;
- clock_t clkTotal = clock(), clkS, clkV;
+ abctime clkTotal = Abc_Clock(), clkS, clkV;
int nIters, nInputs, RetValue, fFound = 0;
assert( Abc_NtkIsStrash(pNtk) );
@@ -136,10 +136,10 @@ void Abc_NtkQbf( Abc_Ntk_t * pNtk, int nPars, int nItersMax, int fDumpCnf, int f
for ( nIters = 0; nIters < nItersMax; nIters++ )
{
// solve the synthesis instance
-clkS = clock();
+clkS = Abc_Clock();
// RetValue = Abc_NtkMiterSat( pNtkSyn, 0, 0, 0, NULL, NULL );
RetValue = Abc_NtkDSat( pNtkSyn, (ABC_INT64_T)0, (ABC_INT64_T)0, 0, 0, 0, 1, 0, 0, 0 );
-clkS = clock() - clkS;
+clkS = Abc_Clock() - clkS;
if ( RetValue == 0 )
Abc_NtkModelToVector( pNtkSyn, vPiValues );
if ( RetValue == 1 )
@@ -160,9 +160,9 @@ clkS = clock() - clkS;
Abc_ObjXorFaninC( Abc_NtkPo(pNtkVer,0), 0 );
// solve the verification instance
-clkV = clock();
+clkV = Abc_Clock();
RetValue = Abc_NtkMiterSat( pNtkVer, 0, 0, 0, NULL, NULL );
-clkV = clock() - clkV;
+clkV = Abc_Clock() - clkV;
if ( RetValue == 0 )
Abc_NtkModelToVector( pNtkVer, vPiValues );
Abc_NtkDelete( pNtkVer );
@@ -213,7 +213,7 @@ clkV = clock() - clkV;
printf( "Quit after %d interatios. ", nItersMax );
else
printf( "Implementation does not exist. " );
- ABC_PRT( "Total runtime", clock() - clkTotal );
+ ABC_PRT( "Total runtime", Abc_Clock() - clkTotal );
Vec_IntFree( vPiValues );
}
diff --git a/src/base/abci/abcQuant.c b/src/base/abci/abcQuant.c
index e6f0ccea..02f7b838 100644
--- a/src/base/abci/abcQuant.c
+++ b/src/base/abci/abcQuant.c
@@ -331,7 +331,7 @@ Abc_Ntk_t * Abc_NtkReachability( Abc_Ntk_t * pNtkRel, int nIters, int fVerbose )
int fFixedPoint = 0;
int fSynthesis = 1;
int fMoreEffort = 1;
- clock_t clk;
+ abctime clk;
assert( Abc_NtkIsStrash(pNtkRel) );
assert( Abc_NtkLatchNum(pNtkRel) == 0 );
@@ -350,7 +350,7 @@ Abc_Ntk_t * Abc_NtkReachability( Abc_Ntk_t * pNtkRel, int nIters, int fVerbose )
nVars = Abc_NtkPiNum(pNtkRel)/2;
for ( i = 0; i < nIters; i++ )
{
- clk = clock();
+ clk = Abc_Clock();
// get the set of next states
pNtkNext = Abc_NtkMiterAnd( pNtkRel, pNtkFront, 0, 0 );
Abc_NtkDelete( pNtkFront );
@@ -399,7 +399,7 @@ Abc_Ntk_t * Abc_NtkReachability( Abc_Ntk_t * pNtkRel, int nIters, int fVerbose )
{
printf( "I = %3d : Reach = %6d Fr = %6d FrM = %6d %7.2f %% ",
i + 1, Abc_NtkNodeNum(pNtkReached), nNodesOld, nNodesNew, 100.0*(nNodesNew-nNodesPrev)/nNodesPrev );
- ABC_PRT( "T", clock() - clk );
+ ABC_PRT( "T", Abc_Clock() - clk );
}
nNodesPrev = Abc_NtkNodeNum(pNtkFront);
}
diff --git a/src/base/abci/abcReach.c b/src/base/abci/abcReach.c
index e0fb4e51..e91a1d5a 100644
--- a/src/base/abci/abcReach.c
+++ b/src/base/abci/abcReach.c
@@ -259,7 +259,7 @@ void Abc_NtkVerifyUsingBdds( Abc_Ntk_t * pNtk, int nBddMax, int nIterMax, int fP
DdNode ** pbParts;
DdNode * bOutput, * bReached, * bInitial;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
assert( Abc_NtkPoNum(pNtk) == 1 );
@@ -307,7 +307,7 @@ void Abc_NtkVerifyUsingBdds( Abc_Ntk_t * pNtk, int nBddMax, int nIterMax, int fP
Extra_StopManager( dd );
// report the runtime
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
fflush( stdout );
}
diff --git a/src/base/abci/abcRec.c b/src/base/abci/abcRec.c
index c39dc35a..b86b7b04 100644
--- a/src/base/abci/abcRec.c
+++ b/src/base/abci/abcRec.c
@@ -106,23 +106,23 @@ struct Abc_ManRec_t_
int nFunsDelayComput; // the times delay computed, just for statistics
int nNoBetter; // the number of functions found but no better than the current structures.
// rewriting runtime
- clock_t timeIfTotal; // time used on the whole process of rewriting a structure.
- clock_t timeIfComputDelay; // time used on the structure's delay computation.
- clock_t timeIfCanonicize; // time used on canonicize the function
- clock_t timeIfDerive; // time used on derive the final network;
- clock_t timeIfCopmutCur; // time used on compute the current structures info
- clock_t timeIfOther; // time used on other things
+ abctime timeIfTotal; // time used on the whole process of rewriting a structure.
+ abctime timeIfComputDelay; // time used on the structure's delay computation.
+ abctime timeIfCanonicize; // time used on canonicize the function
+ abctime timeIfDerive; // time used on derive the final network;
+ abctime timeIfCopmutCur; // time used on compute the current structures info
+ abctime timeIfOther; // time used on other things
// record runtime
- clock_t timeTrim; // the runtime to filter the library
- clock_t timeCollect; // the runtime to collect the node of a structure.
- clock_t timeTruth; // the runtime to compute truth table.
- clock_t timeCanon; // the runtime to canonicize
- clock_t timeInsert; // the runtime to insert a structure.
- clock_t timeBuild; // the runtime to build a new structure in the library.
- clock_t timeMerge; // the runtime to merge libraries;
- clock_t timeReHash; // the runtime to resize the hash table.
- clock_t timeOther; // the runtime of other
- clock_t timeTotal; // the runtime to total.
+ abctime timeTrim; // the runtime to filter the library
+ abctime timeCollect; // the runtime to collect the node of a structure.
+ abctime timeTruth; // the runtime to compute truth table.
+ abctime timeCanon; // the runtime to canonicize
+ abctime timeInsert; // the runtime to insert a structure.
+ abctime timeBuild; // the runtime to build a new structure in the library.
+ abctime timeMerge; // the runtime to merge libraries;
+ abctime timeReHash; // the runtime to resize the hash table.
+ abctime timeOther; // the runtime of other
+ abctime timeTotal; // the runtime to total.
};
@@ -859,7 +859,7 @@ Hop_Obj_t * Abc_RecToHop( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
char pCanonPerm[16];
unsigned *pInOut = s_pMan->pTemp1;
unsigned *pTemp = s_pMan->pTemp2;
- clock_t time = clock();
+ abctime time = Abc_Clock();
int fCompl;
int * pCompl = &fCompl;
nLeaves = If_CutLeaveNum(pCut);
@@ -895,8 +895,8 @@ Hop_Obj_t * Abc_RecToHop( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
Abc_NtkIncrementTravId(pAig);
//derive the best structure in the library.
pHopObj = Abc_NtkRecBuildUp_rec(pMan, pCandMin->obj, s_pMan->vLabels);
- s_pMan->timeIfDerive += clock() - time;
- s_pMan->timeIfTotal += clock() - time;
+ s_pMan->timeIfDerive += Abc_Clock() - time;
+ s_pMan->timeIfTotal += Abc_Clock() - time;
return Hop_NotCond(pHopObj, (pCut->fCompl)^(((uCanonPhase & (1 << nLeaves)) > 0)) ^ fCompl);
}
@@ -1007,7 +1007,7 @@ void Abc_NtkRecFilter(int nLimit)
Rec_Obj_t * previous = NULL, * entry = NULL, * pTemp;
int i;
Abc_Ntk_t * pNtk = s_pMan->pNtk;
- clock_t time = clock();
+ abctime time = Abc_Clock();
if (nLimit > 0)
{
for ( i = 0; i < s_pMan->nBins; i++ )
@@ -1048,8 +1048,8 @@ void Abc_NtkRecFilter(int nLimit)
Abc_NtkDelete( pNtk );
// collect runtime stats
- s_pMan->timeTrim += clock() - time;
- s_pMan->timeTotal += clock() - time;
+ s_pMan->timeTrim += Abc_Clock() - time;
+ s_pMan->timeTotal += Abc_Clock() - time;
}
@@ -1134,7 +1134,7 @@ void Abc_NtkRecLibMerge(Abc_Ntk_t* pNtk)
int i;
Abc_Obj_t * pObj;
Abc_ManRec_t * p = s_pMan;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Abc_NtkPiNum(pNtk) > s_pMan->nVars )
{
printf( "The library has more inputs than the record.\n");
@@ -1162,8 +1162,8 @@ void Abc_NtkRecLibMerge(Abc_Ntk_t* pNtk)
{
Abc_ObjClearMax( pObj );
}
- s_pMan->timeMerge += clock() - clk;
- s_pMan->timeTotal += clock() - clk;
+ s_pMan->timeMerge += Abc_Clock() - clk;
+ s_pMan->timeTotal += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -1182,7 +1182,7 @@ void Abc_NtkRecRezieHash(Abc_ManRec_t* p)
Rec_Obj_t ** pBinsNew, **ppSpot;
Rec_Obj_t * pEntry, * pTemp;
int nBinsNew, Counter, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// get the new table size
nBinsNew = Cudd_Prime( 3 * p->nBins );
printf("Hash table resize from %d to %d.\n", p->nBins, nBinsNew);
@@ -1206,8 +1206,8 @@ void Abc_NtkRecRezieHash(Abc_ManRec_t* p)
ABC_FREE( p->pBins );
p->pBins = pBinsNew;
p->nBins = nBinsNew;
- p->timeReHash += clock() - clk;
- p->timeTotal += clock() - clk;
+ p->timeReHash += Abc_Clock() - clk;
+ p->timeTotal += Abc_Clock() - clk;
}
@@ -1231,7 +1231,7 @@ void Abc_NtkRecStart( Abc_Ntk_t * pNtk, int nVars, int nCuts, int fTrim )
char Buffer[10];
unsigned * pTruth;
int i, RetValue;
- clock_t clkTotal = clock(), clk, timeInsert;
+ abctime clkTotal = Abc_Clock(), clk, timeInsert;
//int testNum = 0;
assert( s_pMan == NULL );
@@ -1308,14 +1308,14 @@ void Abc_NtkRecStart( Abc_Ntk_t * pNtk, int nVars, int nCuts, int fTrim )
Kit_TruthCopy( (unsigned *)Vec_PtrEntry(p->vTtNodes, pObj->Id), (unsigned *)Vec_PtrEntry(p->vTtElems, i), p->nVars );
// compute the tables
-clk = clock();
+clk = Abc_Clock();
Abc_AigForEachAnd( pNtk, pObj, i )
{
RetValue = Abc_NtkRecComputeTruth( pObj, p->vTtNodes, p->nVars );
assert( RetValue );
}
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
Abc_NtkForEachPi( pNtk, pObj, i )
Abc_ObjSetMax( pObj, i+1 );
@@ -1323,7 +1323,7 @@ p->timeTruth += clock() - clk;
Abc_ObjSetMax( pObj, Abc_MaxInt( Abc_ObjGetMax(Abc_ObjFanin0(pObj)), Abc_ObjGetMax(Abc_ObjFanin1(pObj)) ) );
// insert the PO nodes into the table
- timeInsert = clock();
+ timeInsert = Abc_Clock();
Abc_NtkForEachPo( pNtk, pObj, i )
{
p->nTried++;
@@ -1341,7 +1341,7 @@ p->timeTruth += clock() - clk;
ppSpot = Abc_NtkRecTableLookup(p, p->pBins, p->nBins, pTruth, p->nVars );
Abc_NtkRecInsertToLookUpTable(p, ppSpot, pObj, Abc_ObjGetMax(pObj), p->fTrim);
}
- p->timeInsert += clock() - timeInsert;
+ p->timeInsert += Abc_Clock() - timeInsert;
Abc_NtkForEachObj( pNtk, pObj, i )
{
Abc_ObjClearMax( pObj );
@@ -1361,7 +1361,7 @@ p->timeTruth += clock() - clk;
// set the manager
s_pMan = p;
- p->timeTotal += clock() - clkTotal;
+ p->timeTotal += Abc_Clock() - clkTotal;
}
/**Function*************************************************************
@@ -1688,7 +1688,7 @@ void Abc_NtkRecAdd( Abc_Ntk_t * pNtk, int fUseSOPB)
If_Par_t Pars, * pPars = &Pars;
Abc_Ntk_t * pNtkNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Performing renoding with choices.\n" );
@@ -1739,7 +1739,7 @@ void Abc_NtkRecAdd( Abc_Ntk_t * pNtk, int fUseSOPB)
// perform recording
pNtkNew = Abc_NtkIf( pNtk, pPars );
Abc_NtkDelete( pNtkNew );
-s_pMan->timeTotal += clock() - clk;
+s_pMan->timeTotal += Abc_Clock() - clk;
// if ( !Abc_NtkCheck( s_pMan->pNtk ) )
// printf( "Abc_NtkRecAdd: The network check has failed.\n" );
@@ -2066,7 +2066,7 @@ void Abc_NtkRecAddSOPB( If_Man_t * pIfMan, If_Cut_t * pCut, unsigned* pInOut, ch
If_And_t This;
Rec_Obj_t ** ppSpot;
char Buffer[40], Name[20], Truth[20];
- clock_t timeBuild = clock();
+ abctime timeBuild = Abc_Clock();
unsigned * pTruth;
vAnds = If_CutDelaySopArray( pIfMan, pCut );
if(Vec_WrdSize(vAnds) > nLeaves + 3*(nLeaves-1) + s_MaxSize[nLeaves])
@@ -2129,7 +2129,7 @@ void Abc_NtkRecAddSOPB( If_Man_t * pIfMan, If_Cut_t * pCut, unsigned* pInOut, ch
printf( "F" );
return;
}
- s_pMan->timeBuild = clock() - timeBuild;
+ s_pMan->timeBuild = Abc_Clock() - timeBuild;
// Extra_PrintBinary( stdout, pInOut, 8 ); printf( "\n" );
// look up in the hash table and increase the hit number of the functional class
@@ -2164,11 +2164,11 @@ void Abc_NtkRecAddSOPB( If_Man_t * pIfMan, If_Cut_t * pCut, unsigned* pInOut, ch
Abc_ObjAssignName( pObjPo, Buffer, NULL );
// add the resulting truth table to the hash table
- timeInsert = clock();
+ timeInsert = Abc_Clock();
ppSpot = Abc_NtkRecTableLookup(s_pMan, s_pMan->pBins, s_pMan->nBins, pTruth, s_pMan->nVars );
Abc_NtkRecInsertToLookUpTable(s_pMan, ppSpot, pObj, nLeaves, s_pMan->fTrim);
- s_pMan->timeInsert += clock() - timeInsert;
- s_pMan->timeTotal = clock() - timeBuild;
+ s_pMan->timeInsert += Abc_Clock() - timeInsert;
+ s_pMan->timeTotal = Abc_Clock() - timeBuild;
return;
}
@@ -2199,8 +2199,8 @@ int Abc_NtkRecAddCut( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
unsigned * pTruth;
int i, RetValue, nNodes, nNodesBeg, nInputs = s_pMan->nVars, nLeaves = If_CutLeaveNum(pCut);
unsigned uCanonPhase;
- clock_t clk, timeInsert, timeBuild;
- //int begin = clock();
+ abctime clk, timeInsert, timeBuild;
+ //int begin = Abc_Clock();
assert( nInputs <= 16 );
assert( nInputs == (int)pCut->nLimit );
s_pMan->nTried++;
@@ -2212,10 +2212,10 @@ int Abc_NtkRecAddCut( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
}
// collect internal nodes and skip redundant cuts
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkRecCollectNodes( pIfMan, pRoot, pCut, vNodes );
-s_pMan->timeCollect += clock() - clk;
+s_pMan->timeCollect += Abc_Clock() - clk;
if ( !RetValue )
{
s_pMan->nFilterRedund++;
@@ -2230,9 +2230,9 @@ s_pMan->timeCollect += clock() - clk;
}
// compute truth table and skip the redundant structures
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkRecCutTruth( vNodes, nLeaves, s_pMan->vTtTemps, s_pMan->vTtElems );
- s_pMan->timeTruth += clock() - clk;
+ s_pMan->timeTruth += Abc_Clock() - clk;
if ( !RetValue )
{
//fprintf(file,"redundant structures\n");
@@ -2249,14 +2249,14 @@ clk = clock();
pCanonPerm[i] = i;
// semi-canonicize the truth table
-clk = clock();
+clk = Abc_Clock();
uCanonPhase = Kit_TruthSemiCanonicize( pInOut, pTemp, nLeaves, pCanonPerm );
If_CutTruthStretch(pInOut, nLeaves, s_pMan->nVars);
- s_pMan->timeCanon += clock() - clk;
+ s_pMan->timeCanon += Abc_Clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
// go through the variables in the new truth table
- timeBuild = clock();
+ timeBuild = Abc_Clock();
for ( i = 0; i < nLeaves; i++ )
{
// get hold of the corresponding leaf
@@ -2300,7 +2300,7 @@ clk = clock();
}
}
assert(pObj);
- s_pMan->timeBuild += clock() - timeBuild;
+ s_pMan->timeBuild += Abc_Clock() - timeBuild;
pTruth = (unsigned *)Vec_PtrEntry( s_pMan->vTtNodes, pObj->Id );
if ( Kit_TruthSupport(pTruth, nInputs) != Kit_BitMask(nLeaves) )
{
@@ -2350,9 +2350,9 @@ clk = clock();
Abc_ObjAssignName( pObjPo, Buffer, NULL );
// add the resulting truth table to the hash table
- timeInsert = clock();
+ timeInsert = Abc_Clock();
Abc_NtkRecInsertToLookUpTable(s_pMan, ppSpot, pObj, nLeaves, s_pMan->fTrim);
- s_pMan->timeInsert += clock() - timeInsert;
+ s_pMan->timeInsert += Abc_Clock() - timeInsert;
if (pIfMan->pPars->fDelayOpt)
Abc_NtkRecAddSOPB(pIfMan, pCut, pTruth, pCanonPerm, uCanonPhase );
return 1;
@@ -2776,7 +2776,7 @@ void SetUseCut(If_Cut_t* pCut, Rec_Obj_t * pRecObj, char * pCanonPerm)
int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
{
//int fVerbose = 0;
- clock_t timeDelayComput, timeTotal = clock(), timeCanonicize;
+ abctime timeDelayComput, timeTotal = Abc_Clock(), timeCanonicize;
int nLeaves, i, DelayMin = ABC_INFINITY , * pDelayBest = &DelayMin;
char pCanonPerm[16];
unsigned uCanonPhase;
@@ -2813,17 +2813,17 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
return DelayMin;
}
- timeCanonicize = clock();
+ timeCanonicize = Abc_Clock();
//canonicize
for (i = 0; i < nLeaves; i++)
pCanonPerm[i] = i;
uCanonPhase = Kit_TruthSemiCanonicize(pInOut, pTemp, nLeaves, pCanonPerm);
If_CutTruthStretch(pInOut, nLeaves, nVars);
- s_pMan->timeIfCanonicize += clock() - timeCanonicize;
- timeDelayComput = clock();
+ s_pMan->timeIfCanonicize += Abc_Clock() - timeCanonicize;
+ timeDelayComput = Abc_Clock();
pCandMin = Abc_NtkRecLookUpBest(p, pCut, pInOut, pCanonPerm, NULL,pDelayBest);
assert (!(pCandMin == NULL && nLeaves == 2));
- s_pMan->timeIfComputDelay += clock() - timeDelayComput;
+ s_pMan->timeIfComputDelay += Abc_Clock() - timeDelayComput;
//functional class not found in the library.
if ( pCandMin == NULL )
{
@@ -2882,7 +2882,7 @@ int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
{
pCut->pPerm[(int)pCanonPerm[i]] = pCandMin->pinToPinDelay[i];
}
- s_pMan->timeIfTotal += clock() - timeTotal;
+ s_pMan->timeIfTotal += Abc_Clock() - timeTotal;
pCut->Cost = pCandMin->cost;
return DelayMin;
diff --git a/src/base/abci/abcRec2.c b/src/base/abci/abcRec2.c
index 385ec520..66e1e8a6 100644
--- a/src/base/abci/abcRec2.c
+++ b/src/base/abci/abcRec2.c
@@ -538,7 +538,7 @@ void Abc_NtkRecFilter2(int nLimit)
int previous = REC_EMPTY_ID, entry = REC_EMPTY_ID, pTemp;
int i;
Gia_Man_t * pGia = s_pMan->pGia, *newPGia;
- //int time = clock();
+ //int time = Abc_Clock();
Abc_ManRec_t2 *p = s_pMan;
// Gia_Obj_t * pObj;
char fileName[256];
@@ -588,8 +588,8 @@ void Abc_NtkRecFilter2(int nLimit)
Abc_NtkRecStop2();
Abc_Print(1, "Record stopped.");
// collect runtime stats
- //s_pMan->timeTrim += clock() - time;
- //s_pMan->timeTotal += clock() - time;
+ //s_pMan->timeTrim += Abc_Clock() - time;
+ //s_pMan->timeTotal += Abc_Clock() - time;
}
@@ -652,7 +652,7 @@ static void Abc_NtkRecResizeHash2(Abc_ManRec_t2* p)
int * pBinsNew, *ppSpot;
int pEntry, pTemp;
int nBinsNew, Counter, i;
- int clk = clock();
+ int clk = Abc_Clock();
// get the new table size
nBinsNew = Cudd_Prime( 2 * p->nBins );
printf("Hash table resize from %d to %d.\n", p->nBins, nBinsNew);
@@ -677,8 +677,8 @@ static void Abc_NtkRecResizeHash2(Abc_ManRec_t2* p)
ABC_FREE( p->pBins );
p->pBins = pBinsNew;
p->nBins = nBinsNew;
- p->timeReHash += clock() - clk;
- p->timeTotal += clock() - clk;
+ p->timeReHash += Abc_Clock() - clk;
+ p->timeTotal += Abc_Clock() - clk;
}
@@ -1032,7 +1032,7 @@ void Abc_NtkRecStart2( Gia_Man_t * pGia, int nVars, int nCuts, int fTrim )
int * ppSpot;
unsigned * pTruth;
int i;//, j = 0;
- int clkTotal = clock(), clk, timeInsert;
+ int clkTotal = Abc_Clock(), clk, timeInsert;
assert( s_pMan == NULL );
if ( pGia == NULL )
@@ -1104,7 +1104,7 @@ void Abc_NtkRecStart2( Gia_Man_t * pGia, int nVars, int nCuts, int fTrim )
p->pBins = ABC_ALLOC( int, p->nBins );
memset( p->pBins, -1, sizeof(int) * p->nBins );
-clk = clock();
+clk = Abc_Clock();
// Gia_ManForEachPo( pGia, pObj, i )
// {
// pTruthSrc = (unsigned *)Gia_ObjComputeTruthTable(pGia, pObj);
@@ -1112,10 +1112,10 @@ clk = clock();
// // Kit_TruthCopy(pTruthDst, pTruthSrc, p->nVars);
// Rec_MemSetEntry( p, Gia_ObjCioId(pObj), pTruthSrc );
// }
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
// insert the PO nodes into the table
-timeInsert = clock();
+timeInsert = Abc_Clock();
Abc_NtkRecMarkInputs(p, pGia);
Gia_ManForEachPo( pGia, pObj, i )
{
@@ -1134,7 +1134,7 @@ timeInsert = clock();
ppSpot = Abc_NtkRecTableLookup2(p, p->pBins, p->nBins, pTruth, p->nVars );
Abc_NtkRecInsertToLookUpTable2(p, ppSpot, pObj, Abc_ObjGetMax2(p->vInputs, pGia, pFanin), pTruth, p->fTrim);
}
-p->timeInsert += clock() - timeInsert;
+p->timeInsert += Abc_Clock() - timeInsert;
// temporaries
p->pBytes = ABC_ALLOC( int, 4*p->nWords );
@@ -1147,7 +1147,7 @@ p->timeInsert += clock() - timeInsert;
p->vLabelsInt = Vec_IntStart( 1000 );
- p->timeTotal += clock() - clkTotal;
+ p->timeTotal += Abc_Clock() - clkTotal;
}
/**Function*************************************************************
@@ -1482,7 +1482,7 @@ int Abc_NtkRecAddCut2( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
int i, RetValue, nNodes, nNodesBeg, nInputs = s_pMan->nVars, nLeaves = If_CutLeaveNum(pCut);
unsigned uCanonPhase;
int clk, timeInsert, timeBuild;
- //int begin = clock();
+ //int begin = Abc_Clock();
assert( nInputs <= 16 );
assert( nInputs == (int)pCut->nLimit );
s_pMan->nTried++;
@@ -1493,10 +1493,10 @@ int Abc_NtkRecAddCut2( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
return 1;
}
// collect internal nodes and skip redundant cuts
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkRecCollectNodes( pIfMan, pRoot, pCut, vNodes );
-s_pMan->timeCollect += clock() - clk;
+s_pMan->timeCollect += Abc_Clock() - clk;
if ( !RetValue )
{
s_pMan->nFilterRedund++;
@@ -1512,9 +1512,9 @@ s_pMan->timeCollect += clock() - clk;
// compute truth table and skip the redundant structures
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkRecCutTruth( vNodes, nLeaves, s_pMan->vTtTemps, s_pMan->vTtElems );
- s_pMan->timeTruth += clock() - clk;
+ s_pMan->timeTruth += Abc_Clock() - clk;
if ( !RetValue )
{
//fprintf(file,"redundant structures\n");
@@ -1531,15 +1531,15 @@ clk = clock();
pCanonPerm[i] = i;
// semi-canonicize the truth table
-clk = clock();
+clk = Abc_Clock();
//uCanonPhase = Kit_TruthSemiCanonicize( pInOut, pTemp, nLeaves, pCanonPerm );
uCanonPhase = Kit_TruthSemiCanonicize_new( pInOut, pTemp, nLeaves, pCanonPerm );
If_CutTruthStretch(pInOut, nLeaves, s_pMan->nVars);
- s_pMan->timeCanon += clock() - clk;
+ s_pMan->timeCanon += Abc_Clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
// go through the variables in the new truth table
-timeBuild = clock();
+timeBuild = Abc_Clock();
for ( i = 0; i < nLeaves; i++ )
{
// get hold of the corresponding leaf
@@ -1570,7 +1570,7 @@ timeBuild = clock();
//assert(pObj);
pObj = Gia_ManObj(pAig, Abc_Lit2Var(iRecObj));
pTruth = (unsigned *)Gia_ObjComputeTruthTable(pAig, pObj);
-s_pMan->timeBuild += clock() - timeBuild;
+s_pMan->timeBuild += Abc_Clock() - timeBuild;
if ( Kit_TruthSupport(pTruth, nInputs) != Kit_BitMask(nLeaves) )
{
@@ -1620,9 +1620,9 @@ s_pMan->timeBuild += clock() - timeBuild;
//Rec_MemSetEntry( s_pMan, Gia_ObjCioId(pPO), pTruthSrc );
// add the resulting truth table to the hash table
- timeInsert = clock();
+ timeInsert = Abc_Clock();
Abc_NtkRecInsertToLookUpTable2(s_pMan, ppSpot, pPO, nLeaves, pTruth, s_pMan->fTrim);
- s_pMan->timeInsert += clock() - timeInsert;
+ s_pMan->timeInsert += Abc_Clock() - timeInsert;
// if (pIfMan->pPars->fDelayOpt)
// Abc_NtkRecAddSOPB(pIfMan, pCut, pTruth, pCanonPerm, uCanonPhase );
return 1;
@@ -1646,7 +1646,7 @@ void Abc_NtkRecAdd2( Abc_Ntk_t * pNtk, int fUseSOPB)
If_Par_t Pars, * pPars = &Pars;
Abc_Ntk_t * pNtkNew;
- int clk = clock();
+ int clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Performing recoding structures with choices.\n" );
@@ -1701,7 +1701,7 @@ void Abc_NtkRecAdd2( Abc_Ntk_t * pNtk, int fUseSOPB)
// perform recording
pNtkNew = Abc_NtkIf( pNtk, pPars );
Abc_NtkDelete( pNtkNew );
-s_pMan->timeTotal += clock() - clk;
+s_pMan->timeTotal += Abc_Clock() - clk;
// if ( !Abc_NtkCheck( s_pMan->pNtk ) )
// printf( "Abc_NtkRecAdd: The network check has failed.\n" );
@@ -1843,7 +1843,7 @@ static inline int If_CutComputDelay(If_Man_t* p, Rec_Obj_t2* entry, If_Cut_t* pC
int If_CutDelayRecCost2(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
{
//int fVerbose = 0;
- int timeDelayComput, timeTotal = clock(), timeCanonicize;
+ int timeDelayComput, timeTotal = Abc_Clock(), timeCanonicize;
int nLeaves, i, DelayMin = ABC_INFINITY , * pDelayBest = &DelayMin;
char pCanonPerm[16];
unsigned uCanonPhase;
@@ -1880,17 +1880,17 @@ int If_CutDelayRecCost2(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
return DelayMin;
}
- timeCanonicize = clock();
+ timeCanonicize = Abc_Clock();
//canonicize
for (i = 0; i < nLeaves; i++)
pCanonPerm[i] = i;
uCanonPhase = Kit_TruthSemiCanonicize_new(pInOut, pTemp, nLeaves, pCanonPerm);
If_CutTruthStretch(pInOut, nLeaves, nVars);
- s_pMan->timeIfCanonicize += clock() - timeCanonicize;
- timeDelayComput = clock();
+ s_pMan->timeIfCanonicize += Abc_Clock() - timeCanonicize;
+ timeDelayComput = Abc_Clock();
pCandMin = Abc_NtkRecLookUpBest(p, pCut, pInOut, pCanonPerm, NULL,pDelayBest);
assert (!(pCandMin == NULL && nLeaves == 2));
- s_pMan->timeIfComputDelay += clock() - timeDelayComput;
+ s_pMan->timeIfComputDelay += Abc_Clock() - timeDelayComput;
//functional class not found in the library.
if ( pCandMin == NULL )
{
@@ -1918,7 +1918,7 @@ int If_CutDelayRecCost2(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj)
{
pCut->pPerm[(int)pCanonPerm[i]] = pCandMin->pinToPinDelay[i];
}
- s_pMan->timeIfTotal += clock() - timeTotal;
+ s_pMan->timeIfTotal += Abc_Clock() - timeTotal;
pCut->Cost = pCandMin->cost;
return DelayMin;
@@ -1974,7 +1974,7 @@ Hop_Obj_t * Abc_RecToHop2( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
char pCanonPerm[16];
unsigned *pInOut = s_pMan->pTemp1;
unsigned *pTemp = s_pMan->pTemp2;
- int time = clock();
+ int time = Abc_Clock();
int fCompl;
int * pCompl = &fCompl;
nLeaves = If_CutLeaveNum(pCut);
@@ -2058,8 +2058,8 @@ Hop_Obj_t * Abc_RecToHop2( Hop_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut,
else assert( 0 );
- s_pMan->timeIfDerive += clock() - time;
- s_pMan->timeIfTotal += clock() - time;
+ s_pMan->timeIfDerive += Abc_Clock() - time;
+ s_pMan->timeIfTotal += Abc_Clock() - time;
// complement the result if needed
return Hop_NotCond(pHopObj, (pCut->fCompl)^(((uCanonPhase & (1 << nLeaves)) > 0)) ^ fCompl);
}
@@ -2087,7 +2087,7 @@ int Abc_RecToGia2( Gia_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_
char pCanonPerm[16];
unsigned *pInOut = s_pMan->pTemp1;
unsigned *pTemp = s_pMan->pTemp2;
- int time = clock();
+ int time = Abc_Clock();
int fCompl;
int * pCompl = &fCompl;
nLeaves = If_CutLeaveNum(pCut);
@@ -2157,8 +2157,8 @@ int Abc_RecToGia2( Gia_Man_t * pMan, If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_
pHopObj = Vec_IntEntry(s_pMan->vLabelsInt, Gia_ObjCioId(pGiaObj));
else assert( 0 );
- s_pMan->timeIfDerive += clock() - time;
- s_pMan->timeIfTotal += clock() - time;
+ s_pMan->timeIfDerive += Abc_Clock() - time;
+ s_pMan->timeIfTotal += Abc_Clock() - time;
// complement the result if needed
return Abc_LitNotCond(pHopObj, (pCut->fCompl)^(((uCanonPhase & (1 << nLeaves)) > 0)) ^ fCompl);
}
@@ -2405,7 +2405,7 @@ void Abc_NtkRecLibMerge2(Gia_Man_t* pGia2)
int i;
Gia_Obj_t * pObj;
Abc_ManRec_t2 * p = s_pMan;
- int clk = clock();
+ int clk = Abc_Clock();
if ( Gia_ManPiNum(pGia2) > s_pMan->nVars )
{
printf( "The library has more inputs than the record.\n");
@@ -2432,8 +2432,8 @@ void Abc_NtkRecLibMerge2(Gia_Man_t* pGia2)
}
ABC_FREE(pGia2->pCopies);
- s_pMan->timeMerge += clock() - clk;
- s_pMan->timeTotal += clock() - clk;
+ s_pMan->timeMerge += Abc_Clock() - clk;
+ s_pMan->timeTotal += Abc_Clock() - clk;
}
diff --git a/src/base/abci/abcRec3.c b/src/base/abci/abcRec3.c
index 689f73f2..68bb8cdc 100644
--- a/src/base/abci/abcRec3.c
+++ b/src/base/abci/abcRec3.c
@@ -84,13 +84,13 @@ struct Lms_Man_t_
int nAddedFuncs;
int nHoleInTheWall;
// runtime
- clock_t timeTruth;
- clock_t timeCanon;
- clock_t timeBuild;
- clock_t timeCheck;
- clock_t timeInsert;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeTruth;
+ abctime timeCanon;
+ abctime timeBuild;
+ abctime timeCheck;
+ abctime timeInsert;
+ abctime timeOther;
+ abctime timeTotal;
};
static Lms_Man_t * s_pMan3 = NULL;
@@ -305,7 +305,7 @@ void Lms_GiaPrintSubgraph( Gia_Man_t * p, Gia_Obj_t * pObj )
Lms_Man_t * Lms_ManStart( Gia_Man_t * pGia, int nVars, int nCuts, int fFuncOnly, int fVerbose )
{
Lms_Man_t * p;
- clock_t clk, clk2 = clock();
+ abctime clk, clk2 = Abc_Clock();
// if GIA is given, use the number of variables from GIA
nVars = pGia ? Gia_ManCiNum(pGia) : nVars;
assert( nVars >= 6 && nVars <= LMS_VAR_MAX );
@@ -342,12 +342,12 @@ Lms_Man_t * Lms_ManStart( Gia_Man_t * pGia, int nVars, int nCuts, int fFuncOnly,
p->nAdded = Gia_ManCoNum( p->pGia );
Gia_ManForEachCo( p->pGia, pObj, i )
{
- clk = clock();
+ clk = Abc_Clock();
pTruth = Gia_ObjComputeTruthTable( p->pGia, pObj );
- p->timeTruth += clock() - clk;
- clk = clock();
+ p->timeTruth += Abc_Clock() - clk;
+ clk = Abc_Clock();
Index = Vec_MemHashInsert( p->vTtMem, pTruth );
- p->timeInsert += clock() - clk;
+ p->timeInsert += Abc_Clock() - clk;
assert( Index == Prev || Index == Prev + 1 ); // GIA subgraphs should be ordered
Vec_IntPush( p->vTruthIds, Index );
Prev = Index;
@@ -357,7 +357,7 @@ Lms_Man_t * Lms_ManStart( Gia_Man_t * pGia, int nVars, int nCuts, int fFuncOnly,
p->vNodes = Vec_PtrAlloc( 1000 );
p->vLabelsP = Vec_PtrAlloc( 1000 );
p->vLabels = Vec_IntAlloc( 1000 );
-p->timeTotal += clock() - clk2;
+p->timeTotal += Abc_Clock() - clk2;
return p;
}
void Lms_ManStop( Lms_Man_t * p )
@@ -575,7 +575,7 @@ void Abc_NtkRecLibMerge3( Gia_Man_t * pLib )
word * pTruth;
int i, k, Index, iFanin0, iFanin1, nLeaves;
Gia_Obj_t * pObjPo, * pDriver, * pTemp = NULL;
- clock_t clk, clk2 = clock();
+ abctime clk, clk2 = Abc_Clock();
if ( Gia_ManCiNum(pLib) != Gia_ManCiNum(pGia) )
{
@@ -597,11 +597,11 @@ void Abc_NtkRecLibMerge3( Gia_Man_t * pLib )
assert( nLeaves > 1 );
// compute the truth table
-clk = clock();
+clk = Abc_Clock();
pTruth = Gia_ObjComputeTruthTable( pLib, Gia_ObjFanin0(pObjPo) );
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
// semi-canonicize
-clk = clock();
+clk = Abc_Clock();
memcpy( p->pTemp1, pTruth, p->nWords * sizeof(word) );
#ifdef LMS_USE_OLD_FORM
uCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
@@ -609,12 +609,12 @@ clk = clock();
uCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
-p->timeCanon += clock() - clk;
+p->timeCanon += Abc_Clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
if ( nLeaves == 2 && Abc_TtSupportSize(pTruth, 2) != 2 )
continue;
-clk = clock();
+clk = Abc_Clock();
// map cut leaves into elementary variables of GIA
for ( i = 0; i < nLeaves; i++ )
Gia_ManCi( pLib, pCanonPerm[i] )->Value = Abc_Var2Lit( Gia_ObjId(pGia, Gia_ManPi(pGia, i)), (uCanonPhase >> i) & 1 );
@@ -626,7 +626,7 @@ clk = clock();
iFanin1 = Abc_LitNotCond( Gia_ObjFanin1(pTemp)->Value, Gia_ObjFaninC1(pTemp) );
pTemp->Value = Gia_ManHashAnd( pGia, iFanin0, iFanin1 );
}
-p->timeBuild += clock() - clk;
+p->timeBuild += Abc_Clock() - clk;
// check if this node is already driving a PO
assert( Gia_ObjIsAnd(pTemp) );
@@ -643,10 +643,10 @@ p->timeBuild += clock() - clk;
// verify truth table
if ( fCheck )
{
-clk = clock();
+clk = Abc_Clock();
pTemp = Gia_ManCo(pGia, Gia_ManCoNum(pGia)-1);
pTruth = Gia_ObjComputeTruthTable( pGia, Gia_ManCo(pGia, Gia_ManCoNum(pGia)-1) );
-p->timeCheck += clock() - clk;
+p->timeCheck += Abc_Clock() - clk;
if ( memcmp( p->pTemp1, pTruth, p->nWords * sizeof(word) ) != 0 )
{
@@ -663,17 +663,17 @@ p->timeCheck += clock() - clk;
}
}
-clk = clock();
+clk = Abc_Clock();
// add the resulting truth table to the hash table
Index = Vec_MemHashInsert( p->vTtMem, p->pTemp1 );
// save truth table ID
Vec_IntPush( p->vTruthIds, Index );
assert( Gia_ManCoNum(pGia) == Vec_IntSize(p->vTruthIds) );
p->nAdded++;
-p->timeInsert += clock() - clk;
+p->timeInsert += Abc_Clock() - clk;
}
Vec_StrFree( vSupps );
-p->timeTotal += clock() - clk2;
+p->timeTotal += Abc_Clock() - clk2;
}
@@ -700,7 +700,7 @@ int Abc_NtkRecAddCut3( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
Gia_Obj_t * pDriver;
If_Obj_t * pIfObj = NULL;
word * pTruth;
- clock_t clk;
+ abctime clk;
p->nTried++;
// skip small cuts
@@ -715,7 +715,7 @@ int Abc_NtkRecAddCut3( If_Man_t * pIfMan, If_Obj_t * pRoot, If_Cut_t * pCut )
// Vec_MemHashInsert( p->vTtMem2, If_CutTruthW(pCut) );
// semi-canonicize truth table
-clk = clock();
+clk = Abc_Clock();
memcpy( p->pTemp1, If_CutTruthW(pCut), p->nWords * sizeof(word) );
#ifdef LMS_USE_OLD_FORM
uCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
@@ -723,12 +723,12 @@ clk = clock();
uCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
-p->timeCanon += clock() - clk;
+p->timeCanon += Abc_Clock() - clk;
// pCanonPerm and uCanonPhase show what was the variable corresponding to each var in the current truth
if ( p->pGia == NULL )
{
-clk = clock();
+clk = Abc_Clock();
// add the resulting truth table to the hash table
Index = Vec_MemHashInsert( p->vTtMem, p->pTemp1 );
/*
@@ -741,21 +741,21 @@ clk = clock();
Vec_IntPush( p->vTruthFreqs, 1 );
*/
p->nAdded++;
-p->timeInsert += clock() - clk;
+p->timeInsert += Abc_Clock() - clk;
return 1;
}
// collect internal nodes and skip redundant cuts
-clk = clock();
+clk = Abc_Clock();
If_CutTraverse( pIfMan, pRoot, pCut, vNodes );
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
if ( Vec_PtrSize(vNodes) > 253 )
{
p->nFilterSize++;
return 1;
}
-clk = clock();
+clk = Abc_Clock();
// map cut leaves into elementary variables of GIA
for ( i = 0; i < nLeaves; i++ )
If_ManObj( pIfMan, pCut->pLeaves[(int)pCanonPerm[i]] )->iCopy = Abc_Var2Lit( Gia_ObjId(pGia, Gia_ManPi(pGia, i)), (uCanonPhase >> i) & 1 );
@@ -775,7 +775,7 @@ clk = clock();
pIfObj->iCopy = Gia_ManHashAnd( pGia, iFanin0, iFanin1 );
}
p->nHoleInTheWall += fHole;
-p->timeBuild += clock() - clk;
+p->timeBuild += Abc_Clock() - clk;
// check if this node is already driving a PO
assert( If_ObjIsAnd(pIfObj) );
@@ -790,9 +790,9 @@ p->timeBuild += clock() - clk;
Gia_ManAppendCo( pGia, Abc_LitNotCond( pIfObj->iCopy, (uCanonPhase >> nLeaves) & 1 ) );
// verify truth table
-clk = clock();
+clk = Abc_Clock();
pTruth = Gia_ObjComputeTruthTable( pGia, Gia_ManCo(pGia, Gia_ManCoNum(pGia)-1) );
-p->timeCheck += clock() - clk;
+p->timeCheck += Abc_Clock() - clk;
if ( memcmp( p->pTemp1, pTruth, p->nWords * sizeof(word) ) != 0 )
{
/*
@@ -808,14 +808,14 @@ p->timeCheck += clock() - clk;
return 1;
}
-clk = clock();
+clk = Abc_Clock();
// add the resulting truth table to the hash table
Index = Vec_MemHashInsert( p->vTtMem, p->pTemp1 );
// save truth table ID
Vec_IntPush( p->vTruthIds, Index );
assert( Gia_ManCoNum(pGia) == Vec_IntSize(p->vTruthIds) );
p->nAdded++;
-p->timeInsert += clock() - clk;
+p->timeInsert += Abc_Clock() - clk;
return 1;
}
@@ -835,7 +835,7 @@ void Abc_NtkRecAdd3( Abc_Ntk_t * pNtk, int fUseSOPB )
extern Abc_Ntk_t * Abc_NtkIf( Abc_Ntk_t * pNtk, If_Par_t * pPars );
If_Par_t Pars, * pPars = &Pars;
Abc_Ntk_t * pNtkNew;
- int clk = clock();
+ int clk = Abc_Clock();
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Performing recoding structures with choices.\n" );
// remember that the manager was used for library construction
@@ -873,7 +873,7 @@ void Abc_NtkRecAdd3( Abc_Ntk_t * pNtk, int fUseSOPB )
// perform recording
pNtkNew = Abc_NtkIf( pNtk, pPars );
Abc_NtkDelete( pNtkNew );
-s_pMan3->timeTotal += clock() - clk;
+s_pMan3->timeTotal += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -907,7 +907,7 @@ static inline int If_CutFindBestStruct( If_Man_t * pIfMan, If_Cut_t * pCut, char
int BestDelay = ABC_INFINITY, BestArea = ABC_INFINITY, Delay, Area;
int uSupport, nLeaves = If_CutLeaveNum( pCut );
word DelayProfile;
- clock_t clk;
+ abctime clk;
assert( nLeaves > 1 );
pCut->fUser = 1;
// compute support
@@ -931,7 +931,7 @@ static inline int If_CutFindBestStruct( If_Man_t * pIfMan, If_Cut_t * pCut, char
assert( Gia_WordCountOnes(uSupport) == nLeaves );
// semicanonicize the function
-clk = clock();
+clk = Abc_Clock();
memcpy( p->pTemp1, If_CutTruthW(pCut), p->nWords * sizeof(word) );
#ifdef LMS_USE_OLD_FORM
*puCanonPhase = Kit_TruthSemiCanonicize( (unsigned *)p->pTemp1, (unsigned *)p->pTemp2, nLeaves, pCanonPerm );
@@ -939,7 +939,7 @@ clk = clock();
*puCanonPhase = Abc_TtCanonicize( p->pTemp1, nLeaves, pCanonPerm );
#endif
Abc_TtStretch5( (unsigned *)p->pTemp1, nLeaves, p->nVars );
-p->timeCanon += clock() - clk;
+p->timeCanon += Abc_Clock() - clk;
// get TT ID for the given class
pTruthId = Vec_MemHashLookup( p->vTtMem, p->pTemp1 );
@@ -1381,13 +1381,13 @@ int Abc_NtkRecIsRunning3()
}
Gia_Man_t * Abc_NtkRecGetGia3()
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
printf( "Before normalizing: Library has %d classes and %d AIG subgraphs with %d AND nodes.\n",
Vec_MemEntryNum(s_pMan3->vTtMem), Gia_ManPoNum(s_pMan3->pGia), Gia_ManAndNum(s_pMan3->pGia) );
Lms_GiaNormalize( s_pMan3 );
printf( "After normalizing: Library has %d classes and %d AIG subgraphs with %d AND nodes.\n",
Vec_MemEntryNum(s_pMan3->vTtMem), Gia_ManPoNum(s_pMan3->pGia), Gia_ManAndNum(s_pMan3->pGia) );
- Abc_PrintTime( 1, "Normalization runtime", clock() - clk );
+ Abc_PrintTime( 1, "Normalization runtime", Abc_Clock() - clk );
s_pMan3->fLibConstr = 0;
return s_pMan3->pGia;
}
diff --git a/src/base/abci/abcRefactor.c b/src/base/abci/abcRefactor.c
index cfc7bd39..891deff9 100644
--- a/src/base/abci/abcRefactor.c
+++ b/src/base/abci/abcRefactor.c
@@ -50,15 +50,15 @@ struct Abc_ManRef_t_
int nNodesBeg;
int nNodesEnd;
// runtime statistics
- clock_t timeCut;
- clock_t timeBdd;
- clock_t timeDcs;
- clock_t timeSop;
- clock_t timeFact;
- clock_t timeEval;
- clock_t timeRes;
- clock_t timeNtk;
- clock_t timeTotal;
+ abctime timeCut;
+ abctime timeBdd;
+ abctime timeDcs;
+ abctime timeSop;
+ abctime timeFact;
+ abctime timeEval;
+ abctime timeRes;
+ abctime timeNtk;
+ abctime timeTotal;
};
static void Abc_NtkManRefPrintStats( Abc_ManRef_t * p );
@@ -95,7 +95,7 @@ int Abc_NtkRefactor( Abc_Ntk_t * pNtk, int nNodeSizeMax, int nConeSizeMax, int f
Dec_Graph_t * pFForm;
Vec_Ptr_t * vFanins;
Abc_Obj_t * pNode;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
int i, nNodes;
assert( Abc_NtkIsStrash(pNtk) );
@@ -129,19 +129,19 @@ int Abc_NtkRefactor( Abc_Ntk_t * pNtk, int nNodeSizeMax, int nConeSizeMax, int f
if ( i >= nNodes )
break;
// compute a reconvergence-driven cut
-clk = clock();
+clk = Abc_Clock();
vFanins = Abc_NodeFindCut( pManCut, pNode, fUseDcs );
-pManRef->timeCut += clock() - clk;
+pManRef->timeCut += Abc_Clock() - clk;
// evaluate this cut
-clk = clock();
+clk = Abc_Clock();
pFForm = Abc_NodeRefactor( pManRef, pNode, vFanins, fUpdateLevel, fUseZeros, fUseDcs, fVerbose );
-pManRef->timeRes += clock() - clk;
+pManRef->timeRes += Abc_Clock() - clk;
if ( pFForm == NULL )
continue;
// acceptable replacement found, update the graph
-clk = clock();
+clk = Abc_Clock();
Dec_GraphUpdateNetwork( pNode, pFForm, fUpdateLevel, pManRef->nLastGain );
-pManRef->timeNtk += clock() - clk;
+pManRef->timeNtk += Abc_Clock() - clk;
Dec_GraphFree( pFForm );
// {
// extern int s_TotalChanges;
@@ -149,7 +149,7 @@ pManRef->timeNtk += clock() - clk;
// }
}
Extra_ProgressBarStop( pProgress );
-pManRef->timeTotal = clock() - clkStart;
+pManRef->timeTotal = Abc_Clock() - clkStart;
pManRef->nNodesEnd = Abc_NtkNodeNum(pNtk);
// print statistics of the manager
@@ -197,7 +197,7 @@ Dec_Graph_t * Abc_NodeRefactor( Abc_ManRef_t * p, Abc_Obj_t * pNode, Vec_Ptr_t *
Dec_Graph_t * pFForm;
DdNode * bNodeFunc;
int nNodesSaved, nNodesAdded, i;
- clock_t clk;
+ abctime clk;
char * pSop;
int Required;
@@ -206,16 +206,16 @@ Dec_Graph_t * Abc_NodeRefactor( Abc_ManRef_t * p, Abc_Obj_t * pNode, Vec_Ptr_t *
p->nNodesConsidered++;
// get the function of the cut
-clk = clock();
+clk = Abc_Clock();
bNodeFunc = Abc_NodeConeBdd( p->dd, p->dd->vars, pNode, vFanins, p->vVisited ); Cudd_Ref( bNodeFunc );
-p->timeBdd += clock() - clk;
+p->timeBdd += Abc_Clock() - clk;
// if don't-care are used, transform the function into ISOP
if ( fUseDcs )
{
DdNode * bNodeDc, * bNodeOn, * bNodeOnDc;
int nMints, nMintsDc;
-clk = clock();
+clk = Abc_Clock();
// get the don't-cares
bNodeDc = Abc_NodeConeDcs( p->dd, p->dd->vars + vFanins->nSize, p->dd->vars, p->vLeaves, vFanins, p->vVisited ); Cudd_Ref( bNodeDc );
nMints = (1 << vFanins->nSize);
@@ -230,7 +230,7 @@ clk = clock();
bNodeFunc = Cudd_bddIsop( p->dd, bNodeOn, bNodeOnDc ); Cudd_Ref( bNodeFunc );
Cudd_RecursiveDeref( p->dd, bNodeOn );
Cudd_RecursiveDeref( p->dd, bNodeOnDc );
-p->timeDcs += clock() - clk;
+p->timeDcs += Abc_Clock() - clk;
}
// always accept the case of constant node
@@ -246,15 +246,15 @@ p->timeDcs += clock() - clk;
}
// get the SOP of the cut
-clk = clock();
+clk = Abc_Clock();
pSop = Abc_ConvertBddToSop( NULL, p->dd, bNodeFunc, bNodeFunc, vFanins->nSize, 0, p->vCube, -1 );
-p->timeSop += clock() - clk;
+p->timeSop += Abc_Clock() - clk;
// get the factored form
-clk = clock();
+clk = Abc_Clock();
pFForm = Dec_Factor( pSop );
ABC_FREE( pSop );
-p->timeFact += clock() - clk;
+p->timeFact += Abc_Clock() - clk;
// mark the fanin boundary
// (can mark only essential fanins, belonging to bNodeFunc!)
@@ -271,9 +271,9 @@ p->timeFact += clock() - clk;
}
// detect how many new nodes will be added (while taking into account reused nodes)
-clk = clock();
+clk = Abc_Clock();
nNodesAdded = Dec_GraphToNetworkCount( pNode, pFForm, nNodesSaved, Required );
-p->timeEval += clock() - clk;
+p->timeEval += Abc_Clock() - clk;
// quit if there is no improvement
if ( nNodesAdded == -1 || (nNodesAdded == nNodesSaved && !fUseZeros) )
{
diff --git a/src/base/abci/abcRestruct.c b/src/base/abci/abcRestruct.c
index 51af25c6..1863c629 100644
--- a/src/base/abci/abcRestruct.c
+++ b/src/base/abci/abcRestruct.c
@@ -107,7 +107,7 @@ int Abc_NtkRestructure( Abc_Ntk_t * pNtk, int nCutMax, int fUpdateLevel, int fUs
Cut_Cut_t * pCutList;
Dec_Graph_t * pGraph;
Abc_Obj_t * pNode;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
int fMulti = 1;
int fResub = 0;
int i, nNodes;
@@ -125,9 +125,9 @@ int Abc_NtkRestructure( Abc_Ntk_t * pNtk, int nCutMax, int fUpdateLevel, int fUs
pManRst = Abc_NtkManRstStart( nCutMax, fUpdateLevel, fUseZeros, fVerbose );
pManRst->pNtk = pNtk;
// start the cut manager
-clk = clock();
+clk = Abc_Clock();
pManCut = Abc_NtkStartCutManForRestruct( pNtk, nCutMax, fMulti );
-pManRst->timeCut += clock() - clk;
+pManRst->timeCut += Abc_Clock() - clk;
// pNtk->pManCut = pManCut;
// resynthesize each node once
@@ -152,28 +152,28 @@ pManRst->timeCut += clock() - clk;
if ( i >= nNodes )
break;
// get the cuts for the given node
-clk = clock();
+clk = Abc_Clock();
pCutList = (Cut_Cut_t *)Abc_NodeGetCutsRecursive( pManCut, pNode, fMulti, 0 );
-pManRst->timeCut += clock() - clk;
+pManRst->timeCut += Abc_Clock() - clk;
// perform restructuring
-clk = clock();
+clk = Abc_Clock();
if ( fResub )
pGraph = Abc_NodeResubstitute( pManRst, pNode, pCutList );
else
pGraph = Abc_NodeRestructure( pManRst, pNode, pCutList );
-pManRst->timeRes += clock() - clk;
+pManRst->timeRes += Abc_Clock() - clk;
if ( pGraph == NULL )
continue;
// acceptable replacement found, update the graph
-clk = clock();
+clk = Abc_Clock();
Dec_GraphUpdateNetwork( pNode, pGraph, fUpdateLevel, pManRst->nLastGain );
-pManRst->timeNtk += clock() - clk;
+pManRst->timeNtk += Abc_Clock() - clk;
Dec_GraphFree( pGraph );
}
Extra_ProgressBarStop( pProgress );
-pManRst->timeTotal = clock() - clkStart;
+pManRst->timeTotal = Abc_Clock() - clkStart;
// print statistics of the manager
// if ( fVerbose )
@@ -342,12 +342,12 @@ Dec_Graph_t * Abc_NodeRestructureCut( Abc_ManRst_t * p, Abc_Obj_t * pRoot, Cut_C
Vec_PtrPush( p->vLeaves, pLeaf );
}
-clk = clock();
+clk = Abc_Clock();
// collect the internal nodes of the cut
// Abc_NodeConeCollect( &pRoot, 1, p->vLeaves, p->vVisited, 0 );
// derive the BDD of the cut
bFunc = Abc_NodeConeBdd( p->dd, p->dd->vars, pRoot, p->vLeaves, p->vVisited ); Cudd_Ref( bFunc );
-p->timeBdd += clock() - clk;
+p->timeBdd += Abc_Clock() - clk;
// consider the special case, when the function is a constant
if ( Cudd_IsConstant(bFunc) )
@@ -361,10 +361,10 @@ p->timeBdd += clock() - clk;
return Dec_GraphCreateConst1();
}
-clk = clock();
+clk = Abc_Clock();
// try disjoint support decomposition
pNodeDsd = Dsd_DecomposeOne( p->pManDsd, bFunc );
-p->timeDsd += clock() - clk;
+p->timeDsd += Abc_Clock() - clk;
// skip nodes with non-decomposable blocks
Dsd_TreeNodeGetInfoOne( pNodeDsd, NULL, &nMaxSize );
@@ -421,13 +421,13 @@ p->timeDsd += clock() - clk;
// detect how many new nodes will be added (while taking into account reused nodes)
-clk = clock();
+clk = Abc_Clock();
if ( nMaxSize > 3 )
pGraph = NULL;
else
pGraph = Abc_NodeEvaluateDsd( p, pNodeDsd, pRoot, Required, nNodesSaved, &nNodesAdded );
// pGraph = NULL;
-p->timeEval += clock() - clk;
+p->timeEval += Abc_Clock() - clk;
// quit if there is no improvement
if ( pGraph == NULL || nNodesAdded == -1 || (nNodesAdded == nNodesSaved && !p->fUseZeros) )
diff --git a/src/base/abci/abcResub.c b/src/base/abci/abcResub.c
index 3c970c9f..9323f9e7 100644
--- a/src/base/abci/abcResub.c
+++ b/src/base/abci/abcResub.c
@@ -62,18 +62,18 @@ struct Abc_ManRes_t_
// other data
Vec_Ptr_t * vTemp; // temporary array of nodes
// runtime statistics
- clock_t timeCut;
- clock_t timeTruth;
- clock_t timeRes;
- clock_t timeDiv;
- clock_t timeMffc;
- clock_t timeSim;
- clock_t timeRes1;
- clock_t timeResD;
- clock_t timeRes2;
- clock_t timeRes3;
- clock_t timeNtk;
- clock_t timeTotal;
+ abctime timeCut;
+ abctime timeTruth;
+ abctime timeRes;
+ abctime timeDiv;
+ abctime timeMffc;
+ abctime timeSim;
+ abctime timeRes1;
+ abctime timeResD;
+ abctime timeRes2;
+ abctime timeRes3;
+ abctime timeNtk;
+ abctime timeTotal;
// improvement statistics
int nUsedNodeC;
int nUsedNode0;
@@ -117,7 +117,7 @@ static Dec_Graph_t * Abc_ManResubDivs3( Abc_ManRes_t * p, int Required );
static Vec_Ptr_t * Abc_CutFactorLarge( Abc_Obj_t * pNode, int nLeavesMax );
static int Abc_CutVolumeCheck( Abc_Obj_t * pNode, Vec_Ptr_t * vLeaves );
-extern clock_t s_ResubTime;
+extern abctime s_ResubTime;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -144,7 +144,7 @@ int Abc_NtkResubstitute( Abc_Ntk_t * pNtk, int nCutMax, int nStepsMax, int nLeve
Dec_Graph_t * pFForm;
Vec_Ptr_t * vLeaves;
Abc_Obj_t * pNode;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
int i, nNodes;
assert( Abc_NtkIsStrash(pNtk) );
@@ -187,10 +187,10 @@ int Abc_NtkResubstitute( Abc_Ntk_t * pNtk, int nCutMax, int nStepsMax, int nLeve
break;
// compute a reconvergence-driven cut
-clk = clock();
+clk = Abc_Clock();
vLeaves = Abc_NodeFindCut( pManCut, pNode, 0 );
// vLeaves = Abc_CutFactorLarge( pNode, nCutMax );
-pManRes->timeCut += clock() - clk;
+pManRes->timeCut += Abc_Clock() - clk;
/*
if ( fVerbose && vLeaves )
printf( "Node %6d : Leaves = %3d. Volume = %3d.\n", pNode->Id, Vec_PtrSize(vLeaves), Abc_CutVolumeCheck(pNode, vLeaves) );
@@ -200,18 +200,18 @@ pManRes->timeCut += clock() - clk;
// get the don't-cares
if ( pManOdc )
{
-clk = clock();
+clk = Abc_Clock();
Abc_NtkDontCareClear( pManOdc );
Abc_NtkDontCareCompute( pManOdc, pNode, vLeaves, pManRes->pCareSet );
-pManRes->timeTruth += clock() - clk;
+pManRes->timeTruth += Abc_Clock() - clk;
}
// evaluate this cut
-clk = clock();
+clk = Abc_Clock();
pFForm = Abc_ManResubEval( pManRes, pNode, vLeaves, nStepsMax, fUpdateLevel, fVerbose );
// Vec_PtrFree( vLeaves );
// Abc_ManResubCleanup( pManRes );
-pManRes->timeRes += clock() - clk;
+pManRes->timeRes += Abc_Clock() - clk;
if ( pFForm == NULL )
continue;
pManRes->nTotalGain += pManRes->nLastGain;
@@ -225,13 +225,13 @@ pManRes->timeRes += clock() - clk;
}
*/
// acceptable replacement found, update the graph
-clk = clock();
+clk = Abc_Clock();
Dec_GraphUpdateNetwork( pNode, pFForm, fUpdateLevel, pManRes->nLastGain );
-pManRes->timeNtk += clock() - clk;
+pManRes->timeNtk += Abc_Clock() - clk;
Dec_GraphFree( pFForm );
}
Extra_ProgressBarStop( pProgress );
-pManRes->timeTotal = clock() - clkStart;
+pManRes->timeTotal = Abc_Clock() - clkStart;
pManRes->nNodesEnd = Abc_NtkNodeNum(pNtk);
// print statistics
@@ -266,7 +266,7 @@ pManRes->timeTotal = clock() - clkStart;
printf( "Abc_NtkRefactor: The network check has failed.\n" );
return 0;
}
-s_ResubTime = clock() - clkStart;
+s_ResubTime = Abc_Clock() - clkStart;
return 1;
}
@@ -1624,7 +1624,7 @@ Dec_Graph_t * Abc_ManResubEval( Abc_ManRes_t * p, Abc_Obj_t * pRoot, Vec_Ptr_t *
extern int Abc_NodeMffcInside( Abc_Obj_t * pNode, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vInside );
Dec_Graph_t * pGraph;
int Required;
- clock_t clk;
+ abctime clk;
Required = fUpdateLevel? Abc_ObjRequiredLevel(pRoot) : ABC_INFINITY;
@@ -1635,26 +1635,26 @@ Dec_Graph_t * Abc_ManResubEval( Abc_ManRes_t * p, Abc_Obj_t * pRoot, Vec_Ptr_t *
p->nLastGain = -1;
// collect the MFFC
-clk = clock();
+clk = Abc_Clock();
p->nMffc = Abc_NodeMffcInside( pRoot, vLeaves, p->vTemp );
-p->timeMffc += clock() - clk;
+p->timeMffc += Abc_Clock() - clk;
assert( p->nMffc > 0 );
// collect the divisor nodes
-clk = clock();
+clk = Abc_Clock();
if ( !Abc_ManResubCollectDivs( p, pRoot, vLeaves, Required ) )
return NULL;
- p->timeDiv += clock() - clk;
+ p->timeDiv += Abc_Clock() - clk;
p->nTotalDivs += p->nDivs;
p->nTotalLeaves += p->nLeaves;
// simulate the nodes
-clk = clock();
+clk = Abc_Clock();
Abc_ManResubSimulate( p->vDivs, p->nLeaves, p->vSims, p->nLeavesMax, p->nWords );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
-clk = clock();
+clk = Abc_Clock();
// consider constants
if ( (pGraph = Abc_ManResubQuit( p )) )
{
@@ -1666,14 +1666,14 @@ clk = clock();
// consider equal nodes
if ( (pGraph = Abc_ManResubDivs0( p )) )
{
-p->timeRes1 += clock() - clk;
+p->timeRes1 += Abc_Clock() - clk;
p->nUsedNode0++;
p->nLastGain = p->nMffc;
return pGraph;
}
if ( nSteps == 0 || p->nMffc == 1 )
{
-p->timeRes1 += clock() - clk;
+p->timeRes1 += Abc_Clock() - clk;
return NULL;
}
@@ -1683,50 +1683,50 @@ p->timeRes1 += clock() - clk;
// consider one node
if ( (pGraph = Abc_ManResubDivs1( p, Required )) )
{
-p->timeRes1 += clock() - clk;
+p->timeRes1 += Abc_Clock() - clk;
p->nLastGain = p->nMffc - 1;
return pGraph;
}
-p->timeRes1 += clock() - clk;
+p->timeRes1 += Abc_Clock() - clk;
if ( nSteps == 1 || p->nMffc == 2 )
return NULL;
-clk = clock();
+clk = Abc_Clock();
// consider triples
if ( (pGraph = Abc_ManResubDivs12( p, Required )) )
{
-p->timeRes2 += clock() - clk;
+p->timeRes2 += Abc_Clock() - clk;
p->nLastGain = p->nMffc - 2;
return pGraph;
}
-p->timeRes2 += clock() - clk;
+p->timeRes2 += Abc_Clock() - clk;
// get the two level divisors
-clk = clock();
+clk = Abc_Clock();
Abc_ManResubDivsD( p, Required );
-p->timeResD += clock() - clk;
+p->timeResD += Abc_Clock() - clk;
// consider two nodes
-clk = clock();
+clk = Abc_Clock();
if ( (pGraph = Abc_ManResubDivs2( p, Required )) )
{
-p->timeRes2 += clock() - clk;
+p->timeRes2 += Abc_Clock() - clk;
p->nLastGain = p->nMffc - 2;
return pGraph;
}
-p->timeRes2 += clock() - clk;
+p->timeRes2 += Abc_Clock() - clk;
if ( nSteps == 2 || p->nMffc == 3 )
return NULL;
// consider two nodes
-clk = clock();
+clk = Abc_Clock();
if ( (pGraph = Abc_ManResubDivs3( p, Required )) )
{
-p->timeRes3 += clock() - clk;
+p->timeRes3 += Abc_Clock() - clk;
p->nLastGain = p->nMffc - 3;
return pGraph;
}
-p->timeRes3 += clock() - clk;
+p->timeRes3 += Abc_Clock() - clk;
if ( nSteps == 3 || p->nLeavesMax == 4 )
return NULL;
return NULL;
diff --git a/src/base/abci/abcRewrite.c b/src/base/abci/abcRewrite.c
index 9ce83e5f..0b0881a6 100644
--- a/src/base/abci/abcRewrite.c
+++ b/src/base/abci/abcRewrite.c
@@ -68,7 +68,7 @@ int Abc_NtkRewrite( Abc_Ntk_t * pNtk, int fUpdateLevel, int fUseZeros, int fVerb
// Vec_Ptr_t * vAddedCells = NULL, * vUpdatedNets = NULL;
Dec_Graph_t * pGraph;
int i, nNodes, nGain, fCompl;
- clock_t clk, clkStart = clock();
+ abctime clk, clkStart = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) );
// cleanup the AIG
@@ -96,9 +96,9 @@ int Abc_NtkRewrite( Abc_Ntk_t * pNtk, int fUpdateLevel, int fUseZeros, int fVerb
if ( fUpdateLevel )
Abc_NtkStartReverseLevels( pNtk, 0 );
// start the cut manager
-clk = clock();
+clk = Abc_Clock();
pManCut = Abc_NtkStartCutManForRewrite( pNtk );
-Rwr_ManAddTimeCuts( pManRwr, clock() - clk );
+Rwr_ManAddTimeCuts( pManRwr, Abc_Clock() - clk );
pNtk->pManCut = pManCut;
if ( fVeryVerbose )
@@ -137,9 +137,9 @@ Rwr_ManAddTimeCuts( pManRwr, clock() - clk );
// complement the FF if needed
if ( fCompl ) Dec_GraphComplement( pGraph );
-clk = clock();
+clk = Abc_Clock();
Dec_GraphUpdateNetwork( pNode, pGraph, fUpdateLevel, nGain );
-Rwr_ManAddTimeUpdate( pManRwr, clock() - clk );
+Rwr_ManAddTimeUpdate( pManRwr, Abc_Clock() - clk );
if ( fCompl ) Dec_GraphComplement( pGraph );
// use the array of changed nodes to update placement
@@ -147,7 +147,7 @@ Rwr_ManAddTimeUpdate( pManRwr, clock() - clk );
// Abc_PlaceUpdate( vAddedCells, vUpdatedNets );
}
Extra_ProgressBarStop( pProgress );
-Rwr_ManAddTimeTotal( pManRwr, clock() - clkStart );
+Rwr_ManAddTimeTotal( pManRwr, Abc_Clock() - clkStart );
// print stats
pManRwr->nNodesEnd = Abc_NtkNodeNum(pNtk);
if ( fVerbose )
@@ -169,9 +169,9 @@ Rwr_ManAddTimeTotal( pManRwr, clock() - clkStart );
// put the nodes into the DFS order and reassign their IDs
{
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
Abc_NtkReassignIds( pNtk );
-// ABC_PRT( "time", clock() - clk );
+// ABC_PRT( "time", Abc_Clock() - clk );
}
// Abc_AigCheckFaninOrder( pNtk->pManFunc );
// fix the levels
diff --git a/src/base/abci/abcRr.c b/src/base/abci/abcRr.c
index 86bc40ed..9a670b67 100644
--- a/src/base/abci/abcRr.c
+++ b/src/base/abci/abcRr.c
@@ -56,11 +56,11 @@ struct Abc_RRMan_t_
int nLevelsOld; // the old number of levels
int nEdgesTried; // the number of nodes tried
int nEdgesRemoved; // the number of nodes proved
- clock_t timeWindow; // the time to construct the window
- clock_t timeMiter; // the time to construct the miter
- clock_t timeProve; // the time to prove the miter
- clock_t timeUpdate; // the network update time
- clock_t timeTotal; // the total runtime
+ abctime timeWindow; // the time to construct the window
+ abctime timeMiter; // the time to construct the miter
+ abctime timeProve; // the time to prove the miter
+ abctime timeUpdate; // the network update time
+ abctime timeTotal; // the total runtime
};
static Abc_RRMan_t * Abc_RRManStart();
@@ -101,7 +101,7 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
Abc_RRMan_t * p;
Abc_Obj_t * pNode, * pFanin, * pFanout;
int i, k, m, nNodes, RetValue;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
// start the manager
p = Abc_RRManStart();
p->pNtk = pNtk;
@@ -152,9 +152,9 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
p->pFanin = pFanin;
p->pFanout = NULL;
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkRRWindow( p );
- p->timeWindow += clock() - clk;
+ p->timeWindow += Abc_Clock() - clk;
if ( !RetValue )
continue;
/*
@@ -163,16 +163,16 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
Abc_NtkShowAig( p->pWnd, 0 );
}
*/
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkRRProve( p );
- p->timeMiter += clock() - clk;
+ p->timeMiter += Abc_Clock() - clk;
if ( !RetValue )
continue;
//printf( "%d -> %d (%d)\n", pFanin->Id, pNode->Id, k );
- clk = clock();
+ clk = Abc_Clock();
Abc_NtkRRUpdate( pNtk, p->pNode, p->pFanin, p->pFanout );
- p->timeUpdate += clock() - clk;
+ p->timeUpdate += Abc_Clock() - clk;
p->nEdgesRemoved++;
break;
@@ -193,21 +193,21 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
p->pFanin = pFanin;
p->pFanout = pFanout;
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkRRWindow( p );
- p->timeWindow += clock() - clk;
+ p->timeWindow += Abc_Clock() - clk;
if ( !RetValue )
continue;
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkRRProve( p );
- p->timeMiter += clock() - clk;
+ p->timeMiter += Abc_Clock() - clk;
if ( !RetValue )
continue;
- clk = clock();
+ clk = Abc_Clock();
Abc_NtkRRUpdate( pNtk, p->pNode, p->pFanin, p->pFanout );
- p->timeUpdate += clock() - clk;
+ p->timeUpdate += Abc_Clock() - clk;
p->nEdgesRemoved++;
break;
@@ -215,7 +215,7 @@ int Abc_NtkRR( Abc_Ntk_t * pNtk, int nFaninLevels, int nFanoutLevels, int fUseFa
}
Abc_NtkRRSimulateStop(pNtk);
Extra_ProgressBarStop( pProgress );
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( fVerbose )
Abc_RRManPrintStats( p );
Abc_RRManStop( p );
@@ -353,7 +353,7 @@ int Abc_NtkRRProve( Abc_RRMan_t * p )
{
Abc_Ntk_t * pWndCopy;
int RetValue;
- clock_t clk;
+ abctime clk;
// Abc_NtkShowAig( p->pWnd, 0 );
pWndCopy = Abc_NtkDup( p->pWnd );
Abc_NtkRRUpdate( pWndCopy, p->pNode->pCopy->pCopy, p->pFanin->pCopy->pCopy, p->pFanout? p->pFanout->pCopy->pCopy : NULL );
@@ -361,9 +361,9 @@ int Abc_NtkRRProve( Abc_RRMan_t * p )
Abc_NtkReassignIds(pWndCopy);
p->pMiter = Abc_NtkMiter( p->pWnd, pWndCopy, 1, 0, 0, 0 );
Abc_NtkDelete( pWndCopy );
-clk = clock();
+clk = Abc_Clock();
RetValue = Abc_NtkMiterProve( &p->pMiter, p->pParams );
-p->timeProve += clock() - clk;
+p->timeProve += Abc_Clock() - clk;
if ( RetValue == 1 )
return 1;
return 0;
diff --git a/src/base/abci/abcSat.c b/src/base/abci/abcSat.c
index c9987d70..349ebc55 100644
--- a/src/base/abci/abcSat.c
+++ b/src/base/abci/abcSat.c
@@ -55,7 +55,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
sat_solver * pSat;
lbool status;
int RetValue;
- clock_t clk;
+ abctime clk;
if ( pNumConfs )
*pNumConfs = 0;
@@ -68,7 +68,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
// fprintf( stdout, "Warning: The miter has %d outputs. SAT will try to prove all of them.\n", Abc_NtkPoNum(pNtk) );
// load clauses into the sat_solver
- clk = clock();
+ clk = Abc_Clock();
pSat = (sat_solver *)Abc_NtkMiterSatCreate( pNtk, 0 );
if ( pSat == NULL )
return 1;
@@ -77,13 +77,13 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
//return 1;
// printf( "Created SAT problem with %d variable and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// simplify the problem
- clk = clock();
+ clk = Abc_Clock();
status = sat_solver_simplify(pSat);
// printf( "Simplified the problem to %d variables and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
if ( status == 0 )
{
sat_solver_delete( pSat );
@@ -92,7 +92,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
}
// solve the miter
- clk = clock();
+ clk = Abc_Clock();
if ( fVerbose )
pSat->verbosity = 1;
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
@@ -113,7 +113,7 @@ int Abc_NtkMiterSat( Abc_Ntk_t * pNtk, ABC_INT64_T nConfLimit, ABC_INT64_T nInsL
}
else
assert( 0 );
-// ABC_PRT( "SAT sat_solver time", clock() - clk );
+// ABC_PRT( "SAT sat_solver time", Abc_Clock() - clk );
// printf( "The number of conflicts = %d.\n", (int)pSat->sat_solver_stats.conflicts );
// if the problem is SAT, get the counterexample
@@ -630,7 +630,7 @@ void * Abc_NtkMiterSatCreate( Abc_Ntk_t * pNtk, int fAllPrimes )
{
sat_solver * pSat;
Abc_Obj_t * pNode;
- int RetValue, i; //, clk = clock();
+ int RetValue, i; //, clk = Abc_Clock();
assert( Abc_NtkIsStrash(pNtk) || Abc_NtkIsBddLogic(pNtk) );
if ( Abc_NtkIsBddLogic(pNtk) )
@@ -651,7 +651,7 @@ sat_solver_store_mark_roots( pSat );
return NULL;
}
// printf( "Ands = %6d. Muxes = %6d (%5.2f %%). ", Abc_NtkNodeNum(pNtk), nMuxes, 300.0*nMuxes/Abc_NtkNodeNum(pNtk) );
-// ABC_PRT( "Creating sat_solver", clock() - clk );
+// ABC_PRT( "Creating sat_solver", Abc_Clock() - clk );
return pSat;
}
diff --git a/src/base/abci/abcStrash.c b/src/base/abci/abcStrash.c
index 2894003b..d428af38 100644
--- a/src/base/abci/abcStrash.c
+++ b/src/base/abci/abcStrash.c
@@ -54,7 +54,7 @@ Abc_Ntk_t * Abc_NtkRestrash( Abc_Ntk_t * pNtk, int fCleanup )
Abc_Obj_t * pObj;
int i, nNodes;//, RetValue;
assert( Abc_NtkIsStrash(pNtk) );
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
// print warning about choice nodes
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Warning: The choice nodes in the original AIG are removed by strashing.\n" );
@@ -85,7 +85,7 @@ Abc_Ntk_t * Abc_NtkRestrash( Abc_Ntk_t * pNtk, int fCleanup )
Abc_NtkDelete( pNtkAig );
return NULL;
}
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
// if ( RetValue = Abc_NtkRemoveSelfFeedLatches(pNtkAig) )
// printf( "Modified %d self-feeding latches. The result may not verify.\n", RetValue );
return pNtkAig;
@@ -186,7 +186,7 @@ Abc_Ntk_t * Abc_NtkRestrashZero( Abc_Ntk_t * pNtk, int fCleanup )
int i, nNodes;//, RetValue;
int Counter = 0;
assert( Abc_NtkIsStrash(pNtk) );
-//timeRetime = clock();
+//timeRetime = Abc_Clock();
// print warning about choice nodes
if ( Abc_NtkGetChoiceNum( pNtk ) )
printf( "Warning: The choice nodes in the original AIG are removed by strashing.\n" );
@@ -239,7 +239,7 @@ Abc_Ntk_t * Abc_NtkRestrashZero( Abc_Ntk_t * pNtk, int fCleanup )
Abc_NtkDelete( pNtkAig );
return NULL;
}
-//timeRetime = clock() - timeRetime;
+//timeRetime = Abc_Clock() - timeRetime;
// if ( RetValue = Abc_NtkRemoveSelfFeedLatches(pNtkAig) )
// printf( "Modified %d self-feeding latches. The result may not verify.\n", RetValue );
return pNtkAig;
@@ -407,13 +407,13 @@ void Abc_NtkStrashPerform( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtkNew, int fAllNod
// ProgressBar * pProgress;
Vec_Ptr_t * vNodes;
Abc_Obj_t * pNodeOld;
- int i; //, clk = clock();
+ int i; //, clk = Abc_Clock();
assert( Abc_NtkIsLogic(pNtkOld) );
assert( Abc_NtkIsStrash(pNtkNew) );
// vNodes = Abc_NtkDfs( pNtkOld, fAllNodes );
vNodes = Abc_NtkDfsIter( pNtkOld, fAllNodes );
//printf( "Nodes = %d. ", Vec_PtrSize(vNodes) );
-//ABC_PRT( "Time", clock() - clk );
+//ABC_PRT( "Time", Abc_Clock() - clk );
// pProgress = Extra_ProgressBarStart( stdout, vNodes->nSize );
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pNodeOld, i )
{
diff --git a/src/base/abci/abcSymm.c b/src/base/abci/abcSymm.c
index bf6a987b..03226770 100644
--- a/src/base/abci/abcSymm.c
+++ b/src/base/abci/abcSymm.c
@@ -89,22 +89,22 @@ void Abc_NtkSymmetriesUsingSandS( Abc_Ntk_t * pNtk, int fVerbose )
void Abc_NtkSymmetriesUsingBdds( Abc_Ntk_t * pNtk, int fNaive, int fReorder, int fVerbose )
{
DdManager * dd;
- clock_t clk, clkBdd, clkSym;
+ abctime clk, clkBdd, clkSym;
int fGarbCollect = 1;
// compute the global functions
-clk = clock();
+clk = Abc_Clock();
dd = (DdManager *)Abc_NtkBuildGlobalBdds( pNtk, 10000000, 1, fReorder, fVerbose );
printf( "Shared BDD size = %d nodes.\n", Abc_NtkSizeOfGlobalBdds(pNtk) );
Cudd_AutodynDisable( dd );
if ( !fGarbCollect )
Cudd_DisableGarbageCollection( dd );
Cudd_zddVarsFromBddVars( dd, 2 );
-clkBdd = clock() - clk;
+clkBdd = Abc_Clock() - clk;
// create the collapsed network
-clk = clock();
+clk = Abc_Clock();
Ntk_NetworkSymmsBdd( dd, pNtk, fNaive, fVerbose );
-clkSym = clock() - clk;
+clkSym = Abc_Clock() - clk;
// undo the global functions
Abc_NtkFreeGlobalBdds( pNtk, 1 );
printf( "Statistics of BDD-based symmetry detection:\n" );
diff --git a/src/base/abci/abcUnate.c b/src/base/abci/abcUnate.c
index 1bd05cd6..01b9cf51 100644
--- a/src/base/abci/abcUnate.c
+++ b/src/base/abci/abcUnate.c
@@ -74,14 +74,14 @@ void Abc_NtkPrintUnateBdd( Abc_Ntk_t * pNtk, int fUseNaive, int fVerbose )
int TotalSupps = 0;
int TotalUnate = 0;
int i;
- clock_t clk = clock();
- clock_t clkBdd, clkUnate;
+ abctime clk = Abc_Clock();
+ abctime clkBdd, clkUnate;
// compute the global BDDs
dd = (DdManager *)Abc_NtkBuildGlobalBdds(pNtk, 10000000, 1, 1, fVerbose);
if ( dd == NULL )
return;
-clkBdd = clock() - clk;
+clkBdd = Abc_Clock() - clk;
// get information about the network
// dd = pNtk->pManGlob;
@@ -121,14 +121,14 @@ clkBdd = clock() - clk;
Extra_UnateInfoDissolve( p );
}
}
-clkUnate = clock() - clk - clkBdd;
+clkUnate = Abc_Clock() - clk - clkBdd;
// print stats
printf( "Ins/Outs = %4d/%4d. Total supp = %5d. Total unate = %5d.\n",
Abc_NtkCiNum(pNtk), Abc_NtkCoNum(pNtk), TotalSupps, TotalUnate );
ABC_PRT( "Glob BDDs", clkBdd );
ABC_PRT( "Unateness", clkUnate );
- ABC_PRT( "Total ", clock() - clk );
+ ABC_PRT( "Total ", Abc_Clock() - clk );
// deref the PO functions
// Abc_NtkFreeGlobalBdds( pNtk );
diff --git a/src/base/cmd/cmdPlugin.c b/src/base/cmd/cmdPlugin.c
index 2aa95e85..37a28e63 100644
--- a/src/base/cmd/cmdPlugin.c
+++ b/src/base/cmd/cmdPlugin.c
@@ -418,7 +418,7 @@ int Cmd_CommandAbcPlugIn( Abc_Frame_t * pAbc, int argc, char ** argv )
FILE * pFile;
Gia_Man_t * pGia;
int i, fd;
- clock_t clk;
+ abctime clk;
int fLeaveFiles;
/*
Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc);
@@ -536,14 +536,14 @@ int Cmd_CommandAbcPlugIn( Abc_Frame_t * pAbc, int argc, char ** argv )
// run the command line
//printf( "Running command line: %s\n", Vec_StrArray(vCommand) );
- clk = clock();
+ clk = Abc_Clock();
if ( Util_SignalSystem( Vec_StrArray(vCommand) ) )
{
Abc_Print( -1, "The following command has returned non-zero exit status:\n" );
Abc_Print( -1, "\"%s\"\n", Vec_StrArray(vCommand) );
return 1;
}
- clk = clock() - clk;
+ clk = Abc_Clock() - clk;
Vec_StrFree( vCommand );
// check if the output file exists
diff --git a/src/base/cmd/cmdStarter.c b/src/base/cmd/cmdStarter.c
index bfdd480c..16810baa 100644
--- a/src/base/cmd/cmdStarter.c
+++ b/src/base/cmd/cmdStarter.c
@@ -111,7 +111,7 @@ void Cmd_RunStarter( char * pFileName, char * pBinary, char * pCommand, int nCor
char * BufferCopy, * Buffer;
int nLines, LineMax, Line, Len;
int i, c, status, Counter;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// check the number of cores
if ( nCores < 2 )
@@ -244,7 +244,7 @@ void Cmd_RunStarter( char * pFileName, char * pBinary, char * pCommand, int nCor
// status = pthread_mutex_destroy(&mutex); assert(status == 0);
// mutex = PTHREAD_MUTEX_INITIALIZER;
fprintf( stdout, "Finished processing commands in file \"%s\". ", pFileName );
- Abc_PrintTime( 1, "Total wall time", clock() - clk );
+ Abc_PrintTime( 1, "Total wall time", Abc_Clock() - clk );
fflush( stdout );
}
diff --git a/src/base/io/ioReadBblif.c b/src/base/io/ioReadBblif.c
index b3a34cc1..2de62695 100644
--- a/src/base/io/ioReadBblif.c
+++ b/src/base/io/ioReadBblif.c
@@ -165,15 +165,15 @@ Abc_Ntk_t * Bbl_ManToAig( Bbl_Man_t * p )
Vec_Ptr_t * vCopy, * vNodes, * vFaninAigs;
Dec_Graph_t ** pFForms;
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// map SOP handles into factored forms
pFForms = ABC_CALLOC( Dec_Graph_t *, Bbl_ManFncSize(p) );
Bbl_ManForEachObj( p, pObj )
if ( pFForms[Bbl_ObjFncHandle(pObj)] == NULL )
pFForms[Bbl_ObjFncHandle(pObj)] = Dec_Factor( Bbl_ObjSop(p, pObj) );
if ( fVerbose )
-ABC_PRT( "Fct", clock() - clk );
+ABC_PRT( "Fct", Abc_Clock() - clk );
// start the network
pNtk = Abc_NtkAlloc( ABC_NTK_STRASH, ABC_FUNC_AIG, 1 );
pNtk->pName = Extra_UtilStrsav( Bbl_ManName(p) );
@@ -185,7 +185,7 @@ ABC_PRT( "Fct", clock() - clk );
continue;
Vec_PtrSetEntry( vCopy, Bbl_ObjId(pObj), Abc_NtkCreatePi(pNtk) );
}
-clk = clock();
+clk = Abc_Clock();
// create internal nodes
vNodes = Bbl_ManDfs( p );
vFaninAigs = Vec_PtrAlloc( 100 );
@@ -202,7 +202,7 @@ clk = clock();
Vec_PtrFree( vFaninAigs );
Vec_PtrFree( vNodes );
if ( fVerbose )
-ABC_PRT( "AIG", clock() - clk );
+ABC_PRT( "AIG", Abc_Clock() - clk );
// create COs
Bbl_ManForEachObj( p, pObj )
{
@@ -218,12 +218,12 @@ ABC_PRT( "AIG", clock() - clk );
Dec_GraphFree( pFForms[i] );
ABC_FREE( pFForms );
// finalize
-clk = clock();
+clk = Abc_Clock();
Vec_PtrFree( vCopy );
Abc_NtkAddDummyPiNames( pNtk );
Abc_NtkAddDummyPoNames( pNtk );
if ( fVerbose )
-ABC_PRT( "Nam", clock() - clk );
+ABC_PRT( "Nam", Abc_Clock() - clk );
// if ( !Abc_NtkCheck( pNtk ) )
// printf( "Bbl_ManToAig(): Network check has failed.\n" );
return pNtk;
@@ -271,36 +271,36 @@ void Bbl_ManTest( Abc_Ntk_t * pNtk )
Abc_Ntk_t * pNtkNew;
Bbl_Man_t * p, * pNew;
char * pFileName = "test.bblif";
- clock_t clk, clk1, clk2, clk3, clk4, clk5;
-clk = clock();
+ abctime clk, clk1, clk2, clk3, clk4, clk5;
+clk = Abc_Clock();
p = Bbl_ManFromAbc( pNtk );
Bbl_ManPrintStats( p );
-clk1 = clock() - clk;
+clk1 = Abc_Clock() - clk;
//Bbl_ManDumpBlif( p, "test_bbl.blif" );
// write into file and back
-clk = clock();
+clk = Abc_Clock();
Bbl_ManDumpBinaryBlif( p, pFileName );
-clk2 = clock() - clk;
+clk2 = Abc_Clock() - clk;
// read from file
-clk = clock();
+clk = Abc_Clock();
pNew = Bbl_ManReadBinaryBlif( pFileName );
Bbl_ManStop( p ); p = pNew;
-clk3 = clock() - clk;
+clk3 = Abc_Clock() - clk;
// generate ABC network
-clk = clock();
+clk = Abc_Clock();
pNtkNew = Bbl_ManToAig( p );
// pNtkNew = Bbl_ManToAbc( p );
Bbl_ManStop( p );
-clk4 = clock() - clk;
+clk4 = Abc_Clock() - clk;
// equivalence check
-clk = clock();
+clk = Abc_Clock();
// Bbl_ManVerify( pNtk, pNtkNew );
Abc_NtkDelete( pNtkNew );
-clk5 = clock() - clk;
+clk5 = Abc_Clock() - clk;
printf( "Runtime stats:\n" );
ABC_PRT( "ABC to Man", clk1 );
diff --git a/src/bdd/cas/casCore.c b/src/bdd/cas/casCore.c
index 35b1145c..b2e06805 100644
--- a/src/bdd/cas/casCore.c
+++ b/src/bdd/cas/casCore.c
@@ -81,7 +81,7 @@ int Abc_CascadeExperiment( char * pFileGeneric, DdManager * dd, DdNode ** pOutpu
int i;
int nVars = nInputs;
int nOuts = nOutputs;
- clock_t clk1;
+ abctime clk1;
int nVarsEnc; // the number of additional variables to encode outputs
DdNode * pbVarsEnc[MAXOUTPUTS]; // the BDDs of the encoding vars
@@ -140,11 +140,11 @@ int Abc_CascadeExperiment( char * pFileGeneric, DdManager * dd, DdNode ** pOutpu
// printf( "\n" );
// derive the single-output function
- clk1 = clock();
+ clk1 = Abc_Clock();
aFunc = GetSingleOutputFunction( dd, pOutputs, nOuts, pbVarsEnc, nVarsEnc, fVerbose ); Cudd_Ref( aFunc );
// aFunc = GetSingleOutputFunctionRemapped( dd, pOutputs, nOuts, pbVarsEnc, nVarsEnc ); Cudd_Ref( aFunc );
// if ( fVerbose )
-// printf( "Single-output function computation time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+// printf( "Single-output function computation time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
//fprintf( pTable, "%d ", Cudd_SharingSize( pOutputs, nOutputs ) );
//fprintf( pTable, "%d ", Extra_ProfileWidthSharingMax(dd, pOutputs, nOutputs) );
@@ -155,7 +155,7 @@ int Abc_CascadeExperiment( char * pFileGeneric, DdManager * dd, DdNode ** pOutpu
// reorder the single output function
// if ( fVerbose )
// printf( "Reordering variables...\n");
- clk1 = clock();
+ clk1 = Abc_Clock();
// if ( fVerbose )
// printf( "Node count before = %6d\n", Cudd_DagSize( aFunc ) );
// Cudd_ReduceHeap(dd, CUDD_REORDER_SIFT,1);
@@ -168,7 +168,7 @@ int Abc_CascadeExperiment( char * pFileGeneric, DdManager * dd, DdNode ** pOutpu
if ( fVerbose )
printf( "MTBDD reordered = %6d nodes\n", Cudd_DagSize( aFunc ) );
if ( fVerbose )
- printf( "Variable reordering time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Variable reordering time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
// printf( "\n" );
// printf( "Variable order is: " );
// for ( i = 0; i < dd->size; i++ )
@@ -178,16 +178,16 @@ int Abc_CascadeExperiment( char * pFileGeneric, DdManager * dd, DdNode ** pOutpu
//fprintf( pTable, "%d ", Extra_ProfileWidthMax(dd, aFunc) );
// write the single-output function into BLIF for verification
- clk1 = clock();
+ clk1 = Abc_Clock();
if ( fCheck )
WriteSingleOutputFunctionBlif( dd, aFunc, pNames, nNames, FileNameIni );
// if ( fVerbose )
-// printf( "Single-output function writing time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+// printf( "Single-output function writing time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
/*
///////////////////////////////////////////////////////////////////
// verification of single output function
- clk1 = clock();
+ clk1 = Abc_Clock();
{
BFunc g_Func;
DdNode * aRes;
@@ -214,7 +214,7 @@ int Abc_CascadeExperiment( char * pFileGeneric, DdManager * dd, DdNode ** pOutpu
// delocate
Extra_Dissolve( &g_Func );
}
- printf( "Preliminary verification time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Preliminary verification time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
///////////////////////////////////////////////////////////////////
*/
@@ -224,7 +224,7 @@ int Abc_CascadeExperiment( char * pFileGeneric, DdManager * dd, DdNode ** pOutpu
/*
///////////////////////////////////////////////////////////////////
// verification of the decomposed LUT network
- clk1 = clock();
+ clk1 = Abc_Clock();
{
BFunc g_Func;
DdNode * aRes;
@@ -251,7 +251,7 @@ int Abc_CascadeExperiment( char * pFileGeneric, DdManager * dd, DdNode ** pOutpu
// delocate
Extra_Dissolve( &g_Func );
}
- printf( "Final verification time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Final verification time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
///////////////////////////////////////////////////////////////////
*/
@@ -325,24 +325,24 @@ void Experiment2( BFunc * pFunc )
strcat( FileNameFin, "_LUT.blif" );
// derive the single-output function IN THE NEW MANAGER
- clk1 = clock();
+ clk1 = Abc_Clock();
// aFunc = GetSingleOutputFunction( dd, pFunc->pOutputs, nOuts, pbVarsEnc, nVarsEnc ); Cudd_Ref( aFunc );
aFunc = GetSingleOutputFunctionRemappedNewDD( dd, pFunc->pOutputs, nOuts, &DdNew ); Cudd_Ref( aFunc );
- printf( "Single-output function derivation time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
-// s_RemappingTime = clock() - clk1;
+ printf( "Single-output function derivation time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+// s_RemappingTime = Abc_Clock() - clk1;
// dispose of the multiple-output function
Extra_Dissolve( pFunc );
// reorder the single output function
printf( "\nReordering variables in the new manager...\n");
- clk1 = clock();
+ clk1 = Abc_Clock();
printf( "Node count before = %d\n", Cudd_DagSize( aFunc ) );
// Cudd_ReduceHeap(DdNew, CUDD_REORDER_SIFT,1);
Cudd_ReduceHeap(DdNew, CUDD_REORDER_SYMM_SIFT,1);
// Cudd_ReduceHeap(DdNew, CUDD_REORDER_SYMM_SIFT,1);
printf( "Node count after = %d\n", Cudd_DagSize( aFunc ) );
- printf( "Variable reordering time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Variable reordering time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
printf( "\n" );
//fprintf( pTable, "%d ", Cudd_DagSize( aFunc ) );
@@ -360,14 +360,14 @@ void Experiment2( BFunc * pFunc )
// write the single-output function into BLIF for verification
- clk1 = clock();
+ clk1 = Abc_Clock();
WriteSingleOutputFunctionBlif( DdNew, aFunc, pNames, nNames, FileNameIni );
- printf( "Single-output function writing time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Single-output function writing time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
///////////////////////////////////////////////////////////////////
// verification of single output function
- clk1 = clock();
+ clk1 = Abc_Clock();
{
BFunc g_Func;
DdNode * aRes;
@@ -394,7 +394,7 @@ void Experiment2( BFunc * pFunc )
// delocate
Extra_Dissolve( &g_Func );
}
- printf( "Preliminary verification time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Preliminary verification time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
///////////////////////////////////////////////////////////////////
@@ -403,7 +403,7 @@ void Experiment2( BFunc * pFunc )
/*
///////////////////////////////////////////////////////////////////
// verification of the decomposed LUT network
- clk1 = clock();
+ clk1 = Abc_Clock();
{
BFunc g_Func;
DdNode * aRes;
@@ -430,7 +430,7 @@ void Experiment2( BFunc * pFunc )
// delocate
Extra_Dissolve( &g_Func );
}
- printf( "Final verification time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Final verification time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
///////////////////////////////////////////////////////////////////
*/
@@ -954,12 +954,12 @@ void WriteDDintoBLIFfileReorder( DdManager * dd, FILE * pFile, DdNode * Func, ch
///////////////////////////////////////////////////////////////
DdNode * bFmin;
- clock_t clk1;
+ abctime clk1;
if ( s_ddmin == NULL )
s_ddmin = Cudd_Init( dd->size, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0);
- clk1 = clock();
+ clk1 = Abc_Clock();
bFmin = Cudd_bddTransfer( dd, s_ddmin, Func ); Cudd_Ref( bFmin );
// reorder
diff --git a/src/bdd/cas/casDec.c b/src/bdd/cas/casDec.c
index 06ce04ea..82c23240 100644
--- a/src/bdd/cas/casDec.c
+++ b/src/bdd/cas/casDec.c
@@ -128,14 +128,14 @@ int CreateDecomposedNetwork( DdManager * dd, DdNode * aFunc, char ** pNames, int
int nLutOutputs = 0;
int nLutOutputsOrig = 0;
- clock_t clk1;
+ abctime clk1;
s_LutSize = nLutSize;
s_nFuncVars = nNames;
// get the profile
- clk1 = clock();
+ clk1 = Abc_Clock();
Extra_ProfileWidth( dd, aFunc, Profile, -1 );
@@ -284,10 +284,10 @@ int CreateDecomposedNetwork( DdManager * dd, DdNode * aFunc, char ** pNames, int
}
else
{
- clock_t clk2 = clock();
+ abctime clk2 = Abc_Clock();
// p->bRelation = PerformTheEncoding( dd, p->pbCols, p->nCols, bVarsCube, bCVars, p->nMulti, &p->nSimple ); Cudd_Ref( p->bRelation );
p->bRelation = Extra_bddEncodingNonStrict( dd, p->pbCols, p->nCols, bVarsCube, bCVars, p->nMulti, &p->nSimple ); Cudd_Ref( p->bRelation );
- s_EncodingTime += clock() - clk2;
+ s_EncodingTime += Abc_Clock() - clk2;
}
// update the number of LUT outputs
@@ -353,7 +353,7 @@ printf( "Stage %3d: In = %3d InP = %3d Cols = %5d Multi = %2d Simple = %2d
if ( fVerbose )
{
- printf( "Pure decomposition time = %.2f sec\n", (float)(clock() - clk1 - s_EncodingTime)/(float)(CLOCKS_PER_SEC) );
+ printf( "Pure decomposition time = %.2f sec\n", (float)(Abc_Clock() - clk1 - s_EncodingTime)/(float)(CLOCKS_PER_SEC) );
printf( "Encoding time = %.2f sec\n", (float)(s_EncodingTime)/(float)(CLOCKS_PER_SEC) );
// printf( "Encoding search time = %.2f sec\n", (float)(s_EncSearchTime)/(float)(CLOCKS_PER_SEC) );
// printf( "Encoding compute time = %.2f sec\n", (float)(s_EncComputeTime)/(float)(CLOCKS_PER_SEC) );
@@ -361,13 +361,13 @@ printf( "Stage %3d: In = %3d InP = %3d Cols = %5d Multi = %2d Simple = %2d
//fprintf( pTable, "%.2f ", (float)(s_ReadingTime)/(float)(CLOCKS_PER_SEC) );
-//fprintf( pTable, "%.2f ", (float)(clock() - clk1 - s_EncodingTime)/(float)(CLOCKS_PER_SEC) );
+//fprintf( pTable, "%.2f ", (float)(Abc_Clock() - clk1 - s_EncodingTime)/(float)(CLOCKS_PER_SEC) );
//fprintf( pTable, "%.2f ", (float)(s_EncodingTime)/(float)(CLOCKS_PER_SEC) );
//fprintf( pTable, "%.2f ", (float)(s_RemappingTime)/(float)(CLOCKS_PER_SEC) );
// write LUTs into the BLIF file
- clk1 = clock();
+ clk1 = Abc_Clock();
if ( fCheck )
{
FILE * pFile;
@@ -388,7 +388,7 @@ printf( "Stage %3d: In = %3d InP = %3d Cols = %5d Multi = %2d Simple = %2d
fprintf( pFile, ".end\n" );
fclose( pFile );
if ( fVerbose )
- printf( "Output file writing time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Output file writing time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
}
diff --git a/src/bdd/cudd/cuddAndAbs.c b/src/bdd/cudd/cuddAndAbs.c
index 8e1fd161..d9ad1d23 100644
--- a/src/bdd/cudd/cuddAndAbs.c
+++ b/src/bdd/cudd/cuddAndAbs.c
@@ -259,7 +259,7 @@ cuddBddAndAbstractRecur(
}
}
- if ( manager->TimeStop && clock() > manager->TimeStop )
+ if ( manager->TimeStop && Abc_Clock() > manager->TimeStop )
return NULL;
if (topf == top) {
diff --git a/src/bdd/cudd/cuddBddIte.c b/src/bdd/cudd/cuddBddIte.c
index 0d28ce96..803d5f19 100644
--- a/src/bdd/cudd/cuddBddIte.c
+++ b/src/bdd/cudd/cuddBddIte.c
@@ -926,7 +926,7 @@ cuddBddAndRecur(
if (r != NULL) return(r);
}
- if ( manager->TimeStop && clock() > manager->TimeStop )
+ if ( manager->TimeStop && Abc_Clock() > manager->TimeStop )
return NULL;
/* Here we can skip the use of cuddI, because the operands are known
diff --git a/src/bdd/cudd/cuddBridge.c b/src/bdd/cudd/cuddBridge.c
index 8cbb22d5..94b388f5 100644
--- a/src/bdd/cudd/cuddBridge.c
+++ b/src/bdd/cudd/cuddBridge.c
@@ -976,9 +976,9 @@ cuddBddTransferRecur(
if ( st__lookup(table, (const char *)f, (char **)&res))
return(Cudd_NotCond(res,comple));
- if ( ddS->TimeStop && clock() > ddS->TimeStop )
+ if ( ddS->TimeStop && Abc_Clock() > ddS->TimeStop )
return NULL;
- if ( ddD->TimeStop && clock() > ddD->TimeStop )
+ if ( ddD->TimeStop && Abc_Clock() > ddD->TimeStop )
return NULL;
/* Recursive step. */
diff --git a/src/bdd/cudd/cuddCompose.c b/src/bdd/cudd/cuddCompose.c
index f3aff14b..0341ef53 100644
--- a/src/bdd/cudd/cuddCompose.c
+++ b/src/bdd/cudd/cuddCompose.c
@@ -1251,7 +1251,7 @@ cuddBddVarMapRecur(
return(Cudd_NotCond(res,F != f));
}
- if ( manager->TimeStop && clock() > manager->TimeStop )
+ if ( manager->TimeStop && Abc_Clock() > manager->TimeStop )
return NULL;
/* Split and recur on children of this node. */
diff --git a/src/bdd/cudd/cuddInt.h b/src/bdd/cudd/cuddInt.h
index f0aab056..2ccf86a7 100644
--- a/src/bdd/cudd/cuddInt.h
+++ b/src/bdd/cudd/cuddInt.h
@@ -486,7 +486,7 @@ struct DdManager { /* specialized DD symbol table */
#endif
DdNode * bFunc;
DdNode * bFunc2;
- clock_t TimeStop; /* timeout for reordering */
+ abctime TimeStop; /* timeout for reordering */
};
typedef struct Move {
diff --git a/src/bdd/cudd/cuddSymmetry.c b/src/bdd/cudd/cuddSymmetry.c
index 5813f123..c2b1e858 100644
--- a/src/bdd/cudd/cuddSymmetry.c
+++ b/src/bdd/cudd/cuddSymmetry.c
@@ -367,7 +367,7 @@ cuddSymmSifting(
if (ddTotalNumberSwapping >= table->siftMaxSwap)
break;
// enable timeout during variable reodering - alanmi 2/13/11
- if ( table->TimeStop && clock() > table->TimeStop )
+ if ( table->TimeStop && Abc_Clock() > table->TimeStop )
break;
x = table->perm[var[i]];
#ifdef DD_STATS
diff --git a/src/bdd/dsd/dsdProc.c b/src/bdd/dsd/dsdProc.c
index 996fd3dc..bcc3102c 100644
--- a/src/bdd/dsd/dsdProc.c
+++ b/src/bdd/dsd/dsdProc.c
@@ -114,7 +114,7 @@ void Dsd_Decompose( Dsd_Manager_t * pDsdMan, DdNode ** pbFuncs, int nFuncs )
{
DdManager * dd = pDsdMan->dd;
int i;
- clock_t clk;
+ abctime clk;
Dsd_Node_t * pTemp;
int SumMaxGateSize = 0;
int nDecOutputs = 0;
@@ -144,7 +144,7 @@ s_Loops2Useless = 0;
s_nDecBlocks = 0;
// perform decomposition for all outputs
- clk = clock();
+ clk = Abc_Clock();
pDsdMan->nRoots = 0;
s_nCascades = 0;
for ( i = 0; i < nFuncs; i++ )
@@ -156,9 +156,9 @@ s_Loops2Useless = 0;
int nCascades;
int MaxBlock;
int nPrimeBlocks;
- clock_t clk;
+ abctime clk;
- clk = clock();
+ clk = Abc_Clock();
nLiteralsPrev = s_nLiterals;
nDecBlocksPrev = s_nDecBlocks;
nExorGatesPrev = s_nExorGates;
@@ -185,7 +185,7 @@ s_Loops2Useless = 0;
printf("Max=%3d. ", MaxBlock );
printf("Reuse=%2d. ", s_nReusedBlocks-nReusedBlocksPres );
printf("Csc=%2d. ", nCascades );
- printf("T= %.2f s. ", (float)(clock()-clk)/(float)(CLOCKS_PER_SEC) ) ;
+ printf("T= %.2f s. ", (float)(Abc_Clock()-clk)/(float)(CLOCKS_PER_SEC) ) ;
printf("Bdd=%2d. ", Cudd_DagSize(pbFuncs[i]) );
printf("\n");
fflush( stdout );
@@ -203,7 +203,7 @@ s_Loops2Useless = 0;
printf( " The sum of max gate sizes = %5d\n", SumMaxGateSize );
printf( " Shared BDD size = %5d\n", Cudd_SharingSize( pbFuncs, nFuncs ) );
printf( " Decomposition entries = %5d\n", st__count( pDsdMan->Table ) );
- printf( " Pure decomposition time = %.2f sec\n", (float)(clock() - clk)/(float)(CLOCKS_PER_SEC) );
+ printf( " Pure decomposition time = %.2f sec\n", (float)(Abc_Clock() - clk)/(float)(CLOCKS_PER_SEC) );
}
/*
printf( "s_Loops1 = %d.\n", s_Loops1 );
diff --git a/src/bdd/reo/reoShuffle.c b/src/bdd/reo/reoShuffle.c
index 86aab4b9..e1c33617 100644
--- a/src/bdd/reo/reoShuffle.c
+++ b/src/bdd/reo/reoShuffle.c
@@ -162,7 +162,7 @@ void Extra_ShuffleTest( reo_man * pReo, DdManager * dd, DdNode * Func )
DdNode * Temp, * bRemap;
int nSuppSize, OffSet, Num, i;
- clock_t clk;
+ abctime clk;
int pOrder[1000], pOrderInv[1000];
assert( dd->size < 1000 );
@@ -198,17 +198,17 @@ void Extra_ShuffleTest( reo_man * pReo, DdManager * dd, DdNode * Func )
// Extra_ReorderSetVerification( pReo, 1 );
bRemap = Extra_bddRemapUp( dd, Func ); Cudd_Ref( bRemap );
-clk = clock();
+clk = Abc_Clock();
Temp = reoShuffle( pReo, dd, bRemap, pOrder, pOrderInv ); Cudd_Ref( Temp );
-//runtime1 += clock() - clk;
+//runtime1 += Abc_Clock() - clk;
//printf( "Initial = %d. Final = %d.\n", Cudd_DagSize(bRemap), Cudd_DagSize(Temp) );
{
DdNode * bFuncPerm;
-clk = clock();
+clk = Abc_Clock();
bFuncPerm = Cudd_bddPermute( dd, bRemap, pOrderInv ); Cudd_Ref( bFuncPerm );
-//runtime2 += clock() - clk;
+//runtime2 += Abc_Clock() - clk;
if ( bFuncPerm != Temp )
{
printf( "REO: Internal verification has failed!\n" );
diff --git a/src/bdd/reo/reoTest.c b/src/bdd/reo/reoTest.c
index 58e442f3..f9b1cc04 100644
--- a/src/bdd/reo/reoTest.c
+++ b/src/bdd/reo/reoTest.c
@@ -182,21 +182,21 @@ int Extra_bddReorderTest( DdManager * dd, DdNode * bF )
static DdManager * s_ddmin;
DdNode * bFmin;
int nNodes;
-// clock_t clk1;
+// abctime clk1;
if ( s_ddmin == NULL )
s_ddmin = Cudd_Init( dd->size, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0);
// Cudd_ShuffleHeap( s_ddmin, dd->invperm );
-// clk1 = clock();
+// clk1 = Abc_Clock();
bFmin = Cudd_bddTransfer( dd, s_ddmin, bF ); Cudd_Ref( bFmin );
Cudd_ReduceHeap(s_ddmin,CUDD_REORDER_SIFT,1);
// Cudd_ReduceHeap(s_ddmin,CUDD_REORDER_SYMM_SIFT,1);
nNodes = Cudd_DagSize( bFmin );
Cudd_RecursiveDeref( s_ddmin, bFmin );
-// printf( "Classical variable reordering time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+// printf( "Classical variable reordering time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
return nNodes;
}
@@ -222,14 +222,14 @@ int Extra_addReorderTest( DdManager * dd, DdNode * aF )
DdNode * aFmin;
int nNodesBeg;
int nNodesEnd;
- clock_t clk1;
+ abctime clk1;
if ( s_ddmin == NULL )
s_ddmin = Cudd_Init( dd->size, 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0);
// Cudd_ShuffleHeap( s_ddmin, dd->invperm );
- clk1 = clock();
+ clk1 = Abc_Clock();
bF = Cudd_addBddPattern( dd, aF ); Cudd_Ref( bF );
bFmin = Cudd_bddTransfer( dd, s_ddmin, bF ); Cudd_Ref( bFmin );
Cudd_RecursiveDeref( dd, bF );
@@ -243,7 +243,7 @@ int Extra_addReorderTest( DdManager * dd, DdNode * aF )
Cudd_RecursiveDeref( s_ddmin, aFmin );
printf( "Classical reordering of ADDs: Before = %d. After = %d.\n", nNodesBeg, nNodesEnd );
- printf( "Classical variable reordering time = %.2f sec\n", (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC) );
+ printf( "Classical variable reordering time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
return nNodesEnd;
}
diff --git a/src/bool/bdc/bdcCore.c b/src/bool/bdc/bdcCore.c
index a810146d..5a7a0c3a 100644
--- a/src/bool/bdc/bdcCore.c
+++ b/src/bool/bdc/bdcCore.c
@@ -291,7 +291,7 @@ void Bdc_ManDecPrint( Bdc_Man_t * p )
int Bdc_ManDecompose( Bdc_Man_t * p, unsigned * puFunc, unsigned * puCare, int nVars, Vec_Ptr_t * vDivs, int nNodesMax )
{
Bdc_Isf_t Isf, * pIsf = &Isf;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( nVars <= p->pPars->nVarsMax );
// set current manager parameters
p->nVars = nVars;
@@ -318,7 +318,7 @@ int Bdc_ManDecompose( Bdc_Man_t * p, unsigned * puFunc, unsigned * puCare, int n
Bdc_SuppMinimize( p, pIsf );
// call decomposition
p->pRoot = Bdc_ManDecompose_rec( p, pIsf );
- p->timeTotal += clock() - clk;
+ p->timeTotal += Abc_Clock() - clk;
p->numCalls++;
p->numNodes += p->nNodesNew;
if ( p->pRoot == NULL )
diff --git a/src/bool/bdc/bdcDec.c b/src/bool/bdc/bdcDec.c
index 0695f7e9..6a746540 100644
--- a/src/bool/bdc/bdcDec.c
+++ b/src/bool/bdc/bdcDec.c
@@ -45,9 +45,9 @@ ABC_NAMESPACE_IMPL_START
void Bdc_SuppMinimize2( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
{
int v;
- clock_t clk = 0; // Suppress "might be used uninitialized"
+ abctime clk = 0; // Suppress "might be used uninitialized"
if ( p->pPars->fVerbose )
- clk = clock();
+ clk = Abc_Clock();
// compute support
pIsf->uSupp = Kit_TruthSupport( pIsf->puOn, p->nVars ) |
Kit_TruthSupport( pIsf->puOff, p->nVars );
@@ -70,7 +70,7 @@ void Bdc_SuppMinimize2( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
pIsf->uSupp &= ~(1 << v);
}
if ( p->pPars->fVerbose )
- p->timeSupps += clock() - clk;
+ p->timeSupps += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -87,9 +87,9 @@ void Bdc_SuppMinimize2( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
void Bdc_SuppMinimize( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
{
int v;
- clock_t clk = 0; // Suppress "might be used uninitialized"
+ abctime clk = 0; // Suppress "might be used uninitialized"
if ( p->pPars->fVerbose )
- clk = clock();
+ clk = Abc_Clock();
// go through the support variables
pIsf->uSupp = 0;
for ( v = 0; v < p->nVars; v++ )
@@ -106,7 +106,7 @@ void Bdc_SuppMinimize( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
pIsf->uSupp |= (1 << v);
}
if ( p->pPars->fVerbose )
- p->timeSupps += clock() - clk;
+ p->timeSupps += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -549,9 +549,9 @@ int Bdc_DecomposeStepMux( Bdc_Man_t * p, Bdc_Isf_t * pIsf, Bdc_Isf_t * pIsfL, Bd
{
int Var, VarMin, nSuppMin, nSuppCur;
unsigned uSupp0, uSupp1;
- clock_t clk = 0; // Suppress "might be used uninitialized"
+ abctime clk = 0; // Suppress "might be used uninitialized"
if ( p->pPars->fVerbose )
- clk = clock();
+ clk = Abc_Clock();
VarMin = -1;
nSuppMin = 1000;
for ( Var = 0; Var < p->nVars; Var++ )
@@ -582,7 +582,7 @@ int Bdc_DecomposeStepMux( Bdc_Man_t * p, Bdc_Isf_t * pIsf, Bdc_Isf_t * pIsfL, Bd
Bdc_SuppMinimize( p, pIsfR );
}
if ( p->pPars->fVerbose )
- p->timeMuxes += clock() - clk;
+ p->timeMuxes += Abc_Clock() - clk;
return VarMin;
}
@@ -681,7 +681,7 @@ Bdc_Fun_t * Bdc_ManDecompose_rec( Bdc_Man_t * p, Bdc_Isf_t * pIsf )
Bdc_Isf_t IsfL, * pIsfL = &IsfL;
Bdc_Isf_t IsfB, * pIsfR = &IsfB;
int iVar;
- clock_t clk = 0; // Suppress "might be used uninitialized"
+ abctime clk = 0; // Suppress "might be used uninitialized"
/*
printf( "Init function (%d):\n", LocalCounter );
Extra_PrintBinary( stdout, pIsf->puOn, 1<<4 );printf("\n");
@@ -690,25 +690,25 @@ Extra_PrintBinary( stdout, pIsf->puOff, 1<<4 );printf("\n");
// check computed results
assert( Kit_TruthIsDisjoint(pIsf->puOn, pIsf->puOff, p->nVars) );
if ( p->pPars->fVerbose )
- clk = clock();
+ clk = Abc_Clock();
pFunc = Bdc_TableLookup( p, pIsf );
if ( p->pPars->fVerbose )
- p->timeCache += clock() - clk;
+ p->timeCache += Abc_Clock() - clk;
if ( pFunc )
return pFunc;
// decide on the decomposition type
if ( p->pPars->fVerbose )
- clk = clock();
+ clk = Abc_Clock();
Type = Bdc_DecomposeStep( p, pIsf, pIsfL, pIsfR );
if ( p->pPars->fVerbose )
- p->timeCheck += clock() - clk;
+ p->timeCheck += Abc_Clock() - clk;
if ( Type == BDC_TYPE_MUX )
{
if ( p->pPars->fVerbose )
- clk = clock();
+ clk = Abc_Clock();
iVar = Bdc_DecomposeStepMux( p, pIsf, pIsfL, pIsfR );
if ( p->pPars->fVerbose )
- p->timeMuxes += clock() - clk;
+ p->timeMuxes += Abc_Clock() - clk;
p->numMuxes++;
pFunc0 = Bdc_ManDecompose_rec( p, pIsfL );
pFunc1 = Bdc_ManDecompose_rec( p, pIsfR );
diff --git a/src/bool/bdc/bdcInt.h b/src/bool/bdc/bdcInt.h
index da6cce5a..08c97a54 100644
--- a/src/bool/bdc/bdcInt.h
+++ b/src/bool/bdc/bdcInt.h
@@ -118,11 +118,11 @@ struct Bdc_Man_t_
int numWeaks;
int numReuse;
// runtime
- clock_t timeCache;
- clock_t timeCheck;
- clock_t timeMuxes;
- clock_t timeSupps;
- clock_t timeTotal;
+ abctime timeCache;
+ abctime timeCheck;
+ abctime timeMuxes;
+ abctime timeSupps;
+ abctime timeTotal;
};
static inline Bdc_Fun_t * Bdc_FunNew( Bdc_Man_t * p ) { Bdc_Fun_t * pRes; if ( p->nNodes >= p->nNodesAlloc || p->nNodesNew >= p->nNodesMax ) return NULL; pRes = p->pNodes + p->nNodes++; p->nNodesNew++; memset( pRes, 0, sizeof(Bdc_Fun_t) ); return pRes; }
diff --git a/src/bool/bdc/bdcSpfd.c b/src/bool/bdc/bdcSpfd.c
index 9a5bd777..8a00b02f 100644
--- a/src/bool/bdc/bdcSpfd.c
+++ b/src/bool/bdc/bdcSpfd.c
@@ -182,7 +182,7 @@ void Bdc_SpfdDecompose( word Truth, int nVars, int nCands, int nGatesMax )
Bdc_Nod_t * pNode, * pNode0, * pNode1, * pNode2;
int Count0, Count1, * pPerm;
int i, j, k, c, n;
- clock_t clk;
+ abctime clk;
assert( nGatesMax < (1<<8) );
assert( nCands < (1<<12) );
assert( (1<<(nVars-1))*(1<<(nVars-1)) < (1<<12) ); // max SPFD
@@ -219,7 +219,7 @@ void Bdc_SpfdDecompose( word Truth, int nVars, int nCands, int nGatesMax )
Vec_IntPush( vBegs, nVars );
// the next level
-clk = clock();
+clk = Abc_Clock();
pNode0 = pNode;
pNode = ABC_CALLOC( Bdc_Nod_t, 5 * nVars * (nVars - 1) / 2 );
for ( c = i = 0; i < nVars; i++ )
@@ -246,14 +246,14 @@ clk = clock();
}
}
printf( "Selected %6d gates on level %2d. ", c, 1 );
-Abc_PrintTime( 1, "Time", clock() - clk );
+Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// iterate through levels
pNode = ABC_CALLOC( Bdc_Nod_t, nSize );
for ( n = 2; n <= nGatesMax; n++ )
{
-clk = clock();
+clk = Abc_Clock();
c = 0;
pNode1 = (Bdc_Nod_t *)Vec_PtrEntry( vLevels, n-1 );
Count1 = Vec_IntEntry( vBegs, n-1 );
@@ -320,7 +320,7 @@ Bdc_SpfdPrint( pNode + i, 1, vLevels, Truth );
Vec_IntPush( vBegs, j );
printf( "Selected %6d gates (out of %6d) on level %2d. ", j, c, n );
-Abc_PrintTime( 1, "Time", clock() - clk );
+Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
for ( i = 0; i < 10; i++ )
Bdc_SpfdPrint( pNode2 + i, n, vLevels, Truth );
@@ -588,7 +588,7 @@ Vec_Wrd_t * Bdc_SpfdDecomposeTest__( Vec_Int_t ** pvWeights )
int Limit = 6;
int * pPlace, i, n, m, k, s, fCompl;
- clock_t clk = clock(), clk2;
+ abctime clk = Abc_Clock(), clk2;
Vec_Int_t * vStops;
Vec_Wrd_t * vTruths;
Vec_Int_t * vWeights;
@@ -644,7 +644,7 @@ Vec_Wrd_t * Bdc_SpfdDecomposeTest__( Vec_Int_t ** pvWeights )
pBeg1 = p + Vec_IntEntry( vStops, m );
pEnd1 = p + Vec_IntEntry( vStops, m+1 );
- clk2 = clock();
+ clk2 = Abc_Clock();
printf( "Trying %7d x %7d. ", (int)(pEnd0-pBeg0), (int)(pEnd1-pBeg1) );
for ( pThis0 = pBeg0; pThis0 < pEnd0; pThis0++ )
for ( pThis1 = pBeg1; pThis1 < pEnd1; pThis1++ )
@@ -682,11 +682,11 @@ Vec_Wrd_t * Bdc_SpfdDecomposeTest__( Vec_Int_t ** pvWeights )
}
}
printf( "Added %d + %d + 1 = %d. Total = %8d. ", k, m, n+1, (int)(q-p) );
- Abc_PrintTime( 1, "Time", clock() - clk2 );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk2 );
}
Vec_IntPush( vStops, q-p );
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
{
@@ -921,7 +921,7 @@ void Bdc_SpfdDecomposeTest44()
Vec_Wrd_t * vDivs;
word c0, c1, s, tt, tbest;
int i, j, Cost, CostBest = 100000;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
return;
@@ -1007,7 +1007,7 @@ void Bdc_SpfdDecomposeTest44()
printf( "Best solution found with cost %d. ", CostBest );
Extra_PrintHex( stdout, (unsigned *)&tbest, 6 ); //printf( "\n" );
- Abc_PrintTime( 1, " Time", clock() - clk );
+ Abc_PrintTime( 1, " Time", Abc_Clock() - clk );
Vec_WrdFree( vDivs );
Vec_IntFree( vWeights );
@@ -1031,7 +1031,7 @@ void Bdc_SpfdDecomposeTest3()
Vec_Wrd_t * v1M;
Vec_Wrd_t * v1K;
int i, k, Counter;
- clock_t clk;
+ abctime clk;
// int EntryM, EntryK;
Aig_ManRandom64( 1 );
@@ -1043,7 +1043,7 @@ void Bdc_SpfdDecomposeTest3()
for ( i = 0; i < nSizeK; i++ )
Vec_WrdPush( v1K, Aig_ManRandom64(0) );
- clk = clock();
+ clk = Abc_Clock();
Counter = 0;
for ( i = 0; i < nSizeM; i++ )
for ( k = 0; k < nSizeK; k++ )
@@ -1053,15 +1053,15 @@ void Bdc_SpfdDecomposeTest3()
// Counter += ((EntryM & EntryK) == EntryK);
printf( "Total = %8d. ", Counter );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
- clk = clock();
+ clk = Abc_Clock();
Counter = 0;
for ( k = 0; k < nSizeK; k++ )
for ( i = 0; i < nSizeM; i++ )
Counter += ((v1M->pArray[i] & v1K->pArray[k]) == v1K->pArray[k]);
printf( "Total = %8d. ", Counter );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
@@ -1087,7 +1087,7 @@ void Bdc_SpfdDecomposeTest8()
word Func, FuncBest;
int Cost, CostBest = ABC_INFINITY;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// return;
@@ -1095,7 +1095,7 @@ void Bdc_SpfdDecomposeTest8()
printf( "Best init = %4d. ", Bdc_SpfdAdjCost(t) );
Extra_PrintHex( stdout, (unsigned *)&t, 6 ); //printf( "\n" );
- Abc_PrintTime( 1, " Time", clock() - clk );
+ Abc_PrintTime( 1, " Time", Abc_Clock() - clk );
Vec_WrdForEachEntry( vDivs, Func, i )
{
@@ -1109,7 +1109,7 @@ void Bdc_SpfdDecomposeTest8()
printf( "Best cost = %4d. ", CostBest );
Extra_PrintHex( stdout, (unsigned *)&FuncBest, 6 ); //printf( "\n" );
- Abc_PrintTime( 1, " Time", clock() - clk );
+ Abc_PrintTime( 1, " Time", Abc_Clock() - clk );
Abc_Show6VarFunc( 0, t );
Abc_Show6VarFunc( 0, FuncBest );
@@ -1138,7 +1138,7 @@ void Bdc_SpfdDecomposeTest()
Vec_Wrd_t * v1M, * v1K;
int EntryM, EntryK;
int i, k, Counter;
- clock_t clk;
+ abctime clk;
Aig_ManRandom64( 1 );
@@ -1150,7 +1150,7 @@ void Bdc_SpfdDecomposeTest()
for ( i = 0; i < nSizeK; i++ )
Vec_WrdPush( v1K, Aig_ManRandom64(0) );
- clk = clock();
+ clk = Abc_Clock();
Counter = 0;
// for ( i = 0; i < nSizeM; i++ )
// for ( k = 0; k < nSizeK; k++ )
@@ -1159,9 +1159,9 @@ void Bdc_SpfdDecomposeTest()
Vec_WrdForEachEntry( v1K, EntryK, k )
Counter += ((EntryM & EntryK) == EntryK);
printf( "Total = %8d. ", Counter );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
- clk = clock();
+ clk = Abc_Clock();
Counter = 0;
// for ( k = 0; k < nSizeK; k++ )
// for ( i = 0; i < nSizeM; i++ )
@@ -1170,7 +1170,7 @@ void Bdc_SpfdDecomposeTest()
Vec_WrdForEachEntry( v1M, EntryM, i )
Counter += ((EntryM & EntryK) == EntryK);
printf( "Total = %8d. ", Counter );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
diff --git a/src/bool/dec/decMan.c b/src/bool/dec/decMan.c
index 7de31a7e..e6b1c5bd 100644
--- a/src/bool/dec/decMan.c
+++ b/src/bool/dec/decMan.c
@@ -45,14 +45,14 @@ ABC_NAMESPACE_IMPL_START
Dec_Man_t * Dec_ManStart()
{
Dec_Man_t * p;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
p = ABC_ALLOC( Dec_Man_t, 1 );
p->pMvcMem = Mvc_ManagerStart();
p->vCubes = Vec_IntAlloc( 8 );
p->vLits = Vec_IntAlloc( 8 );
// canonical forms, phases, perms
Extra_Truth4VarNPN( &p->puCanons, &p->pPhases, &p->pPerms, &p->pMap );
-//ABC_PRT( "NPN classes precomputation time", clock() - clk );
+//ABC_PRT( "NPN classes precomputation time", Abc_Clock() - clk );
return p;
}
diff --git a/src/bool/kit/cloud.c b/src/bool/kit/cloud.c
index ca2d81eb..3511b3bd 100644
--- a/src/bool/kit/cloud.c
+++ b/src/bool/kit/cloud.c
@@ -71,7 +71,7 @@ CloudManager * Cloud_Init( int nVars, int nBits )
{
CloudManager * dd;
int i;
- clock_t clk1, clk2;
+ abctime clk1, clk2;
assert( nVars <= 100000 );
assert( nBits < 32 );
@@ -99,10 +99,10 @@ CloudManager * Cloud_Init( int nVars, int nBits )
dd->nNodesLimit = (1 << nBits); // 2 ^ nBits
// unique table
-clk1 = clock();
+clk1 = Abc_Clock();
dd->tUnique = ABC_CALLOC( CloudNode, dd->nNodesAlloc );
dd->nMemUsed += sizeof(CloudNode) * dd->nNodesAlloc;
-clk2 = clock();
+clk2 = Abc_Clock();
//ABC_PRT( "calloc() time", clk2 - clk1 );
// set up the constant node (the only node that is not in the hash table)
diff --git a/src/bool/kit/kitPerm.c b/src/bool/kit/kitPerm.c
index 9d6f9373..16f5746d 100644
--- a/src/bool/kit/kitPerm.c
+++ b/src/bool/kit/kitPerm.c
@@ -280,31 +280,31 @@ void Kit_PermComputeTest()
word * T = (word *)malloc( 8 * NFUNCS );
word i, o, w = 0;
int k, b;
- clock_t clk;
+ abctime clk;
srand( 0 );
- clk = clock();
+ clk = Abc_Clock();
for ( k = 0; k < NFUNCS; k++ )
for ( b = 0; b < 8; b++ )
((byte *)(T + k))[b] = (byte)(rand() & 0xFF);
- ABC_PRT( "Assign", clock() - clk );
+ ABC_PRT( "Assign", Abc_Clock() - clk );
// T[0] = 0xacaccacaaccaacca;
// Kit_DsdPrintFromTruth( T, 6 );
// perform measurements
- clk = clock();
+ clk = Abc_Clock();
for ( k = 0; k < NFUNCS; k++ )
{
i = T[k];
// Kit_PermComputeNaive( &i, 6 );
Tf( i, 6 );
}
- ABC_PRT( "Perm1 ", clock() - clk );
+ ABC_PRT( "Perm1 ", Abc_Clock() - clk );
// perform measurements
- clk = clock();
+ clk = Abc_Clock();
for ( k = 0; k < NFUNCS; k++ )
{
i = T[k];
@@ -314,7 +314,7 @@ void Kit_PermComputeTest()
// Kit_PermComputeNaive( &w, 6 );
// assert( w == o );
}
- ABC_PRT( "Perm2 ", clock() - clk );
+ ABC_PRT( "Perm2 ", Abc_Clock() - clk );
assert( w == 0 );
free( T );
diff --git a/src/bool/lucky/luckyInt.h b/src/bool/lucky/luckyInt.h
index 58a7235c..740c35b8 100644
--- a/src/bool/lucky/luckyInt.h
+++ b/src/bool/lucky/luckyInt.h
@@ -90,10 +90,10 @@ typedef struct
static inline void TimePrint( char* Message )
{
static int timeBegin;
- double time = 1.0*(clock() - timeBegin)/CLOCKS_PER_SEC ;
+ double time = 1.0*(Abc_Clock() - timeBegin)/CLOCKS_PER_SEC ;
if ( Message != NULL)
printf("%s = %f sec.\n", Message, time);
- timeBegin = clock();
+ timeBegin = Abc_Clock();
}
static inline int CompareWords( word x, word y)
diff --git a/src/map/amap/amapCore.c b/src/map/amap/amapCore.c
index c4ae817a..5a84669c 100644
--- a/src/map/amap/amapCore.c
+++ b/src/map/amap/amapCore.c
@@ -72,7 +72,7 @@ Vec_Ptr_t * Amap_ManTest( Aig_Man_t * pAig, Amap_Par_t * pPars )
Vec_Ptr_t * vRes;
Amap_Man_t * p;
Amap_Lib_t * pLib;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
pLib = (Amap_Lib_t *)Abc_FrameReadLibGen2();
if ( pLib == NULL )
{
@@ -94,7 +94,7 @@ Vec_Ptr_t * Amap_ManTest( Aig_Man_t * pAig, Amap_Par_t * pPars )
Amap_ManStop( p );
if ( pPars->fVerbose )
{
-ABC_PRT( "Total runtime", clock() - clkTotal );
+ABC_PRT( "Total runtime", Abc_Clock() - clkTotal );
}
return vRes;
}
diff --git a/src/map/amap/amapLib.c b/src/map/amap/amapLib.c
index de02c872..b6350fed 100644
--- a/src/map/amap/amapLib.c
+++ b/src/map/amap/amapLib.c
@@ -262,7 +262,7 @@ Vec_Ptr_t * Amap_LibSelectGates( Amap_Lib_t * p, int fVerbose )
{
Vec_Ptr_t * vSelect;
Amap_Gat_t * pGate, * pGate2;
- int i, k;//, clk = clock();
+ int i, k;//, clk = Abc_Clock();
p->pGate0 = Amap_LibFindGate( p, 0 );
p->pGate1 = Amap_LibFindGate( p, ~0 );
p->pGateBuf = Amap_LibFindGate( p, 0xAAAAAAAA );
@@ -329,7 +329,7 @@ void Amap_LibPrintSelectedGates( Amap_Lib_t * p, int fAllGates )
Amap_Lib_t * Amap_LibReadAndPrepare( char * pFileName, char * pBuffer, int fVerbose, int fVeryVerbose )
{
Amap_Lib_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( pBuffer == NULL )
p = Amap_LibReadFile( pFileName, fVerbose );
else
@@ -352,15 +352,15 @@ Amap_Lib_t * Amap_LibReadAndPrepare( char * pFileName, char * pBuffer, int fVerb
if ( fVerbose )
{
printf( "Selected %d functionally unique gates. ", Vec_PtrSize(p->vSelect) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// Amap_LibPrintSelectedGates( p, 0 );
}
- clk = clock();
+ clk = Abc_Clock();
Amap_LibCreateRules( p, fVeryVerbose );
if ( fVerbose )
{
printf( "Created %d rules and %d matches. ", p->nNodes, p->nSets );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
return p;
}
diff --git a/src/map/amap/amapLiberty.c b/src/map/amap/amapLiberty.c
index 941abe50..13b18df5 100644
--- a/src/map/amap/amapLiberty.c
+++ b/src/map/amap/amapLiberty.c
@@ -1013,7 +1013,7 @@ int Amap_LibertyParse( char * pFileName, int fVerbose )
{
Amap_Tree_t * p;
char * pPos;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue;
p = Amap_LibertyStart( pFileName );
if ( p == NULL )
@@ -1039,7 +1039,7 @@ int Amap_LibertyParse( char * pFileName, int fVerbose )
if ( fVerbose )
{
printf( "Memory = %7.2f MB. ", 1.0*(p->nContents+p->nItermAlloc*sizeof(Amap_Item_t))/(1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
Amap_LibertyStop( p );
return RetValue;
@@ -1061,7 +1061,7 @@ Vec_Str_t * Amap_LibertyParseStr( char * pFileName, int fVerbose )
Amap_Tree_t * p;
Vec_Str_t * vStr = NULL;
char * pPos;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue;
p = Amap_LibertyStart( pFileName );
if ( p == NULL )
@@ -1087,7 +1087,7 @@ Vec_Str_t * Amap_LibertyParseStr( char * pFileName, int fVerbose )
if ( fVerbose )
{
printf( "Memory = %7.2f MB. ", 1.0*(p->nContents+p->nItermAlloc*sizeof(Amap_Item_t))/(1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
Amap_LibertyStop( p );
return vStr;
diff --git a/src/map/amap/amapMatch.c b/src/map/amap/amapMatch.c
index 8903bf4e..52e80c26 100644
--- a/src/map/amap/amapMatch.c
+++ b/src/map/amap/amapMatch.c
@@ -485,7 +485,7 @@ void Amap_ManMatch( Amap_Man_t * p, int fFlow, int fRefs )
Amap_Obj_t * pObj;
float Area;
int i, nInvs;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pMemOld = p->pMemCutBest;
p->pMemCutBest = Aig_MmFlexStart();
Amap_ManForEachNode( p, pObj, i )
@@ -500,7 +500,7 @@ if ( p->pPars->fVerbose )
Area + nInvs * p->fAreaInv,
Area, nInvs * p->fAreaInv, nInvs,
Amap_ManMaxDelay(p) );
-ABC_PRT( "Time ", clock() - clk );
+ABC_PRT( "Time ", Abc_Clock() - clk );
}
// test procedures
// Amap_ManForEachNode( p, pObj, i )
diff --git a/src/map/amap/amapMerge.c b/src/map/amap/amapMerge.c
index b4aaca9d..4b91f7ca 100644
--- a/src/map/amap/amapMerge.c
+++ b/src/map/amap/amapMerge.c
@@ -515,7 +515,7 @@ void Amap_ManMerge( Amap_Man_t * p )
{
Amap_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p->pCutsPi = Amap_ManSetupPis( p );
Amap_ManForEachNode( p, pObj, i )
Amap_ManMergeNodeCuts( p, pObj );
@@ -527,7 +527,7 @@ void Amap_ManMerge( Amap_Man_t * p )
printf( "Node =%6d. Try =%9d. Try3 =%10d. Used =%7d. R =%6.2f. ",
Amap_ManNodeNum(p), p->nCutsTried, p->nCutsTried3, p->nCutsUsed,
1.0*p->nCutsUsed/Amap_ManNodeNum(p) );
-ABC_PRT( "Time ", clock() - clk );
+ABC_PRT( "Time ", Abc_Clock() - clk );
}
}
diff --git a/src/map/amap/amapParse.c b/src/map/amap/amapParse.c
index f2a38db6..6d8b7520 100644
--- a/src/map/amap/amapParse.c
+++ b/src/map/amap/amapParse.c
@@ -462,13 +462,13 @@ void Amap_LibParseTest( char * pFileName )
{
int fVerbose = 0;
Amap_Lib_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Amap_LibReadFile( pFileName, fVerbose );
if ( p == NULL )
return;
Amap_LibParseEquations( p, fVerbose );
Amap_LibFree( p );
- ABC_PRT( "Total time", clock() - clk );
+ ABC_PRT( "Total time", Abc_Clock() - clk );
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/map/amap/amapRule.c b/src/map/amap/amapRule.c
index 772c346d..4ff3cacb 100644
--- a/src/map/amap/amapRule.c
+++ b/src/map/amap/amapRule.c
@@ -338,7 +338,7 @@ void Amap_LibCreateRules( Amap_Lib_t * pLib, int fVeryVerbose )
{
Amap_Gat_t * pGate;
int i, nGates = 0;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
pLib->fVerbose = fVeryVerbose;
pLib->vRules = Vec_PtrAlloc( 100 );
pLib->vRulesX = Vec_PtrAlloc( 100 );
diff --git a/src/map/cov/covCore.c b/src/map/cov/covCore.c
index 1a1d025f..5d7f52dd 100644
--- a/src/map/cov/covCore.c
+++ b/src/map/cov/covCore.c
@@ -109,7 +109,7 @@ void Abc_NtkCovCovers( Cov_Man_t * p, Abc_Ntk_t * pNtk, int fVerbose )
{
Abc_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// start the manager
p->vFanCounts = Abc_NtkFanoutCounts(pNtk);
@@ -135,7 +135,7 @@ void Abc_NtkCovCovers( Cov_Man_t * p, Abc_Ntk_t * pNtk, int fVerbose )
if ( fVerbose )
{
-ABC_PRT( "Total", clock() - clk );
+ABC_PRT( "Total", Abc_Clock() - clk );
}
}
@@ -156,7 +156,7 @@ int Abc_NtkCovCoversOne( Cov_Man_t * p, Abc_Ntk_t * pNtk, int fVerbose )
Abc_Obj_t * pObj;
Vec_Ptr_t * vBoundary;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int Counter = 0;
int fStop = 1;
@@ -221,7 +221,7 @@ if ( fVerbose )
{
printf( "Outs = %4d (%4d) Node = %6d (%6d) Max = %6d Bound = %4d ",
Counter, Abc_NtkCoNum(pNtk), p->nSupps, Abc_NtkNodeNum(pNtk), p->nSuppsMax, p->nBoundary );
-ABC_PRT( "T", clock() - clk );
+ABC_PRT( "T", Abc_Clock() - clk );
}
return fStop;
}
diff --git a/src/map/if/if.h b/src/map/if/if.h
index 578866cb..902754dd 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -235,7 +235,7 @@ struct If_Man_t_
void ** pHashTable[2]; // hash table bins
Mem_Fixed_t * pMemEntries; // memory manager for hash table entries
// statistics
-// clock_t timeTruth;
+// abctime timeTruth;
};
// priority cut
diff --git a/src/map/if/ifCore.c b/src/map/if/ifCore.c
index 95dc03bf..ff5c3654 100644
--- a/src/map/if/ifCore.c
+++ b/src/map/if/ifCore.c
@@ -27,7 +27,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-extern clock_t s_MappingTime;
+extern abctime s_MappingTime;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -80,7 +80,7 @@ int If_ManPerformMapping( If_Man_t * p )
int If_ManPerformMappingComb( If_Man_t * p )
{
If_Obj_t * pObj;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int i;
// set arrival times and fanout estimates
@@ -134,10 +134,10 @@ int If_ManPerformMappingComb( If_Man_t * p )
// Abc_Print( 1, "Total memory = %7.2f MB. Peak cut memory = %7.2f MB. ",
// 1.0 * (p->nObjBytes + 2*sizeof(void *)) * If_ManObjNum(p) / (1<<20),
// 1.0 * p->nSetBytes * Mem_FixedReadMaxEntriesUsed(p->pMemSet) / (1<<20) );
- Abc_PrintTime( 1, "Total time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Total time", Abc_Clock() - clkTotal );
}
// Abc_Print( 1, "Cross cut memory = %d.\n", Mem_FixedReadMaxEntriesUsed(p->pMemSet) );
- s_MappingTime = clock() - clkTotal;
+ s_MappingTime = Abc_Clock() - clkTotal;
// Abc_Print( 1, "Special POs = %d.\n", If_ManCountSpecialPos(p) );
/*
diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c
index ace197fb..78f9ec68 100644
--- a/src/map/if/ifCut.c
+++ b/src/map/if/ifCut.c
@@ -1525,7 +1525,7 @@ int If_CutGetCones( If_Man_t * p )
{
If_Obj_t * pObj;
int i, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
If_ManForEachObj( p, pObj, i )
{
if ( If_ObjIsAnd(pObj) && pObj->nRefs )
@@ -1535,7 +1535,7 @@ int If_CutGetCones( If_Man_t * p )
}
}
Abc_Print( 1, "Cound not find boundary for %d nodes.\n", Counter );
- Abc_PrintTime( 1, "Cones", clock() - clk );
+ Abc_PrintTime( 1, "Cones", Abc_Clock() - clk );
return 1;
}
@@ -1578,7 +1578,7 @@ int If_CutCountTotalFanins( If_Man_t * p )
If_Obj_t * pObj;
Vec_Int_t * vLeaves;
int i, nFaninsTotal = 0, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vLeaves = Vec_IntAlloc( 100 );
If_ManForEachObj( p, pObj, i )
{
@@ -1592,7 +1592,7 @@ int If_CutCountTotalFanins( If_Man_t * p )
}
}
Abc_Print( 1, "Total cut inputs = %d. Total fanins incremental = %d.\n", nFaninsTotal, Counter );
- Abc_PrintTime( 1, "Fanins", clock() - clk );
+ Abc_PrintTime( 1, "Fanins", Abc_Clock() - clk );
Vec_IntFree( vLeaves );
return 1;
}
diff --git a/src/map/if/ifMan.c b/src/map/if/ifMan.c
index b0a70a32..e483a54d 100644
--- a/src/map/if/ifMan.c
+++ b/src/map/if/ifMan.c
@@ -32,7 +32,7 @@ static If_Obj_t * If_ManSetupObj( If_Man_t * p );
static void If_ManCutSetRecycle( If_Man_t * p, If_Set_t * pSet ) { pSet->pNext = p->pFreeList; p->pFreeList = pSet; }
static If_Set_t * If_ManCutSetFetch( If_Man_t * p ) { If_Set_t * pTemp = p->pFreeList; p->pFreeList = p->pFreeList->pNext; return pTemp; }
-extern clock_t s_TimeComp[4];
+extern abctime s_TimeComp[4];
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 8fb2962e..220570e1 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -259,10 +259,10 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
pCut->fCompl = 0;
if ( p->pPars->fTruth )
{
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
// int RetValue = If_CutComputeTruth( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
int RetValue = If_CutComputeTruth2( p, pCut, pCut0, pCut1, pObj->fCompl0, pObj->fCompl1 );
-// p->timeTruth += clock() - clk;
+// p->timeTruth += Abc_Clock() - clk;
pCut->fUseless = 0;
if ( p->pPars->pFuncCell && RetValue < 2 )
@@ -491,7 +491,7 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr
// ProgressBar * pProgress;
If_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
float arrTime;
assert( Mode >= 0 && Mode <= 2 );
// set the sorting function
@@ -561,7 +561,7 @@ int If_ManPerformMappingRound( If_Man_t * p, int nCutsUsed, int Mode, int fPrepr
char Symb = fPreprocess? 'P' : ((Mode == 0)? 'D' : ((Mode == 1)? 'F' : 'A'));
Abc_Print( 1, "%c: Del = %7.2f. Ar = %9.1f. Edge = %8d. Switch = %7.2f. Cut = %8d. ",
Symb, p->RequiredGlo, p->AreaGlo, p->nNets, p->dPower, p->nCutsMerged );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
// Abc_Print( 1, "Max number of cuts = %d. Average number of cuts = %5.2f.\n",
// p->nCutsMax, 1.0 * p->nCutsMerged / If_ManAndNum(p) );
}
diff --git a/src/map/if/ifReduce.c b/src/map/if/ifReduce.c
index 65e321c0..838a1b08 100644
--- a/src/map/if/ifReduce.c
+++ b/src/map/if/ifReduce.c
@@ -51,38 +51,38 @@ static void If_ManImproveNodeFaninCompact( If_Man_t * p, If_Obj_t * pObj, int nL
***********************************************************************/
void If_ManImproveMapping( If_Man_t * p )
{
- clock_t clk;
+ abctime clk;
- clk = clock();
+ clk = Abc_Clock();
If_ManImproveExpand( p, p->pPars->nLutSize );
If_ManComputeRequired( p );
if ( p->pPars->fVerbose )
{
Abc_Print( 1, "E: Del = %7.2f. Ar = %9.1f. Edge = %8d. Switch = %7.2f. Cut = %8d. ",
p->RequiredGlo, p->AreaGlo, p->nNets, p->dPower, p->nCutsMerged );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
/*
- clk = clock();
+ clk = Abc_Clock();
If_ManImproveReduce( p, p->pPars->nLutSize );
If_ManComputeRequired( p, 0 );
if ( p->pPars->fVerbose )
{
Abc_Print( 1, "R: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ",
p->RequiredGlo, p->AreaGlo, p->nNets, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
*/
/*
- clk = clock();
+ clk = Abc_Clock();
If_ManImproveExpand( p, p->pPars->nLutSize );
If_ManComputeRequired( p, 0 );
if ( p->pPars->fVerbose )
{
Abc_Print( 1, "E: Del = %6.2f. Area = %8.2f. Nets = %6d. Cuts = %8d. Lim = %2d. Ave = %5.2f. ",
p->RequiredGlo, p->AreaGlo, p->nNets, p->nCutsMerged, p->nCutsUsed, 1.0 * p->nCutsMerged / If_ManAndNum(p) );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
*/
}
diff --git a/src/map/if/ifSeq.c b/src/map/if/ifSeq.c
index d6037ce8..adb97b22 100644
--- a/src/map/if/ifSeq.c
+++ b/src/map/if/ifSeq.c
@@ -27,7 +27,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-extern clock_t s_MappingTime;
+extern abctime s_MappingTime;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -124,7 +124,7 @@ int If_ManPerformMappingRoundSeq( If_Man_t * p, int nIter )
{
If_Obj_t * pObj;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int fVeryVerbose = 0;
int fChange = 0;
@@ -179,7 +179,7 @@ int If_ManPerformMappingRoundSeq( If_Man_t * p, int nIter )
// p->AreaGlo = If_ManScanMapping(p);
Abc_Print( 1, "S%d: Fi = %6.2f. Del = %6.2f. Area = %8.2f. Cuts = %8d. ",
nIter, (float)p->Period, p->RequiredGlo, p->AreaGlo, p->nCutsMerged );
- Abc_PrintTime( 1, "T", clock() - clk );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
return fChange;
}
@@ -339,7 +339,7 @@ void If_ManPerformMappingSeqPost( If_Man_t * p )
***********************************************************************/
int If_ManPerformMappingSeq( If_Man_t * p )
{
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int PeriodBest;
p->SortMode = 0;
@@ -384,13 +384,13 @@ int If_ManPerformMappingSeq( If_Man_t * p )
// if ( p->pPars->fVerbose )
{
Abc_Print( 1, "The best clock period is %3d. ", p->Period );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
p->RequiredGlo = (float)(PeriodBest);
// postprocess it using combinational mapping
If_ManPerformMappingSeqPost( p );
- s_MappingTime = clock() - clkTotal;
+ s_MappingTime = Abc_Clock() - clkTotal;
return 1;
}
diff --git a/src/map/if/ifTime.c b/src/map/if/ifTime.c
index 6fba33f4..ca11b6fc 100644
--- a/src/map/if/ifTime.c
+++ b/src/map/if/ifTime.c
@@ -250,7 +250,7 @@ Vec_Wrd_t * If_CutDelaySopAnds( If_Man_t * p, If_Cut_t * pCut, Vec_Int_t * vCove
***********************************************************************/
Vec_Wrd_t * If_CutDelaySopArray( If_Man_t * p, If_Cut_t * pCut )
{
- clock_t clk;
+ abctime clk;
Vec_Wrd_t * vAnds;
int RetValue;
if ( p->vCover == NULL )
@@ -266,9 +266,9 @@ Vec_Wrd_t * If_CutDelaySopArray( If_Man_t * p, If_Cut_t * pCut )
return NULL;
assert( RetValue == 0 || RetValue == 1 );
- clk = clock();
+ clk = Abc_Clock();
vAnds = If_CutDelaySopAnds( p, pCut, p->vCover, RetValue ^ pCut->fCompl );
- s_timeOld += clock() - clk;
+ s_timeOld += Abc_Clock() - clk;
/*
if ( pCut->nLeaves <= 5 )
{
@@ -491,7 +491,7 @@ int If_CutDelaySopAnds2( If_Man_t * p, If_Cut_t * pCut, Vec_Int_t * vCover, int
}
int If_CutDelaySopArray2( If_Man_t * p, If_Cut_t * pCut, int * pArea )
{
- clock_t clk;
+ abctime clk;
int RetValue;
if ( p->vCover == NULL )
p->vCover = Vec_IntAlloc(0);
@@ -504,10 +504,10 @@ int If_CutDelaySopArray2( If_Man_t * p, If_Cut_t * pCut, int * pArea )
return -1;
assert( RetValue == 0 || RetValue == 1 );
- clk = clock();
+ clk = Abc_Clock();
RetValue = If_CutDelaySopAnds2( p, pCut, p->vCover, RetValue ^ pCut->fCompl, pArea );
// RetValue = If_CutDelaySopAnds2_( p, pCut, p->vCover, RetValue ^ pCut->fCompl, pArea );
- s_timeNew += clock() - clk;
+ s_timeNew += Abc_Clock() - clk;
return RetValue;
}
int If_CutDelaySopCost2( If_Man_t * p, If_Cut_t * pCut )
diff --git a/src/map/mapper/mapper.h b/src/map/mapper/mapper.h
index 24a07e17..e444b837 100644
--- a/src/map/mapper/mapper.h
+++ b/src/map/mapper/mapper.h
@@ -78,7 +78,7 @@ extern Map_Man_t * Map_ManCreate( int nInputs, int nOutputs, int fVerbose );
extern Map_Node_t * Map_NodeCreate( Map_Man_t * p, Map_Node_t * p1, Map_Node_t * p2 );
extern void Map_ManFree( Map_Man_t * pMan );
extern void Map_ManPrintTimeStats( Map_Man_t * p );
-extern void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, clock_t Time );
+extern void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, abctime Time );
extern int Map_ManReadInputNum( Map_Man_t * p );
extern int Map_ManReadOutputNum( Map_Man_t * p );
extern Map_Node_t ** Map_ManReadInputs ( Map_Man_t * p );
diff --git a/src/map/mapper/mapperCore.c b/src/map/mapper/mapperCore.c
index 9df22923..2f3263b3 100644
--- a/src/map/mapper/mapperCore.c
+++ b/src/map/mapper/mapperCore.c
@@ -53,7 +53,7 @@ int Map_Mapping( Map_Man_t * p )
int fUseAreaFlow = 1;
int fUseExactArea = !p->fSwitching;
int fUseExactAreaWithPhase = !p->fSwitching;
- clock_t clk;
+ abctime clk;
//////////////////////////////////////////////////////////////////////
// perform pre-mapping computations
@@ -65,23 +65,23 @@ int Map_Mapping( Map_Man_t * p )
// return 1;
// compute the cuts of nodes in the DFS order
- clk = clock();
+ clk = Abc_Clock();
Map_MappingCuts( p );
- p->timeCuts = clock() - clk;
+ p->timeCuts = Abc_Clock() - clk;
// derive the truth tables
- clk = clock();
+ clk = Abc_Clock();
Map_MappingTruths( p );
- p->timeTruth = clock() - clk;
+ p->timeTruth = Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
-//ABC_PRT( "Truths", clock() - clk );
+//ABC_PRT( "Truths", Abc_Clock() - clk );
//////////////////////////////////////////////////////////////////////
// compute the minimum-delay mapping
- clk = clock();
+ clk = Abc_Clock();
p->fMappingMode = 0;
if ( !Map_MappingMatches( p ) )
return 0;
- p->timeMatch = clock() - clk;
+ p->timeMatch = Abc_Clock() - clk;
// compute the references and collect the nodes used in the mapping
Map_MappingSetRefs( p );
p->AreaBase = Map_MappingGetArea( p, p->vMapping );
@@ -104,7 +104,7 @@ ABC_PRT( "Time", p->timeMatch );
//////////////////////////////////////////////////////////////////////
// perform area recovery using area flow
- clk = clock();
+ clk = Abc_Clock();
if ( fUseAreaFlow )
{
// compute the required times
@@ -122,15 +122,15 @@ printf( "AreaFlow : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
Map_MappingGetAreaFlow(p), p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- p->timeArea += clock() - clk;
+ p->timeArea += Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// perform area recovery using exact area
- clk = clock();
+ clk = Abc_Clock();
if ( fUseExactArea )
{
// compute the required times
@@ -148,15 +148,15 @@ printf( "Area : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
0.0, p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- p->timeArea += clock() - clk;
+ p->timeArea += Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// perform area recovery using exact area
- clk = clock();
+ clk = Abc_Clock();
if ( fUseExactAreaWithPhase )
{
// compute the required times
@@ -174,15 +174,15 @@ printf( "Area : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
0.0, p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- p->timeArea += clock() - clk;
+ p->timeArea += Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
//////////////////////////////////////////////////////////////////////
// perform area recovery using exact area
- clk = clock();
+ clk = Abc_Clock();
if ( p->fSwitching )
{
// compute the required times
@@ -200,7 +200,7 @@ printf( "Switching: %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
0.0, p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
// compute the required times
@@ -218,10 +218,10 @@ printf( "Switching: %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ",
fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo,
0.0, p->AreaFinal,
100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- p->timeArea += clock() - clk;
+ p->timeArea += Abc_Clock() - clk;
//////////////////////////////////////////////////////////////////////
// print the arrival times of the latest outputs
diff --git a/src/map/mapper/mapperCreate.c b/src/map/mapper/mapperCreate.c
index 169e0b46..3d64bfee 100644
--- a/src/map/mapper/mapperCreate.c
+++ b/src/map/mapper/mapperCreate.c
@@ -313,7 +313,7 @@ void Map_ManPrintTimeStats( Map_Man_t * p )
SeeAlso []
***********************************************************************/
-void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, clock_t Time )
+void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, abctime Time )
{
FILE * pTable;
pTable = fopen( "map_stats.txt", "a+" );
@@ -469,10 +469,10 @@ void Map_TableResize( Map_Man_t * pMan )
Map_Node_t ** pBinsNew;
Map_Node_t * pEnt, * pEnt2;
int nBinsNew, Counter, i;
- clock_t clk;
+ abctime clk;
unsigned Key;
-clk = clock();
+clk = Abc_Clock();
// get the new table size
nBinsNew = Abc_PrimeCudd(2 * pMan->nBins);
// allocate a new array
@@ -493,7 +493,7 @@ clk = clock();
if ( pMan->fVerbose )
{
// printf( "Increasing the unique table size from %6d to %6d. ", pMan->nBins, nBinsNew );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
}
// replace the table and the parameters
ABC_FREE( pMan->pBins );
diff --git a/src/map/mapper/mapperCut.c b/src/map/mapper/mapperCut.c
index bec1870a..84580387 100644
--- a/src/map/mapper/mapperCut.c
+++ b/src/map/mapper/mapperCut.c
@@ -117,7 +117,7 @@ void Map_MappingCuts( Map_Man_t * p )
Map_Node_t * pNode;
Map_Cut_t * pCut;
int nCuts, nNodes, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// set the elementary cuts for the PI variables
assert( p->nVarsMax > 1 && p->nVarsMax < 7 );
for ( i = 0; i < p->nInputs; i++ )
@@ -154,7 +154,7 @@ void Map_MappingCuts( Map_Man_t * p )
nCuts = Map_MappingCountAllCuts(p);
printf( "Nodes = %6d. Total %d-feasible cuts = %10d. Per node = %.1f. ",
p->nNodes, p->nVarsMax, nCuts, ((float)nCuts)/p->nNodes );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// print the cuts for the first primary output
@@ -915,16 +915,16 @@ Map_Cut_t * Map_CutTableConsider( Map_Man_t * pMan, Map_CutTable_t * p, Map_Node
{
Map_Cut_t * pCut;
int Place, i;
-// clock_t clk;
+// abctime clk;
// check the cut
Place = Map_CutTableLookup( p, ppNodes, nNodes );
if ( Place == -1 )
return NULL;
assert( nNodes > 0 );
// create the new cut
-//clk = clock();
+//clk = Abc_Clock();
pCut = Map_CutAlloc( pMan );
-//pMan->time1 += clock() - clk;
+//pMan->time1 += Abc_Clock() - clk;
pCut->nLeaves = nNodes;
for ( i = 0; i < nNodes; i++ )
pCut->ppLeaves[i] = ppNodes[i];
@@ -996,15 +996,15 @@ Map_Cut_t * Map_CutSortCuts( Map_Man_t * pMan, Map_CutTable_t * p, Map_Cut_t * p
{
Map_Cut_t * pListNew;
int nCuts, i;
-// clock_t clk;
+// abctime clk;
// move the cuts from the list into the array
nCuts = Map_CutList2Array( p->pCuts1, pList );
assert( nCuts <= MAP_CUTS_MAX_COMPUTE );
// sort the cuts
-//clk = clock();
+//clk = Abc_Clock();
qsort( (void *)p->pCuts1, nCuts, sizeof(Map_Cut_t *),
(int (*)(const void *, const void *)) Map_CutSortCutsCompare );
-//pMan->time2 += clock() - clk;
+//pMan->time2 += Abc_Clock() - clk;
// move them back into the list
if ( nCuts > MAP_CUTS_MAX_USE - 1 )
{
diff --git a/src/map/mapper/mapperInt.h b/src/map/mapper/mapperInt.h
index 442ca5eb..24017103 100644
--- a/src/map/mapper/mapperInt.h
+++ b/src/map/mapper/mapperInt.h
@@ -149,17 +149,17 @@ struct Map_ManStruct_t_
int nFanoutViolations; // the number of nodes in mapped circuit violating fanout
// runtime statistics
- clock_t timeToMap; // time to transfer to the mapping structure
- clock_t timeCuts; // time to compute k-feasible cuts
- clock_t timeTruth; // time to compute the truth table for each cut
- clock_t timeMatch; // time to perform matching for each node
- clock_t timeArea; // time to recover area after delay oriented mapping
- clock_t timeSweep; // time to perform technology dependent sweep
- clock_t timeToNet; // time to transfer back to the network
- clock_t timeTotal; // the total mapping time
- clock_t time1; // time to transfer to the mapping structure
- clock_t time2; // time to transfer to the mapping structure
- clock_t time3; // time to transfer to the mapping structure
+ abctime timeToMap; // time to transfer to the mapping structure
+ abctime timeCuts; // time to compute k-feasible cuts
+ abctime timeTruth; // time to compute the truth table for each cut
+ abctime timeMatch; // time to perform matching for each node
+ abctime timeArea; // time to recover area after delay oriented mapping
+ abctime timeSweep; // time to perform technology dependent sweep
+ abctime timeToNet; // time to transfer back to the network
+ abctime timeTotal; // the total mapping time
+ abctime time1; // time to transfer to the mapping structure
+ abctime time2; // time to transfer to the mapping structure
+ abctime time3; // time to transfer to the mapping structure
};
// the supergate library
diff --git a/src/map/mapper/mapperLib.c b/src/map/mapper/mapperLib.c
index 1d62bc32..80c2d610 100644
--- a/src/map/mapper/mapperLib.c
+++ b/src/map/mapper/mapperLib.c
@@ -58,7 +58,7 @@ ABC_NAMESPACE_IMPL_START
Map_SuperLib_t * Map_SuperLibCreate( Vec_Str_t * vStr, char * pFileName, char * pExcludeFile, int fAlgorithm, int fVerbose )
{
Map_SuperLib_t * p;
- clock_t clk;
+ abctime clk;
// start the supergate library
p = ABC_ALLOC( Map_SuperLib_t, 1 );
@@ -75,7 +75,7 @@ Map_SuperLib_t * Map_SuperLibCreate( Vec_Str_t * vStr, char * pFileName, char *
p->tTable = Map_SuperTableCreate( p );
// read the supergate library from file
-clk = clock();
+clk = Abc_Clock();
if ( vStr != NULL )
{
// read the supergate library from file
@@ -123,7 +123,7 @@ clk = clock();
{
printf( "Loaded %d unique %d-input supergates from \"%s\". ",
p->nSupersReal, p->nVarsMax, pFileName );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// assign the interver parameters
diff --git a/src/map/scl/sclMan.h b/src/map/scl/sclMan.h
index ebd14d6f..15afb6de 100644
--- a/src/map/scl/sclMan.h
+++ b/src/map/scl/sclMan.h
@@ -80,11 +80,11 @@ struct SC_Man_
float MaxDelay0; // max delay at the begining
float BestDelay; // best delay in the middle
// runtime statistics
- clock_t timeTotal; // starting/total time
- clock_t timeCone; // critical path selection
- clock_t timeSize; // incremental sizing
- clock_t timeTime; // timing update
- clock_t timeOther; // everything else
+ abctime timeTotal; // starting/total time
+ abctime timeCone; // critical path selection
+ abctime timeSize; // incremental sizing
+ abctime timeTime; // timing update
+ abctime timeOther; // everything else
};
////////////////////////////////////////////////////////////////////////
@@ -340,7 +340,7 @@ static inline SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fU
SeeAlso []
***********************************************************************/
-static inline void Abc_SclDumpStats( SC_Man * p, char * pFileName, clock_t Time )
+static inline void Abc_SclDumpStats( SC_Man * p, char * pFileName, abctime Time )
{
FILE * pTable;
pTable = fopen( pFileName, "a+" );
diff --git a/src/map/scl/sclUpsize.c b/src/map/scl/sclUpsize.c
index 6c9a61bc..7e0f5a92 100644
--- a/src/map/scl/sclUpsize.c
+++ b/src/map/scl/sclUpsize.c
@@ -446,7 +446,7 @@ void Abc_SclUpsizePrint( SC_Man * p, int Iter, int win, int nPathPos, int nPathN
printf( "A: " );
printf( "%.2f ", p->SumArea );
printf( "(%+5.1f %%)", 100.0 * (p->SumArea - p->SumArea0)/ p->SumArea0 );
- printf( "%8.2f", 1.0*(clock() - p->timeTotal)/(CLOCKS_PER_SEC) );
+ printf( "%8.2f", 1.0*(Abc_Clock() - p->timeTotal)/(CLOCKS_PER_SEC) );
printf( " " );
printf( "%c", fVerbose ? '\n' : '\r' );
}
@@ -468,7 +468,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
Vec_Int_t * vPathPos = NULL; // critical POs
Vec_Int_t * vPathNodes = NULL; // critical nodes and PIs
Vec_Int_t * vTFO;
- clock_t clk, nRuntimeLimit = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + clock() : 0;
+ abctime clk, nRuntimeLimit = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + Abc_Clock() : 0;
int i, win, nUpsizes = -1, nFramesNoChange = 0;
int nAllPos, nAllNodes, nAllTfos, nAllUpsizes;
@@ -486,7 +486,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
// prepare the manager; collect init stats
p = Abc_SclManStart( pLib, pNtk, 1, pPars->fUseDept );
- p->timeTotal = clock();
+ p->timeTotal = Abc_Clock();
assert( p->vGatesBest == NULL );
p->vGatesBest = Vec_IntDup( p->vGates );
p->BestDelay = p->MaxDelay0;
@@ -498,21 +498,21 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
for ( win = pPars->Window; win <= 100; win *= 2 )
{
// detect critical path
- clk = clock();
+ clk = Abc_Clock();
vPathPos = Abc_SclFindCriticalCoWindow( p, win );
vPathNodes = Abc_SclFindCriticalNodeWindow( p, vPathPos, win, pPars->fUseDept );
- p->timeCone += clock() - clk;
+ p->timeCone += Abc_Clock() - clk;
// selectively upsize the nodes
- clk = clock();
+ clk = Abc_Clock();
nUpsizes = Abc_SclFindUpsizes( p, vPathNodes, pPars->Ratio, pPars->Notches, i );
- p->timeSize += clock() - clk;
+ p->timeSize += Abc_Clock() - clk;
// unmark critical path
- clk = clock();
+ clk = Abc_Clock();
Abc_SclUnmarkCriticalNodeWindow( p, vPathNodes );
Abc_SclUnmarkCriticalNodeWindow( p, vPathPos );
- p->timeCone += clock() - clk;
+ p->timeCone += Abc_Clock() - clk;
if ( nUpsizes > 0 )
break;
Vec_IntFree( vPathPos );
@@ -522,7 +522,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
break;
// update timing information
- clk = clock();
+ clk = Abc_Clock();
if ( pPars->fUseDept )
{
vTFO = Vec_IntAlloc( 0 );
@@ -533,7 +533,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
vTFO = Abc_SclFindTFO( p->pNtk, vPathNodes );
Abc_SclTimeCone( p, vTFO );
}
- p->timeTime += clock() - clk;
+ p->timeTime += Abc_Clock() - clk;
// Abc_SclUpsizePrintDiffs( p, pLib, pNtk );
// save the best network
@@ -564,7 +564,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
Vec_IntFree( vPathNodes );
Vec_IntFree( vTFO );
// check timeout
- if ( nRuntimeLimit && clock() > nRuntimeLimit )
+ if ( nRuntimeLimit && Abc_Clock() > nRuntimeLimit )
break;
}
// update for best gates and recompute timing
@@ -573,7 +573,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
if ( pPars->fVerbose )
Abc_SclUpsizePrint( p, i, pPars->Window, nAllPos/(i?i:1), nAllNodes/(i?i:1), nAllUpsizes/(i?i:1), nAllTfos/(i?i:1), 1 );
// report runtime
- p->timeTotal = clock() - p->timeTotal;
+ p->timeTotal = Abc_Clock() - p->timeTotal;
if ( pPars->fVerbose )
{
p->timeOther = p->timeTotal - p->timeCone - p->timeSize - p->timeTime;
@@ -585,7 +585,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_UpSizePars * pPar
}
if ( pPars->fDumpStats )
Abc_SclDumpStats( p, "stats2.txt", p->timeTotal );
- if ( nRuntimeLimit && clock() > nRuntimeLimit )
+ if ( nRuntimeLimit && Abc_Clock() > nRuntimeLimit )
printf( "Gate sizing timed out at %d seconds.\n", pPars->TimeOut );
// save the result and quit
diff --git a/src/map/super/superAnd.c b/src/map/super/superAnd.c
index 774c4fc5..3e55d0f5 100644
--- a/src/map/super/superAnd.c
+++ b/src/map/super/superAnd.c
@@ -115,7 +115,7 @@ void Super2_Precompute( int nInputs, int nLevels, int fVerbose )
Super2_Man_t * pMan;
Super2_Lib_t * pLibCur, * pLibNext;
int Level;
- clock_t clk;
+ abctime clk;
assert( nInputs < 6 );
@@ -129,13 +129,13 @@ void Super2_Precompute( int nInputs, int nLevels, int fVerbose )
printf( "Computing supergates for %d inputs and %d levels:\n", nInputs, nLevels );
for ( Level = 1; Level <= nLevels; Level++ )
{
-clk = clock();
+clk = Abc_Clock();
pLibNext = Super2_LibCompute( pMan, pLibCur );
pLibNext->nLevels = Level;
Super2_LibStop( pLibCur );
pLibCur = pLibNext;
printf( "Level %d: Tried = %7d. Computed = %7d. ", Level, pMan->nTried, pLibCur->nGates );
-ABC_PRT( "Runtime", clock() - clk );
+ABC_PRT( "Runtime", Abc_Clock() - clk );
fflush( stdout );
}
@@ -463,7 +463,7 @@ void Super2_LibWrite( Super2_Lib_t * pLib )
Super2_Gate_t * pGate;
FILE * pFile;
char FileName[100];
- clock_t clk;
+ abctime clk;
if ( pLib->nLevels > 5 )
{
@@ -471,14 +471,14 @@ void Super2_LibWrite( Super2_Lib_t * pLib )
return;
}
-clk = clock();
+clk = Abc_Clock();
// sort the supergates by truth table
s_uMaskBit = pLib->uMaskBit;
s_uMaskAll = SUPER_MASK(pLib->nMints);
qsort( (void *)pLib->pGates, pLib->nGates, sizeof(Super2_Gate_t *),
(int (*)(const void *, const void *)) Super2_LibCompareGates );
assert( Super2_LibCompareGates( pLib->pGates, pLib->pGates + pLib->nGates - 1 ) < 0 );
-ABC_PRT( "Sorting", clock() - clk );
+ABC_PRT( "Sorting", Abc_Clock() - clk );
// start the file
diff --git a/src/map/super/superGate.c b/src/map/super/superGate.c
index ed47fb48..c96c9526 100644
--- a/src/map/super/superGate.c
+++ b/src/map/super/superGate.c
@@ -70,11 +70,11 @@ struct Super_ManStruct_t_
int nAliases; // the number of hash table lookups thrown away due to aliasing
// runtime
- clock_t Time; // the runtime of the generation procedure
+ abctime Time; // the runtime of the generation procedure
int TimeLimit; // the runtime limit (in seconds)
int TimeSec; // the time passed (in seconds)
- clock_t TimeStop; // the time to stop computation (in miliseconds)
- clock_t TimePrint; // the time to print message
+ abctime TimeStop; // the time to stop computation (in miliseconds)
+ abctime TimePrint; // the time to print message
};
struct Super_GateStruct_t_
@@ -175,7 +175,7 @@ Vec_Str_t * Super_PrecomputeStr( Mio_Library_t * pLibGen, int nVarsMax, int nLev
Super_Man_t * pMan;
Mio_Gate_t ** ppGates;
int nGates, Level;
- clock_t clk, clockStart;
+ abctime clk, clockStart;
assert( nVarsMax < 7 );
if ( nGatesMax && nGatesMax < nVarsMax )
@@ -201,7 +201,7 @@ Vec_Str_t * Super_PrecomputeStr( Mio_Library_t * pLibGen, int nVarsMax, int nLev
pMan->tDelayMax = tDelayMax;
pMan->tAreaMax = tAreaMax;
pMan->TimeLimit = TimeLimit; // in seconds
- pMan->TimeStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + clock() : 0; // in CPU ticks
+ pMan->TimeStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + Abc_Clock() : 0; // in CPU ticks
pMan->fVerbose = fVerbose;
if ( nGates == 0 )
@@ -221,7 +221,7 @@ Vec_Str_t * Super_PrecomputeStr( Mio_Library_t * pLibGen, int nVarsMax, int nLev
Super_First( pMan, nVarsMax );
// perform the computation of supergates
- clockStart = clock();
+ clockStart = Abc_Clock();
if ( fVerbose )
{
printf( "Computing supergates with %d inputs, %d levels, and %d max gates.\n",
@@ -232,20 +232,20 @@ if ( fVerbose )
for ( Level = 1; Level <= nLevels; Level++ )
{
- if ( pMan->TimeStop && clock() > pMan->TimeStop )
+ if ( pMan->TimeStop && Abc_Clock() > pMan->TimeStop )
break;
-clk = clock();
+clk = Abc_Clock();
Super_Compute( pMan, ppGates, nGates, nGatesMax, fSkipInv );
pMan->nLevels = Level;
if ( fVerbose )
{
printf( "Lev %d: Try =%12d. Add =%6d. Rem =%5d. Save =%6d. Lookups =%12d. Aliases =%12d. ",
Level, pMan->nTried, pMan->nAdded, pMan->nRemoved, pMan->nAdded - pMan->nRemoved, pMan->nLookups, pMan->nAliases );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
fflush( stdout );
}
}
- pMan->Time = clock() - clockStart;
+ pMan->Time = Abc_Clock() - clockStart;
if ( fVerbose )
{
@@ -377,7 +377,7 @@ Super_Man_t * Super_Compute( Super_Man_t * pMan, Mio_Gate_t ** ppGates, int nGat
}
pProgress = Extra_ProgressBarStart( stdout, pMan->TimeLimit );
- pMan->TimePrint = clock() + CLOCKS_PER_SEC;
+ pMan->TimePrint = Abc_Clock() + CLOCKS_PER_SEC;
ppGatesLimit = ABC_ALLOC( Super_Gate_t *, pMan->nGates );
// go through the root gates
// the root gates are sorted in the increasing gelay
@@ -736,11 +736,11 @@ done:
***********************************************************************/
int Super_CheckTimeout( ProgressBar * pPro, Super_Man_t * pMan )
{
- clock_t TimeNow = clock();
+ abctime TimeNow = Abc_Clock();
if ( TimeNow > pMan->TimePrint )
{
Extra_ProgressBarUpdate( pPro, ++pMan->TimeSec, NULL );
- pMan->TimePrint = clock() + CLOCKS_PER_SEC;
+ pMan->TimePrint = Abc_Clock() + CLOCKS_PER_SEC;
}
if ( pMan->TimeStop && TimeNow > pMan->TimeStop )
{
@@ -982,7 +982,7 @@ Vec_Str_t * Super_Write( Super_Man_t * pMan )
Super_Gate_t * pGateRoot, * pGate;
stmm_generator * gen;
int fZeroFound, v;
- clock_t clk;
+ abctime clk;
ABC_PTRUINT_T Key;
if ( pMan->nGates < 1 )
@@ -1019,32 +1019,32 @@ Vec_Str_t * Super_Write( Super_Man_t * pMan )
}
}
-clk = clock();
+clk = Abc_Clock();
// sort the supergates by truth table
qsort( (void *)pMan->pGates, pMan->nGates, sizeof(Super_Gate_t *),
(int (*)(const void *, const void *)) Super_WriteCompare );
assert( Super_WriteCompare( pMan->pGates, pMan->pGates + pMan->nGates - 1 ) <= 0 );
if ( pMan->fVerbose )
{
-ABC_PRT( "Sorting", clock() - clk );
+ABC_PRT( "Sorting", Abc_Clock() - clk );
}
// write library in the old format
-clk = clock();
+clk = Abc_Clock();
if ( pMan->fWriteOldFormat )
Super_WriteLibrary( pMan );
if ( pMan->fVerbose )
{
-ABC_PRT( "Writing old format", clock() - clk );
+ABC_PRT( "Writing old format", Abc_Clock() - clk );
}
// write the tree-like structure of supergates
-clk = clock();
+clk = Abc_Clock();
vStr = Super_WriteLibraryTreeStr( pMan );
if ( pMan->fVerbose )
{
-ABC_PRT( "Writing new format", clock() - clk );
+ABC_PRT( "Writing new format", Abc_Clock() - clk );
}
return vStr;
}
diff --git a/src/misc/extra/extra.h b/src/misc/extra/extra.h
index c3c9a93d..28156486 100644
--- a/src/misc/extra/extra.h
+++ b/src/misc/extra/extra.h
@@ -373,7 +373,7 @@ extern unsigned Extra_TruthSemiCanonicize( unsigned * pInOut, unsigned * pAux
/*=== extraUtilUtil.c ================================================================*/
-extern clock_t Extra_CpuTime();
+extern abctime Extra_CpuTime();
extern double Extra_CpuTimeDouble();
extern int Extra_GetSoftDataLimit();
extern ABC_DLL void Extra_UtilGetoptReset();
diff --git a/src/misc/extra/extraBddCas.c b/src/misc/extra/extraBddCas.c
index b745d306..024e4462 100644
--- a/src/misc/extra/extraBddCas.c
+++ b/src/misc/extra/extraBddCas.c
@@ -192,7 +192,7 @@ Extra_bddEncodingNonStrict(
{
DdNode * bEncoded, * bResult;
int nVarsCol = Cudd_SupportSize(dd,bVarsCol);
- clock_t clk;
+ abctime clk;
// cannot work with more that 32-bit codes
assert( nMulti < 32 );
@@ -221,19 +221,19 @@ Extra_bddEncodingNonStrict(
s_MultiStart = nMulti;
- clk = clock();
+ clk = Abc_Clock();
// find the simplest encoding
if ( nColumns > 2 )
EvaluateEncodings_rec( dd, bVarsCol, nVarsCol, nMulti, 1 );
// printf( "The number of backtracks = %d\n", s_BackTracks );
-// s_EncSearchTime += clock() - clk;
+// s_EncSearchTime += Abc_Clock() - clk;
// allocate the temporary storage for the columns
s_pbTemp = (DdNode **)ABC_ALLOC( char, nColumns * sizeof(DdNode *) );
-// clk = clock();
+// clk = Abc_Clock();
bResult = CreateTheCodes_rec( dd, bEncoded, 0, pCVars ); Cudd_Ref( bResult );
-// s_EncComputeTime += clock() - clk;
+// s_EncComputeTime += Abc_Clock() - clk;
// delocate the preliminarily encoded set
Cudd_RecursiveDeref( dd, bEncoded );
diff --git a/src/misc/extra/extraBddMisc.c b/src/misc/extra/extraBddMisc.c
index 6575f7b0..7d9c26d5 100644
--- a/src/misc/extra/extraBddMisc.c
+++ b/src/misc/extra/extraBddMisc.c
@@ -1348,9 +1348,9 @@ extraTransferPermuteRecur(
if ( st__lookup( table, ( char * ) f, ( char ** ) &res ) )
return ( Cudd_NotCond( res, comple ) );
- if ( ddS->TimeStop && clock() > ddS->TimeStop )
+ if ( ddS->TimeStop && Abc_Clock() > ddS->TimeStop )
return NULL;
- if ( ddD->TimeStop && clock() > ddD->TimeStop )
+ if ( ddD->TimeStop && Abc_Clock() > ddD->TimeStop )
return NULL;
/* Recursive step. */
@@ -1909,9 +1909,9 @@ DdNode * extraBddAndPermute( DdHashTable * table, DdManager * ddF, DdNode * bF,
return bRes;
Counter++;
- if ( ddF->TimeStop && clock() > ddF->TimeStop )
+ if ( ddF->TimeStop && Abc_Clock() > ddF->TimeStop )
return NULL;
- if ( ddG->TimeStop && clock() > ddG->TimeStop )
+ if ( ddG->TimeStop && Abc_Clock() > ddG->TimeStop )
return NULL;
// find the topmost variable in F and G using var order of F
@@ -1982,7 +1982,7 @@ void Extra_TestAndPerm( DdManager * ddF, DdNode * bF, DdNode * bG )
{
DdManager * ddG;
DdNode * bG2, * bRes1, * bRes2;
- clock_t clk;
+ abctime clk;
// disable variable ordering in ddF
Cudd_AutodynDisable( ddF );
@@ -1995,15 +1995,15 @@ void Extra_TestAndPerm( DdManager * ddF, DdNode * bF, DdNode * bG )
Cudd_ReduceHeap( ddG, CUDD_REORDER_SYMM_SIFT, 1 );
// compute the result
-clk = clock();
+clk = Abc_Clock();
bRes1 = Cudd_bddAnd( ddF, bF, bG ); Cudd_Ref( bRes1 );
-Abc_PrintTime( 1, "Runtime of Cudd_bddAnd ", clock() - clk );
+Abc_PrintTime( 1, "Runtime of Cudd_bddAnd ", Abc_Clock() - clk );
// compute the result
Counter = 0;
-clk = clock();
+clk = Abc_Clock();
bRes2 = Extra_bddAndPermute( ddF, bF, ddG, bG2, NULL ); Cudd_Ref( bRes2 );
-Abc_PrintTime( 1, "Runtime of new procedure", clock() - clk );
+Abc_PrintTime( 1, "Runtime of new procedure", Abc_Clock() - clk );
printf( "Recursive calls = %d\n", Counter );
printf( "|F| =%6d |G| =%6d |H| =%6d |F|*|G| =%9d ",
Cudd_DagSize(bF), Cudd_DagSize(bG), Cudd_DagSize(bRes2),
diff --git a/src/misc/extra/extraBddTime.c b/src/misc/extra/extraBddTime.c
index 0f4d238d..dc9ff147 100644
--- a/src/misc/extra/extraBddTime.c
+++ b/src/misc/extra/extraBddTime.c
@@ -224,8 +224,8 @@ cuddBddAndRecurTime(
if (r != NULL) return(r);
}
-// if ( TimeOut && ((*pRecCalls)++ % CHECK_FACTOR) == 0 && TimeOut < clock() )
- if ( TimeOut && clock() > TimeOut )
+// if ( TimeOut && ((*pRecCalls)++ % CHECK_FACTOR) == 0 && TimeOut < Abc_Clock() )
+ if ( TimeOut && Abc_Clock() > TimeOut )
return NULL;
/* Here we can skip the use of cuddI, because the operands are known
@@ -378,8 +378,8 @@ cuddBddAndAbstractRecurTime(
}
}
-// if ( TimeOut && ((*pRecCalls)++ % CHECK_FACTOR) == 0 && TimeOut < clock() )
- if ( TimeOut && clock() > TimeOut )
+// if ( TimeOut && ((*pRecCalls)++ % CHECK_FACTOR) == 0 && TimeOut < Abc_Clock() )
+ if ( TimeOut && Abc_Clock() > TimeOut )
return NULL;
if (topf == top) {
@@ -596,7 +596,7 @@ extraTransferPermuteRecurTime(
if ( st__lookup( table, ( char * ) f, ( char ** ) &res ) )
return ( Cudd_NotCond( res, comple ) );
- if ( TimeOut && clock() > TimeOut )
+ if ( TimeOut && Abc_Clock() > TimeOut )
return NULL;
/* Recursive step. */
diff --git a/src/misc/extra/extraUtilMisc.c b/src/misc/extra/extraUtilMisc.c
index 3498abf7..51bd887e 100644
--- a/src/misc/extra/extraUtilMisc.c
+++ b/src/misc/extra/extraUtilMisc.c
@@ -2480,7 +2480,7 @@ void Extra_NpnTest()
// int nFuncs = 5687661;
// int nFuncs = 400777;
int nFuncs = 10;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
word * pFuncs;
int * pComp, * pPerm;
int i;//, k, nUnique = 0;
@@ -2528,7 +2528,7 @@ void Extra_NpnTest()
ABC_FREE( pPerm );
ABC_FREE( pComp );
ABC_FREE( pFuncs );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
diff --git a/src/misc/extra/extraUtilUtil.c b/src/misc/extra/extraUtilUtil.c
index 7f19480c..253d9e3c 100644
--- a/src/misc/extra/extraUtilUtil.c
+++ b/src/misc/extra/extraUtilUtil.c
@@ -347,9 +347,9 @@ void (*Extra_UtilMMoutOfMemory)( long size ) = (void (*)( long size ))Extra_Util
SeeAlso []
***********************************************************************/
-clock_t Extra_CpuTime()
+abctime Extra_CpuTime()
{
- return clock();
+ return Abc_Clock();
}
/**Function*************************************************************
@@ -366,7 +366,7 @@ clock_t Extra_CpuTime()
#if defined(NT) || defined(NT64) || defined(WIN32)
double Extra_CpuTimeDouble()
{
- return 1.0*clock()/CLOCKS_PER_SEC;
+ return 1.0*Abc_Clock()/CLOCKS_PER_SEC;
}
#else
diff --git a/src/misc/nm/nmTable.c b/src/misc/nm/nmTable.c
index 1a792242..5fab82d3 100644
--- a/src/misc/nm/nmTable.c
+++ b/src/misc/nm/nmTable.c
@@ -257,9 +257,9 @@ void Nm_ManResize( Nm_Man_t * p )
{
Nm_Entry_t ** pBinsNewI2N, ** pBinsNewN2I, * pEntry, * pEntry2, ** ppSpot;
int nBinsNew, Counter, e;
- clock_t clk;
+ abctime clk;
-clk = clock();
+clk = Abc_Clock();
// get the new table size
nBinsNew = Abc_PrimeCudd( p->nGrowthFactor * p->nBins );
// allocate a new array
@@ -289,7 +289,7 @@ clk = clock();
}
assert( Counter == p->nEntries );
// printf( "Increasing the structural table size from %6d to %6d. ", p->nBins, nBinsNew );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( p->pBinsI2N );
ABC_FREE( p->pBinsN2I );
diff --git a/src/misc/util/abc_global.h b/src/misc/util/abc_global.h
index 914fd327..f824ea43 100644
--- a/src/misc/util/abc_global.h
+++ b/src/misc/util/abc_global.h
@@ -266,25 +266,43 @@ static inline int Abc_LitRegular( int Lit ) { return Lit & ~01
static inline int Abc_Lit2LitV( int * pMap, int Lit ) { return Abc_Var2Lit( pMap[Abc_Lit2Var(Lit)], Abc_LitIsCompl(Lit) ); }
static inline int Abc_Lit2LitL( int * pMap, int Lit ) { return Abc_LitNotCond( pMap[Abc_Lit2Var(Lit)], Abc_LitIsCompl(Lit) ); }
-enum Abc_VerbLevel
+
+// time counting
+typedef ABC_UINT64_T abctime;
+static inline abctime Abc_Clock()
{
- ABC_PROMPT = -2,
- ABC_ERROR = -1,
- ABC_WARNING = 0,
- ABC_STANDARD = 1,
- ABC_VERBOSE = 2
-};
+ static abctime PeriodNum = 0;
+ static clock_t Period = ((abctime)1 << 30);
+ clock_t ClockTime = clock();
+ if ( ClockTime >= Period )
+ {
+ ClockTime -= Period;
+ PeriodNum++;
+ }
+ return PeriodNum * Period + ClockTime;
+}
+
+// bridge communication
#define BRIDGE_NETLIST 106
#define BRIDGE_ABS_NETLIST 107
+extern int Gia_ManToBridgeText( FILE * pFile, int Size, unsigned char * pBuffer );
+extern int Gia_ManToBridgeAbsNetlist( FILE * pFile, void * p, int pkg_type );
// string printing
extern char * vnsprintf(const char* format, va_list args);
extern char * nsprintf(const char* format, ...);
-extern int Gia_ManToBridgeText( FILE * pFile, int Size, unsigned char * pBuffer );
-extern int Gia_ManToBridgeAbsNetlist( FILE * pFile, void * p, int pkg_type );
+
// misc printing procedures
+enum Abc_VerbLevel
+{
+ ABC_PROMPT = -2,
+ ABC_ERROR = -1,
+ ABC_WARNING = 0,
+ ABC_STANDARD = 1,
+ ABC_VERBOSE = 2
+};
static inline void Abc_Print( int level, const char * format, ... )
{
extern ABC_DLL int Abc_FrameIsBridgeMode();
@@ -339,12 +357,12 @@ static inline void Abc_PrintInt( int i )
Abc_Print( 1, "%4.0fm", v6 );
}
-static inline void Abc_PrintTime( int level, const char * pStr, clock_t time )
+static inline void Abc_PrintTime( int level, const char * pStr, abctime time )
{
ABC_PRT( pStr, time );
}
-static inline void Abc_PrintTimeP( int level, const char * pStr, clock_t time, clock_t Time )
+static inline void Abc_PrintTimeP( int level, const char * pStr, abctime time, abctime Time )
{
ABC_PRTP( pStr, time, Time );
}
@@ -381,6 +399,7 @@ static inline int Abc_PrimeCudd( unsigned int p )
} // end of Cudd_Prime
+
// sorting
extern void Abc_MergeSort( int * pInput, int nSize );
extern int * Abc_MergeSortCost( int * pCosts, int nSize );
@@ -391,7 +410,6 @@ extern void Abc_QuickSortCostData( int * pCosts, int nSize, int fDecrease, wor
extern int * Abc_QuickSortCost( int * pCosts, int nSize, int fDecrease );
-
ABC_NAMESPACE_HEADER_END
#endif
diff --git a/src/misc/util/utilNam.c b/src/misc/util/utilNam.c
index ccea6322..5fb38c51 100644
--- a/src/misc/util/utilNam.c
+++ b/src/misc/util/utilNam.c
@@ -302,7 +302,7 @@ void Abc_NamStrHashResize( Abc_Nam_t * p )
{
Vec_Int_t * vInt2HandleOld;
char * pThis;
- int * piPlace, * pBinsOld, iHandleOld, i;//, clk = clock();
+ int * piPlace, * pBinsOld, iHandleOld, i;//, clk = Abc_Clock();
assert( p->pBins != NULL );
// Abc_Print( 1, "Resizing names manager hash table from %6d to %6d. ", p->nBins, Abc_PrimeCudd( 3 * p->nBins ) );
// replace the table
@@ -327,7 +327,7 @@ void Abc_NamStrHashResize( Abc_Nam_t * p )
}
Vec_IntFree( vInt2HandleOld );
ABC_FREE( pBinsOld );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/misc/util/utilSort.c b/src/misc/util/utilSort.c
index 48321c9f..4dca700c 100644
--- a/src/misc/util/utilSort.c
+++ b/src/misc/util/utilSort.c
@@ -401,7 +401,7 @@ void Abc_SortTest()
int i, nSize = 50000000;
int * pArray = (int *)malloc( sizeof(int) * nSize );
int * pPerm;
- clock_t clk;
+ abctime clk;
// generate numbers
srand( 1000 );
for ( i = 0; i < nSize; i++ )
@@ -413,9 +413,9 @@ void Abc_SortTest()
int fUseCost = 1;
if ( fUseCost )
{
- clk = clock();
+ clk = Abc_Clock();
pPerm = Abc_MergeSortCost( pArray, nSize );
- Abc_PrintTime( 1, "New sort", clock() - clk );
+ Abc_PrintTime( 1, "New sort", Abc_Clock() - clk );
// check
for ( i = 1; i < nSize; i++ )
assert( pArray[pPerm[i-1]] <= pArray[pPerm[i]] );
@@ -423,9 +423,9 @@ void Abc_SortTest()
}
else
{
- clk = clock();
+ clk = Abc_Clock();
Abc_MergeSort( pArray, nSize );
- Abc_PrintTime( 1, "New sort", clock() - clk );
+ Abc_PrintTime( 1, "New sort", Abc_Clock() - clk );
// check
for ( i = 1; i < nSize; i++ )
assert( pArray[i-1] <= pArray[i] );
@@ -433,9 +433,9 @@ void Abc_SortTest()
}
else
{
- clk = clock();
+ clk = Abc_Clock();
qsort( (void *)pArray, nSize, sizeof(int), (int (*)(const void *, const void *)) Abc_SortNumCompare );
- Abc_PrintTime( 1, "Old sort", clock() - clk );
+ Abc_PrintTime( 1, "Old sort", Abc_Clock() - clk );
// check
for ( i = 1; i < nSize; i++ )
assert( pArray[i-1] <= pArray[i] );
@@ -745,18 +745,18 @@ void Abc_QuickSortTest()
int fVerbose = 0;
word * pData1, * pData2;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// generate numbers
pData1 = ABC_ALLOC( word, nSize );
pData2 = ABC_ALLOC( word, nSize );
srand( 1111 );
for ( i = 0; i < nSize; i++ )
pData2[i] = pData1[i] = ((word)i << 32) | rand();
- Abc_PrintTime( 1, "Prepare ", clock() - clk );
+ Abc_PrintTime( 1, "Prepare ", Abc_Clock() - clk );
// perform sorting
- clk = clock();
+ clk = Abc_Clock();
Abc_QuickSort3( pData1, nSize, 1 );
- Abc_PrintTime( 1, "Sort new", clock() - clk );
+ Abc_PrintTime( 1, "Sort new", Abc_Clock() - clk );
// print the result
if ( fVerbose )
{
@@ -765,9 +765,9 @@ void Abc_QuickSortTest()
printf( "\n" );
}
// create new numbers
- clk = clock();
+ clk = Abc_Clock();
Abc_QuickSort1( pData2, nSize, 1 );
- Abc_PrintTime( 1, "Sort old", clock() - clk );
+ Abc_PrintTime( 1, "Sort old", Abc_Clock() - clk );
// print the result
if ( fVerbose )
{
diff --git a/src/misc/util/util_hack.h b/src/misc/util/util_hack.h
index 4d611ef4..cbbb7c2d 100644
--- a/src/misc/util/util_hack.h
+++ b/src/misc/util/util_hack.h
@@ -37,7 +37,7 @@ ABC_NAMESPACE_HEADER_START
#define getSoftDataLimit Extra_GetSoftDataLimit
#define MMoutOfMemory Extra_UtilMMoutOfMemory
-extern clock_t Extra_CpuTime();
+extern abctime Extra_CpuTime();
extern int Extra_GetSoftDataLimit();
extern void (*Extra_UtilMMoutOfMemory)( long size );
diff --git a/src/opt/cgt/cgtCore.c b/src/opt/cgt/cgtCore.c
index a24b180b..a7b3844c 100644
--- a/src/opt/cgt/cgtCore.c
+++ b/src/opt/cgt/cgtCore.c
@@ -201,19 +201,19 @@ void Cgt_ClockGatingRangeCheck( Cgt_Man_t * p, int iStart, int nOutputs )
int Cgt_ClockGatingRange( Cgt_Man_t * p, int iStart )
{
int nOutputs, iStop;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
int nCallsUnsat = p->nCallsUnsat;
int nCallsSat = p->nCallsSat;
int nCallsUndec = p->nCallsUndec;
int nCallsFiltered = p->nCallsFiltered;
-clk = clock();
+clk = Abc_Clock();
p->pPart = Cgt_ManDupPartition( p->pFrame, p->pPars->nVarsMin, p->pPars->nFlopsMin, iStart, p->pCare, p->vSuppsInv, &nOutputs );
p->pCnf = Cnf_DeriveSimple( p->pPart, nOutputs );
p->pSat = (sat_solver *)Cnf_DataWriteIntoSolver( p->pCnf, 1, 0 );
sat_solver_compress( p->pSat );
p->vPatts = Vec_PtrAllocSimInfo( Aig_ManObjNumMax(p->pPart), p->nPattWords );
Vec_PtrCleanSimInfo( p->vPatts, 0, p->nPattWords );
-p->timePrepare += clock() - clk;
+p->timePrepare += Abc_Clock() - clk;
Cgt_ClockGatingRangeCheck( p, iStart, nOutputs );
iStop = iStart + nOutputs;
if ( p->pPars->fVeryVerbose )
@@ -224,7 +224,7 @@ p->timePrepare += clock() - clk;
p->nCallsSat -nCallsSat,
p->nCallsUndec-nCallsUndec,
p->nCallsFiltered-nCallsFiltered );
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
Cgt_ManClean( p );
p->nRecycles++;
@@ -249,14 +249,14 @@ Vec_Vec_t * Cgt_ClockGatingCandidates( Aig_Man_t * pAig, Aig_Man_t * pCare, Cgt_
Cgt_Man_t * p;
Vec_Vec_t * vGatesAll;
int iStart;
- clock_t clk = clock(), clkTotal = clock();
+ abctime clk = Abc_Clock(), clkTotal = Abc_Clock();
// reset random numbers
Aig_ManRandom( 1 );
if ( pPars == NULL )
Cgt_SetDefaultParams( pPars = &Pars );
p = Cgt_ManCreate( pAig, pCare, pPars );
p->pFrame = Cgt_ManDeriveAigForGating( p );
-p->timeAig += clock() - clk;
+p->timeAig += Abc_Clock() - clk;
assert( Aig_ManCoNum(p->pFrame) == Saig_ManRegNum(p->pAig) );
pProgress = Bar_ProgressStart( stdout, Aig_ManCoNum(p->pFrame) );
for ( iStart = 0; iStart < Aig_ManCoNum(p->pFrame); )
@@ -267,7 +267,7 @@ p->timeAig += clock() - clk;
Bar_ProgressStop( pProgress );
vGatesAll = p->vGatesAll;
p->vGatesAll = NULL;
-p->timeTotal = clock() - clkTotal;
+p->timeTotal = Abc_Clock() - clkTotal;
Cgt_ManStop( p );
return vGatesAll;
}
@@ -288,7 +288,7 @@ Aig_Man_t * Cgt_ClockGating( Aig_Man_t * pAig, Aig_Man_t * pCare, Cgt_Par_t * pP
Aig_Man_t * pGated;
Vec_Vec_t * vGatesAll;
Vec_Vec_t * vGates;
- int nNodesUsed;//, clk = clock();
+ int nNodesUsed;//, clk = Abc_Clock();
vGatesAll = Cgt_ClockGatingCandidates( pAig, pCare, pPars );
if ( pPars->fAreaOnly )
vGates = Cgt_ManDecideArea( pAig, vGatesAll, pPars->nOdcMax, pPars->fVerbose );
diff --git a/src/opt/cgt/cgtDecide.c b/src/opt/cgt/cgtDecide.c
index 63730f55..033375a7 100644
--- a/src/opt/cgt/cgtDecide.c
+++ b/src/opt/cgt/cgtDecide.c
@@ -193,7 +193,7 @@ Vec_Vec_t * Cgt_ManDecideSimple( Aig_Man_t * pAig, Vec_Vec_t * vGatesAll, int nO
Vec_Ptr_t * vCands;
Aig_Obj_t * pObjLi, * pObjLo, * pCand, * pCandBest;
int i, k, nHitsCur, nHitsMax, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int nTransTotal = 0, nTransSaved = 0;
vGates = Vec_VecStart( Saig_ManRegNum(pAig) );
pSml = Ssw_SmlSimulateSeq( pAig, 0, nFrames, nWords );
@@ -231,7 +231,7 @@ Vec_Vec_t * Cgt_ManDecideSimple( Aig_Man_t * pAig, Vec_Vec_t * vGatesAll, int nO
// printf( "Gated transitions = %5.2f %%. (%5.2f %%.) ",
// 100.0*nTransSaved/nTransTotal, Cgt_ManComputeCoverage(pAig, vGates) );
printf( "Gated transitions = %5.2f %%. ", Cgt_ManComputeCoverage(pAig, vGates) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
/*
{
@@ -261,7 +261,7 @@ Vec_Vec_t * Cgt_ManDecideArea( Aig_Man_t * pAig, Vec_Vec_t * vGatesAll, int nOdc
Vec_Ptr_t * vCompletes, * vOne;
Aig_Obj_t * pGate;
int i, k, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// derive and label complete gates
vCompletes = Cgt_ManCompleteGates( pAig, vGatesAll, nOdcMax, fVerbose );
// label complete gates
@@ -288,7 +288,7 @@ Vec_Vec_t * Cgt_ManDecideArea( Aig_Man_t * pAig, Vec_Vec_t * vGatesAll, int nOdc
Vec_VecSizeSize(vGatesAll), Counter, Saig_ManRegNum(pAig) );
printf( "Complete gates = %6d. Gated transitions = %5.2f %%. ",
Vec_PtrSize(vCompletes), Cgt_ManComputeCoverage(pAig, vGates) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
Vec_PtrFree( vCompletes );
return vGates;
diff --git a/src/opt/cgt/cgtInt.h b/src/opt/cgt/cgtInt.h
index b73d60dd..43d38d8d 100644
--- a/src/opt/cgt/cgtInt.h
+++ b/src/opt/cgt/cgtInt.h
@@ -74,15 +74,15 @@ struct Cgt_Man_t_
int nCallsUnsat; // unsatisfiable calls
int nCallsUndec; // undecided calls
int nCallsFiltered; // filtered out calls
- clock_t timeAig; // constructing AIG
- clock_t timePrepare; // partitioning and SAT solving
- clock_t timeSat; // total runtime
- clock_t timeSatSat; // satisfiable runtime
- clock_t timeSatUnsat; // unsatisfiable runtime
- clock_t timeSatUndec; // undecided runtime
- clock_t timeDecision; // making decision about what gates to use
- clock_t timeOther; // other runtime
- clock_t timeTotal; // total runtime
+ abctime timeAig; // constructing AIG
+ abctime timePrepare; // partitioning and SAT solving
+ abctime timeSat; // total runtime
+ abctime timeSatSat; // satisfiable runtime
+ abctime timeSatUnsat; // unsatisfiable runtime
+ abctime timeSatUndec; // undecided runtime
+ abctime timeDecision; // making decision about what gates to use
+ abctime timeOther; // other runtime
+ abctime timeTotal; // total runtime
};
////////////////////////////////////////////////////////////////////////
diff --git a/src/opt/cgt/cgtSat.c b/src/opt/cgt/cgtSat.c
index b6d3c599..9ff5f69c 100644
--- a/src/opt/cgt/cgtSat.c
+++ b/src/opt/cgt/cgtSat.c
@@ -47,7 +47,7 @@ int Cgt_CheckImplication( Cgt_Man_t * p, Aig_Obj_t * pGate, Aig_Obj_t * pMiter )
{
int nBTLimit = p->pPars->nConfMax;
int pLits[2], RetValue;
- clock_t clk;
+ abctime clk;
p->nCalls++;
// sanity checks
@@ -60,12 +60,12 @@ int Cgt_CheckImplication( Cgt_Man_t * p, Aig_Obj_t * pGate, Aig_Obj_t * pMiter )
pLits[0] = toLitCond( p->pCnf->pVarNums[Aig_Regular(pGate)->Id], Aig_IsComplement(pGate) );
pLits[1] = toLitCond( p->pCnf->pVarNums[pMiter->Id], 0 );
-clk = clock();
+clk = Abc_Clock();
RetValue = sat_solver_solve( p->pSat, pLits, pLits + 2, (ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -76,13 +76,13 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nCallsUndec++;
return -1;
}
diff --git a/src/opt/csw/cswCore.c b/src/opt/csw/cswCore.c
index 3702b346..d1b871f9 100644
--- a/src/opt/csw/cswCore.c
+++ b/src/opt/csw/cswCore.c
@@ -48,8 +48,8 @@ Aig_Man_t * Csw_Sweep( Aig_Man_t * pAig, int nCutsMax, int nLeafMax, int fVerbos
Aig_Man_t * pRes;
Aig_Obj_t * pObj, * pObjNew, * pObjRes;
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// start the manager
p = Csw_ManStart( pAig, nCutsMax, nLeafMax, fVerbose );
// set elementary cuts at the PIs
@@ -83,7 +83,7 @@ clk = clock();
// remove dangling nodes
Aig_ManCleanup( p->pManRes );
// return the resulting manager
-p->timeTotal = clock() - clk;
+p->timeTotal = Abc_Clock() - clk;
p->timeOther = p->timeTotal - p->timeCuts - p->timeHash;
pRes = p->pManRes;
Csw_ManStop( p );
diff --git a/src/opt/csw/cswCut.c b/src/opt/csw/cswCut.c
index 0b1d9254..0474d8a5 100644
--- a/src/opt/csw/cswCut.c
+++ b/src/opt/csw/cswCut.c
@@ -498,7 +498,7 @@ Aig_Obj_t * Csw_ObjSweep( Csw_Man_t * p, Aig_Obj_t * pObj, int fTriv )
Aig_Obj_t * pObjNew;
unsigned * pTruth;
int i, k, nVars, nFanins, iVar;
- clock_t clk;
+ abctime clk;
assert( !Aig_IsComplement(pObj) );
if ( !Aig_ObjIsNode(pObj) )
@@ -523,7 +523,7 @@ Aig_Obj_t * Csw_ObjSweep( Csw_Man_t * p, Aig_Obj_t * pObj, int fTriv )
continue;
// get the next cut of this node
pCut = Csw_CutFindFree( p, pObj );
-clk = clock();
+clk = Abc_Clock();
// assemble the new cut
if ( !Csw_CutMerge( p, pCut0, pCut1, pCut ) )
{
@@ -542,7 +542,7 @@ clk = clock();
nFanins = pCut->nFanins;
// nVars = Csw_CutSupportMinimize( p, pCut ); // leads to quality degradation
nVars = Kit_TruthSupportSize( pTruth, p->nLeafMax );
-p->timeCuts += clock() - clk;
+p->timeCuts += Abc_Clock() - clk;
// check for trivial truth tables
if ( nVars == 0 )
@@ -567,9 +567,9 @@ p->timeCuts += clock() - clk;
}
// check if an equivalent node with the same cut exists
-clk = clock();
+clk = Abc_Clock();
pObjNew = pCut->nFanins > 2 ? Csw_TableCutLookup( p, pCut ) : NULL;
-p->timeHash += clock() - clk;
+p->timeHash += Abc_Clock() - clk;
if ( pObjNew )
{
p->nNodesCuts++;
@@ -584,7 +584,7 @@ p->timeHash += clock() - clk;
p->nNodesTried++;
// load the resulting cuts into the table
-clk = clock();
+clk = Abc_Clock();
Csw_ObjForEachCut( p, pObj, pCut, i )
{
if ( pCut->nFanins > 2 )
@@ -593,7 +593,7 @@ clk = clock();
Csw_TableCutInsert( p, pCut );
}
}
-p->timeHash += clock() - clk;
+p->timeHash += Abc_Clock() - clk;
// return the node if could not replace it
return pObj;
diff --git a/src/opt/csw/cswInt.h b/src/opt/csw/cswInt.h
index 4f8dac39..890a61d2 100644
--- a/src/opt/csw/cswInt.h
+++ b/src/opt/csw/cswInt.h
@@ -93,10 +93,10 @@ struct Csw_Man_t_
int nNodesTriv2; // the number of trivial nodes
int nNodesCuts; // the number of rewritten nodes
int nNodesTried; // the number of nodes tried
- clock_t timeCuts; // time to compute the cut and its truth table
- clock_t timeHash; // time for hashing cuts
- clock_t timeOther; // other time
- clock_t timeTotal; // total time
+ abctime timeCuts; // time to compute the cut and its truth table
+ abctime timeHash; // time for hashing cuts
+ abctime timeOther; // other time
+ abctime timeTotal; // total time
};
static inline int Csw_CutLeaveNum( Csw_Cut_t * pCut ) { return pCut->nFanins; }
diff --git a/src/opt/cut/cut.h b/src/opt/cut/cut.h
index 64d3108a..9d4e223b 100644
--- a/src/opt/cut/cut.h
+++ b/src/opt/cut/cut.h
@@ -124,7 +124,7 @@ extern int Cut_CutCountList( Cut_Cut_t * pList );
extern Cut_Man_t * Cut_ManStart( Cut_Params_t * pParams );
extern void Cut_ManStop( Cut_Man_t * p );
extern void Cut_ManPrintStats( Cut_Man_t * p );
-extern void Cut_ManPrintStatsToFile( Cut_Man_t * p, char * pFileName, clock_t TimeTotal );
+extern void Cut_ManPrintStatsToFile( Cut_Man_t * p, char * pFileName, abctime TimeTotal );
extern void Cut_ManSetFanoutCounts( Cut_Man_t * p, Vec_Int_t * vFanCounts );
extern void Cut_ManSetNodeAttrs( Cut_Man_t * p, Vec_Int_t * vFanCounts );
extern int Cut_ManReadVarsMax( Cut_Man_t * p );
diff --git a/src/opt/cut/cutInt.h b/src/opt/cut/cutInt.h
index 754779a3..957cf2c2 100644
--- a/src/opt/cut/cutInt.h
+++ b/src/opt/cut/cutInt.h
@@ -92,12 +92,12 @@ struct Cut_ManStruct_t_
int nNodesDag;
int nNodesNoCuts;
// runtime
- clock_t timeMerge;
- clock_t timeUnion;
- clock_t timeTruth;
- clock_t timeFilter;
- clock_t timeHash;
- clock_t timeMap;
+ abctime timeMerge;
+ abctime timeUnion;
+ abctime timeTruth;
+ abctime timeFilter;
+ abctime timeHash;
+ abctime timeMap;
};
// iterator through all the cuts of the list
diff --git a/src/opt/cut/cutMan.c b/src/opt/cut/cutMan.c
index ea3d73bb..2a82d8bb 100644
--- a/src/opt/cut/cutMan.c
+++ b/src/opt/cut/cutMan.c
@@ -201,7 +201,7 @@ void Cut_ManPrintStats( Cut_Man_t * p )
SeeAlso []
***********************************************************************/
-void Cut_ManPrintStatsToFile( Cut_Man_t * p, char * pFileName, clock_t TimeTotal )
+void Cut_ManPrintStatsToFile( Cut_Man_t * p, char * pFileName, abctime TimeTotal )
{
FILE * pTable;
pTable = fopen( "cut_stats.txt", "a+" );
diff --git a/src/opt/cut/cutNode.c b/src/opt/cut/cutNode.c
index 4f94011a..11810c33 100644
--- a/src/opt/cut/cutNode.c
+++ b/src/opt/cut/cutNode.c
@@ -370,7 +370,7 @@ Cut_Cut_t * Cut_NodeComputeCuts( Cut_Man_t * p, int Node, int Node0, int Node1,
{
Cut_List_t Super, * pSuper = &Super;
Cut_Cut_t * pList, * pCut;
- clock_t clk;
+ abctime clk;
// start the number of cuts at the node
p->nNodes++;
p->nNodeCuts = 0;
@@ -381,11 +381,11 @@ Cut_Cut_t * Cut_NodeComputeCuts( Cut_Man_t * p, int Node, int Node0, int Node1,
Cut_CutNumberList( Cut_NodeReadCutsNew(p, Node1) );
}
// compute the cuts
-clk = clock();
+clk = Abc_Clock();
Cut_ListStart( pSuper );
Cut_NodeDoComputeCuts( p, pSuper, Node, fCompl0, fCompl1, Cut_NodeReadCutsNew(p, Node0), Cut_NodeReadCutsNew(p, Node1), fTriv, TreeCode );
pList = Cut_ListFinish( pSuper );
-p->timeMerge += clock() - clk;
+p->timeMerge += Abc_Clock() - clk;
// verify the result of cut computation
// Cut_CutListVerify( pList );
// performing the recording
@@ -414,12 +414,12 @@ p->timeMerge += clock() - clk;
/////
Cut_NodeWriteCutsNew( p, Node, pList );
// filter the cuts
-//clk = clock();
+//clk = Abc_Clock();
// if ( p->pParams->fFilter )
// Cut_CutFilter( p, pList0 );
-//p->timeFilter += clock() - clk;
+//p->timeFilter += Abc_Clock() - clk;
// perform mapping of this node with these cuts
-clk = clock();
+clk = Abc_Clock();
if ( p->pParams->fMap && !p->pParams->fSeq )
{
// int Delay1, Delay2;
@@ -428,7 +428,7 @@ clk = clock();
// assert( Delay1 >= Delay2 );
Cut_NodeMapping( p, pList, Node, Node0, Node1 );
}
-p->timeMap += clock() - clk;
+p->timeMap += Abc_Clock() - clk;
return pList;
}
@@ -681,7 +681,7 @@ Cut_Cut_t * Cut_NodeUnionCuts( Cut_Man_t * p, Vec_Int_t * vNodes )
Cut_Cut_t * pList, * pListStart, * pCut, * pCut2;
Cut_Cut_t * pTop = NULL; // Suppress "might be used uninitialized"
int i, k, Node, Root, Limit = p->pParams->nVarsMax;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// start the new list
Cut_ListStart( pSuper );
@@ -771,12 +771,12 @@ finish :
assert( Cut_NodeReadCutsNew(p, Root) == NULL );
pList = Cut_ListFinish( pSuper );
Cut_NodeWriteCutsNew( p, Root, pList );
-p->timeUnion += clock() - clk;
+p->timeUnion += Abc_Clock() - clk;
// filter the cuts
-//clk = clock();
+//clk = Abc_Clock();
// if ( p->pParams->fFilter )
// Cut_CutFilter( p, pList );
-//p->timeFilter += clock() - clk;
+//p->timeFilter += Abc_Clock() - clk;
p->nNodes -= vNodes->nSize - 1;
return pList;
}
@@ -797,7 +797,7 @@ Cut_Cut_t * Cut_NodeUnionCutsSeq( Cut_Man_t * p, Vec_Int_t * vNodes, int CutSetN
Cut_List_t Super, * pSuper = &Super;
Cut_Cut_t * pList, * pListStart, * pCut, * pCut2, * pTop;
int i, k, Node, Root, Limit = p->pParams->nVarsMax;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// start the new list
Cut_ListStart( pSuper );
@@ -953,12 +953,12 @@ finish :
Cut_NodeWriteCutsNew( p, Root, pList );
}
-p->timeUnion += clock() - clk;
+p->timeUnion += Abc_Clock() - clk;
// filter the cuts
-//clk = clock();
+//clk = Abc_Clock();
// if ( p->pParams->fFilter )
// Cut_CutFilter( p, pList );
-//p->timeFilter += clock() - clk;
+//p->timeFilter += Abc_Clock() - clk;
// if ( fFirst )
// p->nNodes -= vNodes->nSize - 1;
return pList;
diff --git a/src/opt/cut/cutOracle.c b/src/opt/cut/cutOracle.c
index 5b740da5..59d823c8 100644
--- a/src/opt/cut/cutOracle.c
+++ b/src/opt/cut/cutOracle.c
@@ -46,7 +46,7 @@ struct Cut_OracleStruct_t_
int EntrySize;
int nTruthWords;
// stats
- clock_t timeTotal;
+ abctime timeTotal;
int nCuts;
int nCutsTriv;
};
@@ -322,7 +322,7 @@ Cut_Cut_t * Cut_OracleComputeCuts( Cut_Oracle_t * p, int Node, int Node0, int No
Cut_Cut_t * pList = NULL, ** ppTail = &pList;
Cut_Cut_t * pCut, * pCut0, * pCut1, * pList0, * pList1;
int iCutStart, nCuts, i, Entry;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// get the cuts of the children
pList0 = (Cut_Cut_t *)Vec_PtrEntry( p->vCutsNew, Node0 );
@@ -367,7 +367,7 @@ Cut_Cut_t * Cut_OracleComputeCuts( Cut_Oracle_t * p, int Node, int Node0, int No
// write the new cut
assert( Vec_PtrEntry( p->vCutsNew, Node ) == NULL );
Vec_PtrWriteEntry( p->vCutsNew, Node, pList );
-p->timeTotal += clock() - clk;
+p->timeTotal += Abc_Clock() - clk;
return pList;
}
diff --git a/src/opt/cut/cutPre22.c b/src/opt/cut/cutPre22.c
index 0eeea66b..ea1ab64f 100644
--- a/src/opt/cut/cutPre22.c
+++ b/src/opt/cut/cutPre22.c
@@ -69,9 +69,9 @@ struct Cut_CMan_t_
int nVarCounts[CUT_CELL_MVAR+1];
int nSymGroups[CUT_CELL_MVAR+1];
int nSymGroupsE[CUT_CELL_MVAR+1];
- clock_t timeCanon;
- clock_t timeSupp;
- clock_t timeTable;
+ abctime timeCanon;
+ abctime timeSupp;
+ abctime timeTable;
int nCellFound;
int nCellNotFound;
};
@@ -235,7 +235,7 @@ void Cut_CellPrecompute()
Cut_CMan_t * p;
Cut_Cell_t * pCell, * pTemp;
int i1, i2, i3, i, j, k, c;
- clock_t clk = clock(); //, clk2 = clock();
+ abctime clk = Abc_Clock(); //, clk2 = Abc_Clock();
p = Cut_CManStart();
@@ -402,7 +402,7 @@ void Cut_CellPrecompute()
}
printf( "BASIC: Total = %d. Good = %d. Entry = %d. ", (int)p->nTotal, (int)p->nGood, (int)sizeof(Cut_Cell_t) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
printf( "Cells: " );
for ( i = 0; i <= 9; i++ )
printf( "%d=%d ", i, p->nVarCounts[i] );
@@ -438,16 +438,16 @@ void Cut_CellPrecompute()
pCell->CrossBarPhase = c;
Cut_CellCrossBar( pCell );
// minimize the support
-//clk2 = clock();
+//clk2 = Abc_Clock();
Cut_CellSuppMin( pCell );
-//p->timeSupp += clock() - clk2;
+//p->timeSupp += Abc_Clock() - clk2;
// canonicize
-//clk2 = clock();
+//clk2 = Abc_Clock();
pCell->CanonPhase = Extra_TruthSemiCanonicize( pCell->uTruth, p->puAux, pCell->nVars, pCell->CanonPerm, pCell->Store );
-//p->timeCanon += clock() - clk2;
+//p->timeCanon += Abc_Clock() - clk2;
// add to the table
-//clk2 = clock();
+//clk2 = Abc_Clock();
p->nTotal++;
if ( Cut_CellTableLookup( p, pCell ) ) // already exists
Extra_MmFixedEntryRecycle( p->pMem, (char *)pCell );
@@ -482,11 +482,11 @@ void Cut_CellPrecompute()
}
*/
}
-//p->timeTable += clock() - clk2;
+//p->timeTable += Abc_Clock() - clk2;
}
printf( "VAR %d: Total = %d. Good = %d. Entry = %d. ", k, p->nTotal, p->nGood, (int)sizeof(Cut_Cell_t) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
printf( "Cells: " );
for ( i = 0; i <= 9; i++ )
printf( "%d=%d ", i, p->nVarCounts[i] );
@@ -841,7 +841,7 @@ void Cut_CellDumpToFile()
int NumUsed[10][5] = {{0}};
int BoxUsed[22][5] = {{0}};
int i, k, Counter;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( p == NULL )
{
@@ -920,7 +920,7 @@ void Cut_CellDumpToFile()
printf( "Library composed of %d functions is written into file \"%s\". ", Counter, pFileName );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
diff --git a/src/opt/cut/cutSeq.c b/src/opt/cut/cutSeq.c
index e1df2c95..d4f2d85f 100644
--- a/src/opt/cut/cutSeq.c
+++ b/src/opt/cut/cutSeq.c
@@ -73,7 +73,7 @@ void Cut_NodeComputeCutsSeq( Cut_Man_t * p, int Node, int Node0, int Node1, int
{
Cut_List_t Super, * pSuper = &Super;
Cut_Cut_t * pListNew;
- clock_t clk;
+ abctime clk;
// get the number of cuts at the node
p->nNodeCuts = Cut_CutCountList( Cut_NodeReadCutsOld(p, Node) );
@@ -110,13 +110,13 @@ void Cut_NodeComputeCutsSeq( Cut_Man_t * p, int Node, int Node0, int Node1, int
p->pCompareNew = Cut_NodeReadCutsNew( p, Node );
// merge the old and the new
-clk = clock();
+clk = Abc_Clock();
Cut_ListStart( pSuper );
Cut_NodeDoComputeCuts( p, pSuper, Node, fCompl0, fCompl1, p->pStore0[0], p->pStore1[1], 0, 0 );
Cut_NodeDoComputeCuts( p, pSuper, Node, fCompl0, fCompl1, p->pStore0[1], p->pStore1[0], 0, 0 );
Cut_NodeDoComputeCuts( p, pSuper, Node, fCompl0, fCompl1, p->pStore0[1], p->pStore1[1], fTriv, 0 );
pListNew = Cut_ListFinish( pSuper );
-p->timeMerge += clock() - clk;
+p->timeMerge += Abc_Clock() - clk;
// shift the cuts by as many latches and recompute signatures
if ( Node == Node0 || Node == Node1 || Node0 == Node1 )
diff --git a/src/opt/dar/darCore.c b/src/opt/dar/darCore.c
index bbcb385e..17074123 100644
--- a/src/opt/dar/darCore.c
+++ b/src/opt/dar/darCore.c
@@ -83,7 +83,7 @@ int Dar_ManRewrite( Aig_Man_t * pAig, Dar_RwrPar_t * pPars )
Dar_Cut_t * pCut;
Aig_Obj_t * pObj, * pObjNew;
int i, k, nNodesOld, nNodeBefore, nNodeAfter, Required;
- clock_t clk = 0, clkStart;
+ abctime clk = 0, clkStart;
int Counter = 0;
int nMffcSize;//, nMffcGains[MAX_VAL+1][MAX_VAL+1] = {{0}};
// prepare the library
@@ -102,7 +102,7 @@ int Dar_ManRewrite( Aig_Man_t * pAig, Dar_RwrPar_t * pPars )
// set elementary cuts for the PIs
// Dar_ManCutsStart( p );
// resynthesize each node once
- clkStart = clock();
+ clkStart = Abc_Clock();
p->nNodesInit = Aig_ManNodeNum(pAig);
nNodesOld = Vec_PtrSize( pAig->vObjs );
@@ -133,10 +133,10 @@ int Dar_ManRewrite( Aig_Man_t * pAig, Dar_RwrPar_t * pPars )
// compute cuts for the node
p->nNodesTried++;
-clk = clock();
+clk = Abc_Clock();
Dar_ObjSetCuts( pObj, NULL );
Dar_ObjComputeCuts_rec( p, pObj );
-p->timeCuts += clock() - clk;
+p->timeCuts += Abc_Clock() - clk;
// check if there is a trivial cut
Dar_ObjForEachCut( pObj, pCut, k )
@@ -210,7 +210,7 @@ p->timeCuts += clock() - clk;
}
*/
-p->timeTotal = clock() - clkStart;
+p->timeTotal = Abc_Clock() - clkStart;
p->timeOther = p->timeTotal - p->timeCuts - p->timeEval;
// Bar_ProgressStop( pProgress );
@@ -289,7 +289,7 @@ Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fSkipTtM
Aig_Obj_t * pObj;
Aig_MmFixed_t * pMemCuts;
int i, nNodes;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// remove dangling nodes
if ( (nNodes = Aig_ManCleanup( pAig )) )
{
@@ -319,7 +319,7 @@ Aig_MmFixed_t * Dar_ManComputeCuts( Aig_Man_t * pAig, int nCutsMax, int fSkipTtM
Aig_ManObjNum(pAig), nCuts, nCutsK );
printf( "Cut size = %2d. Truth size = %2d. Total mem = %5.2f MB ",
(int)sizeof(Dar_Cut_t), (int)4, 1.0*Aig_MmFixedReadMemUsage(p->pMemCuts)/(1<<20) );
- ABC_PRT( "Runtime", clock() - clk );
+ ABC_PRT( "Runtime", Abc_Clock() - clk );
/*
Aig_ManForEachNode( pAig, pObj, i )
if ( i % 300 == 0 )
diff --git a/src/opt/dar/darInt.h b/src/opt/dar/darInt.h
index 08a905a8..263e66b6 100644
--- a/src/opt/dar/darInt.h
+++ b/src/opt/dar/darInt.h
@@ -96,12 +96,12 @@ struct Dar_Man_t_
int nCutsGood; // good cuts
int nCutsSkipped; // skipped bad cuts
// timing statistics
- clock_t timeCuts;
- clock_t timeEval;
- clock_t timeOther;
- clock_t timeTotal;
- clock_t time1;
- clock_t time2;
+ abctime timeCuts;
+ abctime timeEval;
+ abctime timeOther;
+ abctime timeTotal;
+ abctime time1;
+ abctime time2;
};
static inline Dar_Cut_t * Dar_ObjCuts( Aig_Obj_t * pObj ) { return (Dar_Cut_t *)pObj->pData; }
diff --git a/src/opt/dar/darLib.c b/src/opt/dar/darLib.c
index 27408328..ee440872 100644
--- a/src/opt/dar/darLib.c
+++ b/src/opt/dar/darLib.c
@@ -129,7 +129,7 @@ Dar_Lib_t * Dar_LibAlloc( int nObjs )
{
unsigned uTruths[4] = { 0xAAAA, 0xCCCC, 0xF0F0, 0xFF00 };
Dar_Lib_t * p;
- int i;//, clk = clock();
+ int i;//, clk = Abc_Clock();
p = ABC_ALLOC( Dar_Lib_t, 1 );
memset( p, 0, sizeof(Dar_Lib_t) );
// allocate objects
@@ -146,7 +146,7 @@ Dar_Lib_t * Dar_LibAlloc( int nObjs )
p->pObjs[i].fTerm = 1;
p->pObjs[i].Num = uTruths[i];
}
-// ABC_PRT( "Library start", clock() - clk );
+// ABC_PRT( "Library start", Abc_Clock() - clk );
return p;
}
@@ -592,11 +592,11 @@ Dar_Lib_t * Dar_LibRead()
***********************************************************************/
void Dar_LibStart()
{
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
assert( s_DarLib == NULL );
s_DarLib = Dar_LibRead();
// printf( "The 4-input library started with %d nodes and %d subgraphs. ", s_DarLib->nObjs - 4, s_DarLib->nSubgrTotal );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -921,7 +921,7 @@ void Dar_LibEval( Dar_Man_t * p, Aig_Obj_t * pRoot, Dar_Cut_t * pCut, int Requir
float PowerSaved, PowerAdded;
Dar_LibObj_t * pObj;
int Out, k, Class, nNodesSaved, nNodesAdded, nNodesGained;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( pCut->nLeaves != 4 )
return;
// check if the cut exits and assigns leaves and their levels
@@ -963,7 +963,7 @@ void Dar_LibEval( Dar_Man_t * p, Aig_Obj_t * pRoot, Dar_Cut_t * pCut, int Requir
assert( p->LevelBest <= Required );
*pnMffcSize = nNodesSaved;
}
-clk = clock() - clk;
+clk = Abc_Clock() - clk;
p->ClassTimes[Class] += clk;
p->timeEval += clk;
}
@@ -1189,7 +1189,7 @@ int Dar2_LibEval( Gia_Man_t * p, Vec_Int_t * vCutLits, unsigned uTruth, int fKee
// int fTraining = 0;
Dar_LibObj_t * pObj;
int Out, k, Class, nNodesSaved, nNodesAdded, nNodesGained;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
assert( Vec_IntSize(vCutLits) == 4 );
assert( (uTruth >> 16) == 0 );
// check if the cut exits and assigns leaves and their levels
@@ -1233,7 +1233,7 @@ int Dar2_LibEval( Gia_Man_t * p, Vec_Int_t * vCutLits, unsigned uTruth, int fKee
p_ClassBest = Class;
// assert( p_LevelBest <= Required );
}
-//clk = clock() - clk;
+//clk = Abc_Clock() - clk;
//p->ClassTimes[Class] += clk;
//p->timeEval += clk;
assert( p_OutBest != -1 );
diff --git a/src/opt/dar/darRefact.c b/src/opt/dar/darRefact.c
index 0dcb54e8..45e150c4 100644
--- a/src/opt/dar/darRefact.c
+++ b/src/opt/dar/darRefact.c
@@ -61,10 +61,10 @@ struct Ref_Man_t_
int nCutsUsed; // the number of rewriting steps
int nCutsTried; // the number of cuts tries
// timing statistics
- clock_t timeCuts;
- clock_t timeEval;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeCuts;
+ abctime timeEval;
+ abctime timeOther;
+ abctime timeTotal;
};
////////////////////////////////////////////////////////////////////////
@@ -501,7 +501,7 @@ int Dar_ManRefactor( Aig_Man_t * pAig, Dar_RefPar_t * pPars )
Aig_Obj_t * pObj, * pObjNew;
int nNodesOld, nNodeBefore, nNodeAfter, nNodesSaved, nNodesSaved2;
int i, Required, nLevelMin;
- clock_t clkStart, clk;
+ abctime clkStart, clk;
// start the manager
p = Dar_ManRefStart( pAig, pPars );
@@ -513,7 +513,7 @@ int Dar_ManRefactor( Aig_Man_t * pAig, Dar_RefPar_t * pPars )
Aig_ManStartReverseLevels( pAig, 0 );
// resynthesize each node once
- clkStart = clock();
+ clkStart = Abc_Clock();
vCut = Vec_VecEntry( p->vCuts, 0 );
vCut2 = Vec_VecEntry( p->vCuts, 1 );
p->nNodesInit = Aig_ManNodeNum(pAig);
@@ -530,12 +530,12 @@ int Dar_ManRefactor( Aig_Man_t * pAig, Dar_RefPar_t * pPars )
//printf( "\nConsidering node %d.\n", pObj->Id );
// get the bounded MFFC size
-clk = clock();
+clk = Abc_Clock();
nLevelMin = Abc_MaxInt( 0, Aig_ObjLevel(pObj) - 10 );
nNodesSaved = Aig_NodeMffcSupp( pAig, pObj, nLevelMin, vCut );
if ( nNodesSaved < p->pPars->nMffcMin ) // too small to consider
{
-p->timeCuts += clock() - clk;
+p->timeCuts += Abc_Clock() - clk;
continue;
}
p->nNodesTried++;
@@ -564,13 +564,13 @@ p->timeCuts += clock() - clk;
else
p->nNodesBelow++;
}
-p->timeCuts += clock() - clk;
+p->timeCuts += Abc_Clock() - clk;
// try the cuts
-clk = clock();
+clk = Abc_Clock();
Required = pAig->vLevelR? Aig_ObjRequiredLevel(pAig, pObj) : ABC_INFINITY;
Dar_ManRefactorTryCuts( p, pObj, nNodesSaved, Required );
-p->timeEval += clock() - clk;
+p->timeEval += Abc_Clock() - clk;
// check the best gain
if ( !(p->GainBest > 0 || (p->GainBest == 0 && p->pPars->fUseZeros)) )
@@ -594,7 +594,7 @@ p->timeEval += clock() - clk;
p->nCutsUsed++;
// break;
}
-p->timeTotal = clock() - clkStart;
+p->timeTotal = Abc_Clock() - clkStart;
p->timeOther = p->timeTotal - p->timeCuts - p->timeEval;
// Bar_ProgressStop( pProgress );
diff --git a/src/opt/dar/darScript.c b/src/opt/dar/darScript.c
index 583ca563..f1a30a82 100644
--- a/src/opt/dar/darScript.c
+++ b/src/opt/dar/darScript.c
@@ -364,9 +364,9 @@ Aig_Man_t * Dar_ManChoice( Aig_Man_t * pAig, int fBalance, int fUpdateLevel, int
Aig_Man_t * pMan, * pTemp;
Vec_Ptr_t * vAigs;
int i;
- clock_t clk;
+ abctime clk;
-clk = clock();
+clk = Abc_Clock();
// vAigs = Dar_ManChoiceSynthesisExt();
vAigs = Dar_ManChoiceSynthesis( pAig, fBalance, fUpdateLevel, 0, fVerbose );
@@ -382,9 +382,9 @@ clk = clock();
if ( fVerbose )
{
-ABC_PRT( "Synthesis time", clock() - clk );
+ABC_PRT( "Synthesis time", Abc_Clock() - clk );
}
-clk = clock();
+clk = Abc_Clock();
if ( fConstruct )
pMan = Aig_ManChoiceConstructive( vAigs, fVerbose );
else
@@ -394,7 +394,7 @@ clk = clock();
Vec_PtrFree( vAigs );
if ( fVerbose )
{
-ABC_PRT( "Choicing time ", clock() - clk );
+ABC_PRT( "Choicing time ", Abc_Clock() - clk );
}
return pMan;
// return NULL;
@@ -687,9 +687,9 @@ Aig_Man_t * Dar_ManChoiceNew( Aig_Man_t * pAig, Dch_Pars_t * pPars )
Aig_Man_t * pMan, * pTemp;
Vec_Ptr_t * vAigs;
int i;
- clock_t clk;
+ abctime clk;
-clk = clock();
+clk = Abc_Clock();
// vAigs = Dar_ManChoiceSynthesisExt();
// vAigs = Dar_ManChoiceSynthesis( pAig, 1, 1, pPars->fPower, fVerbose );
vAigs = Dar_ManChoiceSynthesis( pAig, 1, 1, pPars->fPower, 0 );
@@ -706,11 +706,11 @@ clk = clock();
if ( fVerbose )
{
-//ABC_PRT( "Synthesis time", clock() - clk );
+//ABC_PRT( "Synthesis time", Abc_Clock() - clk );
}
- pPars->timeSynth = clock() - clk;
+ pPars->timeSynth = Abc_Clock() - clk;
-clk = clock();
+clk = Abc_Clock();
// perform choice computation
if ( pPars->fUseGia )
pMan = Cec_ComputeChoices( vAigs, pPars );
@@ -741,7 +741,7 @@ clk = clock();
if ( fVerbose )
{
-//ABC_PRT( "Choicing time ", clock() - clk );
+//ABC_PRT( "Choicing time ", Abc_Clock() - clk );
}
return pMan;
// return NULL;
@@ -770,11 +770,11 @@ Aig_Man_t * Dar_ManChoiceNewAig( Aig_Man_t * pAig, Dch_Pars_t * pPars )
void * pManTime;
char * pName, * pSpec;
int i;
- clock_t clk;
+ abctime clk;
-clk = clock();
+clk = Abc_Clock();
vAigs = Dar_ManChoiceSynthesis( pAig, 1, 1, pPars->fPower, fVerbose );
-pPars->timeSynth = clock() - clk;
+pPars->timeSynth = Abc_Clock() - clk;
// swap the first and last network
// this should lead to the primary choice being "better" because of synthesis
// (it is also important when constructing choices)
@@ -841,7 +841,7 @@ Aig_Man_t * Dar_ManChoiceNew( Aig_Man_t * pAig, Dch_Pars_t * pPars )
Vec_Ptr_t * vPios;
void * pManTime;
char * pName, * pSpec;
- clock_t clk;
+ abctime clk;
// save useful things
pManTime = pAig->pManTime; pAig->pManTime = NULL;
@@ -849,9 +849,9 @@ Aig_Man_t * Dar_ManChoiceNew( Aig_Man_t * pAig, Dch_Pars_t * pPars )
pSpec = Abc_UtilStrsav( pAig->pSpec );
// perform synthesis
-clk = clock();
+clk = Abc_Clock();
pGia = Dar_NewChoiceSynthesis( Aig_ManDupDfs(pAig), 1, 1, pPars->fPower, pPars->fLightSynth, pPars->fVerbose );
-pPars->timeSynth = clock() - clk;
+pPars->timeSynth = Abc_Clock() - clk;
// perform choice computation
if ( pPars->fUseGia )
diff --git a/src/opt/dau/dauDsd.c b/src/opt/dau/dauDsd.c
index a6597d98..2aeeb958 100644
--- a/src/opt/dau/dauDsd.c
+++ b/src/opt/dau/dauDsd.c
@@ -949,7 +949,7 @@ struct Dau_Dsd_t_
char pOutput[DAU_MAX_STR]; // output stream
};
-static clock_t s_Times[3] = {0};
+static abctime s_Times[3] = {0};
/**Function*************************************************************
@@ -1155,7 +1155,7 @@ finish:
}
int Dau_Dsd6DecomposeSingleVar( Dau_Dsd_t * p, word * pTruth, int * pVars, int nVars )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( nVars > 1 );
while ( 1 )
{
@@ -1171,7 +1171,7 @@ int Dau_Dsd6DecomposeSingleVar( Dau_Dsd_t * p, word * pTruth, int * pVars, int n
}
if ( nVars == 1 )
Dau_DsdWriteVar( p, pVars[--nVars], (int)(pTruth[0] & 1) );
- s_Times[0] += clock() - clk;
+ s_Times[0] += Abc_Clock() - clk;
return nVars;
}
static inline int Dau_Dsd6FindSupportOne( Dau_Dsd_t * p, word tCof0, word tCof1, int * pVars, int nVars, int v, int u )
@@ -1284,7 +1284,7 @@ finish:
}
int Dau_Dsd6DecomposeDoubleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int nVars )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
while ( 1 )
{
int v, u, nVarsOld;
@@ -1298,7 +1298,7 @@ int Dau_Dsd6DecomposeDoubleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int
nVars = Dau_Dsd6DecomposeDoubleVarsOne( p, pTruth, pVars, nVars, v, u );
if ( nVars == 0 )
{
- s_Times[1] += clock() - clk;
+ s_Times[1] += Abc_Clock() - clk;
return 0;
}
if ( nVarsOld > nVars )
@@ -1310,7 +1310,7 @@ int Dau_Dsd6DecomposeDoubleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int
if ( v == 0 ) // not found
break;
}
- s_Times[1] += clock() - clk;
+ s_Times[1] += Abc_Clock() - clk;
return nVars;
}
@@ -1382,7 +1382,7 @@ static inline int Dau_Dsd6DecomposeTripleVarsInner( Dau_Dsd_t * p, word * pTrut
}
int Dau_Dsd6DecomposeTripleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int nVars )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
while ( 1 )
{
int v;
@@ -1401,13 +1401,13 @@ int Dau_Dsd6DecomposeTripleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int
continue;
if ( nVarsNew == 0 )
{
- s_Times[2] += clock() - clk;
+ s_Times[2] += Abc_Clock() - clk;
return 0;
}
nVars = Dau_Dsd6DecomposeDoubleVars( p, pTruth, pVars, nVarsNew );
if ( nVars == 0 )
{
- s_Times[2] += clock() - clk;
+ s_Times[2] += Abc_Clock() - clk;
return 0;
}
break;
@@ -1415,7 +1415,7 @@ int Dau_Dsd6DecomposeTripleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int
}
if ( v == -1 )
{
- s_Times[2] += clock() - clk;
+ s_Times[2] += Abc_Clock() - clk;
return nVars;
}
}
@@ -1513,7 +1513,7 @@ finish:
}
int Dau_DsdDecomposeSingleVar( Dau_Dsd_t * p, word * pTruth, int * pVars, int nVars )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( nVars > 1 );
while ( 1 )
{
@@ -1529,7 +1529,7 @@ int Dau_DsdDecomposeSingleVar( Dau_Dsd_t * p, word * pTruth, int * pVars, int nV
}
if ( nVars == 1 )
Dau_DsdWriteVar( p, pVars[--nVars], (int)(pTruth[0] & 1) );
- s_Times[0] += clock() - clk;
+ s_Times[0] += Abc_Clock() - clk;
return nVars;
}
@@ -1660,7 +1660,7 @@ finish:
}
int Dau_DsdDecomposeDoubleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int nVars )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
while ( 1 )
{
int v, u, nVarsOld;
@@ -1674,7 +1674,7 @@ int Dau_DsdDecomposeDoubleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int
nVars = Dau_DsdDecomposeDoubleVarsOne( p, pTruth, pVars, nVars, v, u );
if ( nVars == 0 )
{
- s_Times[1] += clock() - clk;
+ s_Times[1] += Abc_Clock() - clk;
return 0;
}
if ( nVarsOld > nVars )
@@ -1686,7 +1686,7 @@ int Dau_DsdDecomposeDoubleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int
if ( v == 0 ) // not found
break;
}
- s_Times[1] += clock() - clk;
+ s_Times[1] += Abc_Clock() - clk;
return nVars;
}
@@ -1775,7 +1775,7 @@ static inline int Dau_DsdDecomposeTripleVarsInner( Dau_Dsd_t * p, word * pTruth
}
int Dau_DsdDecomposeTripleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int nVars )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
while ( 1 )
{
int v;
@@ -1794,13 +1794,13 @@ int Dau_DsdDecomposeTripleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int
continue;
if ( nVarsNew == 0 )
{
- s_Times[2] += clock() - clk;
+ s_Times[2] += Abc_Clock() - clk;
return 0;
}
nVars = Dau_DsdDecomposeDoubleVars( p, pTruth, pVars, nVarsNew );
if ( nVars == 0 )
{
- s_Times[2] += clock() - clk;
+ s_Times[2] += Abc_Clock() - clk;
return 0;
}
break;
@@ -1808,7 +1808,7 @@ int Dau_DsdDecomposeTripleVars( Dau_Dsd_t * p, word * pTruth, int * pVars, int
}
if ( v == -1 )
{
- s_Times[2] += clock() - clk;
+ s_Times[2] += Abc_Clock() - clk;
return nVars;
}
}
@@ -1969,7 +1969,7 @@ void Dau_DsdTest555()
char pRes[DAU_MAX_STR];
int nSizeNonDec;
int i, Counter = 0;
- clock_t clk = clock(), clkDec = 0, clk2;
+ abctime clk = Abc_Clock(), clkDec = 0, clk2;
// return;
while ( fgets( pBuffer, DAU_MAX_STR, pFile ) != NULL )
@@ -1989,9 +1989,9 @@ void Dau_DsdTest555()
pTruth = Dau_DsdToTruth( pBuffer[0] == '*' ? pBuffer + 1 : pBuffer, nVars );
Abc_TtCopy( Tru[0], pTruth, nWords, 0 );
Abc_TtCopy( Tru[1], pTruth, nWords, 0 );
- clk2 = clock();
+ clk2 = Abc_Clock();
nSizeNonDec = Dau_DsdDecompose( Tru[1], nVars, 0, 1, pRes );
- clkDec += clock() - clk2;
+ clkDec += Abc_Clock() - clk2;
Dau_DsdNormalize( pRes );
// pStr2 = Dau_DsdPerform( t ); nSizeNonDec = 0;
assert( nSizeNonDec == 0 );
@@ -2008,7 +2008,7 @@ void Dau_DsdTest555()
}
printf( "Finished trying %d decompositions. ", Counter );
Abc_PrintTime( 1, "Time", clkDec );
- Abc_PrintTime( 1, "Total", clock() - clk );
+ Abc_PrintTime( 1, "Total", Abc_Clock() - clk );
Abc_PrintTime( 1, "Time1", s_Times[0] );
Abc_PrintTime( 1, "Time2", s_Times[1] );
diff --git a/src/opt/dau/dauMerge.c b/src/opt/dau/dauMerge.c
index 08eaff73..fff2e523 100644
--- a/src/opt/dau/dauMerge.c
+++ b/src/opt/dau/dauMerge.c
@@ -571,7 +571,7 @@ void Dau_DsdRemoveBraces( char * pDsd, int * pMatches )
}
-clock_t s_TimeComp[4] = {0};
+abctime s_TimeComp[4] = {0};
/**Function*************************************************************
@@ -605,7 +605,7 @@ char * Dau_DsdMerge( char * pDsd0i, int * pPerm0, char * pDsd1i, int * pPerm1, i
word * pTruth, * pt = NULL, * pt0 = NULL, * pt1 = NULL;
word pParts[3][DAU_MAX_WORD];
int Status;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Counter++;
// create local copies
Dau_DsdMergeCopy( pDsd0i, fCompl0, pDsd0 );
@@ -675,10 +675,10 @@ printf( "Normalized:\n" );
if ( fVerbose )
printf( "%s\n", pRes );
- s_TimeComp[0] += clock() - clk;
+ s_TimeComp[0] += Abc_Clock() - clk;
return pRes;
}
-s_TimeComp[3] += clock() - clk;
+s_TimeComp[3] += Abc_Clock() - clk;
// create variable mapping
nVarsTotal = Dau_DsdMergeCreateMaps( pVarPres, nVarsShared, pOld2New, pNew2Old );
// perform variable replacement
@@ -761,9 +761,9 @@ printf( "%s\n", pRes );
}
if ( Status == 0 )
- s_TimeComp[1] += clock() - clk;
+ s_TimeComp[1] += Abc_Clock() - clk;
else
- s_TimeComp[2] += clock() - clk;
+ s_TimeComp[2] += Abc_Clock() - clk;
return pRes;
}
diff --git a/src/opt/dau/dauTree.c b/src/opt/dau/dauTree.c
index dd62642b..e0ce4ac4 100644
--- a/src/opt/dau/dauTree.c
+++ b/src/opt/dau/dauTree.c
@@ -91,10 +91,10 @@ struct Dss_Man_t_
int nCacheHits[2];
int nCacheMisses[2];
int nCacheEntries[2];
- clock_t timeBeg;
- clock_t timeDec;
- clock_t timeLook;
- clock_t timeEnd;
+ abctime timeBeg;
+ abctime timeDec;
+ abctime timeLook;
+ abctime timeEnd;
};
static inline Dss_Obj_t * Dss_Regular( Dss_Obj_t * p ) { return (Dss_Obj_t *)((ABC_PTRUINT_T)(p) & ~01); }
@@ -309,16 +309,16 @@ void Dau_DsdTest_()
*/
}
-clock_t if_dec_time;
+abctime if_dec_time;
void Dau_DsdCheckStructOne( word * pTruth, int nVars, int nLeaves )
{
extern Dss_Ntk_t * Dss_NtkCreate( char * pDsd, int nVars, word * pTruth );
extern void Dss_NtkFree( Dss_Ntk_t * p );
- static clock_t timeTt = 0;
- static clock_t timeDsd = 0;
- clock_t clkTt, clkDsd;
+ static abctime timeTt = 0;
+ static abctime timeDsd = 0;
+ abctime clkTt, clkDsd;
char pDsd[1000];
word Truth[1024];
@@ -345,14 +345,14 @@ void Dau_DsdCheckStructOne( word * pTruth, int nVars, int nLeaves )
pNtk = Dss_NtkCreate( pDsd, 16, NULL );
// measure DSD runtime
- clkDsd = clock();
+ clkDsd = Abc_Clock();
Status = Dss_ObjCheck666( pNtk );
- timeDsd += clock() - clkDsd;
+ timeDsd += Abc_Clock() - clkDsd;
Dss_NtkFree( pNtk );
// measure TT runtime
- clkTt = clock();
+ clkTt = Abc_Clock();
{
#define CLU_VAR_MAX 16
@@ -381,7 +381,7 @@ void Dau_DsdCheckStructOne( word * pTruth, int nVars, int nLeaves )
}
}
- timeTt += clock() - clkTt;
+ timeTt += Abc_Clock() - clkTt;
}
#endif
@@ -1087,7 +1087,7 @@ void Dss_ManPrint( char * pFileName, Dss_Man_t * p )
{
Dss_Obj_t * pObj;
int CountNonDsd = 0, CountNonDsdStr = 0;
- int i, clk = clock();
+ int i, clk = Abc_Clock();
FILE * pFile;
pFile = pFileName ? fopen( pFileName, "wb" ) : stdout;
if ( pFileName && pFile == NULL )
@@ -1110,7 +1110,7 @@ void Dss_ManPrint( char * pFileName, Dss_Man_t * p )
fprintf( pFile, "Cache hits = %8d %8d\n", p->nCacheHits[0], p->nCacheHits[1] );
fprintf( pFile, "Cache misses = %8d %8d\n", p->nCacheMisses[0], p->nCacheMisses[1] );
fprintf( pFile, "Cache entries = %8d %8d\n", p->nCacheEntries[0], p->nCacheEntries[1] );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// Dss_ManHashProfile( p );
// Dss_ManDump( p );
// return;
@@ -1547,7 +1547,7 @@ int Dss_ManMerge( Dss_Man_t * p, int * iDsd, int * nFans, int ** pFans, unsigned
Dss_Ent_t * pEnt, ** ppSpot;
Dss_Fun_t * pFun;
int i;
- clock_t clk;
+ abctime clk;
Counter++;
if ( DAU_MAX_VAR < nKLutSize )
{
@@ -1569,17 +1569,17 @@ Dss_ManPrintOne( stdout, p, iDsd[1], pFans[1] );
if ( iDsd[1] == 1 ) return iDsd[0];
// no overlap
-clk = clock();
+clk = Abc_Clock();
assert( nFans[0] == Dss_VecLitSuppSize(p->vObjs, iDsd[0]) );
assert( nFans[1] == Dss_VecLitSuppSize(p->vObjs, iDsd[1]) );
assert( nFans[0] + nFans[1] <= nKLutSize + Dss_WordCountOnes(uSharedMask) );
// create map of shared variables
pEnt = Dss_ManSharedMap( p, iDsd, nFans, pFans, uSharedMask );
-p->timeBeg += clock() - clk;
+p->timeBeg += Abc_Clock() - clk;
// check cache
if ( p->pCache == NULL )
{
-clk = clock();
+clk = Abc_Clock();
if ( uSharedMask == 0 )
pFun = Dss_ManOperationFun( p, iDsd, nFans[0] + nFans[1] );
else
@@ -1588,14 +1588,14 @@ clk = clock();
return -1;
assert( (int)pFun->nFans == Dss_VecLitSuppSize(p->vObjs, pFun->iDsd) );
assert( (int)pFun->nFans <= nKLutSize );
-p->timeDec += clock() - clk;
+p->timeDec += Abc_Clock() - clk;
}
else
{
-clk = clock();
+clk = Abc_Clock();
ppSpot = Dss_ManCacheLookup( p, pEnt );
-p->timeLook += clock() - clk;
-clk = clock();
+p->timeLook += Abc_Clock() - clk;
+clk = Abc_Clock();
if ( *ppSpot == NULL )
{
if ( uSharedMask == 0 )
@@ -1610,10 +1610,10 @@ clk = clock();
*ppSpot = Dss_ManCacheCreate( p, pEnt, pFun );
}
pFun = (*ppSpot)->pFunc;
-p->timeDec += clock() - clk;
+p->timeDec += Abc_Clock() - clk;
}
-clk = clock();
+clk = Abc_Clock();
for ( i = 0; i < (int)pFun->nFans; i++ )
if ( pFun->pFans[i] < 2 * nFans[0] ) // first dec
pPermRes[i] = (unsigned char)Dss_Lit2Lit( pFans[0], pFun->pFans[i] );
@@ -1636,7 +1636,7 @@ clk = clock();
for ( i = 0; i < (int)pFun->nFans; i++ )
pPermResInt[i] = pPermRes[i];
-p->timeEnd += clock() - clk;
+p->timeEnd += Abc_Clock() - clk;
if ( fVerbose )
{
@@ -1698,7 +1698,7 @@ int Mpm_FuncCompute( Dss_Man_t * p, int iDsd0, int iDsd1, Vec_Str_t * vShared, i
Dss_Fun_t * pFun;
int iDsd[2] = { iDsd0, iDsd1 };
int i;
- clock_t clk;
+ abctime clk;
assert( iDsd0 <= iDsd1 );
if ( DAU_MAX_VAR < *pnLeaves )
@@ -1712,12 +1712,12 @@ int Mpm_FuncCompute( Dss_Man_t * p, int iDsd0, int iDsd1, Vec_Str_t * vShared, i
Dss_ManPrintOne( stdout, p, iDsd1, NULL );
}
-clk = clock();
+clk = Abc_Clock();
pEnt = Dss_ManSharedMapDerive( p, iDsd0, iDsd1, vShared );
ppSpot = Dss_ManCacheLookup( p, pEnt );
-p->timeLook += clock() - clk;
+p->timeLook += Abc_Clock() - clk;
-clk = clock();
+clk = Abc_Clock();
if ( *ppSpot == NULL )
{
if ( Vec_StrSize(vShared) == 0 )
@@ -1732,7 +1732,7 @@ clk = clock();
*ppSpot = Dss_ManCacheCreate( p, pEnt, pFun );
}
pFun = (*ppSpot)->pFunc;
-p->timeDec += clock() - clk;
+p->timeDec += Abc_Clock() - clk;
*pnLeaves = (int)pFun->nFans;
for ( i = 0; i < (int)pFun->nFans; i++ )
diff --git a/src/opt/fxu/fxuReduce.c b/src/opt/fxu/fxuReduce.c
index 1e553d8d..7542a432 100644
--- a/src/opt/fxu/fxuReduce.c
+++ b/src/opt/fxu/fxuReduce.c
@@ -60,7 +60,7 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota
int nCubes, nBitsMax, nSum;
int CutOffNum = -1, CutOffQuant = -1; // Suppress "might be used uninitialized"
int iPair, iQuant, k, c;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
char * pSopCover;
int nFanins;
@@ -164,7 +164,7 @@ int Fxu_PreprocessCubePairs( Fxu_Matrix * p, Vec_Ptr_t * vCovers, int nPairsTota
}
assert( iPair == nPairsTotal );
ABC_FREE( pnLitsDiff );
-//ABC_PRT( "Preprocess", clock() - clk );
+//ABC_PRT( "Preprocess", Abc_Clock() - clk );
return 1;
}
diff --git a/src/opt/lpk/lpkAbcDec.c b/src/opt/lpk/lpkAbcDec.c
index 731c37e6..b7d4ccb1 100644
--- a/src/opt/lpk/lpkAbcDec.c
+++ b/src/opt/lpk/lpkAbcDec.c
@@ -148,7 +148,7 @@ int Lpk_Decompose_rec( Lpk_Man_t * pMan, Lpk_Fun_t * p )
{
Lpk_Res_t * pResMux, * pResDsd;
Lpk_Fun_t * p2;
- clock_t clk;
+ abctime clk;
// is only called for non-trivial blocks
assert( p->nLutK >= 3 && p->nLutK <= 6 );
@@ -165,15 +165,15 @@ int Lpk_Decompose_rec( Lpk_Man_t * pMan, Lpk_Fun_t * p )
Lpk_FunComputeCofSupps( p );
// check DSD decomposition
-clk = clock();
+clk = Abc_Clock();
pResDsd = Lpk_DsdAnalize( pMan, p, pMan->pPars->nVarsShared );
-pMan->timeEvalDsdAn += clock() - clk;
+pMan->timeEvalDsdAn += Abc_Clock() - clk;
if ( pResDsd && (pResDsd->nBSVars == (int)p->nLutK || pResDsd->nBSVars == (int)p->nLutK - 1) &&
pResDsd->AreaEst <= (int)p->nAreaLim && pResDsd->DelayEst <= (int)p->nDelayLim )
{
-clk = clock();
+clk = Abc_Clock();
p2 = Lpk_DsdSplit( pMan, p, pResDsd->pCofVars, pResDsd->nCofVars, pResDsd->BSVars );
-pMan->timeEvalDsdSp += clock() - clk;
+pMan->timeEvalDsdSp += Abc_Clock() - clk;
assert( p2->nVars <= (int)p->nLutK );
if ( p->nVars > p->nLutK && !Lpk_Decompose_rec( pMan, p ) )
return 0;
@@ -181,9 +181,9 @@ pMan->timeEvalDsdSp += clock() - clk;
}
// check MUX decomposition
-clk = clock();
+clk = Abc_Clock();
pResMux = Lpk_MuxAnalize( pMan, p );
-pMan->timeEvalMuxAn += clock() - clk;
+pMan->timeEvalMuxAn += Abc_Clock() - clk;
// pResMux = NULL;
assert( !pResMux || (pResMux->DelayEst <= (int)p->nDelayLim && pResMux->AreaEst <= (int)p->nAreaLim) );
// accept MUX decomposition if it is "good"
@@ -202,9 +202,9 @@ pMan->timeEvalMuxAn += clock() - clk;
assert( pResMux == NULL || pResDsd == NULL );
if ( pResMux )
{
-clk = clock();
+clk = Abc_Clock();
p2 = Lpk_MuxSplit( pMan, p, pResMux->Variable, pResMux->Polarity );
-pMan->timeEvalMuxSp += clock() - clk;
+pMan->timeEvalMuxSp += Abc_Clock() - clk;
if ( p2->nVars > p->nLutK && !Lpk_Decompose_rec( pMan, p2 ) )
return 0;
if ( p->nVars > p->nLutK && !Lpk_Decompose_rec( pMan, p ) )
@@ -213,9 +213,9 @@ pMan->timeEvalMuxSp += clock() - clk;
}
if ( pResDsd )
{
-clk = clock();
+clk = Abc_Clock();
p2 = Lpk_DsdSplit( pMan, p, pResDsd->pCofVars, pResDsd->nCofVars, pResDsd->BSVars );
-pMan->timeEvalDsdSp += clock() - clk;
+pMan->timeEvalDsdSp += Abc_Clock() - clk;
assert( p2->nVars <= (int)p->nLutK );
if ( p->nVars > p->nLutK && !Lpk_Decompose_rec( pMan, p ) )
return 0;
diff --git a/src/opt/lpk/lpkCore.c b/src/opt/lpk/lpkCore.c
index f060db9a..91e7c715 100644
--- a/src/opt/lpk/lpkCore.c
+++ b/src/opt/lpk/lpkCore.c
@@ -134,7 +134,7 @@ int Lpk_ExploreCut( Lpk_Man_t * p, Lpk_Cut_t * pCut, Kit_DsdNtk_t * pNtk )
If_Obj_t * pDriver, * ppLeaves[16];
Abc_Obj_t * pLeaf, * pObjNew;
int nGain, i;
- clock_t clk;
+ abctime clk;
int nNodesBef;
// int nOldShared;
@@ -186,9 +186,9 @@ int Lpk_ExploreCut( Lpk_Man_t * p, Lpk_Cut_t * pCut, Kit_DsdNtk_t * pNtk )
// perform mapping
p->pIfMan->pPars->fAreaOnly = 1;
-clk = clock();
+clk = Abc_Clock();
If_ManPerformMappingComb( p->pIfMan );
-p->timeMap += clock() - clk;
+p->timeMap += Abc_Clock() - clk;
// compute the gain in area
nGain = pCut->nNodes - pCut->nNodesDup - (int)p->pIfMan->AreaGlo;
@@ -244,16 +244,16 @@ int Lpk_ResynthesizeNode( Lpk_Man_t * p )
Lpk_Cut_t * pCut;
unsigned * pTruth;
int i, k, nSuppSize, nCutNodes, RetValue;
- clock_t clk;
+ abctime clk;
// compute the cuts
-clk = clock();
+clk = Abc_Clock();
if ( !Lpk_NodeCuts( p ) )
{
-p->timeCuts += clock() - clk;
+p->timeCuts += Abc_Clock() - clk;
return 0;
}
-p->timeCuts += clock() - clk;
+p->timeCuts += Abc_Clock() - clk;
//return 0;
@@ -283,10 +283,10 @@ p->timeCuts += clock() - clk;
continue;
// compute the truth table
-clk = clock();
+clk = Abc_Clock();
pTruth = Lpk_CutTruth( p, pCut, 0 );
nSuppSize = Extra_TruthSupportSize(pTruth, pCut->nLeaves);
-p->timeTruth += clock() - clk;
+p->timeTruth += Abc_Clock() - clk;
pDsdNtk = Kit_DsdDecompose( pTruth, pCut->nLeaves );
// Kit_DsdVerify( pDsdNtk, pTruth, pCut->nLeaves );
@@ -319,9 +319,9 @@ p->timeTruth += clock() - clk;
}
// update the network
-clk = clock();
+clk = Abc_Clock();
RetValue = Lpk_ExploreCut( p, pCut, pDsdNtk );
-p->timeEval += clock() - clk;
+p->timeEval += Abc_Clock() - clk;
Kit_DsdNtkFree( pDsdNtk );
if ( RetValue )
break;
@@ -374,18 +374,18 @@ int Lpk_ResynthesizeNodeNew( Lpk_Man_t * p )
unsigned * pTruth;
int nNodesBef, nNodesAft, nCutNodes;
int i, k;
- clock_t clk;
+ abctime clk;
int Required = Abc_ObjRequiredLevel(p->pObj);
// CloudNode * pFun2;//, * pFun1;
// compute the cuts
-clk = clock();
+clk = Abc_Clock();
if ( !Lpk_NodeCuts( p ) )
{
-p->timeCuts += clock() - clk;
+p->timeCuts += Abc_Clock() - clk;
return 0;
}
-p->timeCuts += clock() - clk;
+p->timeCuts += Abc_Clock() - clk;
if ( p->pPars->fVeryVerbose )
printf( "Node %5d : Mffc size = %5d. Cuts = %5d. Level = %2d. Req = %2d.\n",
@@ -421,21 +421,21 @@ p->timeCuts += clock() - clk;
Vec_PtrPush( p->vLeaves, Abc_NtkObj(p->pNtk, pCut->pLeaves[k]) );
// compute the truth table
-clk = clock();
+clk = Abc_Clock();
pTruth = Lpk_CutTruth( p, pCut, 0 );
-p->timeTruth += clock() - clk;
-clk = clock();
+p->timeTruth += Abc_Clock() - clk;
+clk = Abc_Clock();
Lpk_ComputeSupports( p, pCut, pTruth );
-p->timeSupps += clock() - clk;
-//clk = clock();
+p->timeSupps += Abc_Clock() - clk;
+//clk = Abc_Clock();
// pFun1 = Lpk_CutTruthBdd( p, pCut );
-//p->timeTruth2 += clock() - clk;
+//p->timeTruth2 += Abc_Clock() - clk;
/*
-clk = clock();
+clk = Abc_Clock();
Cloud_Restart( p->pDsdMan->dd );
pFun2 = Kit_TruthToCloud( p->pDsdMan->dd, pTruth, pCut->nLeaves );
RetValue = Kit_CreateCloud( p->pDsdMan->dd, pFun2, p->vBddNodes );
-p->timeTruth3 += clock() - clk;
+p->timeTruth3 += Abc_Clock() - clk;
*/
// if ( pFun1 != pFun2 )
// printf( "Truth tables do not agree!\n" );
@@ -458,10 +458,10 @@ p->timeTruth3 += clock() - clk;
// update the network
nNodesBef = Abc_NtkNodeNum(p->pNtk);
-clk = clock();
+clk = Abc_Clock();
pObjNew = Lpk_Decompose( p, p->pNtk, p->vLeaves, pTruth, p->puSupps, p->pPars->nLutSize,
(int)pCut->nNodes - (int)pCut->nNodesDup - 1 + (int)(p->pPars->fZeroCost > 0), Required );
-p->timeEval += clock() - clk;
+p->timeEval += Abc_Clock() - clk;
nNodesAft = Abc_NtkNodeNum(p->pNtk);
// perform replacement
@@ -511,7 +511,7 @@ int Lpk_Resynthesize( Abc_Ntk_t * pNtk, Lpk_Par_t * pPars )
double Delta;
// int * pnFanouts, nObjMax;
int i, Iter, nNodes, nNodesPrev;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Abc_NtkIsLogic(pNtk) );
// sweep dangling nodes as a preprocessing step
@@ -659,7 +659,7 @@ int Lpk_Resynthesize( Abc_Ntk_t * pNtk, Lpk_Par_t * pPars )
printf( " %d=%d", i, p->nBlocks[i] );
printf( "\n" );
- p->timeTotal = clock() - clk;
+ p->timeTotal = Abc_Clock() - clk;
p->timeEval = p->timeEval - p->timeMap;
p->timeOther = p->timeTotal - p->timeCuts - p->timeTruth - p->timeEval - p->timeMap;
ABC_PRTP( "Cuts ", p->timeCuts, p->timeTotal );
diff --git a/src/opt/lpk/lpkInt.h b/src/opt/lpk/lpkInt.h
index 053cfe96..841572c7 100644
--- a/src/opt/lpk/lpkInt.h
+++ b/src/opt/lpk/lpkInt.h
@@ -121,20 +121,20 @@ struct Lpk_Man_t_
// counter of non-DSD blocks
int nBlocks[17];
// runtime
- clock_t timeCuts;
- clock_t timeTruth;
- clock_t timeSupps;
- clock_t timeTruth2;
- clock_t timeTruth3;
- clock_t timeEval;
- clock_t timeMap;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeCuts;
+ abctime timeTruth;
+ abctime timeSupps;
+ abctime timeTruth2;
+ abctime timeTruth3;
+ abctime timeEval;
+ abctime timeMap;
+ abctime timeOther;
+ abctime timeTotal;
// runtime of eval
- clock_t timeEvalMuxAn;
- clock_t timeEvalMuxSp;
- clock_t timeEvalDsdAn;
- clock_t timeEvalDsdSp;
+ abctime timeEvalMuxAn;
+ abctime timeEvalMuxSp;
+ abctime timeEvalDsdAn;
+ abctime timeEvalDsdSp;
};
diff --git a/src/opt/mfs/mfsCore.c b/src/opt/mfs/mfsCore.c
index bb36b85c..12355132 100644
--- a/src/opt/mfs/mfsCore.c
+++ b/src/opt/mfs/mfsCore.c
@@ -86,7 +86,7 @@ int Abc_NtkMfsEdgePower( Mfs_Man_t * p, Abc_Obj_t * pNode )
int Abc_WinNode(Mfs_Man_t * p, Abc_Obj_t *pNode)
{
-// clock_t clk;
+// abctime clk;
// Abc_Obj_t * pFanin;
// int i;
@@ -119,7 +119,7 @@ int Abc_WinNode(Mfs_Man_t * p, Abc_Obj_t *pNode)
/*
int Abc_NtkMfsPowerResubNode( Mfs_Man_t * p, Abc_Obj_t * pNode )
{
- clock_t clk;
+ abctime clk;
Abc_Obj_t * pFanin;
int i;
@@ -235,46 +235,46 @@ void Abc_NtkMfsPowerResub( Mfs_Man_t * p, Mfs_Par_t * pPars)
***********************************************************************/
int Abc_NtkMfsResub( Mfs_Man_t * p, Abc_Obj_t * pNode )
{
- clock_t clk;
+ abctime clk;
p->nNodesTried++;
// prepare data structure for this node
Mfs_ManClean( p );
// compute window roots, window support, and window nodes
-clk = clock();
+clk = Abc_Clock();
p->vRoots = Abc_MfsComputeRoots( pNode, p->pPars->nWinTfoLevs, p->pPars->nFanoutsMax );
p->vSupp = Abc_NtkNodeSupport( p->pNtk, (Abc_Obj_t **)Vec_PtrArray(p->vRoots), Vec_PtrSize(p->vRoots) );
p->vNodes = Abc_NtkDfsNodes( p->pNtk, (Abc_Obj_t **)Vec_PtrArray(p->vRoots), Vec_PtrSize(p->vRoots) );
-p->timeWin += clock() - clk;
+p->timeWin += Abc_Clock() - clk;
if ( p->pPars->nWinMax && Vec_PtrSize(p->vNodes) > p->pPars->nWinMax )
{
p->nMaxDivs++;
return 1;
}
// compute the divisors of the window
-clk = clock();
+clk = Abc_Clock();
p->vDivs = Abc_MfsComputeDivisors( p, pNode, Abc_ObjRequiredLevel(pNode) - 1 );
p->nTotalDivs += Vec_PtrSize(p->vDivs) - Abc_ObjFaninNum(pNode);
-p->timeDiv += clock() - clk;
+p->timeDiv += Abc_Clock() - clk;
// construct AIG for the window
-clk = clock();
+clk = Abc_Clock();
p->pAigWin = Abc_NtkConstructAig( p, pNode );
-p->timeAig += clock() - clk;
+p->timeAig += Abc_Clock() - clk;
// translate it into CNF
-clk = clock();
+clk = Abc_Clock();
p->pCnf = Cnf_DeriveSimple( p->pAigWin, 1 + Vec_PtrSize(p->vDivs) );
-p->timeCnf += clock() - clk;
+p->timeCnf += Abc_Clock() - clk;
// create the SAT problem
-clk = clock();
+clk = Abc_Clock();
p->pSat = Abc_MfsCreateSolverResub( p, NULL, 0, 0 );
if ( p->pSat == NULL )
{
p->nNodesBad++;
return 1;
}
-//clk = clock();
+//clk = Abc_Clock();
// if ( p->pPars->fGiaSat )
// Abc_NtkMfsConstructGia( p );
-//p->timeGia += clock() - clk;
+//p->timeGia += Abc_Clock() - clk;
// solve the SAT problem
if ( p->pPars->fPower )
Abc_NtkMfsEdgePower( p, pNode );
@@ -286,7 +286,7 @@ clk = clock();
if ( p->pPars->fMoreEffort )
Abc_NtkMfsResubNode2( p, pNode );
}
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
// if ( p->pPars->fGiaSat )
// Abc_NtkMfsDeconstructGia( p );
return 1;
@@ -311,28 +311,28 @@ int Abc_NtkMfsNode( Mfs_Man_t * p, Abc_Obj_t * pNode )
extern Hop_Obj_t * Abc_NodeIfNodeResyn( Bdc_Man_t * p, Hop_Man_t * pHop, Hop_Obj_t * pRoot, int nVars, Vec_Int_t * vTruth, unsigned * puCare, float dProb );
int nGain;
- clock_t clk;
+ abctime clk;
p->nNodesTried++;
// prepare data structure for this node
Mfs_ManClean( p );
// compute window roots, window support, and window nodes
-clk = clock();
+clk = Abc_Clock();
p->vRoots = Abc_MfsComputeRoots( pNode, p->pPars->nWinTfoLevs, p->pPars->nFanoutsMax );
p->vSupp = Abc_NtkNodeSupport( p->pNtk, (Abc_Obj_t **)Vec_PtrArray(p->vRoots), Vec_PtrSize(p->vRoots) );
p->vNodes = Abc_NtkDfsNodes( p->pNtk, (Abc_Obj_t **)Vec_PtrArray(p->vRoots), Vec_PtrSize(p->vRoots) );
-p->timeWin += clock() - clk;
+p->timeWin += Abc_Clock() - clk;
// count the number of patterns
// p->dTotalRatios += Abc_NtkConstraintRatio( p, pNode );
// construct AIG for the window
-clk = clock();
+clk = Abc_Clock();
p->pAigWin = Abc_NtkConstructAig( p, pNode );
-p->timeAig += clock() - clk;
+p->timeAig += Abc_Clock() - clk;
// translate it into CNF
-clk = clock();
+clk = Abc_Clock();
p->pCnf = Cnf_DeriveSimple( p->pAigWin, Abc_ObjFaninNum(pNode) );
-p->timeCnf += clock() - clk;
+p->timeCnf += Abc_Clock() - clk;
// create the SAT problem
-clk = clock();
+clk = Abc_Clock();
p->pSat = (sat_solver *)Cnf_DataWriteIntoSolver( p->pCnf, 1, 0 );
if ( p->pSat && p->pPars->fOneHotness )
Abc_NtkAddOneHotness( p );
@@ -341,7 +341,7 @@ clk = clock();
// solve the SAT problem
RetValue = Abc_NtkMfsSolveSat( p, pNode );
p->nTotConfLevel += p->pSat->stats.conflicts;
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue == 0 )
{
p->nTimeOutsLevel++;
@@ -385,7 +385,7 @@ int Abc_NtkMfs( Abc_Ntk_t * pNtk, Mfs_Par_t * pPars )
Vec_Vec_t * vLevels;
Vec_Ptr_t * vNodes;
int i, k, nNodes, nFaninMax;
- clock_t clk = clock(), clk2;
+ abctime clk = Abc_Clock(), clk2;
int nTotalNodesBeg = Abc_NtkNodeNum(pNtk);
int nTotalEdgesBeg = Abc_NtkGetTotalFanins(pNtk);
@@ -520,7 +520,7 @@ int Abc_NtkMfs( Abc_Ntk_t * pNtk, Mfs_Par_t * pPars )
p->nNodesGainedLevel = 0;
p->nTotConfLevel = 0;
p->nTimeOutsLevel = 0;
- clk2 = clock();
+ clk2 = Abc_Clock();
Vec_PtrForEachEntry( Abc_Obj_t *, vNodes, pObj, i )
{
if ( p->pPars->nDepthMax && (int)pObj->Level > p->pPars->nDepthMax )
@@ -541,7 +541,7 @@ int Abc_NtkMfs( Abc_Ntk_t * pNtk, Mfs_Par_t * pPars )
1.0*p->nNodesGainedLevel/Vec_PtrSize(vNodes),
1.0*p->nTotConfLevel/Vec_PtrSize(vNodes),
100.0*p->nTimeOutsLevel/Vec_PtrSize(vNodes) );
- ABC_PRT( "Time", clock() - clk2 );
+ ABC_PRT( "Time", Abc_Clock() - clk2 );
*/
}
}
@@ -582,7 +582,7 @@ int Abc_NtkMfs( Abc_Ntk_t * pNtk, Mfs_Par_t * pPars )
}
// free the manager
- p->timeTotal = clock() - clk;
+ p->timeTotal = Abc_Clock() - clk;
Mfs_ManStop( p );
return 1;
}
diff --git a/src/opt/mfs/mfsInt.h b/src/opt/mfs/mfsInt.h
index ddaa323d..68e4b231 100644
--- a/src/opt/mfs/mfsInt.h
+++ b/src/opt/mfs/mfsInt.h
@@ -124,14 +124,14 @@ struct Mfs_Man_t_
float TotalSwitchingBeg;
float TotalSwitchingEnd;
// statistics
- clock_t timeWin;
- clock_t timeDiv;
- clock_t timeAig;
- clock_t timeGia;
- clock_t timeCnf;
- clock_t timeSat;
- clock_t timeInt;
- clock_t timeTotal;
+ abctime timeWin;
+ abctime timeDiv;
+ abctime timeAig;
+ abctime timeGia;
+ abctime timeCnf;
+ abctime timeSat;
+ abctime timeInt;
+ abctime timeTotal;
};
static inline float Abc_MfsObjProb( Mfs_Man_t * p, Abc_Obj_t * pObj ) { return (p->vProbs && pObj->Id < Vec_IntSize(p->vProbs))? Abc_Int2Float(Vec_IntEntry(p->vProbs,pObj->Id)) : 0.0; }
diff --git a/src/opt/mfs/mfsInter.c b/src/opt/mfs/mfsInter.c
index 5e97f0b3..d56365b0 100644
--- a/src/opt/mfs/mfsInter.c
+++ b/src/opt/mfs/mfsInter.c
@@ -338,7 +338,7 @@ Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands )
Hop_Obj_t * pFunc;
int nFanins, status;
int c, i, * pGloVars;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
// p->nDcMints += Abc_NtkMfsInterplateEval( p, pCands, nCands );
// derive the SAT solver for interpolation
@@ -362,7 +362,7 @@ Hop_Obj_t * Abc_NtkMfsInterplate( Mfs_Man_t * p, int * pCands, int nCands )
return NULL;
}
//printf( "%d\n", pSat->stats.conflicts );
-// ABC_PRT( "S", clock() - clk );
+// ABC_PRT( "S", Abc_Clock() - clk );
// get the learned clauses
pCnf = (Sto_Man_t *)sat_solver_store_release( pSat );
sat_solver_delete( pSat );
diff --git a/src/opt/mfs/mfsResub.c b/src/opt/mfs/mfsResub.c
index 694b366c..dc73cea7 100644
--- a/src/opt/mfs/mfsResub.c
+++ b/src/opt/mfs/mfsResub.c
@@ -102,12 +102,12 @@ int Abc_NtkMfsTryResubOnce( Mfs_Man_t * p, int * pCands, int nCands )
{
int fVeryVerbose = 0;
unsigned * pData;
- int RetValue, RetValue2 = -1, iVar, i;//, clk = clock();
+ int RetValue, RetValue2 = -1, iVar, i;//, clk = Abc_Clock();
/*
if ( p->pPars->fGiaSat )
{
RetValue2 = Abc_NtkMfsTryResubOnceGia( p, pCands, nCands );
-p->timeGia += clock() - clk;
+p->timeGia += Abc_Clock() - clk;
return RetValue2;
}
*/
@@ -168,7 +168,7 @@ int Abc_NtkMfsSolveSatResub( Mfs_Man_t * p, Abc_Obj_t * pNode, int iFanin, int f
unsigned * pData;
int pCands[MFS_FANIN_MAX];
int RetValue, iVar, i, nCands, nWords, w;
- clock_t clk;
+ abctime clk;
Abc_Obj_t * pFanin;
Hop_Obj_t * pFunc;
assert( iFanin >= 0 );
@@ -208,14 +208,14 @@ int Abc_NtkMfsSolveSatResub( Mfs_Man_t * p, Abc_Obj_t * pNode, int iFanin, int f
p->nNodesGainedLevel++;
if ( fSkipUpdate )
return 1;
-clk = clock();
+clk = Abc_Clock();
// derive the function
pFunc = Abc_NtkMfsInterplate( p, pCands, nCands );
if ( pFunc == NULL )
return 0;
// update the network
Abc_NtkMfsUpdateNetwork( p, pNode, p->vMfsFanins, pFunc );
-p->timeInt += clock() - clk;
+p->timeInt += Abc_Clock() - clk;
p->nRemoves++;
return 1;
}
@@ -285,7 +285,7 @@ p->timeInt += clock() - clk;
p->nNodesGainedLevel++;
if ( fSkipUpdate )
return 1;
-clk = clock();
+clk = Abc_Clock();
// derive the function
pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+1 );
if ( pFunc == NULL )
@@ -293,7 +293,7 @@ clk = clock();
// update the network
Vec_PtrPush( p->vMfsFanins, Vec_PtrEntry(p->vDivs, iVar) );
Abc_NtkMfsUpdateNetwork( p, pNode, p->vMfsFanins, pFunc );
-p->timeInt += clock() - clk;
+p->timeInt += Abc_Clock() - clk;
p->nResubs++;
return 1;
}
@@ -322,7 +322,7 @@ int Abc_NtkMfsSolveSatResub2( Mfs_Man_t * p, Abc_Obj_t * pNode, int iFanin, int
unsigned * pData, * pData2;
int pCands[MFS_FANIN_MAX];
int RetValue, iVar, iVar2, i, w, nCands, nWords, fBreak;
- clock_t clk;
+ abctime clk;
Abc_Obj_t * pFanin;
Hop_Obj_t * pFunc;
assert( iFanin >= 0 );
@@ -360,14 +360,14 @@ int Abc_NtkMfsSolveSatResub2( Mfs_Man_t * p, Abc_Obj_t * pNode, int iFanin, int
printf( "Node %d: Fanins %d/%d can be removed.\n", pNode->Id, iFanin, iFanin2 );
p->nNodesResub++;
p->nNodesGainedLevel++;
-clk = clock();
+clk = Abc_Clock();
// derive the function
pFunc = Abc_NtkMfsInterplate( p, pCands, nCands );
if ( pFunc == NULL )
return 0;
// update the network
Abc_NtkMfsUpdateNetwork( p, pNode, p->vMfsFanins, pFunc );
-p->timeInt += clock() - clk;
+p->timeInt += Abc_Clock() - clk;
return 1;
}
@@ -454,7 +454,7 @@ p->timeInt += clock() - clk;
printf( "Node %d: Fanins %d/%d can be replaced by divisors %d/%d.\n", pNode->Id, iFanin, iFanin2, iVar, iVar2 );
p->nNodesResub++;
p->nNodesGainedLevel++;
-clk = clock();
+clk = Abc_Clock();
// derive the function
pFunc = Abc_NtkMfsInterplate( p, pCands, nCands+2 );
if ( pFunc == NULL )
@@ -464,7 +464,7 @@ clk = clock();
Vec_PtrPush( p->vMfsFanins, Vec_PtrEntry(p->vDivs, iVar) );
assert( Vec_PtrSize(p->vMfsFanins) == nCands + 2 );
Abc_NtkMfsUpdateNetwork( p, pNode, p->vMfsFanins, pFunc );
-p->timeInt += clock() - clk;
+p->timeInt += Abc_Clock() - clk;
return 1;
}
if ( p->nCexes >= p->pPars->nWinMax )
diff --git a/src/opt/nwk/nwkBidec.c b/src/opt/nwk/nwkBidec.c
index 2f1c0366..1d3d2c26 100644
--- a/src/opt/nwk/nwkBidec.c
+++ b/src/opt/nwk/nwkBidec.c
@@ -133,7 +133,7 @@ void Nwk_ManBidecResyn( Nwk_Man_t * pNtk, int fVerbose )
Nwk_Obj_t * pObj;
Vec_Int_t * vTruth;
int i, nGainTotal = 0, nNodes1, nNodes2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pPars->nVarsMax = Nwk_ManGetFaninMax( pNtk );
pPars->fVerbose = fVerbose;
if ( pPars->nVarsMax < 2 )
@@ -163,7 +163,7 @@ void Nwk_ManBidecResyn( Nwk_Man_t * pNtk, int fVerbose )
if ( fVerbose )
{
printf( "Total gain in AIG nodes = %d. ", nGainTotal );
- ABC_PRT( "Total runtime", clock() - clk );
+ ABC_PRT( "Total runtime", Abc_Clock() - clk );
}
}
diff --git a/src/opt/nwk/nwkFlow.c b/src/opt/nwk/nwkFlow.c
index 50a4787f..8a672c72 100644
--- a/src/opt/nwk/nwkFlow.c
+++ b/src/opt/nwk/nwkFlow.c
@@ -444,7 +444,7 @@ Vec_Ptr_t * Nwk_ManRetimeCutForward( Nwk_Man_t * pMan, int nLatches, int fVerbos
Vec_Ptr_t * vNodes;
Nwk_Obj_t * pObj;
int i, RetValue, Counter = 0, Counter2 = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// set the sequential parameters
pMan->nLatches = nLatches;
pMan->nTruePis = Nwk_ManCiNum(pMan) - nLatches;
@@ -504,7 +504,7 @@ Vec_Ptr_t * Nwk_ManRetimeCutForward( Nwk_Man_t * pMan, int nLatches, int fVerbos
if ( fVerbose )
{
printf( "Min-cut = %4d. Unmoved = %4d. ", Vec_PtrSize(vNodes), Counter );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
return vNodes;
}
@@ -525,7 +525,7 @@ Vec_Ptr_t * Nwk_ManRetimeCutBackward( Nwk_Man_t * pMan, int nLatches, int fVerbo
Vec_Ptr_t * vNodes;
Nwk_Obj_t * pObj;
int i, RetValue, Counter = 0, Counter2 = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// set the sequential parameters
pMan->nLatches = nLatches;
pMan->nTruePis = Nwk_ManCiNum(pMan) - nLatches;
@@ -591,7 +591,7 @@ Vec_Ptr_t * Nwk_ManRetimeCutBackward( Nwk_Man_t * pMan, int nLatches, int fVerbo
if ( fVerbose )
{
printf( "Min-cut = %4d. Unmoved = %4d. ", Vec_PtrSize(vNodes), Counter );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
return vNodes;
}
diff --git a/src/opt/nwk/nwkMap.c b/src/opt/nwk/nwkMap.c
index e8be5a2d..0b54e74e 100644
--- a/src/opt/nwk/nwkMap.c
+++ b/src/opt/nwk/nwkMap.c
@@ -110,7 +110,7 @@ If_Man_t * Nwk_ManToIf( Aig_Man_t * p, If_Par_t * pPars, Vec_Ptr_t * vAigToIf )
If_Obj_t * pIfObj;
Aig_Obj_t * pNode, * pFanin, * pPrev;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// set the number of registers (switch activity will be combinational)
Aig_ManSetRegNum( p, 0 );
if ( pPars->fPower )
@@ -118,7 +118,7 @@ If_Man_t * Nwk_ManToIf( Aig_Man_t * p, If_Par_t * pPars, Vec_Ptr_t * vAigToIf )
vSwitching = Saig_ManComputeSwitchProbs( p, 48, 16, 0 );
if ( pPars->fVerbose )
{
- ABC_PRT( "Computing switching activity", clock() - clk );
+ ABC_PRT( "Computing switching activity", Abc_Clock() - clk );
}
pSwitching = (float *)vSwitching->pArray;
vSwitching2 = Vec_IntStart( Aig_ManObjNumMax(p) );
diff --git a/src/opt/nwk/nwkMerge.c b/src/opt/nwk/nwkMerge.c
index c913e0d1..3e458a06 100644
--- a/src/opt/nwk/nwkMerge.c
+++ b/src/opt/nwk/nwkMerge.c
@@ -704,14 +704,14 @@ int Nwk_ManLutMergeGraphTest( char * pFileName )
{
int nPairs;
Nwk_Grf_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Nwk_ManLutMergeReadGraph( pFileName );
- ABC_PRT( "Reading", clock() - clk );
- clk = clock();
+ ABC_PRT( "Reading", Abc_Clock() - clk );
+ clk = Abc_Clock();
Nwk_ManGraphSolve( p );
printf( "GRAPH: Nodes = %6d. Edges = %6d. Pairs = %6d. ",
p->nVerts, p->nEdges, Vec_IntSize(p->vPairs)/2 );
- ABC_PRT( "Solving", clock() - clk );
+ ABC_PRT( "Solving", Abc_Clock() - clk );
nPairs = Vec_IntSize(p->vPairs)/2;
Nwk_ManGraphReportMemoryUsage( p );
Nwk_ManGraphFree( p );
@@ -975,7 +975,7 @@ Vec_Int_t * Nwk_ManLutMerge( Nwk_Man_t * pNtk, void * pParsInit )
Vec_Ptr_t * vStart, * vNext, * vCands1, * vCands2;
Nwk_Obj_t * pLut, * pCand;
int i, k, nVertsMax, nCands;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// count the number of vertices
nVertsMax = 0;
Nwk_ManForEachNode( pNtk, pLut, i )
@@ -1015,16 +1015,16 @@ Vec_Int_t * Nwk_ManLutMerge( Nwk_Man_t * pNtk, void * pParsInit )
if ( pPars->fVerbose )
{
printf( "Mergable LUTs = %6d. Total cands = %6d. ", p->nVertsMax, nCands );
- ABC_PRT( "Deriving graph", clock() - clk );
+ ABC_PRT( "Deriving graph", Abc_Clock() - clk );
}
// solve the graph problem
- clk = clock();
+ clk = Abc_Clock();
Nwk_ManGraphSolve( p );
if ( pPars->fVerbose )
{
printf( "GRAPH: Nodes = %6d. Edges = %6d. Pairs = %6d. ",
p->nVerts, p->nEdges, Vec_IntSize(p->vPairs)/2 );
- ABC_PRT( "Solving", clock() - clk );
+ ABC_PRT( "Solving", Abc_Clock() - clk );
Nwk_ManGraphReportMemoryUsage( p );
}
vResult = p->vPairs; p->vPairs = NULL;
diff --git a/src/opt/nwk/nwkUtil.c b/src/opt/nwk/nwkUtil.c
index 2771e723..5b42b881 100644
--- a/src/opt/nwk/nwkUtil.c
+++ b/src/opt/nwk/nwkUtil.c
@@ -544,9 +544,9 @@ int Nwk_ManMinimumBaseInt( Nwk_Man_t * pNtk, int fVerbose )
void Nwk_ManMinimumBaseRec( Nwk_Man_t * pNtk, int fVerbose )
{
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for ( i = 0; Nwk_ManMinimumBaseInt( pNtk, fVerbose ); i++ );
- ABC_PRT( "Minbase", clock() - clk );
+ ABC_PRT( "Minbase", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/opt/res/resCore.c b/src/opt/res/resCore.c
index d7edf189..d57cdea5 100644
--- a/src/opt/res/resCore.c
+++ b/src/opt/res/resCore.c
@@ -60,23 +60,23 @@ struct Res_Man_t_
int nTotalNets2; // the total number of nets
int nTotalNodes2; // the total number of nodess
// runtime
- clock_t timeWin; // windowing
- clock_t timeDiv; // divisors
- clock_t timeAig; // strashing
- clock_t timeSim; // simulation
- clock_t timeCand; // resubstitution candidates
- clock_t timeSatTotal; // SAT solving total
- clock_t timeSatSat; // SAT solving (sat calls)
- clock_t timeSatUnsat; // SAT solving (unsat calls)
- clock_t timeSatSim; // SAT solving (simulation)
- clock_t timeInt; // interpolation
- clock_t timeUpd; // updating
- clock_t timeTotal; // total runtime
+ abctime timeWin; // windowing
+ abctime timeDiv; // divisors
+ abctime timeAig; // strashing
+ abctime timeSim; // simulation
+ abctime timeCand; // resubstitution candidates
+ abctime timeSatTotal; // SAT solving total
+ abctime timeSatSat; // SAT solving (sat calls)
+ abctime timeSatUnsat; // SAT solving (unsat calls)
+ abctime timeSatSim; // SAT solving (simulation)
+ abctime timeInt; // interpolation
+ abctime timeUpd; // updating
+ abctime timeTotal; // total runtime
};
extern Hop_Obj_t * Kit_GraphToHop( Hop_Man_t * pMan, Kit_Graph_t * pGraph );
-extern clock_t s_ResynTime;
+extern abctime s_ResynTime;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -220,7 +220,7 @@ int Abc_NtkResynthesize( Abc_Ntk_t * pNtk, Res_Par_t * pPars )
Vec_Ptr_t * vFanins;
unsigned * puTruth;
int i, k, RetValue, nNodesOld, nFanins, nFaninsMax;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
// start the manager
p = Res_ManAlloc( pPars );
@@ -260,9 +260,9 @@ int Abc_NtkResynthesize( Abc_Ntk_t * pNtk, Res_Par_t * pPars )
break;
// create the window for this node
-clk = clock();
+clk = Abc_Clock();
RetValue = Res_WinCompute( pObj, p->pPars->nWindow/10, p->pPars->nWindow%10, p->pWin );
-p->timeWin += clock() - clk;
+p->timeWin += Abc_Clock() - clk;
if ( !RetValue )
continue;
p->nWinsTriv += Res_WinIsTrivial( p->pWin );
@@ -278,9 +278,9 @@ p->timeWin += clock() - clk;
}
// collect the divisors
-clk = clock();
+clk = Abc_Clock();
Res_WinDivisors( p->pWin, Abc_ObjRequiredLevel(pObj) - 1 );
-p->timeDiv += clock() - clk;
+p->timeDiv += Abc_Clock() - clk;
p->nWins++;
p->nWinNodes += Vec_PtrSize(p->pWin->vNodes);
@@ -293,10 +293,10 @@ p->timeDiv += clock() - clk;
}
// create the AIG for the window
-clk = clock();
+clk = Abc_Clock();
if ( p->pAig ) Abc_NtkDelete( p->pAig );
p->pAig = Res_WndStrash( p->pWin );
-p->timeAig += clock() - clk;
+p->timeAig += Abc_Clock() - clk;
if ( p->pPars->fVeryVerbose )
{
@@ -305,9 +305,9 @@ p->timeAig += clock() - clk;
}
// prepare simulation info
-clk = clock();
+clk = Abc_Clock();
RetValue = Res_SimPrepare( p->pSim, p->pAig, Vec_PtrSize(p->pWin->vLeaves), 0 ); //p->pPars->fVerbose );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
if ( !RetValue )
{
p->nSimEmpty++;
@@ -329,12 +329,12 @@ p->timeSim += clock() - clk;
// printf( " " );
// find resub candidates for the node
-clk = clock();
+clk = Abc_Clock();
if ( p->pPars->fArea )
RetValue = Res_FilterCandidates( p->pWin, p->pAig, p->pSim, p->vResubs, p->vResubsW, nFaninsMax, 1 );
else
RetValue = Res_FilterCandidates( p->pWin, p->pAig, p->pSim, p->vResubs, p->vResubsW, nFaninsMax, 0 );
-p->timeCand += clock() - clk;
+p->timeCand += Abc_Clock() - clk;
p->nCandSets += RetValue;
if ( RetValue == 0 )
continue;
@@ -350,17 +350,17 @@ p->timeCand += clock() - clk;
break;
// solve the SAT problem and get clauses
-clk = clock();
+clk = Abc_Clock();
if ( p->pCnf ) Sto_ManFree( p->pCnf );
p->pCnf = (Sto_Man_t *)Res_SatProveUnsat( p->pAig, vFanins );
if ( p->pCnf == NULL )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
// printf( " Sat\n" );
// printf( "-" );
continue;
}
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
// printf( "+" );
p->nProvedSets++;
@@ -372,9 +372,9 @@ p->timeSatUnsat += clock() - clk;
// Sto_ManDumpClauses( p->pCnf, "trace.cnf" );
// interpolate the problem if it was UNSAT
-clk = clock();
+clk = Abc_Clock();
nFanins = Int_ManInterpolate( p->pMan, p->pCnf, 0, &puTruth );
-p->timeInt += clock() - clk;
+p->timeInt += Abc_Clock() - clk;
if ( nFanins != Vec_PtrSize(vFanins) - 2 )
continue;
assert( puTruth );
@@ -388,9 +388,9 @@ p->timeInt += clock() - clk;
Kit_GraphFree( pGraph );
// update the network
-clk = clock();
+clk = Abc_Clock();
Res_UpdateNetwork( pObj, Vec_VecEntry(p->vResubsW, k), pFunc, p->vLevels );
-p->timeUpd += clock() - clk;
+p->timeUpd += Abc_Clock() - clk;
break;
}
// printf( "\n" );
@@ -405,10 +405,10 @@ p->timeSatTotal = p->timeSatSat + p->timeSatUnsat + p->timeSatSim;
p->nTotalNodes2 = Abc_NtkNodeNum(pNtk);
// quit resubstitution manager
-p->timeTotal = clock() - clkTotal;
+p->timeTotal = Abc_Clock() - clkTotal;
Res_ManFree( p );
-s_ResynTime += clock() - clkTotal;
+s_ResynTime += Abc_Clock() - clkTotal;
// check the resulting network
if ( !Abc_NtkCheck( pNtk ) )
{
diff --git a/src/opt/res/resInt.h b/src/opt/res/resInt.h
index f9709bf6..0eb91322 100644
--- a/src/opt/res/resInt.h
+++ b/src/opt/res/resInt.h
@@ -91,7 +91,7 @@ struct Res_Sim_t_
// resub candidates
Vec_Vec_t * vCands; // resubstitution candidates
// statistics
- clock_t timeSat;
+ abctime timeSat;
};
////////////////////////////////////////////////////////////////////////
diff --git a/src/opt/res/resSat.c b/src/opt/res/resSat.c
index 6e209ad9..d6fb5f5e 100644
--- a/src/opt/res/resSat.c
+++ b/src/opt/res/resSat.c
@@ -216,7 +216,7 @@ int Res_SatSimulate( Res_Sim_t * p, int nPatsLimit, int fOnSet )
sat_solver * pSat;
int RetValue = -1; // Suppress "might be used uninitialized"
int i, k, value, status, Lit, Var, iPat;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
//printf( "Looking for %s: ", fOnSet? "onset " : "offset" );
@@ -319,7 +319,7 @@ int Res_SatSimulate( Res_Sim_t * p, int nPatsLimit, int fOnSet )
finish:
sat_solver_delete( pSat );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
return RetValue;
}
diff --git a/src/opt/ret/retCore.c b/src/opt/ret/retCore.c
index 35d5f4d0..f3484d2c 100644
--- a/src/opt/ret/retCore.c
+++ b/src/opt/ret/retCore.c
@@ -27,7 +27,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-clock_t timeRetime = 0;
+abctime timeRetime = 0;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -49,7 +49,7 @@ int Abc_NtkRetime( Abc_Ntk_t * pNtk, int Mode, int nDelayLim, int fForwardOnly,
int nLatches = Abc_NtkLatchNum(pNtk);
int nLevels = Abc_NtkLevel(pNtk);
int RetValue = 0;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int nNodesOld, nLatchesOld;
assert( Mode > 0 && Mode < 7 );
assert( !fForwardOnly || !fBackwardOnly );
@@ -98,9 +98,9 @@ int Abc_NtkRetime( Abc_Ntk_t * pNtk, int Mode, int nDelayLim, int fForwardOnly,
{
printf( "Reduction in area = %3d. Reduction in delay = %3d. ",
nLatches - Abc_NtkLatchNum(pNtk), nLevels - Abc_NtkLevel(pNtk) );
- ABC_PRT( "Total runtime", clock() - clkTotal );
+ ABC_PRT( "Total runtime", Abc_Clock() - clkTotal );
}
- timeRetime = clock() - clkTotal;
+ timeRetime = Abc_Clock() - clkTotal;
return RetValue;
}
diff --git a/src/opt/ret/retFlow.c b/src/opt/ret/retFlow.c
index 9b215dab..3ce0458b 100644
--- a/src/opt/ret/retFlow.c
+++ b/src/opt/ret/retFlow.c
@@ -145,7 +145,7 @@ Vec_Ptr_t * Abc_NtkMaxFlow( Abc_Ntk_t * pNtk, int fForward, int fVerbose )
Vec_Ptr_t * vMinCut;
Abc_Obj_t * pLatch;
int Flow, FlowCur, RetValue, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int fUseDirectedFlow = 1;
// find the max-flow
@@ -231,7 +231,7 @@ Vec_Ptr_t * Abc_NtkMaxFlow( Abc_Ntk_t * pNtk, int fForward, int fVerbose )
{
printf( "L = %6d. %s max-flow = %6d. Min-cut = %6d. ",
Abc_NtkLatchNum(pNtk), fForward? "Forward " : "Backward", Flow, Vec_PtrSize(vMinCut) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
// Abc_NtkMaxFlowPrintCut( pNtk, vMinCut );
diff --git a/src/opt/ret/retInit.c b/src/opt/ret/retInit.c
index b3f6180a..8e09e1b3 100644
--- a/src/opt/ret/retInit.c
+++ b/src/opt/ret/retInit.c
@@ -49,7 +49,7 @@ Vec_Int_t * Abc_NtkRetimeInitialValues( Abc_Ntk_t * pNtkCone, Vec_Int_t * vValue
Vec_Int_t * vSolution;
Abc_Ntk_t * pNtkMiter, * pNtkLogic;
int RetValue;
- clock_t clk;
+ abctime clk;
if ( pNtkCone == NULL )
return Vec_IntDup( vValues );
// convert the target network to AIG
@@ -60,10 +60,10 @@ Vec_Int_t * Abc_NtkRetimeInitialValues( Abc_Ntk_t * pNtkCone, Vec_Int_t * vValue
if ( fVerbose )
printf( "The miter for initial state computation has %d AIG nodes. ", Abc_NtkNodeNum(pNtkMiter) );
// solve the miter
- clk = clock();
+ clk = Abc_Clock();
RetValue = Abc_NtkMiterSat( pNtkMiter, (ABC_INT64_T)500000, (ABC_INT64_T)50000000, 0, NULL, NULL );
if ( fVerbose )
- { ABC_PRT( "SAT solving time", clock() - clk ); }
+ { ABC_PRT( "SAT solving time", Abc_Clock() - clk ); }
// analyze the result
if ( RetValue == 1 )
printf( "Abc_NtkRetimeInitialValues(): The problem is unsatisfiable. DC latch values are used.\n" );
diff --git a/src/opt/ret/retLvalue.c b/src/opt/ret/retLvalue.c
index 5bcc2583..d48bc6cd 100644
--- a/src/opt/ret/retLvalue.c
+++ b/src/opt/ret/retLvalue.c
@@ -94,7 +94,7 @@ Vec_Int_t * Abc_NtkRetimeGetLags( Abc_Ntk_t * pNtk, int nIterLimit, int fVerbose
Vec_Ptr_t * vNodes, * vLatches;
Abc_Obj_t * pNode;
int i, FiMax, FiBest, RetValue;
- clock_t clk, clkIter;
+ abctime clk, clkIter;
char NodeLag;
// get the upper bound on the clock period
@@ -112,9 +112,9 @@ Vec_Int_t * Abc_NtkRetimeGetLags( Abc_Ntk_t * pNtk, int nIterLimit, int fVerbose
}
// search for the optimal clock period between 0 and nLevelMax
-clk = clock();
+clk = Abc_Clock();
FiBest = Abc_NtkRetimeSearch_rec( pNtk, vNodes, vLatches, 0, FiMax, nIterLimit, fVerbose );
-clkIter = clock() - clk;
+clkIter = Abc_Clock() - clk;
// recompute the best l-values
RetValue = Abc_NtkRetimeForPeriod( pNtk, vNodes, vLatches, FiBest, nIterLimit, fVerbose );
diff --git a/src/opt/rwr/rwr.h b/src/opt/rwr/rwr.h
index 74af4caa..b688fc09 100644
--- a/src/opt/rwr/rwr.h
+++ b/src/opt/rwr/rwr.h
@@ -86,13 +86,13 @@ struct Rwr_Man_t_
int nCutsBad;
int nSubgraphs;
// runtime statistics
- clock_t timeStart;
- clock_t timeCut;
- clock_t timeRes;
- clock_t timeEval;
- clock_t timeMffc;
- clock_t timeUpdate;
- clock_t timeTotal;
+ abctime timeStart;
+ abctime timeCut;
+ abctime timeRes;
+ abctime timeEval;
+ abctime timeMffc;
+ abctime timeUpdate;
+ abctime timeTotal;
};
struct Rwr_Node_t_ // 24 bytes
@@ -146,9 +146,9 @@ extern void Rwr_ManPrintStatsFile( Rwr_Man_t * p );
extern void * Rwr_ManReadDecs( Rwr_Man_t * p );
extern Vec_Ptr_t * Rwr_ManReadLeaves( Rwr_Man_t * p );
extern int Rwr_ManReadCompl( Rwr_Man_t * p );
-extern void Rwr_ManAddTimeCuts( Rwr_Man_t * p, clock_t Time );
-extern void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, clock_t Time );
-extern void Rwr_ManAddTimeTotal( Rwr_Man_t * p, clock_t Time );
+extern void Rwr_ManAddTimeCuts( Rwr_Man_t * p, abctime Time );
+extern void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, abctime Time );
+extern void Rwr_ManAddTimeTotal( Rwr_Man_t * p, abctime Time );
/*=== rwrPrint.c ========================================================*/
extern void Rwr_ManPrint( Rwr_Man_t * p );
/*=== rwrUtil.c ========================================================*/
diff --git a/src/opt/rwr/rwrEva.c b/src/opt/rwr/rwrEva.c
index de29e153..a4d50fca 100644
--- a/src/opt/rwr/rwrEva.c
+++ b/src/opt/rwr/rwrEva.c
@@ -69,17 +69,17 @@ int Rwr_NodeRewrite( Rwr_Man_t * p, Cut_Man_t * pManCut, Abc_Obj_t * pNode, int
int Required, nNodesSaved;
int nNodesSaveCur = -1; // Suppress "might be used uninitialized"
int i, GainCur, GainBest = -1;
- clock_t clk, clk2;//, Counter;
+ abctime clk, clk2;//, Counter;
p->nNodesConsidered++;
// get the required times
Required = fUpdateLevel? Abc_ObjRequiredLevel(pNode) : ABC_INFINITY;
// get the node's cuts
-clk = clock();
+clk = Abc_Clock();
pCut = (Cut_Cut_t *)Abc_NodeGetCutsRecursive( pManCut, pNode, 0, 0 );
assert( pCut != NULL );
-p->timeCut += clock() - clk;
+p->timeCut += Abc_Clock() - clk;
//printf( " %d", Rwr_CutCountNumNodes(pNode, pCut) );
/*
@@ -89,7 +89,7 @@ p->timeCut += clock() - clk;
printf( "%d ", Counter );
*/
// go through the cuts
-clk = clock();
+clk = Abc_Clock();
for ( pCut = pCut->pNext; pCut; pCut = pCut->pNext )
{
// consider only 4-input cuts
@@ -128,7 +128,7 @@ clk = clock();
continue;
}
-clk2 = clock();
+clk2 = Abc_Clock();
/*
printf( "Considering: (" );
Vec_PtrForEachEntry( Abc_Obj_t *, p->vFaninsCur, pFanin, i )
@@ -145,12 +145,12 @@ clk2 = clock();
// unmark the fanin boundary
Vec_PtrForEachEntry( Abc_Obj_t *, p->vFaninsCur, pFanin, i )
Abc_ObjRegular(pFanin)->vFanouts.nSize--;
-p->timeMffc += clock() - clk2;
+p->timeMffc += Abc_Clock() - clk2;
// evaluate the cut
-clk2 = clock();
+clk2 = Abc_Clock();
pGraph = Rwr_CutEvaluate( p, pNode, pCut, p->vFaninsCur, nNodesSaved, Required, &GainCur, fPlaceEnable );
-p->timeEval += clock() - clk2;
+p->timeEval += Abc_Clock() - clk2;
// check if the cut is better than the current best one
if ( pGraph != NULL && GainBest < GainCur )
@@ -167,7 +167,7 @@ p->timeEval += clock() - clk2;
Vec_PtrPush( p->vFanins, pFanin );
}
}
-p->timeRes += clock() - clk;
+p->timeRes += Abc_Clock() - clk;
if ( GainBest == -1 )
return -1;
diff --git a/src/opt/rwr/rwrExp.c b/src/opt/rwr/rwrExp.c
index e760ab8e..9d8455b4 100644
--- a/src/opt/rwr/rwrExp.c
+++ b/src/opt/rwr/rwrExp.c
@@ -226,7 +226,7 @@ void Rwt_Man5ExplorePrint()
int * pDistrib;
unsigned * pReprs;
unsigned uTruth, uTruthC;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_Int_t * vClassesNN, * vClassesNPN;
// find the max number of occurences
@@ -285,7 +285,7 @@ void Rwt_Man5ExplorePrint()
printf( "%d classes written into file \"%s\".\n", vClassesNN->nSize, "nnclass_stats5.txt" );
-clk = clock();
+clk = Abc_Clock();
// how many NPN classes exist?
Vec_IntForEachEntry( vClassesNN, uTruth, i )
{
@@ -300,7 +300,7 @@ clk = clock();
(*pCounter) += Counter;
}
printf( "The numbe of NPN classes = %d.\n", stmm_count(s_pManRwrExp5->tTableNPN) );
-ABC_PRT( "Computing NPN classes", clock() - clk );
+ABC_PRT( "Computing NPN classes", Abc_Clock() - clk );
// put them into an array
vClassesNPN = Vec_IntAlloc( stmm_count(s_pManRwrExp5->tTableNPN) );
diff --git a/src/opt/rwr/rwrMan.c b/src/opt/rwr/rwrMan.c
index 0f0631bc..2245428f 100644
--- a/src/opt/rwr/rwrMan.c
+++ b/src/opt/rwr/rwrMan.c
@@ -48,8 +48,8 @@ Rwr_Man_t * Rwr_ManStart( int fPrecompute )
{
Dec_Man_t * pManDec;
Rwr_Man_t * p;
- clock_t clk = clock();
-clk = clock();
+ abctime clk = Abc_Clock();
+clk = Abc_Clock();
p = ABC_ALLOC( Rwr_Man_t, 1 );
memset( p, 0, sizeof(Rwr_Man_t) );
p->nFuncs = (1<<16);
@@ -91,7 +91,7 @@ clk = clock();
// Rwr_ManPrint( p );
Rwr_ManPreprocess( p );
}
-p->timeStart = clock() - clk;
+p->timeStart = Abc_Clock() - clk;
return p;
}
@@ -258,7 +258,7 @@ int Rwr_ManReadCompl( Rwr_Man_t * p )
SeeAlso []
***********************************************************************/
-void Rwr_ManAddTimeCuts( Rwr_Man_t * p, clock_t Time )
+void Rwr_ManAddTimeCuts( Rwr_Man_t * p, abctime Time )
{
p->timeCut += Time;
}
@@ -274,7 +274,7 @@ void Rwr_ManAddTimeCuts( Rwr_Man_t * p, clock_t Time )
SeeAlso []
***********************************************************************/
-void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, clock_t Time )
+void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, abctime Time )
{
p->timeUpdate += Time;
}
@@ -290,7 +290,7 @@ void Rwr_ManAddTimeUpdate( Rwr_Man_t * p, clock_t Time )
SeeAlso []
***********************************************************************/
-void Rwr_ManAddTimeTotal( Rwr_Man_t * p, clock_t Time )
+void Rwr_ManAddTimeTotal( Rwr_Man_t * p, abctime Time )
{
p->timeTotal += Time;
}
diff --git a/src/opt/rwr/rwrUtil.c b/src/opt/rwr/rwrUtil.c
index 97ddca3c..ee87cf9f 100644
--- a/src/opt/rwr/rwrUtil.c
+++ b/src/opt/rwr/rwrUtil.c
@@ -429,7 +429,7 @@ void Rwr_ManWriteToArray( Rwr_Man_t * p )
Rwr_Node_t * pNode;
unsigned Entry0, Entry1;
int i, nEntries;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// prepare the buffer
nEntries = p->vForest->nSize - 5;
pFile = fopen( "npn4_aig_array.txt", "w" );
@@ -455,7 +455,7 @@ void Rwr_ManWriteToArray( Rwr_Man_t * p )
Extra_PrintHex( pFile, &Entry0, 4 );
fprintf( pFile, " \n};\n" );
fclose( pFile );
- printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", clock() - clk );
+ printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -476,7 +476,7 @@ void Rwr_ManLoadFromArray( Rwr_Man_t * p, int fVerbose )
unsigned Entry0, Entry1;
int Level, Volume, nEntries, fExor;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// reconstruct the forest
for ( i = 0; ; i++ )
@@ -505,7 +505,7 @@ void Rwr_ManLoadFromArray( Rwr_Man_t * p, int fVerbose )
if ( fVerbose )
{
printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded );
- printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", clock() - clk );
+ printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", Abc_Clock() - clk );
}
}
@@ -527,7 +527,7 @@ void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName )
Rwr_Node_t * pNode;
unsigned * pBuffer;
int i, nEntries;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// prepare the buffer
nEntries = p->vForest->nSize - 5;
pBuffer = ABC_ALLOC( unsigned, nEntries * 2 );
@@ -545,7 +545,7 @@ void Rwr_ManWriteToFile( Rwr_Man_t * p, char * pFileName )
fwrite( pBuffer, sizeof(unsigned), nEntries * 2, pFile );
ABC_FREE( pBuffer );
fclose( pFile );
- printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", clock() - clk );
+ printf( "The number of nodes saved = %d. ", nEntries ); ABC_PRT( "Saving", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -566,7 +566,7 @@ void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName )
unsigned * pBuffer;
int Level, Volume, nEntries, fExor;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int RetValue;
// load the data
@@ -601,7 +601,7 @@ void Rwr_ManLoadFromFile( Rwr_Man_t * p, char * pFileName )
}
ABC_FREE( pBuffer );
printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded );
- printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", clock() - clk );
+ printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", Abc_Clock() - clk );
}
diff --git a/src/opt/rwt/rwt.h b/src/opt/rwt/rwt.h
index ff00cf52..2a0f7618 100644
--- a/src/opt/rwt/rwt.h
+++ b/src/opt/rwt/rwt.h
@@ -94,14 +94,14 @@ struct Rwt_Man_t_
int nCutsBad;
int nSubgraphs;
// runtime statistics
- clock_t timeStart;
- clock_t timeTruth;
- clock_t timeCut;
- clock_t timeRes;
- clock_t timeEval;
- clock_t timeMffc;
- clock_t timeUpdate;
- clock_t timeTotal;
+ abctime timeStart;
+ abctime timeTruth;
+ abctime timeCut;
+ abctime timeRes;
+ abctime timeEval;
+ abctime timeMffc;
+ abctime timeUpdate;
+ abctime timeTotal;
};
struct Rwt_Node_t_ // 24 bytes
@@ -142,9 +142,9 @@ extern void Rwt_ManPrintStatsFile( Rwt_Man_t * p );
extern void * Rwt_ManReadDecs( Rwt_Man_t * p );
extern Vec_Ptr_t * Rwt_ManReadLeaves( Rwt_Man_t * p );
extern int Rwt_ManReadCompl( Rwt_Man_t * p );
-extern void Rwt_ManAddTimeCuts( Rwt_Man_t * p, clock_t Time );
-extern void Rwt_ManAddTimeUpdate( Rwt_Man_t * p, clock_t Time );
-extern void Rwt_ManAddTimeTotal( Rwt_Man_t * p, clock_t Time );
+extern void Rwt_ManAddTimeCuts( Rwt_Man_t * p, abctime Time );
+extern void Rwt_ManAddTimeUpdate( Rwt_Man_t * p, abctime Time );
+extern void Rwt_ManAddTimeTotal( Rwt_Man_t * p, abctime Time );
/*=== rwrUtil.c ========================================================*/
extern void Rwt_ManLoadFromArray( Rwt_Man_t * p, int fVerbose );
extern char * Rwt_ManGetPractical( Rwt_Man_t * p );
diff --git a/src/opt/rwt/rwtMan.c b/src/opt/rwt/rwtMan.c
index 18998ac8..d7597e08 100644
--- a/src/opt/rwt/rwtMan.c
+++ b/src/opt/rwt/rwtMan.c
@@ -87,8 +87,8 @@ void Rwt_ManGlobalStop()
Rwt_Man_t * Rwt_ManStart( int fPrecompute )
{
Rwt_Man_t * p;
- clock_t clk = clock();
-clk = clock();
+ abctime clk = Abc_Clock();
+clk = Abc_Clock();
p = ABC_ALLOC( Rwt_Man_t, 1 );
memset( p, 0, sizeof(Rwt_Man_t) );
p->nFuncs = (1<<16);
@@ -131,7 +131,7 @@ clk = clock();
// Rwt_ManPrint( p );
Rwt_ManPreprocess( p );
}
-p->timeStart = clock() - clk;
+p->timeStart = Abc_Clock() - clk;
return p;
}
@@ -298,7 +298,7 @@ int Rwt_ManReadCompl( Rwt_Man_t * p )
SeeAlso []
***********************************************************************/
-void Rwt_ManAddTimeCuts( Rwt_Man_t * p, clock_t Time )
+void Rwt_ManAddTimeCuts( Rwt_Man_t * p, abctime Time )
{
p->timeCut += Time;
}
@@ -314,7 +314,7 @@ void Rwt_ManAddTimeCuts( Rwt_Man_t * p, clock_t Time )
SeeAlso []
***********************************************************************/
-void Rwt_ManAddTimeUpdate( Rwt_Man_t * p, clock_t Time )
+void Rwt_ManAddTimeUpdate( Rwt_Man_t * p, abctime Time )
{
p->timeUpdate += Time;
}
@@ -330,7 +330,7 @@ void Rwt_ManAddTimeUpdate( Rwt_Man_t * p, clock_t Time )
SeeAlso []
***********************************************************************/
-void Rwt_ManAddTimeTotal( Rwt_Man_t * p, clock_t Time )
+void Rwt_ManAddTimeTotal( Rwt_Man_t * p, abctime Time )
{
p->timeTotal += Time;
}
diff --git a/src/opt/rwt/rwtUtil.c b/src/opt/rwt/rwtUtil.c
index d6011b20..c6bf63ed 100644
--- a/src/opt/rwt/rwtUtil.c
+++ b/src/opt/rwt/rwtUtil.c
@@ -593,7 +593,7 @@ void Rwt_ManLoadFromArray( Rwt_Man_t * p, int fVerbose )
unsigned Entry0, Entry1;
int Level, Volume, nEntries, fExor;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// reconstruct the forest
for ( i = 0; ; i++ )
@@ -622,7 +622,7 @@ void Rwt_ManLoadFromArray( Rwt_Man_t * p, int fVerbose )
if ( fVerbose )
{
printf( "The number of classes = %d. Canonical nodes = %d.\n", p->nClasses, p->nAdded );
- printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", clock() - clk );
+ printf( "The number of nodes loaded = %d. ", nEntries ); ABC_PRT( "Loading", Abc_Clock() - clk );
}
}
diff --git a/src/opt/sfm/sfmCore.c b/src/opt/sfm/sfmCore.c
index 7032c7dd..865db096 100644
--- a/src/opt/sfm/sfmCore.c
+++ b/src/opt/sfm/sfmCore.c
@@ -111,7 +111,7 @@ int Sfm_NodeResubSolve( Sfm_Ntk_t * p, int iNode, int f, int fRemoveOnly )
int fVeryVerbose = 0;//p->pPars->fVeryVerbose && Vec_IntSize(p->vDivs) < 200;// || pNode->Id == 556;
int i, iFanin, iVar = -1;
word uTruth, uSign, uMask;
- clock_t clk;
+ abctime clk;
assert( Sfm_ObjIsNode(p, iNode) );
assert( f >= 0 && f < Sfm_ObjFaninNum(p, iNode) );
p->nTryRemoves++;
@@ -128,9 +128,9 @@ int Sfm_NodeResubSolve( Sfm_Ntk_t * p, int iNode, int f, int fRemoveOnly )
Sfm_ObjForEachFanin( p, iNode, iFanin, i )
if ( i != f )
Vec_IntPush( p->vDivIds, Sfm_ObjSatVar(p, iFanin) );
-clk = clock();
+clk = Abc_Clock();
uTruth = Sfm_ComputeInterpolant( p );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
// analyze outcomes
if ( uTruth == SFM_SAT_UNDEC )
{
@@ -169,9 +169,9 @@ p->timeSat += clock() - clk;
return 0;
// try replacing the critical fanin
Vec_IntPush( p->vDivIds, Sfm_ObjSatVar(p, Vec_IntEntry(p->vDivs, iVar)) );
-clk = clock();
+clk = Abc_Clock();
uTruth = Sfm_ComputeInterpolant( p );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
// analyze outcomes
if ( uTruth == SFM_SAT_UNDEC )
{
@@ -254,7 +254,7 @@ int Sfm_NodeResub( Sfm_Ntk_t * p, int iNode )
int Sfm_NtkPerform( Sfm_Ntk_t * p, Sfm_Par_t * pPars )
{
int i, k, Counter = 0;
- p->timeTotal = clock();
+ p->timeTotal = Abc_Clock();
if ( pPars->fVerbose )
printf( "Performing MFS with %d fixed objects.\n", Vec_StrSum(p->vFixed) );
p->pPars = pPars;
@@ -280,7 +280,7 @@ int Sfm_NtkPerform( Sfm_Ntk_t * p, Sfm_Par_t * pPars )
}
p->nTotalNodesEnd = Vec_WecSizeUsed(&p->vFanins) - Sfm_NtkPoNum(p);
p->nTotalEdgesEnd = Vec_WecSizeSize(&p->vFanins) - Sfm_NtkPoNum(p);
- p->timeTotal = clock() - p->timeTotal;
+ p->timeTotal = Abc_Clock() - p->timeTotal;
if ( pPars->fVerbose )
Sfm_NtkPrintStats( p );
return Counter;
diff --git a/src/opt/sfm/sfmInt.h b/src/opt/sfm/sfmInt.h
index 8b0072f1..d918077c 100644
--- a/src/opt/sfm/sfmInt.h
+++ b/src/opt/sfm/sfmInt.h
@@ -112,13 +112,13 @@ struct Sfm_Ntk_t_
int nTimeOuts;
int nMaxDivs;
// runtime
- clock_t timeWin;
- clock_t timeDiv;
- clock_t timeCnf;
- clock_t timeSat;
- clock_t timeOther;
- clock_t timeTotal;
-// clock_t time1;
+ abctime timeWin;
+ abctime timeDiv;
+ abctime timeCnf;
+ abctime timeSat;
+ abctime timeOther;
+ abctime timeTotal;
+// abctime time1;
};
static inline int Sfm_NtkPiNum( Sfm_Ntk_t * p ) { return p->nPis; }
diff --git a/src/opt/sfm/sfmSat.c b/src/opt/sfm/sfmSat.c
index 01b9d4cf..f96e2078 100644
--- a/src/opt/sfm/sfmSat.c
+++ b/src/opt/sfm/sfmSat.c
@@ -55,7 +55,7 @@ void Sfm_NtkWindowToSolver( Sfm_Ntk_t * p )
{
Vec_Int_t * vClause;
int RetValue, iNode = -1, iFanin, i, k;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// if ( p->pSat )
// printf( "%d ", p->pSat->stats.learnts );
sat_solver_restart( p->pSat );
@@ -93,7 +93,7 @@ void Sfm_NtkWindowToSolver( Sfm_Ntk_t * p )
// finalize
RetValue = sat_solver_simplify( p->pSat );
assert( RetValue );
- p->timeCnf += clock() - clk;
+ p->timeCnf += Abc_Clock() - clk;
}
/**Function*************************************************************
diff --git a/src/opt/sfm/sfmWin.c b/src/opt/sfm/sfmWin.c
index 9efe30d3..9f3617d1 100644
--- a/src/opt/sfm/sfmWin.c
+++ b/src/opt/sfm/sfmWin.c
@@ -264,7 +264,7 @@ int Sfm_NtkCollectTfi_rec( Sfm_Ntk_t * p, int iNode, int nWinSizeMax )
int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose )
{
int i, k, iTemp, nDivStart;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Sfm_ObjIsNode( p, iNode ) );
Vec_IntClear( p->vLeaves ); // leaves
Vec_IntClear( p->vNodes ); // internal
@@ -276,7 +276,7 @@ int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose )
if ( Sfm_NtkCollectTfi_rec( p, iNode, p->pPars->nWinSizeMax ) )
{
p->nMaxDivs++;
- p->timeWin += clock() - clk;
+ p->timeWin += Abc_Clock() - clk;
return 0;
}
// collect TFO (currently use only one level of TFO)
@@ -293,8 +293,8 @@ int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose )
}
else
Vec_IntPush( p->vRoots, iNode );
- p->timeWin += clock() - clk;
- clk = clock();
+ p->timeWin += Abc_Clock() - clk;
+ clk = Abc_Clock();
// create divisors
Vec_IntClear( p->vDivs );
Vec_IntForEachEntry( p->vLeaves, iTemp, i )
@@ -338,7 +338,7 @@ int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose )
assert( Vec_IntSize(p->vDivs) <= p->pPars->nWinSizeMax );
// statistics
p->nTotalDivs += Vec_IntSize(p->vDivs);
- p->timeDiv += clock() - clk;
+ p->timeDiv += Abc_Clock() - clk;
if ( !fVerbose )
return 1;
diff --git a/src/opt/sim/sim.h b/src/opt/sim/sim.h
index 93553a84..bb26dc1a 100644
--- a/src/opt/sim/sim.h
+++ b/src/opt/sim/sim.h
@@ -88,13 +88,13 @@ struct Sym_Man_t_
int nPairsRem;
int nPairsTotal;
// runtime statistics
- clock_t timeStruct;
- clock_t timeCount;
- clock_t timeMatr;
- clock_t timeSim;
- clock_t timeFraig;
- clock_t timeSat;
- clock_t timeTotal;
+ abctime timeStruct;
+ abctime timeCount;
+ abctime timeMatr;
+ abctime timeSim;
+ abctime timeFraig;
+ abctime timeSat;
+ abctime timeTotal;
};
typedef struct Sim_Man_t_ Sim_Man_t;
@@ -126,11 +126,11 @@ struct Sim_Man_t_
int nSatRunsSat;
int nSatRunsUnsat;
// runtime statistics
- clock_t timeSim;
- clock_t timeTrav;
- clock_t timeFraig;
- clock_t timeSat;
- clock_t timeTotal;
+ abctime timeSim;
+ abctime timeTrav;
+ abctime timeFraig;
+ abctime timeSat;
+ abctime timeTotal;
};
typedef struct Sim_Pat_t_ Sim_Pat_t;
diff --git a/src/opt/sim/simSupp.c b/src/opt/sim/simSupp.c
index 1cf13fa8..e8093aaa 100644
--- a/src/opt/sim/simSupp.c
+++ b/src/opt/sim/simSupp.c
@@ -105,7 +105,7 @@ Vec_Ptr_t * Sim_ComputeFunSupp( Abc_Ntk_t * pNtk, int fVerbose )
Sim_Man_t * p;
Vec_Ptr_t * vResult;
int nSolved, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
srand( 0xABC );
@@ -151,7 +151,7 @@ if ( fVerbose )
}
exit:
-p->timeTotal = clock() - clk;
+p->timeTotal = Abc_Clock() - clk;
vResult = p->vSuppFun;
// p->vSuppFun = NULL;
Sim_ManStop( p );
@@ -173,11 +173,11 @@ int Sim_ComputeSuppRound( Sim_Man_t * p, int fUseTargets )
{
Vec_Int_t * vTargets;
int i, Counter = 0;
- clock_t clk;
+ abctime clk;
// perform one round of random simulation
-clk = clock();
+clk = Abc_Clock();
Sim_UtilSimulate( p, 0 );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
// iterate through the CIs and detect COs that depend on them
for ( i = p->iInput; i < p->nInputs; i++ )
{
@@ -210,14 +210,14 @@ int Sim_ComputeSuppRoundNode( Sim_Man_t * p, int iNumCi, int fUseTargets )
int i, k, v, Output, LuckyPat, fType0, fType1;
int Counter = 0;
int fFirst = 1;
- clock_t clk;
+ abctime clk;
// collect nodes by level in the TFO of the CI
// this proceduredoes not collect the CIs and COs
// but it increments TravId of the collected nodes and CIs/COs
-clk = clock();
+clk = Abc_Clock();
pNodeCi = Abc_NtkCi( p->pNtk, iNumCi );
vNodesByLevel = Abc_DfsLevelized( pNodeCi, 0 );
-p->timeTrav += clock() - clk;
+p->timeTrav += Abc_Clock() - clk;
// complement the simulation info of the selected CI
Sim_UtilInfoFlip( p, pNodeCi );
// simulate the levelized structure of nodes
@@ -225,9 +225,9 @@ p->timeTrav += clock() - clk;
{
fType0 = Abc_NodeIsTravIdCurrent( Abc_ObjFanin0(pNode) );
fType1 = Abc_NodeIsTravIdCurrent( Abc_ObjFanin1(pNode) );
-clk = clock();
+clk = Abc_Clock();
Sim_UtilSimulateNode( p, pNode, 1, fType0, fType1 );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
}
// set the simulation info of the affected COs
if ( fUseTargets )
@@ -457,7 +457,7 @@ void Sim_SolveTargetsUsingSat( Sim_Man_t * p, int Limit )
int * pModel;
int RetValue, Output, Input, k, v;
int Counter = 0;
- clock_t clk;
+ abctime clk;
p->nSatRuns = 0;
// put targets into one array
@@ -473,12 +473,12 @@ void Sim_SolveTargetsUsingSat( Sim_Man_t * p, int Limit )
Fraig_ParamsSetDefault( &Params );
Params.nSeconds = ABC_INFINITY;
Params.fInternal = 1;
-clk = clock();
+clk = Abc_Clock();
pMan = (Fraig_Man_t *)Abc_NtkToFraig( pMiter, &Params, 0, 0 );
-p->timeFraig += clock() - clk;
-clk = clock();
+p->timeFraig += Abc_Clock() - clk;
+clk = Abc_Clock();
Fraig_ManProveMiter( pMan );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
// analyze the result
RetValue = Fraig_ManCheckMiter( pMan );
diff --git a/src/opt/sim/simSym.c b/src/opt/sim/simSym.c
index 8f99dc54..591adc59 100644
--- a/src/opt/sim/simSym.c
+++ b/src/opt/sim/simSym.c
@@ -49,7 +49,7 @@ int Sim_ComputeTwoVarSymms( Abc_Ntk_t * pNtk, int fVerbose )
Vec_Ptr_t * vResult;
int Result;
int i;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
srand( 0xABC );
@@ -61,9 +61,9 @@ int Sim_ComputeTwoVarSymms( Abc_Ntk_t * pNtk, int fVerbose )
p->nPairsTotal, p->nPairsSymm, p->nPairsNonSymm, p->nPairsRem );
// detect symmetries using circuit structure
-clk = clock();
+clk = Abc_Clock();
Sim_SymmsStructCompute( pNtk, p->vMatrSymms, p->vSuppFun );
-p->timeStruct = clock() - clk;
+p->timeStruct = Abc_Clock() - clk;
Sim_UtilCountPairsAll( p );
p->nPairsSymmStr = p->nPairsSymm;
@@ -133,7 +133,7 @@ p->timeStruct = clock() - clk;
Result = p->nPairsSymm;
vResult = p->vMatrSymms;
-p->timeTotal = clock() - clkTotal;
+p->timeTotal = Abc_Clock() - clkTotal;
// p->vMatrSymms = NULL;
Sym_ManStop( p );
return Result;
diff --git a/src/opt/sim/simSymSat.c b/src/opt/sim/simSymSat.c
index 14ec6806..125f7cc6 100644
--- a/src/opt/sim/simSymSat.c
+++ b/src/opt/sim/simSymSat.c
@@ -138,7 +138,7 @@ int Sim_SymmsSatProveOne( Sym_Man_t * p, int Out, int Var1, int Var2, unsigned *
Fraig_Man_t * pMan;
Abc_Ntk_t * pMiter;
int RetValue, i;
- clock_t clk;
+ abctime clk;
int * pModel;
// get the miter for this problem
@@ -150,12 +150,12 @@ int Sim_SymmsSatProveOne( Sym_Man_t * p, int Out, int Var1, int Var2, unsigned *
Params.nPatsDyna = 512;
Params.nSeconds = ABC_INFINITY;
-clk = clock();
+clk = Abc_Clock();
pMan = (Fraig_Man_t *)Abc_NtkToFraig( pMiter, &Params, 0, 0 );
-p->timeFraig += clock() - clk;
-clk = clock();
+p->timeFraig += Abc_Clock() - clk;
+clk = Abc_Clock();
Fraig_ManProveMiter( pMan );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
// analyze the result
RetValue = Fraig_ManCheckMiter( pMan );
diff --git a/src/opt/sim/simSymSim.c b/src/opt/sim/simSymSim.c
index 811397a5..fb0d60a7 100644
--- a/src/opt/sim/simSymSim.c
+++ b/src/opt/sim/simSymSim.c
@@ -50,21 +50,21 @@ void Sim_SymmsSimulate( Sym_Man_t * p, unsigned * pPat, Vec_Ptr_t * vMatrsNonSym
{
Abc_Obj_t * pNode;
int i, nPairsTotal, nPairsSym, nPairsNonSym;
- clock_t clk;
+ abctime clk;
// create the simulation matrix
Sim_SymmsCreateSquare( p, pPat );
// simulate each node in the DFS order
-clk = clock();
+clk = Abc_Clock();
Vec_PtrForEachEntry( Abc_Obj_t *, p->vNodes, pNode, i )
{
// if ( Abc_NodeIsConst(pNode) )
// continue;
Sim_UtilSimulateNodeOne( pNode, p->vSim, p->nSimWords, 0 );
}
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
// collect info into the CO matrices
-clk = clock();
+clk = Abc_Clock();
Abc_NtkForEachCo( p->pNtk, pNode, i )
{
pNode = Abc_ObjFanin0(pNode);
@@ -78,7 +78,7 @@ clk = clock();
continue;
Sim_SymmsDeriveInfo( p, pPat, pNode, vMatrsNonSym, i );
}
-p->timeMatr += clock() - clk;
+p->timeMatr += Abc_Clock() - clk;
}
/**Function*************************************************************
diff --git a/src/opt/sim/simUtils.c b/src/opt/sim/simUtils.c
index 975c57a6..dc05df0f 100644
--- a/src/opt/sim/simUtils.c
+++ b/src/opt/sim/simUtils.c
@@ -634,15 +634,15 @@ int Sim_UtilCountPairsOnePrint( Extra_BitMat_t * pMat, Vec_Int_t * vSupport )
void Sim_UtilCountPairsAllPrint( Sym_Man_t * p )
{
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
for ( i = 0; i < p->nOutputs; i++ )
{
printf( "Output %2d :", i );
Sim_UtilCountPairsOnePrint( (Extra_BitMat_t *)Vec_PtrEntry(p->vMatrSymms, i), Vec_VecEntryInt(p->vSupports, i) );
printf( "\n" );
}
-p->timeCount += clock() - clk;
+p->timeCount += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -659,8 +659,8 @@ p->timeCount += clock() - clk;
void Sim_UtilCountPairsAll( Sym_Man_t * p )
{
int nPairsTotal, nPairsSym, nPairsNonSym, i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
p->nPairsSymm = 0;
p->nPairsNonSymm = 0;
for ( i = 0; i < p->nOutputs; i++ )
@@ -686,7 +686,7 @@ clk = clock();
}
//printf( "\n" );
p->nPairsRem = p->nPairsTotal-p->nPairsSymm-p->nPairsNonSymm;
-p->timeCount += clock() - clk;
+p->timeCount += Abc_Clock() - clk;
}
/**Function*************************************************************
diff --git a/src/proof/abs/absGla.c b/src/proof/abs/absGla.c
index 4063757c..5daa953f 100644
--- a/src/proof/abs/absGla.c
+++ b/src/proof/abs/absGla.c
@@ -73,12 +73,12 @@ struct Ga2_Man_t_
Vec_Int_t * vIsopMem;
char * pSopSizes, ** pSops; // CNF representation
// statistics
- clock_t timeStart;
- clock_t timeInit;
- clock_t timeSat;
- clock_t timeUnsat;
- clock_t timeCex;
- clock_t timeOther;
+ abctime timeStart;
+ abctime timeInit;
+ abctime timeSat;
+ abctime timeUnsat;
+ abctime timeCex;
+ abctime timeOther;
};
static inline int Ga2_ObjId( Ga2_Man_t * p, Gia_Obj_t * pObj ) { return Vec_IntEntry(p->vIds, Gia_ObjId(p->pGia, pObj)); }
@@ -243,7 +243,7 @@ void Ga2_ManCollectLeaves_rec( Gia_Man_t * p, Gia_Obj_t * pObj, Vec_Int_t * vLea
int Ga2_ManMarkup( Gia_Man_t * p, int N, int fSimple )
{
static unsigned uTruth5[5] = { 0xAAAAAAAA, 0xCCCCCCCC, 0xF0F0F0F0, 0xFF00FF00, 0xFFFF0000 };
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
Vec_Int_t * vLeaves;
Gia_Obj_t * pObj;
int i, k, Leaf, CountMarks;
@@ -330,20 +330,20 @@ int Ga2_ManMarkup( Gia_Man_t * p, int N, int fSimple )
Vec_IntPush( p->vMapping, -1 ); // placeholder for ref counter
CountMarks++;
}
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
Vec_IntFree( vLeaves );
Gia_ManCleanValue( p );
return CountMarks;
}
void Ga2_ManComputeTest( Gia_Man_t * p )
{
- clock_t clk;
+ abctime clk;
// unsigned uTruth;
Gia_Obj_t * pObj;
int i, Counter = 0;
- clk = clock();
+ clk = Abc_Clock();
Ga2_ManMarkup( p, 5, 0 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
Gia_ManForEachAnd( p, pObj, i )
{
if ( !pObj->fPhase )
@@ -355,7 +355,7 @@ void Ga2_ManComputeTest( Gia_Man_t * p )
Counter++;
}
Abc_Print( 1, "Marked AND nodes = %6d. ", Counter );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -373,7 +373,7 @@ Ga2_Man_t * Ga2_ManStart( Gia_Man_t * pGia, Abs_Par_t * pPars )
{
Ga2_Man_t * p;
p = ABC_CALLOC( Ga2_Man_t, 1 );
- p->timeStart = clock();
+ p->timeStart = Abc_Clock();
p->fUseNewLine = 1;
// user data
p->pGia = pGia;
@@ -1366,7 +1366,7 @@ int Ga2_GlaAbsCount( Ga2_Man_t * p, int fRo, int fAnd )
SeeAlso []
***********************************************************************/
-void Ga2_ManAbsPrintFrame( Ga2_Man_t * p, int nFrames, int nConfls, int nCexes, clock_t Time, int fFinal )
+void Ga2_ManAbsPrintFrame( Ga2_Man_t * p, int nFrames, int nConfls, int nCexes, abctime Time, int fFinal )
{
int fUseNewLine = ((fFinal && nCexes) || p->pPars->fVeryVerbose);
if ( Abc_FrameIsBatchMode() && !fUseNewLine )
@@ -1502,7 +1502,7 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
int fUseSecondCore = 1;
Ga2_Man_t * p;
Vec_Int_t * vCore, * vPPis;
- clock_t clk2, clk = clock();
+ abctime clk2, clk = Abc_Clock();
int Status = l_Undef, RetValue = -1, iFrameTryToProve = -1, fOneIsSent = 0;
int i, c, f, Lit;
pPars->iFrame = -1;
@@ -1529,7 +1529,7 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
}
// start the manager
p = Ga2_ManStart( pAig, pPars );
- p->timeInit = clock() - clk;
+ p->timeInit = Abc_Clock() - clk;
// perform initial abstraction
if ( p->pPars->fVerbose )
{
@@ -1600,12 +1600,12 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
break;
}
// perform SAT solving
- clk2 = clock();
+ clk2 = Abc_Clock();
Status = sat_solver2_solve( p->pSat, &Lit, &Lit+1, (ABC_INT64_T)pPars->nConfLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
if ( Status == l_True ) // perform refinement
{
p->nCexes++;
- p->timeSat += clock() - clk2;
+ p->timeSat += Abc_Clock() - clk2;
// cancel old one if it was sent
if ( Abc_FrameIsBridgeMode() && fOneIsSent )
@@ -1620,14 +1620,14 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
}
// perform refinement
- clk2 = clock();
+ clk2 = Abc_Clock();
Rnm_ManSetRefId( p->pRnm, c );
vPPis = Ga2_ManRefine( p );
- p->timeCex += clock() - clk2;
+ p->timeCex += Abc_Clock() - clk2;
if ( vPPis == NULL )
{
if ( pPars->fVerbose )
- Ga2_ManAbsPrintFrame( p, f, sat_solver2_nconflicts(p->pSat)-nConflsBeg, c, clock() - clk, 1 );
+ Ga2_ManAbsPrintFrame( p, f, sat_solver2_nconflicts(p->pSat)-nConflsBeg, c, Abc_Clock() - clk, 1 );
goto finish;
}
@@ -1657,13 +1657,13 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
Ga2_ManAddToAbs( p, vPPis );
Vec_IntFree( vPPis );
if ( pPars->fVerbose )
- Ga2_ManAbsPrintFrame( p, f, sat_solver2_nconflicts(p->pSat)-nConflsBeg, c+1, clock() - clk, 0 );
+ Ga2_ManAbsPrintFrame( p, f, sat_solver2_nconflicts(p->pSat)-nConflsBeg, c+1, Abc_Clock() - clk, 0 );
continue;
}
- p->timeUnsat += clock() - clk2;
+ p->timeUnsat += Abc_Clock() - clk2;
if ( Status == l_Undef ) // ran out of resources
goto finish;
- if ( p->pSat->nRuntimeLimit && clock() > p->pSat->nRuntimeLimit ) // timeout
+ if ( p->pSat->nRuntimeLimit && Abc_Clock() > p->pSat->nRuntimeLimit ) // timeout
goto finish;
if ( c == 0 )
{
@@ -1706,12 +1706,12 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
Vec_IntFree( vCore );
}
// run SAT solver
- clk2 = clock();
+ clk2 = Abc_Clock();
Status = sat_solver2_solve( p->pSat, &Lit, &Lit+1, (ABC_INT64_T)pPars->nConfLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
if ( Status == l_Undef )
goto finish;
assert( Status == l_False );
- p->timeUnsat += clock() - clk2;
+ p->timeUnsat += Abc_Clock() - clk2;
// derive the core
assert( p->pSat->pPrf2 != NULL );
@@ -1734,7 +1734,7 @@ int Gia_ManPerformGla( Gia_Man_t * pAig, Abs_Par_t * pPars )
p->pPars->iFrameProved = f;
// print statistics
if ( pPars->fVerbose )
- Ga2_ManAbsPrintFrame( p, f, sat_solver2_nconflicts(p->pSat)-nConflsBeg, c, clock() - clk, 1 );
+ Ga2_ManAbsPrintFrame( p, f, sat_solver2_nconflicts(p->pSat)-nConflsBeg, c, Abc_Clock() - clk, 1 );
// check if abstraction was proved
if ( Gia_GlaProveCheck( pPars->fVerbose ) )
{
@@ -1817,7 +1817,7 @@ finish:
{
Vec_IntFreeP( &pAig->vGateClasses );
pAig->vGateClasses = Ga2_ManAbsTranslate( p );
- if ( p->pPars->nTimeOut && clock() >= p->pSat->nRuntimeLimit )
+ if ( p->pPars->nTimeOut && Abc_Clock() >= p->pSat->nRuntimeLimit )
Abc_Print( 1, "GLA reached timeout %d sec in frame %d with a %d-stable abstraction. ", p->pPars->nTimeOut, p->pPars->iFrameProved+1, p->pPars->nFramesNoChange );
else if ( pPars->nConfLimit && sat_solver2_nconflicts(p->pSat) >= pPars->nConfLimit )
Abc_Print( 1, "GLA exceeded %d conflicts in frame %d with a %d-stable abstraction. ", pPars->nConfLimit, p->pPars->iFrameProved+1, p->pPars->nFramesNoChange );
@@ -1838,16 +1838,16 @@ finish:
Vec_IntFreeP( &pAig->vGateClasses );
RetValue = 0;
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( p->pPars->fVerbose )
{
- p->timeOther = (clock() - clk) - p->timeUnsat - p->timeSat - p->timeCex - p->timeInit;
- ABC_PRTP( "Runtime: Initializing", p->timeInit, clock() - clk );
- ABC_PRTP( "Runtime: Solver UNSAT", p->timeUnsat, clock() - clk );
- ABC_PRTP( "Runtime: Solver SAT ", p->timeSat, clock() - clk );
- ABC_PRTP( "Runtime: Refinement ", p->timeCex, clock() - clk );
- ABC_PRTP( "Runtime: Other ", p->timeOther, clock() - clk );
- ABC_PRTP( "Runtime: TOTAL ", clock() - clk, clock() - clk );
+ p->timeOther = (Abc_Clock() - clk) - p->timeUnsat - p->timeSat - p->timeCex - p->timeInit;
+ ABC_PRTP( "Runtime: Initializing", p->timeInit, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Solver UNSAT", p->timeUnsat, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Solver SAT ", p->timeSat, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Refinement ", p->timeCex, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Other ", p->timeOther, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: TOTAL ", Abc_Clock() - clk, Abc_Clock() - clk );
Ga2_ManReportMemory( p );
}
// Ga2_ManDumpStats( p->pGia, p->pPars, p->pSat, p->pPars->iFrameProved, 0 );
diff --git a/src/proof/abs/absGlaOld.c b/src/proof/abs/absGlaOld.c
index e2f83e96..70bd2e91 100644
--- a/src/proof/abs/absGlaOld.c
+++ b/src/proof/abs/absGlaOld.c
@@ -93,11 +93,11 @@ struct Gla_Man_t_
Gia_Man_t * pGia2;
Rnm_Man_t * pRnm;
// statistics
- clock_t timeInit;
- clock_t timeSat;
- clock_t timeUnsat;
- clock_t timeCex;
- clock_t timeOther;
+ abctime timeInit;
+ abctime timeSat;
+ abctime timeUnsat;
+ abctime timeCex;
+ abctime timeOther;
};
// declarations
@@ -1447,7 +1447,7 @@ Vec_Int_t * Gla_ManUnsatCore( Gla_Man_t * p, int f, sat_solver2 * pSat, int nCon
Vec_Int_t * vCore = NULL;
int nConfPrev = pSat->stats.conflicts;
int RetValue, iLit = Gla_ManGetOutLit( p, f );
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( piRetValue )
*piRetValue = 1;
// consider special case when PO points to the flop
@@ -1478,18 +1478,18 @@ Vec_Int_t * Gla_ManUnsatCore( Gla_Man_t * p, int f, sat_solver2 * pSat, int nCon
{
// Abc_Print( 1, "%6d", (int)pSat->stats.conflicts - nConfPrev );
// Abc_Print( 1, "UNSAT after %7d conflicts. ", pSat->stats.conflicts );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
assert( RetValue == l_False );
// derive the UNSAT core
- clk = clock();
+ clk = Abc_Clock();
vCore = (Vec_Int_t *)Sat_ProofCore( pSat );
if ( vCore )
Vec_IntSort( vCore, 1 );
if ( fVerbose )
{
// Abc_Print( 1, "Core is %8d vars (out of %8d). ", Vec_IntSize(vCore), sat_solver2_nvars(pSat) );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
return vCore;
}
@@ -1506,7 +1506,7 @@ Vec_Int_t * Gla_ManUnsatCore( Gla_Man_t * p, int f, sat_solver2 * pSat, int nCon
SeeAlso []
***********************************************************************/
-void Gla_ManAbsPrintFrame( Gla_Man_t * p, int nCoreSize, int nFrames, int nConfls, int nCexes, clock_t Time )
+void Gla_ManAbsPrintFrame( Gla_Man_t * p, int nCoreSize, int nFrames, int nConfls, int nCexes, abctime Time )
{
if ( Abc_FrameIsBatchMode() && nCoreSize <= 0 )
return;
@@ -1643,7 +1643,7 @@ int Gia_ManPerformGlaOld( Gia_Man_t * pAig, Abs_Par_t * pPars, int fStartVta )
Vec_Int_t * vPPis, * vCore;//, * vCore2 = NULL;
Abc_Cex_t * pCex = NULL;
int f, i, iPrev, nConfls, Status, nVarsOld = 0, nCoreSize, fOneIsSent = 0, RetValue = -1;
- clock_t clk2, clk = clock();
+ abctime clk2, clk = Abc_Clock();
// preconditions
assert( Gia_ManPoNum(pAig) == 1 );
assert( pPars->nFramesMax == 0 || pPars->nFramesStart <= pPars->nFramesMax );
@@ -1696,10 +1696,10 @@ int Gia_ManPerformGlaOld( Gia_Man_t * pAig, Abs_Par_t * pPars, int fStartVta )
}
// start the manager
p = Gla_ManStart( pAig, pPars );
- p->timeInit = clock() - clk;
+ p->timeInit = Abc_Clock() - clk;
// set runtime limit
if ( p->pPars->nTimeOut )
- sat_solver2_set_runtime_limit( p->pSat, p->pPars->nTimeOut * CLOCKS_PER_SEC + clock() );
+ sat_solver2_set_runtime_limit( p->pSat, p->pPars->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() );
// perform initial abstraction
if ( p->pPars->fVerbose )
{
@@ -1721,10 +1721,10 @@ int Gia_ManPerformGlaOld( Gia_Man_t * pAig, Abs_Par_t * pPars, int fStartVta )
// iterate as long as there are counter-examples
for ( i = 0; ; i++ )
{
- clk2 = clock();
+ clk2 = Abc_Clock();
vCore = Gla_ManUnsatCore( p, f, p->pSat, pPars->nConfLimit, pPars->fVerbose, &Status, &nConfls );
// assert( (vCore != NULL) == (Status == 1) );
- if ( Status == -1 || (p->pSat->nRuntimeLimit && clock() > p->pSat->nRuntimeLimit) ) // resource limit is reached
+ if ( Status == -1 || (p->pSat->nRuntimeLimit && Abc_Clock() > p->pSat->nRuntimeLimit) ) // resource limit is reached
{
Prf_ManStopP( &p->pSat->pPrf2 );
// if ( Gia_ManRegNum(p->pGia) > 1 ) // for comb cases, return the abstraction
@@ -1734,10 +1734,10 @@ int Gia_ManPerformGlaOld( Gia_Man_t * pAig, Abs_Par_t * pPars, int fStartVta )
if ( Status == 1 )
{
Prf_ManStopP( &p->pSat->pPrf2 );
- p->timeUnsat += clock() - clk2;
+ p->timeUnsat += Abc_Clock() - clk2;
break;
}
- p->timeSat += clock() - clk2;
+ p->timeSat += Abc_Clock() - clk2;
assert( Status == 0 );
p->nCexes++;
@@ -1749,7 +1749,7 @@ int Gia_ManPerformGlaOld( Gia_Man_t * pAig, Abs_Par_t * pPars, int fStartVta )
}
// perform the refinement
- clk2 = clock();
+ clk2 = Abc_Clock();
if ( pPars->fAddLayer )
{
vPPis = Gla_ManCollectPPis( p, NULL );
@@ -1803,7 +1803,7 @@ int Gia_ManPerformGlaOld( Gia_Man_t * pAig, Abs_Par_t * pPars, int fStartVta )
// print the result (do not count it towards change)
if ( p->pPars->fVerbose )
- Gla_ManAbsPrintFrame( p, -1, f+1, sat_solver2_nconflicts(p->pSat)-nConflsBeg, i, clock() - clk );
+ Gla_ManAbsPrintFrame( p, -1, f+1, sat_solver2_nconflicts(p->pSat)-nConflsBeg, i, Abc_Clock() - clk );
}
if ( pCex != NULL )
break;
@@ -1836,9 +1836,9 @@ int Gia_ManPerformGlaOld( Gia_Man_t * pAig, Abs_Par_t * pPars, int fStartVta )
Gia_GlaAddOneSlice( p, f, vCore );
Vec_IntFree( vCore );
// run SAT solver
- clk2 = clock();
+ clk2 = Abc_Clock();
vCore = Gla_ManUnsatCore( p, f, p->pSat, pPars->nConfLimit, p->pPars->fVerbose, &Status, &nConfls );
- p->timeUnsat += clock() - clk2;
+ p->timeUnsat += Abc_Clock() - clk2;
// assert( (vCore != NULL) == (Status == 1) );
Vec_IntFreeP( &vCore );
if ( Status == -1 ) // resource limit is reached
@@ -1855,7 +1855,7 @@ int Gia_ManPerformGlaOld( Gia_Man_t * pAig, Abs_Par_t * pPars, int fStartVta )
}
// print the result
if ( p->pPars->fVerbose )
- Gla_ManAbsPrintFrame( p, nCoreSize, f+1, sat_solver2_nconflicts(p->pSat)-nConflsBeg, i, clock() - clk );
+ Gla_ManAbsPrintFrame( p, nCoreSize, f+1, sat_solver2_nconflicts(p->pSat)-nConflsBeg, i, Abc_Clock() - clk );
if ( f > 2 && iPrev > 0 && i == 0 ) // change has happened
{
@@ -1901,7 +1901,7 @@ finish:
pAig->vGateClasses = Gla_ManTranslate( p );
if ( Status == -1 )
{
- if ( p->pPars->nTimeOut && clock() >= p->pSat->nRuntimeLimit )
+ if ( p->pPars->nTimeOut && Abc_Clock() >= p->pSat->nRuntimeLimit )
Abc_Print( 1, "Timeout %d sec in frame %d with a %d-stable abstraction. ", p->pPars->nTimeOut, f, p->pPars->nFramesNoChange );
else if ( pPars->nConfLimit && sat_solver2_nconflicts(p->pSat) >= pPars->nConfLimit )
Abc_Print( 1, "Exceeded %d conflicts in frame %d with a %d-stable abstraction. ", pPars->nConfLimit, f, p->pPars->nFramesNoChange );
@@ -1929,16 +1929,16 @@ finish:
Vec_IntFreeP( &pAig->vGateClasses );
RetValue = 0;
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( p->pPars->fVerbose )
{
- p->timeOther = (clock() - clk) - p->timeUnsat - p->timeSat - p->timeCex - p->timeInit;
- ABC_PRTP( "Runtime: Initializing", p->timeInit, clock() - clk );
- ABC_PRTP( "Runtime: Solver UNSAT", p->timeUnsat, clock() - clk );
- ABC_PRTP( "Runtime: Solver SAT ", p->timeSat, clock() - clk );
- ABC_PRTP( "Runtime: Refinement ", p->timeCex, clock() - clk );
- ABC_PRTP( "Runtime: Other ", p->timeOther, clock() - clk );
- ABC_PRTP( "Runtime: TOTAL ", clock() - clk, clock() - clk );
+ p->timeOther = (Abc_Clock() - clk) - p->timeUnsat - p->timeSat - p->timeCex - p->timeInit;
+ ABC_PRTP( "Runtime: Initializing", p->timeInit, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Solver UNSAT", p->timeUnsat, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Solver SAT ", p->timeSat, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Refinement ", p->timeCex, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Other ", p->timeOther, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: TOTAL ", Abc_Clock() - clk, Abc_Clock() - clk );
Gla_ManReportMemory( p );
}
// Ga2_ManDumpStats( pAig, p->pPars, p->pSat, p->pPars->iFrame, 1 );
diff --git a/src/proof/abs/absIter.c b/src/proof/abs/absIter.c
index e8e5730b..7b660359 100644
--- a/src/proof/abs/absIter.c
+++ b/src/proof/abs/absIter.c
@@ -70,7 +70,7 @@ Gia_Man_t * Gia_ManShrinkGla( Gia_Man_t * p, int nFrameMax, int nTimeOut, int fU
int i, iFrame0, iFrame;
int nTotal = 0, nRemoved = 0;
Vec_Int_t * vGScopy;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ManPoNum(p) == 1 );
assert( p->vGateClasses != NULL );
vGScopy = Vec_IntDup( p->vGateClasses );
@@ -99,7 +99,7 @@ Gia_Man_t * Gia_ManShrinkGla( Gia_Man_t * p, int nFrameMax, int nTimeOut, int fU
if ( Gia_ObjIsInGla(p, Gia_ObjFanin0(Gia_ObjRoToRi(p, pObj))) )
continue;
}
- clk = clock();
+ clk = Abc_Clock();
printf( "%5d : ", nTotal );
printf( "Obj =%7d ", i );
Gia_ObjRemFromGla( p, pObj );
@@ -122,7 +122,7 @@ Gia_Man_t * Gia_ManShrinkGla( Gia_Man_t * p, int nFrameMax, int nTimeOut, int fU
printf( "Removing " );
Vec_IntWriteEntry( vGScopy, Gia_ObjId(p, pObj), 0 );
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
nTotal++;
// update the classes
Vec_IntFreeP( &p->vGateClasses );
@@ -135,7 +135,7 @@ Gia_Man_t * Gia_ManShrinkGla( Gia_Man_t * p, int nFrameMax, int nTimeOut, int fU
Vec_IntFree( vGScopy );
printf( "Tried = %d. ", nTotal );
printf( "Removed = %d. (%.2f %%) ", nRemoved, 100.0 * nRemoved / Vec_IntCountPositive(p->vGateClasses) );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
return NULL;
}
diff --git a/src/proof/abs/absOldCex.c b/src/proof/abs/absOldCex.c
index e5eaee27..c57d8ed9 100644
--- a/src/proof/abs/absOldCex.c
+++ b/src/proof/abs/absOldCex.c
@@ -720,9 +720,9 @@ Abc_Cex_t * Saig_ManCbaFindCexCareBits( Aig_Man_t * pAig, Abc_Cex_t * pCex, int
Saig_ManCba_t * p;
Vec_Int_t * vReasons;
Abc_Cex_t * pCare;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
- clk = clock();
+ clk = Abc_Clock();
p = Saig_ManCbaStart( pAig, pCex, nInputs, fVerbose );
// p->vReg2Frame = Vec_VecStart( pCex->iFrame );
@@ -743,7 +743,7 @@ Abc_Cex_t * Saig_ManCbaFindCexCareBits( Aig_Man_t * pAig, Abc_Cex_t * pCex, int
Aig_ManCiNum(p->pFrames), Vec_IntSize(vReasons),
Saig_ManPiNum(p->pAig) - p->nInputs, Vec_IntSize(vRes) );
Vec_IntFree( vRes );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
pCare = Saig_ManCbaReason2Cex( p, vReasons );
@@ -786,7 +786,7 @@ Vec_Int_t * Saig_ManCbaFilterInputs( Aig_Man_t * pAig, int iFirstFlopPi, Abc_Cex
{
Saig_ManCba_t * p;
Vec_Int_t * vRes, * vReasons;
- clock_t clk;
+ abctime clk;
if ( Saig_ManPiNum(pAig) != pCex->nPis )
{
printf( "Saig_ManCbaFilterInputs(): The PI count of AIG (%d) does not match that of cex (%d).\n",
@@ -794,7 +794,7 @@ Vec_Int_t * Saig_ManCbaFilterInputs( Aig_Man_t * pAig, int iFirstFlopPi, Abc_Cex
return NULL;
}
-clk = clock();
+clk = Abc_Clock();
p = Saig_ManCbaStart( pAig, pCex, iFirstFlopPi, fVerbose );
p->pFrames = Saig_ManCbaUnrollWithCex( pAig, pCex, iFirstFlopPi, &p->vMapPiF2A, &p->vReg2Frame );
vReasons = Saig_ManCbaFindReason( p );
@@ -804,7 +804,7 @@ clk = clock();
printf( "Frame PIs = %4d (essential = %4d) AIG PIs = %4d (essential = %4d) ",
Aig_ManCiNum(p->pFrames), Vec_IntSize(vReasons),
Saig_ManPiNum(p->pAig) - p->nInputs, Vec_IntSize(vRes) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
Vec_IntFree( vReasons );
@@ -831,7 +831,7 @@ Vec_Int_t * Saig_ManCbaPerform( Aig_Man_t * pAbs, int nInputs, Saig_ParBmc_t * p
{
Vec_Int_t * vAbsFfsToAdd;
int RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// assert( pAbs->nRegs > 0 );
// perform BMC
RetValue = Saig_ManBmcScalable( pAbs, pPars );
@@ -859,7 +859,7 @@ Vec_Int_t * Saig_ManCbaPerform( Aig_Man_t * pAbs, int nInputs, Saig_ParBmc_t * p
{
printf( "Adding %d registers to the abstraction (total = %d). ",
Vec_IntSize(vAbsFfsToAdd), Aig_ManRegNum(pAbs)+Vec_IntSize(vAbsFfsToAdd) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
return vAbsFfsToAdd;
}
diff --git a/src/proof/abs/absOldRef.c b/src/proof/abs/absOldRef.c
index 6cc5ff6d..b42053dd 100644
--- a/src/proof/abs/absOldRef.c
+++ b/src/proof/abs/absOldRef.c
@@ -257,7 +257,7 @@ int Saig_ManCexRefineStep( Aig_Man_t * p, Vec_Int_t * vFlops, Vec_Int_t * vFlopC
Aig_Man_t * pAbs;
Vec_Int_t * vFlopsNew;
int i, Entry;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pAbs = Saig_ManDupAbstraction( p, vFlops );
if ( fSensePath )
vFlopsNew = Saig_ManExtendCounterExampleTest2( pAbs, Saig_ManCexFirstFlopPi(p, pAbs), pCex, fVerbose );
@@ -281,7 +281,7 @@ int Saig_ManCexRefineStep( Aig_Man_t * p, Vec_Int_t * vFlops, Vec_Int_t * vFlopC
if ( fVerbose )
{
printf( "Adding %d registers to the abstraction (total = %d). ", Vec_IntSize(vFlopsNew), Aig_ManRegNum(p)+Vec_IntSize(vFlopsNew) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
// vFlopsNew contains PI numbers that should be kept in pAbs
// select the most useful flops among those to be added
@@ -411,7 +411,7 @@ Vec_Int_t * Saig_ManCexAbstractionFlops( Aig_Man_t * p, Gia_ParAbs_t * pPars )
int nUseStart = 0;
Aig_Man_t * pAbs, * pTemp;
Vec_Int_t * vFlops;
- int Iter;//, clk = clock(), clk2 = clock();//, iFlop;
+ int Iter;//, clk = Abc_Clock(), clk2 = Abc_Clock();//, iFlop;
assert( Aig_ManRegNum(p) > 0 );
if ( pPars->fVerbose )
printf( "Performing counter-example-based refinement.\n" );
diff --git a/src/proof/abs/absOldSat.c b/src/proof/abs/absOldSat.c
index 14f59667..7ee54b29 100644
--- a/src/proof/abs/absOldSat.c
+++ b/src/proof/abs/absOldSat.c
@@ -510,7 +510,7 @@ Abc_Cex_t * Saig_RefManRunSat( Saig_RefMan_t * p, int fNewOrder )
Vec_Int_t * vAssumps, * vVar2PiId;
int i, k, Entry, RetValue;//, f = 0, Counter = 0;
int nCoreLits, * pCoreLits;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// create CNF
assert( Aig_ManRegNum(p->pFrames) == 0 );
// pCnf = Cnf_Derive( p->pFrames, 0 ); // too slow
@@ -530,7 +530,7 @@ Abc_Cex_t * Saig_RefManRunSat( Saig_RefMan_t * p, int fNewOrder )
Cnf_DataFree( pCnf );
return NULL;
}
-//Abc_PrintTime( 1, "Preparing", clock() - clk );
+//Abc_PrintTime( 1, "Preparing", Abc_Clock() - clk );
// look for a true counter-example
if ( p->nInputs > 0 )
{
@@ -582,10 +582,10 @@ Abc_Cex_t * Saig_RefManRunSat( Saig_RefMan_t * p, int fNewOrder )
}
// solve
-clk = clock();
+clk = Abc_Clock();
RetValue = sat_solver_solve( pSat, Vec_IntArray(vAssumps), Vec_IntArray(vAssumps) + Vec_IntSize(vAssumps),
(ABC_INT64_T)nConfLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-//Abc_PrintTime( 1, "Solving", clock() - clk );
+//Abc_PrintTime( 1, "Solving", Abc_Clock() - clk );
if ( RetValue != l_False )
{
if ( RetValue == l_True )
@@ -868,9 +868,9 @@ Abc_Cex_t * Saig_ManFindCexCareBits( Aig_Man_t * pAig, Abc_Cex_t * pCex, int nIn
Saig_RefMan_t * p;
Vec_Int_t * vReasons;
Abc_Cex_t * pCare;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
- clk = clock();
+ clk = Abc_Clock();
p = Saig_RefManStart( pAig, pCex, nInputs, fVerbose );
vReasons = Saig_RefManFindReason( p );
@@ -883,7 +883,7 @@ Aig_ManPrintStats( p->pFrames );
printf( "Frame PIs = %4d (essential = %4d) AIG PIs = %4d (essential = %4d) ",
Aig_ManCiNum(p->pFrames), Vec_IntSize(vReasons),
Saig_ManPiNum(p->pAig) - p->nInputs, Vec_IntSize(vRes) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
Vec_IntFree( vRes );
@@ -900,7 +900,7 @@ ABC_PRT( "Time", clock() - clk );
Saig_ManPiNum(p->pAig) - p->nInputs, Vec_IntSize(vRes) );
Vec_IntFree( vRes );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
*/
}
@@ -931,7 +931,7 @@ Vec_Int_t * Saig_ManExtendCounterExampleTest3( Aig_Man_t * pAig, int iFirstFlopP
{
Saig_RefMan_t * p;
Vec_Int_t * vRes, * vReasons;
- clock_t clk;
+ abctime clk;
if ( Saig_ManPiNum(pAig) != pCex->nPis )
{
printf( "Saig_ManExtendCounterExampleTest3(): The PI count of AIG (%d) does not match that of cex (%d).\n",
@@ -939,7 +939,7 @@ Vec_Int_t * Saig_ManExtendCounterExampleTest3( Aig_Man_t * pAig, int iFirstFlopP
return NULL;
}
-clk = clock();
+clk = Abc_Clock();
p = Saig_RefManStart( pAig, pCex, iFirstFlopPi, fVerbose );
vReasons = Saig_RefManFindReason( p );
@@ -950,7 +950,7 @@ clk = clock();
printf( "Frame PIs = %4d (essential = %4d) AIG PIs = %4d (essential = %4d) ",
Aig_ManCiNum(p->pFrames), Vec_IntSize(vReasons),
Saig_ManPiNum(p->pAig) - p->nInputs, Vec_IntSize(vRes) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
/*
@@ -967,7 +967,7 @@ ABC_PRT( "Time", clock() - clk );
printf( "Frame PIs = %4d (essential = %4d) AIG PIs = %4d (essential = %4d) ",
Aig_ManCiNum(p->pFrames), Vec_IntSize(vReasons),
Saig_ManPiNum(p->pAig) - p->nInputs, Vec_IntSize(vRes) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
*/
diff --git a/src/proof/abs/absOldSim.c b/src/proof/abs/absOldSim.c
index e5c1e938..5d316935 100644
--- a/src/proof/abs/absOldSim.c
+++ b/src/proof/abs/absOldSim.c
@@ -444,7 +444,7 @@ Vec_Int_t * Saig_ManExtendCounterExampleTest2( Aig_Man_t * p, int iFirstFlopPi,
{
Vec_Int_t * vRes;
Vec_Ptr_t * vSimInfo;
- clock_t clk;
+ abctime clk;
if ( Saig_ManPiNum(p) != pCex->nPis )
{
printf( "Saig_ManExtendCounterExampleTest2(): The PI count of AIG (%d) does not match that of cex (%d).\n",
@@ -455,12 +455,12 @@ Vec_Int_t * Saig_ManExtendCounterExampleTest2( Aig_Man_t * p, int iFirstFlopPi,
vSimInfo = Vec_PtrAllocSimInfo( Aig_ManObjNumMax(p), Abc_BitWordNum(2*(pCex->iFrame+1)) );
Vec_PtrCleanSimInfo( vSimInfo, 0, Abc_BitWordNum(2*(pCex->iFrame+1)) );
-clk = clock();
+clk = Abc_Clock();
vRes = Saig_ManProcessCex( p, iFirstFlopPi, pCex, vSimInfo, fVerbose );
if ( fVerbose )
{
printf( "Total new PIs = %3d. Non-removable PIs = %3d. ", Saig_ManPiNum(p)-iFirstFlopPi, Vec_IntSize(vRes) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
Vec_PtrFree( vSimInfo );
Aig_ManFanoutStop( p );
diff --git a/src/proof/abs/absOut.c b/src/proof/abs/absOut.c
index c230acb4..0cd9e0e2 100644
--- a/src/proof/abs/absOut.c
+++ b/src/proof/abs/absOut.c
@@ -97,7 +97,7 @@ int Gia_ManGlaRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int fMinCut, int fVerbose
Abc_Cex_t * pCare;
Vec_Int_t * vPis, * vPPis;
int f, i, iObjId;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int nOnes = 0, Counter = 0;
if ( p->vGateClasses == NULL )
{
@@ -175,7 +175,7 @@ int Gia_ManGlaRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int fMinCut, int fVerbose
if ( fVerbose )
{
Abc_Print( 1, "Additional objects = %d. ", Vec_IntSize(vPPis) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
}
}
@@ -209,7 +209,7 @@ int Gia_ManGlaRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int fMinCut, int fVerbose
if ( fVerbose )
{
Abc_Print( 1, "Essential bits = %d. Additional objects = %d. ", nOnes, Counter );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
// consider the case of SAT
if ( iObjId == -1 )
@@ -375,7 +375,7 @@ int Gia_ManNewRefine( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrameStart, int iFra
Gia_Man_t * pAbs, * pNew;
Vec_Int_t * vFlops, * vInit;
Vec_Int_t * vCopy;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
int RetValue;
ABC_FREE( p->pCexSeq );
if ( p->vGateClasses == NULL )
diff --git a/src/proof/abs/absRef.c b/src/proof/abs/absRef.c
index f72d86e2..dda0c8cb 100644
--- a/src/proof/abs/absRef.c
+++ b/src/proof/abs/absRef.c
@@ -290,7 +290,7 @@ void Rnm_ManStop( Rnm_Man_t * p, int fProfile )
{
double MemGia = sizeof(Gia_Man_t) + sizeof(Gia_Obj_t) * p->pGia->nObjsAlloc + sizeof(int) * p->pGia->nTravIdsAlloc;
double MemOther = sizeof(Rnm_Man_t) + sizeof(Rnm_Obj_t) * p->nObjsAlloc + sizeof(int) * Vec_IntCap(p->vObjs);
- clock_t timeOther = p->timeTotal - p->timeFwd - p->timeBwd - p->timeVer;
+ abctime timeOther = p->timeTotal - p->timeFwd - p->timeBwd - p->timeVer;
printf( "Abstraction refinement runtime statistics:\n" );
ABC_PRTP( "Sensetization", p->timeFwd, p->timeTotal );
ABC_PRTP( "Justification", p->timeBwd, p->timeTotal );
@@ -674,7 +674,7 @@ Vec_Int_t * Rnm_ManRefine( Rnm_Man_t * p, Abc_Cex_t * pCex, Vec_Int_t * vMap, in
{
int fVerify = 1;
Vec_Int_t * vGoodPPis, * vNewPPis;
- clock_t clk, clk2 = clock();
+ abctime clk, clk2 = Abc_Clock();
int RetValue;
p->nCalls++;
// Gia_ManCleanValue( p->pGia );
@@ -692,27 +692,27 @@ Vec_Int_t * Rnm_ManRefine( Rnm_Man_t * p, Abc_Cex_t * pCex, Vec_Int_t * vMap, in
p->pObjs = ABC_REALLOC( Rnm_Obj_t, p->pObjs, (p->nObjsAlloc = p->nObjs + 10000) );
memset( p->pObjs, 0, sizeof(Rnm_Obj_t) * p->nObjs );
// propagate priorities
- clk = clock();
+ clk = Abc_Clock();
vGoodPPis = Vec_IntAlloc( 100 );
if ( Rnm_ManSensitize( p ) ) // the CEX is not a true CEX
{
- p->timeFwd += clock() - clk;
+ p->timeFwd += Abc_Clock() - clk;
// select refinement
- clk = clock();
+ clk = Abc_Clock();
p->nVisited = 0;
Rnm_ManJustify_rec( p, Gia_ObjFanin0(Gia_ManPo(p->pGia, 0)), pCex->iFrame, vGoodPPis );
RetValue = Vec_IntUniqify( vGoodPPis );
// assert( RetValue == 0 );
- p->timeBwd += clock() - clk;
+ p->timeBwd += Abc_Clock() - clk;
}
// verify (empty) refinement
// (only works when post-processing is not applied)
if ( fVerify )
{
- clk = clock();
+ clk = Abc_Clock();
Rnm_ManVerifyUsingTerSim( p->pGia, p->pCex, p->vMap, p->vObjs, vGoodPPis );
- p->timeVer += clock() - clk;
+ p->timeVer += Abc_Clock() - clk;
}
// at this point array vGoodPPis contains the set of important PPIs
@@ -737,7 +737,7 @@ Vec_Int_t * Rnm_ManRefine( Rnm_Man_t * p, Abc_Cex_t * pCex, Vec_Int_t * vMap, in
Rnm_ManCleanValues( p );
// Vec_IntReverseOrder( vGoodPPis );
- p->timeTotal += clock() - clk2;
+ p->timeTotal += Abc_Clock() - clk2;
p->nRefines += Vec_IntSize(vGoodPPis);
return vGoodPPis;
}
diff --git a/src/proof/abs/absRef.h b/src/proof/abs/absRef.h
index 9bae40a3..93c054aa 100644
--- a/src/proof/abs/absRef.h
+++ b/src/proof/abs/absRef.h
@@ -83,10 +83,10 @@ struct Rnm_Man_t_
int nRefines; // total refined objects
int nVisited; // visited during justification
// statistics
- clock_t timeFwd; // forward propagation
- clock_t timeBwd; // backward propagation
- clock_t timeVer; // ternary simulation
- clock_t timeTotal; // other time
+ abctime timeFwd; // forward propagation
+ abctime timeBwd; // backward propagation
+ abctime timeVer; // ternary simulation
+ abctime timeTotal; // other time
};
// accessing the refinement object
diff --git a/src/proof/abs/absRpm.c b/src/proof/abs/absRpm.c
index edb60083..ef5747c1 100644
--- a/src/proof/abs/absRpm.c
+++ b/src/proof/abs/absRpm.c
@@ -110,7 +110,7 @@ void Gia_ManTestDoms2( Gia_Man_t * p )
{
Vec_Int_t * vNodes;
Gia_Obj_t * pObj, * pDom;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
assert( p->vDoms == NULL );
Gia_ManComputeDoms( p );
@@ -119,7 +119,7 @@ void Gia_ManTestDoms2( Gia_Man_t * p )
if ( Gia_ObjId(p, pObj) != Gia_ObjDom(p, pObj) )
printf( "PI =%6d Id =%8d. Dom =%8d.\n", i, Gia_ObjId(p, pObj), Gia_ObjDom(p, pObj) );
*/
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// for each dominated PI, when if the PIs is in a leaf of the MFFC of the dominator
Gia_ManCleanMark1( p );
Gia_ManForEachPi( p, pObj, i )
diff --git a/src/proof/abs/absVta.c b/src/proof/abs/absVta.c
index 4b943870..01680a3f 100644
--- a/src/proof/abs/absVta.c
+++ b/src/proof/abs/absVta.c
@@ -71,10 +71,10 @@ struct Vta_Man_t_
sat_solver2 * pSat; // incremental SAT solver
Vec_Int_t * vAddedNew; // the IDs of variables added to the solver
// statistics
- clock_t timeSat;
- clock_t timeUnsat;
- clock_t timeCex;
- clock_t timeOther;
+ abctime timeSat;
+ abctime timeUnsat;
+ abctime timeCex;
+ abctime timeOther;
};
@@ -1082,7 +1082,7 @@ static inline int Vga_ManGetOutLit( Vta_Man_t * p, int f )
***********************************************************************/
Vec_Int_t * Vta_ManUnsatCore( int iLit, sat_solver2 * pSat, int nConfMax, int fVerbose, int * piRetValue, int * pnConfls )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_Int_t * vCore;
int RetValue, nConfPrev = pSat->stats.conflicts;
if ( piRetValue )
@@ -1115,16 +1115,16 @@ Vec_Int_t * Vta_ManUnsatCore( int iLit, sat_solver2 * pSat, int nConfMax, int fV
{
// Abc_Print( 1, "%6d", (int)pSat->stats.conflicts - nConfPrev );
// Abc_Print( 1, "UNSAT after %7d conflicts. ", pSat->stats.conflicts );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
assert( RetValue == l_False );
// derive the UNSAT core
- clk = clock();
+ clk = Abc_Clock();
vCore = (Vec_Int_t *)Sat_ProofCore( pSat );
if ( fVerbose )
{
// Abc_Print( 1, "Core is %8d vars (out of %8d). ", Vec_IntSize(vCore), sat_solver2_nvars(pSat) );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
return vCore;
}
@@ -1140,7 +1140,7 @@ Vec_Int_t * Vta_ManUnsatCore( int iLit, sat_solver2 * pSat, int nConfMax, int fV
SeeAlso []
***********************************************************************/
-int Vta_ManAbsPrintFrame( Vta_Man_t * p, Vec_Int_t * vCore, int nFrames, int nConfls, int nCexes, clock_t Time, int fVerbose )
+int Vta_ManAbsPrintFrame( Vta_Man_t * p, Vec_Int_t * vCore, int nFrames, int nConfls, int nCexes, abctime Time, int fVerbose )
{
unsigned * pInfo;
int * pCountAll = NULL, * pCountUni = NULL;
@@ -1495,7 +1495,7 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Abs_Par_t * pPars )
Vec_Int_t * vCore;
Abc_Cex_t * pCex = NULL;
int i, f, nConfls, Status, nObjOld, RetValue = -1, nCountNoChange = 0, fOneIsSent = 0;
- clock_t clk = clock(), clk2;
+ abctime clk = Abc_Clock(), clk2;
// preconditions
assert( Gia_ManPoNum(pAig) == 1 );
assert( pPars->nFramesMax == 0 || pPars->nFramesStart <= pPars->nFramesMax );
@@ -1525,7 +1525,7 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Abs_Par_t * pPars )
p = Vga_ManStart( pAig, pPars );
// set runtime limit
if ( p->pPars->nTimeOut )
- sat_solver2_set_runtime_limit( p->pSat, p->pPars->nTimeOut * CLOCKS_PER_SEC + clock() );
+ sat_solver2_set_runtime_limit( p->pSat, p->pPars->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() );
// perform initial abstraction
if ( p->pPars->fVerbose )
{
@@ -1564,7 +1564,7 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Abs_Par_t * pPars )
// iterate as long as there are counter-examples
for ( i = 0; ; i++ )
{
- clk2 = clock();
+ clk2 = Abc_Clock();
vCore = Vta_ManUnsatCore( Vga_ManGetOutLit(p, f), p->pSat, pPars->nConfLimit, pPars->fVerbose, &Status, &nConfls );
assert( (vCore != NULL) == (Status == 1) );
if ( Status == -1 ) // resource limit is reached
@@ -1573,27 +1573,27 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Abs_Par_t * pPars )
goto finish;
}
// check timeout
- if ( p->pSat->nRuntimeLimit && clock() > p->pSat->nRuntimeLimit )
+ if ( p->pSat->nRuntimeLimit && Abc_Clock() > p->pSat->nRuntimeLimit )
{
Vga_ManRollBack( p, nObjOld );
goto finish;
}
if ( vCore != NULL )
{
- p->timeUnsat += clock() - clk2;
+ p->timeUnsat += Abc_Clock() - clk2;
break;
}
- p->timeSat += clock() - clk2;
+ p->timeSat += Abc_Clock() - clk2;
assert( Status == 0 );
p->nCexes++;
// perform the refinement
- clk2 = clock();
+ clk2 = Abc_Clock();
pCex = Vta_ManRefineAbstraction( p, f );
- p->timeCex += clock() - clk2;
+ p->timeCex += Abc_Clock() - clk2;
if ( pCex != NULL )
goto finish;
// print the result (do not count it towards change)
- Vta_ManAbsPrintFrame( p, NULL, f+1, sat_solver2_nconflicts(p->pSat)-nConflsBeg, i, clock() - clk, p->pPars->fVerbose );
+ Vta_ManAbsPrintFrame( p, NULL, f+1, sat_solver2_nconflicts(p->pSat)-nConflsBeg, i, Abc_Clock() - clk, p->pPars->fVerbose );
}
assert( Status == 1 );
// valid core is obtained
@@ -1608,9 +1608,9 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Abs_Par_t * pPars )
Vec_IntFree( vCore );
// run SAT solver
- clk2 = clock();
+ clk2 = Abc_Clock();
vCore = Vta_ManUnsatCore( Vga_ManGetOutLit(p, f), p->pSat, pPars->nConfLimit, p->pPars->fVerbose, &Status, &nConfls );
- p->timeUnsat += clock() - clk2;
+ p->timeUnsat += Abc_Clock() - clk2;
assert( (vCore != NULL) == (Status == 1) );
if ( Status == -1 ) // resource limit is reached
break;
@@ -1628,7 +1628,7 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Abs_Par_t * pPars )
Vec_IntSort( vCore, 1 );
Vec_PtrPush( p->vCores, vCore );
// print the result
- if ( Vta_ManAbsPrintFrame( p, vCore, f+1, sat_solver2_nconflicts(p->pSat)-nConflsBeg, i, clock() - clk, p->pPars->fVerbose ) )
+ if ( Vta_ManAbsPrintFrame( p, vCore, f+1, sat_solver2_nconflicts(p->pSat)-nConflsBeg, i, Abc_Clock() - clk, p->pPars->fVerbose ) )
{
// reset the counter of frames without change
nCountNoChange = 1;
@@ -1682,7 +1682,7 @@ finish:
pAig->vObjClasses = Gia_VtaFramesToAbs( (Vec_Vec_t *)p->vCores );
if ( Status == -1 )
{
- if ( p->pPars->nTimeOut && clock() >= p->pSat->nRuntimeLimit )
+ if ( p->pPars->nTimeOut && Abc_Clock() >= p->pSat->nRuntimeLimit )
Abc_Print( 1, "Timeout %d sec in frame %d with a %d-stable abstraction. ", p->pPars->nTimeOut, f, p->pPars->nFramesNoChange );
else if ( pPars->nConfLimit && sat_solver2_nconflicts(p->pSat) >= pPars->nConfLimit )
Abc_Print( 1, "Exceeded %d conflicts in frame %d with a %d-stable abstraction. ", pPars->nConfLimit, f, p->pPars->nFramesNoChange );
@@ -1711,16 +1711,16 @@ finish:
Vec_IntFreeP( &pAig->vObjClasses );
RetValue = 0;
}
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( p->pPars->fVerbose )
{
- p->timeOther = (clock() - clk) - p->timeUnsat - p->timeSat - p->timeCex;
- ABC_PRTP( "Runtime: Solver UNSAT", p->timeUnsat, clock() - clk );
- ABC_PRTP( "Runtime: Solver SAT ", p->timeSat, clock() - clk );
- ABC_PRTP( "Runtime: Refinement ", p->timeCex, clock() - clk );
- ABC_PRTP( "Runtime: Other ", p->timeOther, clock() - clk );
- ABC_PRTP( "Runtime: TOTAL ", clock() - clk, clock() - clk );
+ p->timeOther = (Abc_Clock() - clk) - p->timeUnsat - p->timeSat - p->timeCex;
+ ABC_PRTP( "Runtime: Solver UNSAT", p->timeUnsat, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Solver SAT ", p->timeSat, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Refinement ", p->timeCex, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: Other ", p->timeOther, Abc_Clock() - clk );
+ ABC_PRTP( "Runtime: TOTAL ", Abc_Clock() - clk, Abc_Clock() - clk );
Gia_VtaPrintMemory( p );
}
diff --git a/src/proof/bbr/bbrCex.c b/src/proof/bbr/bbrCex.c
index 60fef07c..31a46d61 100644
--- a/src/proof/bbr/bbrCex.c
+++ b/src/proof/bbr/bbrCex.c
@@ -55,7 +55,7 @@ Abc_Cex_t * Aig_ManVerifyUsingBddsCountExample( Aig_Man_t * p, DdManager * dd,
DdNode * bTemp, * bVar, * bRing;
int i, v, RetValue, nPiOffset;
char * pValues;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
//printf( "\nDeriving counter-example.\n" );
// allocate room for the counter-example
@@ -158,7 +158,7 @@ Abc_Cex_t * Aig_ManVerifyUsingBddsCountExample( Aig_Man_t * p, DdManager * dd,
}
if ( fVerbose && !fSilent )
{
- ABC_PRT( "Counter-example generation time", clock() - clk );
+ ABC_PRT( "Counter-example generation time", Abc_Clock() - clk );
}
return pCex;
}
diff --git a/src/proof/bbr/bbrReach.c b/src/proof/bbr/bbrReach.c
index 0becaa39..b5125ec7 100644
--- a/src/proof/bbr/bbrReach.c
+++ b/src/proof/bbr/bbrReach.c
@@ -247,7 +247,7 @@ int Aig_ManComputeReachable( DdManager * dd, Aig_Man_t * p, DdNode ** pbParts, D
Cudd_ReorderingType method;
int i, nIters, nBddSize = 0, status;
int nThreshold = 10000;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_Ptr_t * vOnionRings;
int fixedPoint = 0;
@@ -282,7 +282,7 @@ int Aig_ManComputeReachable( DdManager * dd, Aig_Man_t * p, DdNode ** pbParts, D
for ( nIters = 0; nIters < pPars->nIterMax; nIters++ )
{
// check the runtime limit
- if ( pPars->TimeLimit && pPars->TimeLimit <= (clock()-clk)/CLOCKS_PER_SEC )
+ if ( pPars->TimeLimit && pPars->TimeLimit <= (Abc_Clock()-clk)/CLOCKS_PER_SEC )
{
printf( "Reached timeout after image computation (%d seconds).\n", pPars->TimeLimit );
Vec_PtrFree( vOnionRings );
@@ -442,7 +442,7 @@ int Aig_ManVerifyUsingBdds_int( Aig_Man_t * p, Saig_ParBbr_t * pPars )
DdNode ** pbParts, ** pbOutputs;
DdNode * bInitial, * bTemp;
int RetValue, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_Ptr_t * vOnionRings;
assert( Saig_ManRegNum(p) > 0 );
@@ -459,7 +459,7 @@ int Aig_ManVerifyUsingBdds_int( Aig_Man_t * p, Saig_ParBbr_t * pPars )
printf( "Shared BDD size is %6d nodes.\n", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
// check the runtime limit
- if ( pPars->TimeLimit && pPars->TimeLimit <= (clock()-clk)/CLOCKS_PER_SEC )
+ if ( pPars->TimeLimit && pPars->TimeLimit <= (Abc_Clock()-clk)/CLOCKS_PER_SEC )
{
printf( "Reached timeout after constructing global BDDs (%d seconds).\n", pPars->TimeLimit );
Cudd_Quit( dd );
@@ -524,7 +524,7 @@ int Aig_ManVerifyUsingBdds_int( Aig_Man_t * p, Saig_ParBbr_t * pPars )
// report the runtime
if ( !pPars->fSilent )
{
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
fflush( stdout );
}
return RetValue;
diff --git a/src/proof/cec/cecCec.c b/src/proof/cec/cecCec.c
index 37df4d8d..aa6d753a 100644
--- a/src/proof/cec/cecCec.c
+++ b/src/proof/cec/cecCec.c
@@ -73,7 +73,7 @@ int Cec_ManVerifyOld( Gia_Man_t * pMiter, int fVerbose, int * piOutFail )
Gia_Man_t * pTemp = Gia_ManTransformMiter( pMiter );
Aig_Man_t * pMiterCec = Gia_ManToAig( pTemp, 0 );
int RetValue, iOut, nOuts;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
if ( piOutFail )
*piOutFail = -1;
Gia_ManStop( pTemp );
@@ -83,12 +83,12 @@ int Cec_ManVerifyOld( Gia_Man_t * pMiter, int fVerbose, int * piOutFail )
if ( RetValue == 1 )
{
Abc_Print( 1, "Networks are equivalent. " );
-Abc_PrintTime( 1, "Time", clock() - clkTotal );
+Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
else if ( RetValue == 0 )
{
Abc_Print( 1, "Networks are NOT EQUIVALENT. " );
-Abc_PrintTime( 1, "Time", clock() - clkTotal );
+Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
if ( pMiterCec->pData == NULL )
Abc_Print( 1, "Counter-example is not available.\n" );
else
@@ -113,7 +113,7 @@ Abc_PrintTime( 1, "Time", clock() - clkTotal );
else
{
Abc_Print( 1, "Networks are UNDECIDED. " );
-Abc_PrintTime( 1, "Time", clock() - clkTotal );
+Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
fflush( stdout );
Aig_ManStop( pMiterCec );
@@ -136,7 +136,7 @@ int Cec_ManHandleSpecialCases( Gia_Man_t * p, Cec_ParCec_t * pPars )
Gia_Obj_t * pObj1, * pObj2;
Gia_Obj_t * pDri1, * pDri2;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Gia_ManSetPhase( p );
Gia_ManForEachPo( p, pObj1, i )
{
@@ -146,7 +146,7 @@ int Cec_ManHandleSpecialCases( Gia_Man_t * p, Cec_ParCec_t * pPars )
if ( Gia_ObjPhase(pObj1) != Gia_ObjPhase(pObj2) )
{
Abc_Print( 1, "Networks are NOT EQUIVALENT. Outputs %d trivially differ (different phase). ", i/2 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
pPars->iOutFail = i/2;
Cec_ManTransformPattern( p, i/2, NULL );
return 0;
@@ -158,7 +158,7 @@ int Cec_ManHandleSpecialCases( Gia_Man_t * p, Cec_ParCec_t * pPars )
if ( Gia_ObjIsPi(p, pDri1) && Gia_ObjIsPi(p, pDri2) && pDri1 != pDri2 )
{
Abc_Print( 1, "Networks are NOT EQUIVALENT. Outputs %d trivially differ (different PIs). ", i/2 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
pPars->iOutFail = i/2;
Cec_ManTransformPattern( p, i/2, NULL );
// if their compl attributes are the same - one should be complemented
@@ -171,7 +171,7 @@ int Cec_ManHandleSpecialCases( Gia_Man_t * p, Cec_ParCec_t * pPars )
(Gia_ObjIsPi(p, pDri2) && Gia_ObjIsConst0(pDri1)) )
{
Abc_Print( 1, "Networks are NOT EQUIVALENT. Outputs %d trivially differ (PI vs. constant). ", i/2 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
pPars->iOutFail = i/2;
Cec_ManTransformPattern( p, i/2, NULL );
// the compl attributes are the same - the PI should be complemented
@@ -186,7 +186,7 @@ int Cec_ManHandleSpecialCases( Gia_Man_t * p, Cec_ParCec_t * pPars )
if ( Gia_ManAndNum(p) == 0 )
{
Abc_Print( 1, "Networks are equivalent. " );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 1;
}
return -1;
@@ -209,8 +209,8 @@ int Cec_ManVerify( Gia_Man_t * pInit, Cec_ParCec_t * pPars )
Cec_ParFra_t ParsFra, * pParsFra = &ParsFra;
Gia_Man_t * p, * pNew;
int RetValue;
- clock_t clk = clock();
- clock_t clkTotal = clock();
+ abctime clk = Abc_Clock();
+ abctime clkTotal = Abc_Clock();
// consider special cases:
// 1) (SAT) a pair of POs have different value under all-0 pattern
// 2) (SAT) a pair of POs has different PI/Const drivers
@@ -245,7 +245,7 @@ int Cec_ManVerify( Gia_Man_t * pInit, Cec_ParCec_t * pPars )
if ( p->pCexComb && !Gia_ManVerifyCex( p, p->pCexComb, 1 ) )
Abc_Print( 1, "Counter-example simulation has failed.\n" );
Abc_Print( 1, "Networks are NOT EQUIVALENT. " );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 0;
}
p = Gia_ManDup( pInit );
@@ -257,7 +257,7 @@ int Cec_ManVerify( Gia_Man_t * pInit, Cec_ParCec_t * pPars )
if ( pPars->fVerbose )
{
Abc_Print( 1, "Networks are UNDECIDED after the new CEC engine. " );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
if ( fDumpUndecided )
{
@@ -266,7 +266,7 @@ int Cec_ManVerify( Gia_Man_t * pInit, Cec_ParCec_t * pPars )
Gia_AigerWrite( pNew, "gia_cec_undecided.aig", 0, 0 );
Abc_Print( 1, "The result is written into file \"%s\".\n", "gia_cec_undecided.aig" );
}
- if ( pPars->TimeLimit && (clock() - clkTotal)/CLOCKS_PER_SEC >= pPars->TimeLimit )
+ if ( pPars->TimeLimit && (Abc_Clock() - clkTotal)/CLOCKS_PER_SEC >= pPars->TimeLimit )
{
Gia_ManStop( pNew );
return -1;
diff --git a/src/proof/cec/cecChoice.c b/src/proof/cec/cecChoice.c
index c07b9112..01b5adec 100644
--- a/src/proof/cec/cecChoice.c
+++ b/src/proof/cec/cecChoice.c
@@ -209,8 +209,8 @@ int Cec_ManChoiceComputation_int( Gia_Man_t * pAig, Cec_ParChc_t * pPars )
Cec_ManSim_t * pSim;
Gia_Man_t * pSrm;
int r, RetValue;
- clock_t clkSat = 0, clkSim = 0, clkSrm = 0, clkTotal = clock();
- clock_t clk2, clk = clock();
+ abctime clkSat = 0, clkSim = 0, clkSrm = 0, clkTotal = Abc_Clock();
+ abctime clk2, clk = Abc_Clock();
ABC_FREE( pAig->pReprs );
ABC_FREE( pAig->pNexts );
Gia_ManRandom( 1 );
@@ -233,51 +233,51 @@ int Cec_ManChoiceComputation_int( Gia_Man_t * pAig, Cec_ParChc_t * pPars )
{
Abc_Print( 1, "Obj = %7d. And = %7d. Conf = %5d. Ring = %d. CSat = %d.\n",
Gia_ManObjNum(pAig), Gia_ManAndNum(pAig), pPars->nBTLimit, pPars->fUseRings, pPars->fUseCSat );
- Cec_ManRefinedClassPrintStats( pAig, NULL, 0, clock() - clk );
+ Cec_ManRefinedClassPrintStats( pAig, NULL, 0, Abc_Clock() - clk );
}
// perform refinement of equivalence classes
for ( r = 0; r < nItersMax; r++ )
{
- clk = clock();
+ clk = Abc_Clock();
// perform speculative reduction
- clk2 = clock();
+ clk2 = Abc_Clock();
pSrm = Cec_ManCombSpecReduce( pAig, &vOutputs, pPars->fUseRings );
assert( Gia_ManRegNum(pSrm) == 0 && Gia_ManCiNum(pSrm) == Gia_ManCiNum(pAig) );
- clkSrm += clock() - clk2;
+ clkSrm += Abc_Clock() - clk2;
if ( Gia_ManCoNum(pSrm) == 0 )
{
if ( pPars->fVerbose )
- Cec_ManRefinedClassPrintStats( pAig, NULL, r+1, clock() - clk );
+ Cec_ManRefinedClassPrintStats( pAig, NULL, r+1, Abc_Clock() - clk );
Vec_IntFree( vOutputs );
Gia_ManStop( pSrm );
break;
}
//Gia_DumpAiger( pSrm, "choicesrm", r, 2 );
// found counter-examples to speculation
- clk2 = clock();
+ clk2 = Abc_Clock();
if ( pPars->fUseCSat )
vCexStore = Cbs_ManSolveMiterNc( pSrm, pPars->nBTLimit, &vStatus, 0 );
else
vCexStore = Cec_ManSatSolveMiter( pSrm, pParsSat, &vStatus );
Gia_ManStop( pSrm );
- clkSat += clock() - clk2;
+ clkSat += Abc_Clock() - clk2;
if ( Vec_IntSize(vCexStore) == 0 )
{
if ( pPars->fVerbose )
- Cec_ManRefinedClassPrintStats( pAig, vStatus, r+1, clock() - clk );
+ Cec_ManRefinedClassPrintStats( pAig, vStatus, r+1, Abc_Clock() - clk );
Vec_IntFree( vCexStore );
Vec_StrFree( vStatus );
Vec_IntFree( vOutputs );
break;
}
// refine classes with these counter-examples
- clk2 = clock();
+ clk2 = Abc_Clock();
RetValue = Cec_ManResimulateCounterExamplesComb( pSim, vCexStore );
Vec_IntFree( vCexStore );
- clkSim += clock() - clk2;
+ clkSim += Abc_Clock() - clk2;
Gia_ManCheckRefinements( pAig, vStatus, vOutputs, pSim, pPars->fUseRings );
if ( pPars->fVerbose )
- Cec_ManRefinedClassPrintStats( pAig, vStatus, r+1, clock() - clk );
+ Cec_ManRefinedClassPrintStats( pAig, vStatus, r+1, Abc_Clock() - clk );
Vec_StrFree( vStatus );
Vec_IntFree( vOutputs );
//Gia_ManEquivPrintClasses( pAig, 1, 0 );
@@ -286,7 +286,7 @@ int Cec_ManChoiceComputation_int( Gia_Man_t * pAig, Cec_ParChc_t * pPars )
if ( r == nItersMax )
Abc_Print( 1, "The refinement was not finished. The result may be incorrect.\n" );
Cec_ManSimStop( pSim );
- clkTotal = clock() - clkTotal;
+ clkTotal = Abc_Clock() - clkTotal;
// report the results
if ( pPars->fVerbose )
{
diff --git a/src/proof/cec/cecCore.c b/src/proof/cec/cecCore.c
index 40d5fba6..051a5126 100644
--- a/src/proof/cec/cecCore.c
+++ b/src/proof/cec/cecCore.c
@@ -258,14 +258,14 @@ int Cec_ManSimulationOne( Gia_Man_t * pAig, Cec_ParSim_t * pPars )
{
Cec_ManSim_t * pSim;
int RetValue = 0;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
pSim = Cec_ManSimStart( pAig, pPars );
if ( (pAig->pReprs == NULL && (RetValue = Cec_ManSimClassesPrepare( pSim, -1 ))) ||
(RetValue == 0 && (RetValue = Cec_ManSimClassesRefine( pSim ))) )
Abc_Print( 1, "The number of failed outputs of the miter = %6d. (Words = %4d. Frames = %4d.)\n",
pSim->nOuts, pPars->nWords, pPars->nFrames );
if ( pPars->fVerbose )
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
Cec_ManSimStop( pSim );
return RetValue;
}
@@ -344,7 +344,7 @@ Gia_Man_t * Cec_ManSatSweeping( Gia_Man_t * pAig, Cec_ParFra_t * pPars )
Cec_ManSim_t * pSim;
Cec_ManPat_t * pPat;
int i, fTimeOut = 0, nMatches = 0;
- clock_t clk, clk2, clkTotal = clock();
+ abctime clk, clk2, clkTotal = Abc_Clock();
// duplicate AIG and transfer equivalence classes
Gia_ManRandom( 1 );
@@ -374,7 +374,7 @@ Gia_Man_t * Cec_ManSatSweeping( Gia_Man_t * pAig, Cec_ParFra_t * pPars )
pPat->fVerbose = pPars->fVeryVerbose;
// start equivalence classes
-clk = clock();
+clk = Abc_Clock();
if ( p->pAig->pReprs == NULL )
{
if ( Cec_ManSimClassesPrepare(pSim, -1) || Cec_ManSimClassesRefine(pSim) )
@@ -384,11 +384,11 @@ clk = clock();
goto finalize;
}
}
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
// perform solving
for ( i = 1; i <= pPars->nItersMax; i++ )
{
- clk2 = clock();
+ clk2 = Abc_Clock();
nMatches = 0;
if ( pPars->fDualOut )
{
@@ -425,9 +425,9 @@ p->timeSim += clock() - clk;
}
break;
}
-clk = clock();
+clk = Abc_Clock();
Cec_ManSatSolve( pPat, pSrm, pParsSat );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( Cec_ManFraClassesUpdate( p, pSim, pPat, pSrm ) )
{
Gia_ManStop( pSrm );
@@ -449,7 +449,7 @@ p->timeSat += clock() - clk;
{
Abc_Print( 1, "%3d : P =%7d. D =%7d. F =%6d. M = %7d. And =%8d. ",
i, p->nAllProved, p->nAllDisproved, p->nAllFailed, nMatches, Gia_ManAndNum(p->pAig) );
- Abc_PrintTime( 1, "Time", clock() - clk2 );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk2 );
}
if ( Gia_ManAndNum(p->pAig) == 0 )
{
@@ -458,7 +458,7 @@ p->timeSat += clock() - clk;
break;
}
// check resource limits
- if ( p->pPars->TimeLimit && (clock() - clkTotal)/CLOCKS_PER_SEC >= p->pPars->TimeLimit )
+ if ( p->pPars->TimeLimit && (Abc_Clock() - clkTotal)/CLOCKS_PER_SEC >= p->pPars->TimeLimit )
{
fTimeOut = 1;
break;
@@ -509,10 +509,10 @@ finalize:
100.0*(Gia_ManAndNum(pAig)-Gia_ManAndNum(p->pAig))/(Gia_ManAndNum(pAig)?Gia_ManAndNum(pAig):1),
Gia_ManRegNum(pAig), Gia_ManRegNum(p->pAig),
100.0*(Gia_ManRegNum(pAig)-Gia_ManRegNum(p->pAig))/(Gia_ManRegNum(pAig)?Gia_ManRegNum(pAig):1) );
- Abc_PrintTimeP( 1, "Sim ", p->timeSim, clock() - (int)clkTotal );
- Abc_PrintTimeP( 1, "Sat ", p->timeSat-pPat->timeTotalSave, clock() - (int)clkTotal );
- Abc_PrintTimeP( 1, "Pat ", p->timePat+pPat->timeTotalSave, clock() - (int)clkTotal );
- Abc_PrintTime( 1, "Time", (int)(clock() - clkTotal) );
+ Abc_PrintTimeP( 1, "Sim ", p->timeSim, Abc_Clock() - (int)clkTotal );
+ Abc_PrintTimeP( 1, "Sat ", p->timeSat-pPat->timeTotalSave, Abc_Clock() - (int)clkTotal );
+ Abc_PrintTimeP( 1, "Pat ", p->timePat+pPat->timeTotalSave, Abc_Clock() - (int)clkTotal );
+ Abc_PrintTime( 1, "Time", (int)(Abc_Clock() - clkTotal) );
}
pTemp = p->pAig; p->pAig = NULL;
@@ -524,7 +524,7 @@ finalize:
else if ( pSim->pCexes )
Abc_Print( 1, "Disproved %d outputs of the miter.\n", pSim->nOuts );
if ( fTimeOut )
- Abc_Print( 1, "Timed out after %d seconds.\n", (int)((double)clock() - clkTotal)/CLOCKS_PER_SEC );
+ Abc_Print( 1, "Timed out after %d seconds.\n", (int)((double)Abc_Clock() - clkTotal)/CLOCKS_PER_SEC );
pAig->pCexComb = pSim->pCexComb; pSim->pCexComb = NULL;
Cec_ManSimStop( pSim );
diff --git a/src/proof/cec/cecCorr.c b/src/proof/cec/cecCorr.c
index 4ea79935..fac30004 100644
--- a/src/proof/cec/cecCorr.c
+++ b/src/proof/cec/cecCorr.c
@@ -722,7 +722,7 @@ Gia_Man_t * Gia_ManCorrReduce( Gia_Man_t * p )
SeeAlso []
***********************************************************************/
-void Cec_ManRefinedClassPrintStats( Gia_Man_t * p, Vec_Str_t * vStatus, int iIter, clock_t Time )
+void Cec_ManRefinedClassPrintStats( Gia_Man_t * p, Vec_Str_t * vStatus, int iIter, abctime Time )
{
int nLits, CounterX = 0, Counter0 = 0, Counter = 0;
int i, Entry, nProve = 0, nDispr = 0, nFail = 0;
@@ -793,7 +793,7 @@ void Cec_ManLSCorrespondenceBmc( Gia_Man_t * pAig, Cec_ParCor_t * pPars, int nPr
fChanges = 1;
while ( fChanges )
{
- clock_t clkBmc = clock();
+ abctime clkBmc = Abc_Clock();
fChanges = 0;
pSrm = Gia_ManCorrSpecReduceInit( pAig, pPars->nFrames, nPrefs, !pPars->fLatchCorr, &vOutputs, pPars->fUseRings );
if ( Gia_ManPoNum(pSrm) == 0 )
@@ -815,7 +815,7 @@ void Cec_ManLSCorrespondenceBmc( Gia_Man_t * pAig, Cec_ParCor_t * pPars, int nPr
fChanges = 1;
}
if ( pPars->fVerbose )
- Cec_ManRefinedClassPrintStats( pAig, vStatus, -1, clock() - clkBmc );
+ Cec_ManRefinedClassPrintStats( pAig, vStatus, -1, Abc_Clock() - clkBmc );
// recycle
Vec_IntFree( vCexStore );
Vec_StrFree( vStatus );
@@ -919,9 +919,9 @@ int Cec_ManLSCorrespondenceClasses( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
Cec_ManSim_t * pSim;
Gia_Man_t * pSrm;
int r, RetValue;
- clock_t clkTotal = clock();
- clock_t clkSat = 0, clkSim = 0, clkSrm = 0;
- clock_t clk2, clk = clock();
+ abctime clkTotal = Abc_Clock();
+ abctime clkSat = 0, clkSim = 0, clkSrm = 0;
+ abctime clk2, clk = Abc_Clock();
if ( Gia_ManRegNum(pAig) == 0 )
{
Abc_Print( 1, "Cec_ManLatchCorrespondence(): Not a sequential AIG.\n" );
@@ -955,7 +955,7 @@ int Cec_ManLSCorrespondenceClasses( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
Abc_Print( 1, "Obj = %7d. And = %7d. Conf = %5d. Fr = %d. Lcorr = %d. Ring = %d. CSat = %d.\n",
Gia_ManObjNum(pAig), Gia_ManAndNum(pAig),
pPars->nBTLimit, pPars->nFrames, pPars->fLatchCorr, pPars->fUseRings, pPars->fUseCSat );
- Cec_ManRefinedClassPrintStats( pAig, NULL, 0, clock() - clk );
+ Cec_ManRefinedClassPrintStats( pAig, NULL, 0, Abc_Clock() - clk );
}
// check the base case
if ( fRunBmcFirst && (!pPars->fLatchCorr || pPars->nFrames > 1) )
@@ -980,12 +980,12 @@ int Cec_ManLSCorrespondenceClasses( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
Abc_Print( 1, "Stopped signal correspondence after %d refiment iterations.\n", r );
return 1;
}
- clk = clock();
+ clk = Abc_Clock();
// perform speculative reduction
- clk2 = clock();
+ clk2 = Abc_Clock();
pSrm = Gia_ManCorrSpecReduce( pAig, pPars->nFrames, !pPars->fLatchCorr, &vOutputs, pPars->fUseRings );
assert( Gia_ManRegNum(pSrm) == 0 && Gia_ManPiNum(pSrm) == Gia_ManRegNum(pAig)+(pPars->nFrames+!pPars->fLatchCorr)*Gia_ManPiNum(pAig) );
- clkSrm += clock() - clk2;
+ clkSrm += Abc_Clock() - clk2;
if ( Gia_ManCoNum(pSrm) == 0 )
{
Vec_IntFree( vOutputs );
@@ -994,13 +994,13 @@ int Cec_ManLSCorrespondenceClasses( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
}
//Gia_DumpAiger( pSrm, "corrsrm", r, 2 );
// found counter-examples to speculation
- clk2 = clock();
+ clk2 = Abc_Clock();
if ( pPars->fUseCSat )
vCexStore = Cbs_ManSolveMiterNc( pSrm, pPars->nBTLimit, &vStatus, 0 );
else
vCexStore = Cec_ManSatSolveMiter( pSrm, pParsSat, &vStatus );
Gia_ManStop( pSrm );
- clkSat += clock() - clk2;
+ clkSat += Abc_Clock() - clk2;
if ( Vec_IntSize(vCexStore) == 0 )
{
Vec_IntFree( vCexStore );
@@ -1011,13 +1011,13 @@ int Cec_ManLSCorrespondenceClasses( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
// Cec_ManLSCorrAnalyzeDependence( pAig, vOutputs, vStatus );
// refine classes with these counter-examples
- clk2 = clock();
+ clk2 = Abc_Clock();
RetValue = Cec_ManResimulateCounterExamples( pSim, vCexStore, pPars->nFrames + 1 + nAddFrames );
Vec_IntFree( vCexStore );
- clkSim += clock() - clk2;
+ clkSim += Abc_Clock() - clk2;
Gia_ManCheckRefinements( pAig, vStatus, vOutputs, pSim, pPars->fUseRings );
if ( pPars->fVerbose )
- Cec_ManRefinedClassPrintStats( pAig, vStatus, r+1, clock() - clk );
+ Cec_ManRefinedClassPrintStats( pAig, vStatus, r+1, Abc_Clock() - clk );
Vec_StrFree( vStatus );
Vec_IntFree( vOutputs );
//Gia_ManEquivPrintClasses( pAig, 1, 0 );
@@ -1033,7 +1033,7 @@ int Cec_ManLSCorrespondenceClasses( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
}
}
if ( pPars->fVerbose )
- Cec_ManRefinedClassPrintStats( pAig, NULL, r+1, clock() - clk );
+ Cec_ManRefinedClassPrintStats( pAig, NULL, r+1, Abc_Clock() - clk );
// check the overflow
if ( r == nIterMax )
Abc_Print( 1, "The refinement was not finished. The result may be incorrect.\n" );
@@ -1041,7 +1041,7 @@ int Cec_ManLSCorrespondenceClasses( Gia_Man_t * pAig, Cec_ParCor_t * pPars )
// check the base case
if ( !fRunBmcFirst && (!pPars->fLatchCorr || pPars->nFrames > 1) )
Cec_ManLSCorrespondenceBmc( pAig, pPars, 0 );
- clkTotal = clock() - clkTotal;
+ clkTotal = Abc_Clock() - clkTotal;
// report the results
if ( pPars->fVerbose )
{
diff --git a/src/proof/cec/cecInt.h b/src/proof/cec/cecInt.h
index 36ff3483..dd6dc618 100644
--- a/src/proof/cec/cecInt.h
+++ b/src/proof/cec/cecInt.h
@@ -61,13 +61,13 @@ struct Cec_ManPat_t_
int nSeries; // simulation series
int fVerbose; // verbose stats
// runtime statistics
- clock_t timeFind; // detecting the pattern
- clock_t timeShrink; // minimizing the pattern
- clock_t timeVerify; // verifying the result of minimisation
- clock_t timeSort; // sorting literals
- clock_t timePack; // packing into sim info structures
- clock_t timeTotal; // total runtime
- clock_t timeTotalSave; // total runtime for saving
+ abctime timeFind; // detecting the pattern
+ abctime timeShrink; // minimizing the pattern
+ abctime timeVerify; // verifying the result of minimisation
+ abctime timeSort; // sorting literals
+ abctime timePack; // packing into sim info structures
+ abctime timeTotal; // total runtime
+ abctime timeTotalSave; // total runtime for saving
};
// SAT solving manager
@@ -154,10 +154,10 @@ struct Cec_ManFra_t_
int nAllDisproved; // total number of disproved nodes
int nAllFailed; // total number of failed nodes
// runtime stats
- clock_t timeSim; // unsat
- clock_t timePat; // unsat
- clock_t timeSat; // sat
- clock_t timeTotal; // total runtime
+ abctime timeSim; // unsat
+ abctime timePat; // unsat
+ abctime timeSat; // sat
+ abctime timeTotal; // total runtime
};
////////////////////////////////////////////////////////////////////////
@@ -169,7 +169,7 @@ struct Cec_ManFra_t_
////////////////////////////////////////////////////////////////////////
/*=== cecCorr.c ============================================================*/
-extern void Cec_ManRefinedClassPrintStats( Gia_Man_t * p, Vec_Str_t * vStatus, int iIter, clock_t Time );
+extern void Cec_ManRefinedClassPrintStats( Gia_Man_t * p, Vec_Str_t * vStatus, int iIter, abctime Time );
/*=== cecClass.c ============================================================*/
extern int Cec_ManSimClassRemoveOne( Cec_ManSim_t * p, int i );
extern int Cec_ManSimClassesPrepare( Cec_ManSim_t * p, int LevelMax );
diff --git a/src/proof/cec/cecPat.c b/src/proof/cec/cecPat.c
index f372f3bb..c175eaa7 100644
--- a/src/proof/cec/cecPat.c
+++ b/src/proof/cec/cecPat.c
@@ -360,20 +360,20 @@ void Cec_ManPatSavePattern( Cec_ManPat_t * pMan, Cec_ManSat_t * p, Gia_Obj_t *
{
Vec_Int_t * vPat;
int nPatLits;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
assert( Gia_ObjIsCo(pObj) );
pMan->nPats++;
pMan->nPatsAll++;
// compute values in the cone of influence
-clk = clock();
+clk = Abc_Clock();
Gia_ManIncrementTravId( p->pAig );
nPatLits = Cec_ManPatComputePattern_rec( p, p->pAig, Gia_ObjFanin0(pObj) );
assert( (Gia_ObjFanin0(pObj)->fMark1 ^ Gia_ObjFaninC0(pObj)) == 1 );
pMan->nPatLits += nPatLits;
pMan->nPatLitsAll += nPatLits;
-pMan->timeFind += clock() - clk;
+pMan->timeFind += Abc_Clock() - clk;
// compute sensitizing path
-clk = clock();
+clk = Abc_Clock();
Vec_IntClear( pMan->vPattern1 );
Gia_ManIncrementTravId( p->pAig );
Cec_ManPatComputePattern1_rec( p->pAig, Gia_ObjFanin0(pObj), pMan->vPattern1 );
@@ -385,18 +385,18 @@ clk = clock();
vPat = Vec_IntSize(pMan->vPattern1) < Vec_IntSize(pMan->vPattern2) ? pMan->vPattern1 : pMan->vPattern2;
pMan->nPatLitsMin += Vec_IntSize(vPat);
pMan->nPatLitsMinAll += Vec_IntSize(vPat);
-pMan->timeShrink += clock() - clk;
+pMan->timeShrink += Abc_Clock() - clk;
// verify pattern using ternary simulation
-clk = clock();
+clk = Abc_Clock();
Cec_ManPatVerifyPattern( p->pAig, pObj, vPat );
-pMan->timeVerify += clock() - clk;
+pMan->timeVerify += Abc_Clock() - clk;
// sort pattern
-clk = clock();
+clk = Abc_Clock();
Vec_IntSort( vPat, 0 );
-pMan->timeSort += clock() - clk;
+pMan->timeSort += Abc_Clock() - clk;
// save pattern
Cec_ManPatStore( pMan, vPat );
- pMan->timeTotal += clock() - clkTotal;
+ pMan->timeTotal += Abc_Clock() - clkTotal;
}
/**Function*************************************************************
@@ -452,7 +452,7 @@ Vec_Ptr_t * Cec_ManPatCollectPatterns( Cec_ManPat_t * pMan, int nInputs, int nW
int iStartOld = pMan->iStart;
int nWords = nWordsInit;
int nBits = 32 * nWords;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vInfo = Vec_PtrAllocSimInfo( nInputs, nWords );
Gia_ManRandomInfo( vInfo, 0, 0, nWords );
vPres = Vec_PtrAllocSimInfo( nInputs, nWords );
@@ -477,14 +477,14 @@ Vec_Ptr_t * Cec_ManPatCollectPatterns( Cec_ManPat_t * pMan, int nInputs, int nW
}
Vec_PtrFree( vPres );
pMan->nSeries = Vec_PtrReadWordsSimInfo(vInfo) / nWordsInit;
- pMan->timePack += clock() - clk;
- pMan->timeTotal += clock() - clk;
+ pMan->timePack += Abc_Clock() - clk;
+ pMan->timeTotal += Abc_Clock() - clk;
pMan->iStart = iStartOld;
if ( pMan->fVerbose )
{
Abc_Print( 1, "Total = %5d. Max used = %5d. Full = %5d. Series = %d. ",
nPatterns, kMax, nWordsInit*32, pMan->nSeries );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
Cec_ManPatPrintStats( pMan );
}
return vInfo;
diff --git a/src/proof/cec/cecSeq.c b/src/proof/cec/cecSeq.c
index 43bfa99c..f39fb2a4 100644
--- a/src/proof/cec/cecSeq.c
+++ b/src/proof/cec/cecSeq.c
@@ -185,7 +185,7 @@ int Cec_ManSeqResimulateInfo( Gia_Man_t * pAig, Vec_Ptr_t * vSimInfo, Abc_Cex_t
{
Cec_ParSim_t ParsSim, * pParsSim = &ParsSim;
Cec_ManSim_t * pSim;
- int RetValue;//, clkTotal = clock();
+ int RetValue;//, clkTotal = Abc_Clock();
assert( (Vec_PtrSize(vSimInfo) - Gia_ManRegNum(pAig)) % Gia_ManPiNum(pAig) == 0 );
Cec_ManSimSetDefaultParams( pParsSim );
pParsSim->nFrames = (Vec_PtrSize(vSimInfo) - Gia_ManRegNum(pAig)) / Gia_ManPiNum(pAig);
@@ -216,7 +216,7 @@ int Cec_ManSeqResimulateCounter( Gia_Man_t * pAig, Cec_ParSim_t * pPars, Abc_Cex
{
Vec_Ptr_t * vSimInfo;
int RetValue;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
if ( pCex == NULL )
{
Abc_Print( 1, "Cec_ManSeqResimulateCounter(): Counter-example is not available.\n" );
@@ -251,7 +251,7 @@ int Cec_ManSeqResimulateCounter( Gia_Man_t * pAig, Cec_ParSim_t * pPars, Abc_Cex
Gia_ManEquivPrintClasses( pAig, 0, 0 );
Vec_PtrFree( vSimInfo );
if ( pPars->fVerbose )
- ABC_PRT( "Time", clock() - clkTotal );
+ ABC_PRT( "Time", Abc_Clock() - clkTotal );
// if ( RetValue && pPars->fCheckMiter )
// Abc_Print( 1, "Cec_ManSeqResimulateCounter(): An output of the miter is asserted!\n" );
return RetValue;
diff --git a/src/proof/cec/cecSolve.c b/src/proof/cec/cecSolve.c
index d560c37a..c799d17d 100644
--- a/src/proof/cec/cecSolve.c
+++ b/src/proof/cec/cecSolve.c
@@ -472,7 +472,7 @@ int Cec_ManSatCheckNode( Cec_ManSat_t * p, Gia_Obj_t * pObj )
Gia_Obj_t * pObjR = Gia_Regular(pObj);
int nBTLimit = p->pPars->nBTLimit;
int Lit, RetValue, status, nConflicts;
- clock_t clk, clk2;
+ abctime clk, clk2;
if ( pObj == Gia_ManConst0(p->pAig) )
return 1;
@@ -493,14 +493,14 @@ int Cec_ManSatCheckNode( Cec_ManSat_t * p, Gia_Obj_t * pObj )
Cec_ManSatSolverRecycle( p );
// if the nodes do not have SAT variables, allocate them
-clk2 = clock();
+clk2 = Abc_Clock();
Cec_CnfNodeAddToSolver( p, pObjR );
-//ABC_PRT( "cnf", clock() - clk2 );
+//ABC_PRT( "cnf", Abc_Clock() - clk2 );
//Abc_Print( 1, "%d \n", p->pSat->size );
-clk2 = clock();
+clk2 = Abc_Clock();
// Cec_SetActivityFactors( p, pObjR );
-//ABC_PRT( "act", clock() - clk2 );
+//ABC_PRT( "act", Abc_Clock() - clk2 );
// propage unit clauses
if ( p->pSat->qtail != p->pSat->qhead )
@@ -518,17 +518,17 @@ clk2 = clock();
if ( pObjR->fPhase ) Lit = lit_neg( Lit );
}
//Sat_SolverWriteDimacs( p->pSat, "temp.cnf", pLits, pLits + 2, 1 );
-clk = clock();
+clk = Abc_Clock();
nConflicts = p->pSat->stats.conflicts;
-clk2 = clock();
+clk2 = Abc_Clock();
RetValue = sat_solver_solve( p->pSat, &Lit, &Lit + 1,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-//ABC_PRT( "sat", clock() - clk2 );
+//ABC_PRT( "sat", Abc_Clock() - clk2 );
if ( RetValue == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
Lit = lit_neg( Lit );
RetValue = sat_solver_addclause( p->pSat, &Lit, &Lit + 1 );
assert( RetValue );
@@ -539,7 +539,7 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatSat++;
p->nConfSat += p->pSat->stats.conflicts - nConflicts;
//Abc_Print( 1, "SAT after %d conflicts\n", p->pSat->stats.conflicts - nConflicts );
@@ -547,7 +547,7 @@ p->timeSatSat += clock() - clk;
}
else // if ( RetValue == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatUndec++;
p->nConfUndec += p->pSat->stats.conflicts - nConflicts;
//Abc_Print( 1, "UNDEC after %d conflicts\n", p->pSat->stats.conflicts - nConflicts );
@@ -572,7 +572,7 @@ int Cec_ManSatCheckNodeTwo( Cec_ManSat_t * p, Gia_Obj_t * pObj1, Gia_Obj_t * pOb
Gia_Obj_t * pObjR2 = Gia_Regular(pObj2);
int nBTLimit = p->pPars->nBTLimit;
int Lits[2], RetValue, status, nConflicts;
- clock_t clk, clk2;
+ abctime clk, clk2;
if ( pObj1 == Gia_ManConst0(p->pAig) || pObj2 == Gia_ManConst0(p->pAig) || pObj1 == Gia_Not(pObj2) )
return 1;
@@ -593,16 +593,16 @@ int Cec_ManSatCheckNodeTwo( Cec_ManSat_t * p, Gia_Obj_t * pObj1, Gia_Obj_t * pOb
Cec_ManSatSolverRecycle( p );
// if the nodes do not have SAT variables, allocate them
-clk2 = clock();
+clk2 = Abc_Clock();
Cec_CnfNodeAddToSolver( p, pObjR1 );
Cec_CnfNodeAddToSolver( p, pObjR2 );
-//ABC_PRT( "cnf", clock() - clk2 );
+//ABC_PRT( "cnf", Abc_Clock() - clk2 );
//Abc_Print( 1, "%d \n", p->pSat->size );
-clk2 = clock();
+clk2 = Abc_Clock();
// Cec_SetActivityFactors( p, pObjR1 );
// Cec_SetActivityFactors( p, pObjR2 );
-//ABC_PRT( "act", clock() - clk2 );
+//ABC_PRT( "act", Abc_Clock() - clk2 );
// propage unit clauses
if ( p->pSat->qtail != p->pSat->qhead )
@@ -622,17 +622,17 @@ clk2 = clock();
if ( pObjR2->fPhase ) Lits[1] = lit_neg( Lits[1] );
}
//Sat_SolverWriteDimacs( p->pSat, "temp.cnf", pLits, pLits + 2, 1 );
-clk = clock();
+clk = Abc_Clock();
nConflicts = p->pSat->stats.conflicts;
-clk2 = clock();
+clk2 = Abc_Clock();
RetValue = sat_solver_solve( p->pSat, Lits, Lits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-//ABC_PRT( "sat", clock() - clk2 );
+//ABC_PRT( "sat", Abc_Clock() - clk2 );
if ( RetValue == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
Lits[0] = lit_neg( Lits[0] );
Lits[1] = lit_neg( Lits[1] );
RetValue = sat_solver_addclause( p->pSat, Lits, Lits + 2 );
@@ -644,7 +644,7 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatSat++;
p->nConfSat += p->pSat->stats.conflicts - nConflicts;
//Abc_Print( 1, "SAT after %d conflicts\n", p->pSat->stats.conflicts - nConflicts );
@@ -652,7 +652,7 @@ p->timeSatSat += clock() - clk;
}
else // if ( RetValue == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatUndec++;
p->nConfUndec += p->pSat->stats.conflicts - nConflicts;
//Abc_Print( 1, "UNDEC after %d conflicts\n", p->pSat->stats.conflicts - nConflicts );
@@ -679,7 +679,7 @@ void Cec_ManSatSolve( Cec_ManPat_t * pPat, Gia_Man_t * pAig, Cec_ParSat_t * pPar
Cec_ManSat_t * p;
Gia_Obj_t * pObj;
int i, status;
- clock_t clk = clock(), clk2;
+ abctime clk = Abc_Clock(), clk2;
// reset the manager
if ( pPat )
{
@@ -702,7 +702,7 @@ void Cec_ManSatSolve( Cec_ManPat_t * pPat, Gia_Man_t * pAig, Cec_ParSat_t * pPar
continue;
}
Bar_ProgressUpdate( pProgress, i, "SAT..." );
-clk2 = clock();
+clk2 = Abc_Clock();
status = Cec_ManSatCheckNode( p, Gia_ObjChild0(pObj) );
pObj->fMark0 = (status == 0);
pObj->fMark1 = (status == 1);
@@ -720,15 +720,15 @@ clk2 = clock();
// save the pattern
if ( pPat )
{
- clock_t clk3 = clock();
+ abctime clk3 = Abc_Clock();
Cec_ManPatSavePattern( pPat, p, pObj );
- pPat->timeTotalSave += clock() - clk3;
+ pPat->timeTotalSave += Abc_Clock() - clk3;
}
// quit if one of them is solved
if ( pPars->fCheckMiter )
break;
}
- p->timeTotal = clock() - clk;
+ p->timeTotal = Abc_Clock() - clk;
Bar_ProgressStop( pProgress );
if ( pPars->fVerbose )
Cec_ManSatPrintStats( p );
@@ -803,7 +803,7 @@ Vec_Str_t * Cec_ManSatSolveSeq( Vec_Ptr_t * vPatts, Gia_Man_t * pAig, Cec_ParSat
Gia_Obj_t * pObj;
int iPat = 0, nPatsInit, nPats;
int i, status;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
nPatsInit = nPats = 32 * Vec_PtrReadWordsSimInfo(vPatts);
Gia_ManSetPhase( pAig );
Gia_ManLevelNum( pAig );
@@ -857,7 +857,7 @@ Vec_Str_t * Cec_ManSatSolveSeq( Vec_Ptr_t * vPatts, Gia_Man_t * pAig, Cec_ParSat
// if ( iPat == 32 * 15 * 16 - 1 )
// break;
}
- p->timeTotal = clock() - clk;
+ p->timeTotal = Abc_Clock() - clk;
Bar_ProgressStop( pProgress );
if ( pPars->fVerbose )
Cec_ManSatPrintStats( p );
@@ -962,7 +962,7 @@ Vec_Int_t * Cec_ManSatSolveMiter( Gia_Man_t * pAig, Cec_ParSat_t * pPars, Vec_St
Cec_ManSat_t * p;
Gia_Obj_t * pObj;
int i, status;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// prepare AIG
Gia_ManSetPhase( pAig );
Gia_ManLevelNum( pAig );
@@ -1009,7 +1009,7 @@ Vec_Int_t * Cec_ManSatSolveMiter( Gia_Man_t * pAig, Cec_ParSat_t * pPars, Vec_St
// Gia_SatVerifyPattern( pAig, pObj, p->vCex, p->vVisits );
Cec_ManSatAddToStore( vCexStore, p->vCex, i );
}
- p->timeTotal = clock() - clk;
+ p->timeTotal = Abc_Clock() - clk;
Bar_ProgressStop( pProgress );
// if ( pPars->fVerbose )
// Cec_ManSatPrintStats( p );
diff --git a/src/proof/cec/cecSweep.c b/src/proof/cec/cecSweep.c
index 9ba2e07e..977ff3a8 100644
--- a/src/proof/cec/cecSweep.c
+++ b/src/proof/cec/cecSweep.c
@@ -190,11 +190,11 @@ int Cec_ManFraClassesUpdate( Cec_ManFra_t * p, Cec_ManSim_t * pSim, Cec_ManPat_t
Vec_Ptr_t * vInfo;
Gia_Obj_t * pObj, * pObjOld, * pReprOld;
int i, k, iRepr, iNode;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
vInfo = Cec_ManPatCollectPatterns( pPat, Gia_ManCiNum(p->pAig), pSim->nWords );
-p->timePat += clock() - clk;
-clk = clock();
+p->timePat += Abc_Clock() - clk;
+clk = Abc_Clock();
if ( vInfo != NULL )
{
Gia_ManCreateValueRefs( p->pAig );
@@ -209,7 +209,7 @@ clk = clock();
}
Vec_PtrFree( vInfo );
}
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
assert( Vec_IntSize(p->vXorNodes) == 2*Gia_ManCoNum(pNew) );
// mark the transitive fanout of failed nodes
if ( p->pPars->nDepthMax != 1 )
diff --git a/src/proof/cec/cecSynth.c b/src/proof/cec/cecSynth.c
index 6ab88cbe..c00723bc 100644
--- a/src/proof/cec/cecSynth.c
+++ b/src/proof/cec/cecSynth.c
@@ -298,7 +298,7 @@ int Cec_SequentialSynthesisPart( Gia_Man_t * p, Cec_ParSeq_t * pPars )
int * pMapBack, * pReprs;
int i, nCountPis, nCountRegs;
int nClasses;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// save parameters
if ( fPrintParts )
@@ -367,7 +367,7 @@ int Cec_SequentialSynthesisPart( Gia_Man_t * p, Cec_ParSeq_t * pPars )
ABC_FREE( pReprs );
if ( pPars->fVerbose )
{
- Abc_PrintTime( 1, "Total time", clock() - clk );
+ Abc_PrintTime( 1, "Total time", Abc_Clock() - clk );
}
return 1;
}
diff --git a/src/proof/dch/dch.h b/src/proof/dch/dch.h
index e887ba26..5d644643 100644
--- a/src/proof/dch/dch.h
+++ b/src/proof/dch/dch.h
@@ -55,7 +55,7 @@ struct Dch_Pars_t_
int fLightSynth; // uses lighter version of synthesis
int fSkipRedSupp; // skip choices with redundant support vars
int fVerbose; // verbose stats
- clock_t timeSynth; // synthesis runtime
+ abctime timeSynth; // synthesis runtime
int nNodesAhead; // the lookahead in terms of nodes
int nCallsRecycle; // calls to perform before recycling SAT solver
};
diff --git a/src/proof/dch/dchCore.c b/src/proof/dch/dchCore.c
index b92de8a6..0da65bee 100644
--- a/src/proof/dch/dchCore.c
+++ b/src/proof/dch/dchCore.c
@@ -90,21 +90,21 @@ Aig_Man_t * Dch_ComputeChoices( Aig_Man_t * pAig, Dch_Pars_t * pPars )
{
Dch_Man_t * p;
Aig_Man_t * pResult;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
// reset random numbers
Aig_ManRandom(1);
// start the choicing manager
p = Dch_ManCreate( pAig, pPars );
// compute candidate equivalence classes
-clk = clock();
+clk = Abc_Clock();
p->ppClasses = Dch_CreateCandEquivClasses( pAig, pPars->nWords, pPars->fVerbose );
-p->timeSimInit = clock() - clk;
+p->timeSimInit = Abc_Clock() - clk;
// Dch_ClassesPrint( p->ppClasses, 0 );
p->nLits = Dch_ClassesLitNum( p->ppClasses );
// perform SAT sweeping
Dch_ManSweep( p );
// free memory ahead of time
-p->timeTotal = clock() - clkTotal;
+p->timeTotal = Abc_Clock() - clkTotal;
Dch_ManStop( p );
// create choices
ABC_FREE( pAig->pTable );
@@ -134,21 +134,21 @@ p->timeTotal = clock() - clkTotal;
void Dch_ComputeEquivalences( Aig_Man_t * pAig, Dch_Pars_t * pPars )
{
Dch_Man_t * p;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
// reset random numbers
Aig_ManRandom(1);
// start the choicing manager
p = Dch_ManCreate( pAig, pPars );
// compute candidate equivalence classes
-clk = clock();
+clk = Abc_Clock();
p->ppClasses = Dch_CreateCandEquivClasses( pAig, pPars->nWords, pPars->fVerbose );
-p->timeSimInit = clock() - clk;
+p->timeSimInit = Abc_Clock() - clk;
// Dch_ClassesPrint( p->ppClasses, 0 );
p->nLits = Dch_ClassesLitNum( p->ppClasses );
// perform SAT sweeping
Dch_ManSweep( p );
// free memory ahead of time
-p->timeTotal = clock() - clkTotal;
+p->timeTotal = Abc_Clock() - clkTotal;
Dch_ManStop( p );
}
diff --git a/src/proof/dch/dchInt.h b/src/proof/dch/dchInt.h
index d1dd2c51..7edbc0f9 100644
--- a/src/proof/dch/dchInt.h
+++ b/src/proof/dch/dchInt.h
@@ -84,15 +84,15 @@ struct Dch_Man_t_
int nEquivs; // the number of final equivalences
int nChoices; // the number of final choice nodes
// runtime stats
- clock_t timeSimInit; // simulation and class computation
- clock_t timeSimSat; // simulation of the counter-examples
- clock_t timeSat; // solving SAT
- clock_t timeSatSat; // sat
- clock_t timeSatUnsat; // unsat
- clock_t timeSatUndec; // undecided
- clock_t timeChoice; // choice computation
- clock_t timeOther; // other runtime
- clock_t timeTotal; // total runtime
+ abctime timeSimInit; // simulation and class computation
+ abctime timeSimSat; // simulation of the counter-examples
+ abctime timeSat; // solving SAT
+ abctime timeSatSat; // sat
+ abctime timeSatUnsat; // unsat
+ abctime timeSatUndec; // undecided
+ abctime timeChoice; // choice computation
+ abctime timeOther; // other runtime
+ abctime timeTotal; // total runtime
};
////////////////////////////////////////////////////////////////////////
diff --git a/src/proof/dch/dchSat.c b/src/proof/dch/dchSat.c
index fefd5ce2..9da18564 100644
--- a/src/proof/dch/dchSat.c
+++ b/src/proof/dch/dchSat.c
@@ -46,7 +46,7 @@ int Dch_NodesAreEquiv( Dch_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew )
{
int nBTLimit = p->pPars->nBTLimit;
int pLits[2], RetValue, RetValue1, status;
- clock_t clk;
+ abctime clk;
p->nSatCalls++;
// sanity checks
@@ -85,13 +85,13 @@ int Dch_NodesAreEquiv( Dch_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew )
if ( pNew->fPhase ) pLits[1] = lit_neg( pLits[1] );
}
//Sat_SolverWriteDimacs( p->pSat, "temp.cnf", pLits, pLits + 2, 1 );
-clk = clock();
+clk = Abc_Clock();
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -100,13 +100,13 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatFailsReal++;
return -1;
}
@@ -127,13 +127,13 @@ p->timeSatUndec += clock() - clk;
if ( pOld->fPhase ) pLits[0] = lit_neg( pLits[0] );
if ( pNew->fPhase ) pLits[1] = lit_neg( pLits[1] );
}
-clk = clock();
+clk = Abc_Clock();
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -142,13 +142,13 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatFailsReal++;
return -1;
}
diff --git a/src/proof/dch/dchSimSat.c b/src/proof/dch/dchSimSat.c
index 26de4643..d3dbbe16 100644
--- a/src/proof/dch/dchSimSat.c
+++ b/src/proof/dch/dchSimSat.c
@@ -178,7 +178,7 @@ void Dch_ManResimulateCex( Dch_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pRepr )
{
Aig_Obj_t * pRoot, ** ppClass;
int i, k, nSize, RetValue1, RetValue2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// get the equivalence classes
Dch_ManCollectTfoCands( p, pObj, pRepr );
// resimulate the cone of influence of the solved nodes
@@ -208,7 +208,7 @@ void Dch_ManResimulateCex( Dch_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pRepr )
assert( RetValue1 );
else
assert( RetValue2 );
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -226,7 +226,7 @@ void Dch_ManResimulateCex2( Dch_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pRepr )
{
Aig_Obj_t * pRoot;
int i, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// get the equivalence class
if ( Dch_ObjIsConst1Cand(p->pAigTotal, pObj) )
Dch_ClassesCollectConst1Group( p->ppClasses, pObj, 500, p->vSimRoots );
@@ -248,7 +248,7 @@ void Dch_ManResimulateCex2( Dch_Man_t * p, Aig_Obj_t * pObj, Aig_Obj_t * pRepr )
else
RetValue = Dch_ClassesRefineOneClass( p->ppClasses, pRepr, 0 );
assert( RetValue );
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/proof/fra/fra.h b/src/proof/fra/fra.h
index b1fdb539..391ba482 100644
--- a/src/proof/fra/fra.h
+++ b/src/proof/fra/fra.h
@@ -237,17 +237,17 @@ struct Fra_Man_t_
int nSatCallsRecent;
int nSatCallsSkipped;
// runtime
- clock_t timeSim;
- clock_t timeTrav;
- clock_t timeRwr;
- clock_t timeSat;
- clock_t timeSatUnsat;
- clock_t timeSatSat;
- clock_t timeSatFail;
- clock_t timeRef;
- clock_t timeTotal;
- clock_t time1;
- clock_t time2;
+ abctime timeSim;
+ abctime timeTrav;
+ abctime timeRwr;
+ abctime timeSat;
+ abctime timeSatUnsat;
+ abctime timeSatSat;
+ abctime timeSatFail;
+ abctime timeRef;
+ abctime timeTotal;
+ abctime time1;
+ abctime time2;
};
////////////////////////////////////////////////////////////////////////
diff --git a/src/proof/fra/fraBmc.c b/src/proof/fra/fraBmc.c
index 4b68a79a..cc6bb8c0 100644
--- a/src/proof/fra/fraBmc.c
+++ b/src/proof/fra/fraBmc.c
@@ -312,7 +312,7 @@ void Fra_BmcPerform( Fra_Man_t * p, int nPref, int nDepth )
{
Aig_Obj_t * pObj;
int i, nImpsOld = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( p->pBmc == NULL );
// derive and fraig the frames
p->pBmc = Fra_BmcStart( p->pManAig, nPref, nDepth );
@@ -337,7 +337,7 @@ void Fra_BmcPerform( Fra_Man_t * p, int nPref, int nDepth )
printf( "Original AIG = %d. Init %d frames = %d. Fraig = %d. ",
Aig_ManNodeNum(p->pBmc->pAig), p->pBmc->nFramesAll,
Aig_ManNodeNum(p->pBmc->pAigFrames), Aig_ManNodeNum(p->pBmc->pAigFraig) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
printf( "Before BMC: " );
// Fra_ClassesPrint( p->pCla, 0 );
printf( "Const = %5d. Class = %5d. Lit = %5d. ",
@@ -386,10 +386,10 @@ void Fra_BmcPerformSimple( Aig_Man_t * pAig, int nFrames, int nBTLimit, int fRew
Fra_Man_t * pTemp;
Fra_Bmc_t * pBmc;
Aig_Man_t * pAigTemp;
- clock_t clk;
+ abctime clk;
int iOutput;
// derive and fraig the frames
- clk = clock();
+ clk = Abc_Clock();
pBmc = Fra_BmcStart( pAig, 0, nFrames );
pTemp = Fra_LcrAigPrepare( pAig );
pTemp->pBmc = pBmc;
@@ -402,21 +402,21 @@ void Fra_BmcPerformSimple( Aig_Man_t * pAig, int nFrames, int nBTLimit, int fRew
printf( "Time-frames (%d): PI/PO = %d/%d. Node = %6d. Lev = %5d. ",
nFrames, Aig_ManCiNum(pBmc->pAigFrames), Aig_ManCoNum(pBmc->pAigFrames),
Aig_ManNodeNum(pBmc->pAigFrames), Aig_ManLevelNum(pBmc->pAigFrames) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( fRewrite )
{
- clk = clock();
+ clk = Abc_Clock();
pBmc->pAigFrames = Dar_ManRwsat( pAigTemp = pBmc->pAigFrames, 1, 0 );
Aig_ManStop( pAigTemp );
if ( fVerbose )
{
printf( "Time-frames after rewriting: Node = %6d. Lev = %5d. ",
Aig_ManNodeNum(pBmc->pAigFrames), Aig_ManLevelNum(pBmc->pAigFrames) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
}
- clk = clock();
+ clk = Abc_Clock();
iOutput = Fra_FraigMiterAssertedOutput( pBmc->pAigFrames );
if ( iOutput >= 0 )
pAig->pSeqModel = Abc_CexMakeTriv( Aig_ManRegNum(pAig), Aig_ManCiNum(pAig)-Aig_ManRegNum(pAig), Aig_ManCoNum(pAig)-Aig_ManRegNum(pAig), iOutput );
@@ -437,7 +437,7 @@ void Fra_BmcPerformSimple( Aig_Man_t * pAig, int nFrames, int nBTLimit, int fRew
printf( "Fraiged init frames: Node = %6d. Lev = %5d. ",
pBmc->pAigFraig? Aig_ManNodeNum(pBmc->pAigFraig) : -1,
pBmc->pAigFraig? Aig_ManLevelNum(pBmc->pAigFraig) : -1 );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
Fra_BmcStop( pBmc );
ABC_FREE( pTemp );
diff --git a/src/proof/fra/fraCec.c b/src/proof/fra/fraCec.c
index 3e7addb2..662a1d9e 100644
--- a/src/proof/fra/fraCec.c
+++ b/src/proof/fra/fraCec.c
@@ -54,7 +54,7 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
sat_solver2 * pSat;
Cnf_Dat_t * pCnf;
int status, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_Int_t * vCiIds;
assert( Aig_ManRegNum(pMan) == 0 );
@@ -100,13 +100,13 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
printf( "Created SAT problem with %d variable and %d clauses. ", sat_solver2_nvars(pSat), sat_solver2_nclauses(pSat) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// simplify the problem
- clk = clock();
+ clk = Abc_Clock();
status = sat_solver2_simplify(pSat);
// printf( "Simplified the problem to %d variables and %d clauses. ", sat_solver2_nvars(pSat), sat_solver2_nclauses(pSat) );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
if ( status == 0 )
{
Vec_IntFree( vCiIds );
@@ -116,7 +116,7 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
}
// solve the miter
- clk = clock();
+ clk = Abc_Clock();
if ( fVerbose )
pSat->verbosity = 1;
status = sat_solver2_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
@@ -139,7 +139,7 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
assert( 0 );
// Abc_Print( 1, "The number of conflicts = %6d. ", (int)pSat->stats.conflicts );
- // Abc_PrintTime( 1, "Solving time", clock() - clk );
+ // Abc_PrintTime( 1, "Solving time", Abc_Clock() - clk );
// if the problem is SAT, get the counterexample
if ( status == l_True )
@@ -160,7 +160,7 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
sat_solver * pSat;
Cnf_Dat_t * pCnf;
int status, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_Int_t * vCiIds;
assert( Aig_ManRegNum(pMan) == 0 );
@@ -215,13 +215,13 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
// printf( "Created SAT problem with %d variable and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
- // ABC_PRT( "Time", clock() - clk );
+ // ABC_PRT( "Time", Abc_Clock() - clk );
// simplify the problem
- clk = clock();
+ clk = Abc_Clock();
status = sat_solver_simplify(pSat);
// printf( "Simplified the problem to %d variables and %d clauses. ", sat_solver_nvars(pSat), sat_solver_nclauses(pSat) );
- // ABC_PRT( "Time", clock() - clk );
+ // ABC_PRT( "Time", Abc_Clock() - clk );
if ( status == 0 )
{
Vec_IntFree( vCiIds );
@@ -231,7 +231,7 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
}
// solve the miter
- clk = clock();
+ clk = Abc_Clock();
// if ( fVerbose )
// pSat->verbosity = 1;
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)nInsLimit, (ABC_INT64_T)0, (ABC_INT64_T)0 );
@@ -254,7 +254,7 @@ int Fra_FraigSat( Aig_Man_t * pMan, ABC_INT64_T nConfLimit, ABC_INT64_T nInsLimi
assert( 0 );
// Abc_Print( 1, "The number of conflicts = %6d. ", (int)pSat->stats.conflicts );
- // Abc_PrintTime( 1, "Solving time", clock() - clk );
+ // Abc_PrintTime( 1, "Solving time", Abc_Clock() - clk );
// if the problem is SAT, get the counterexample
if ( status == l_True )
@@ -292,7 +292,7 @@ int Fra_FraigCec( Aig_Man_t ** ppAig, int nConfLimit, int fVerbose )
Fra_Par_t Params, * pParams = &Params;
Aig_Man_t * pAig = *ppAig, * pTemp;
int i, RetValue;
- clock_t clk;
+ abctime clk;
// report the original miter
if ( fVerbose )
@@ -309,24 +309,24 @@ int Fra_FraigCec( Aig_Man_t ** ppAig, int nConfLimit, int fVerbose )
}
// if SAT only, solve without iteration
-clk = clock();
+clk = Abc_Clock();
RetValue = Fra_FraigSat( pAig, (ABC_INT64_T)2*nBTLimitStart, (ABC_INT64_T)0, 0, 0, 0, 1, 0, 0, 0 );
if ( fVerbose )
{
printf( "Initial SAT: Nodes = %6d. ", Aig_ManNodeNum(pAig) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( RetValue >= 0 )
return RetValue;
// duplicate the AIG
-clk = clock();
+clk = Abc_Clock();
pAig = Dar_ManRwsat( pTemp = pAig, 1, 0 );
Aig_ManStop( pTemp );
if ( fVerbose )
{
printf( "Rewriting: Nodes = %6d. ", Aig_ManNodeNum(pAig) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
// perform the loop
@@ -339,13 +339,13 @@ ABC_PRT( "Time", clock() - clk );
{
//printf( "Running fraiging with %d BTnode and %d BTmiter.\n", pParams->nBTLimitNode, pParams->nBTLimitMiter );
// run fraiging
-clk = clock();
+clk = Abc_Clock();
pAig = Fra_FraigPerform( pTemp = pAig, pParams );
Aig_ManStop( pTemp );
if ( fVerbose )
{
printf( "Fraiging (i=%d): Nodes = %6d. ", i+1, Aig_ManNodeNum(pAig) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
// check the miter status
@@ -354,13 +354,13 @@ ABC_PRT( "Time", clock() - clk );
break;
// perform rewriting
-clk = clock();
+clk = Abc_Clock();
pAig = Dar_ManRewriteDefault( pTemp = pAig );
Aig_ManStop( pTemp );
if ( fVerbose )
{
printf( "Rewriting: Nodes = %6d. ", Aig_ManNodeNum(pAig) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
// check the miter status
@@ -377,12 +377,12 @@ ABC_PRT( "Time", clock() - clk );
// if still unsolved try last gasp
if ( RetValue == -1 )
{
-clk = clock();
+clk = Abc_Clock();
RetValue = Fra_FraigSat( pAig, (ABC_INT64_T)nBTLimitLast, (ABC_INT64_T)0, 0, 0, 0, 1, 0, 0, 0 );
if ( fVerbose )
{
printf( "Final SAT: Nodes = %6d. ", Aig_ManNodeNum(pAig) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
@@ -468,7 +468,7 @@ int Fra_FraigCecTop( Aig_Man_t * pMan1, Aig_Man_t * pMan2, int nConfLimit, int n
Aig_Man_t * pTemp;
//Abc_NtkDarCec( pNtk1, pNtk2, fPartition, fVerbose );
int RetValue;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
if ( Aig_ManCiNum(pMan1) != Aig_ManCiNum(pMan1) )
{
@@ -501,17 +501,17 @@ int Fra_FraigCecTop( Aig_Man_t * pMan1, Aig_Man_t * pMan2, int nConfLimit, int n
if ( RetValue == 1 )
{
printf( "Networks are equivalent. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else if ( RetValue == 0 )
{
printf( "Networks are NOT EQUIVALENT. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
else
{
printf( "Networks are UNDECIDED. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
fflush( stdout );
return RetValue;
diff --git a/src/proof/fra/fraClaus.c b/src/proof/fra/fraClaus.c
index c4f50559..cb41dc5e 100644
--- a/src/proof/fra/fraClaus.c
+++ b/src/proof/fra/fraClaus.c
@@ -606,10 +606,10 @@ int Fra_ClausProcessClauses( Clu_Man_t * p, int fRefs )
Aig_Obj_t * pObj;
Dar_Cut_t * pCut;
int Scores[16], uScores, i, k, j, nCuts = 0;
- clock_t clk;
+ abctime clk;
// simulate the AIG
-clk = clock();
+clk = Abc_Clock();
// srand( 0xAABBAABB );
Aig_ManRandom(1);
pSeq = Fra_SmlSimulateSeq( p->pAig, 0, p->nPref + p->nSimFrames, p->nSimWords/p->nSimFrames, 1 );
@@ -621,32 +621,32 @@ clk = clock();
}
if ( p->fVerbose )
{
-ABC_PRT( "Sim-seq", clock() - clk );
+ABC_PRT( "Sim-seq", Abc_Clock() - clk );
}
-clk = clock();
+clk = Abc_Clock();
if ( fRefs )
{
Fra_ClausCollectLatchClauses( p, pSeq );
if ( p->fVerbose )
{
-ABC_PRT( "Lat-cla", clock() - clk );
+ABC_PRT( "Lat-cla", Abc_Clock() - clk );
}
}
// generate cuts for all nodes, assign cost, and find best cuts
-clk = clock();
+clk = Abc_Clock();
pMemCuts = Dar_ManComputeCuts( p->pAig, 10, 0, 1 );
// pManCut = Aig_ComputeCuts( p->pAig, 10, 4, 0, 1 );
if ( p->fVerbose )
{
-ABC_PRT( "Cuts ", clock() - clk );
+ABC_PRT( "Cuts ", Abc_Clock() - clk );
}
// collect sequential info for each cut
-clk = clock();
+clk = Abc_Clock();
Aig_ManForEachNode( p->pAig, pObj, i )
Dar_ObjForEachCut( pObj, pCut, k )
if ( pCut->nLeaves > 1 )
@@ -660,22 +660,22 @@ clk = clock();
}
if ( p->fVerbose )
{
-ABC_PRT( "Infoseq", clock() - clk );
+ABC_PRT( "Infoseq", Abc_Clock() - clk );
}
Fra_SmlStop( pSeq );
// perform combinational simulation
-clk = clock();
+clk = Abc_Clock();
// srand( 0xAABBAABB );
Aig_ManRandom(1);
pComb = Fra_SmlSimulateComb( p->pAig, p->nSimWords + p->nSimWordsPref, 0 );
if ( p->fVerbose )
{
-ABC_PRT( "Sim-cmb", clock() - clk );
+ABC_PRT( "Sim-cmb", Abc_Clock() - clk );
}
// collect combinational info for each cut
-clk = clock();
+clk = Abc_Clock();
Aig_ManForEachNode( p->pAig, pObj, i )
Dar_ObjForEachCut( pObj, pCut, k )
if ( pCut->nLeaves > 1 )
@@ -696,7 +696,7 @@ clk = clock();
// Aig_ManCutStop( pManCut );
if ( p->fVerbose )
{
-ABC_PRT( "Infocmb", clock() - clk );
+ABC_PRT( "Infocmb", Abc_Clock() - clk );
}
if ( p->fVerbose )
@@ -729,12 +729,12 @@ int Fra_ClausProcessClauses2( Clu_Man_t * p, int fRefs )
Aig_Obj_t * pObj;
Aig_Cut_t * pCut;
int i, k, j, nCuts = 0;
- clock_t clk;
+ abctime clk;
int ScoresSeq[1<<12], ScoresComb[1<<12];
assert( p->nLutSize < 13 );
// simulate the AIG
-clk = clock();
+clk = Abc_Clock();
// srand( 0xAABBAABB );
Aig_ManRandom(1);
pSeq = Fra_SmlSimulateSeq( p->pAig, 0, p->nPref + p->nSimFrames, p->nSimWords/p->nSimFrames, 1 );
@@ -746,42 +746,42 @@ clk = clock();
}
if ( p->fVerbose )
{
-//ABC_PRT( "Sim-seq", clock() - clk );
+//ABC_PRT( "Sim-seq", Abc_Clock() - clk );
}
// perform combinational simulation
-clk = clock();
+clk = Abc_Clock();
// srand( 0xAABBAABB );
Aig_ManRandom(1);
pComb = Fra_SmlSimulateComb( p->pAig, p->nSimWords + p->nSimWordsPref, 0 );
if ( p->fVerbose )
{
-//ABC_PRT( "Sim-cmb", clock() - clk );
+//ABC_PRT( "Sim-cmb", Abc_Clock() - clk );
}
-clk = clock();
+clk = Abc_Clock();
if ( fRefs )
{
Fra_ClausCollectLatchClauses( p, pSeq );
if ( p->fVerbose )
{
-//ABC_PRT( "Lat-cla", clock() - clk );
+//ABC_PRT( "Lat-cla", Abc_Clock() - clk );
}
}
// generate cuts for all nodes, assign cost, and find best cuts
-clk = clock();
+clk = Abc_Clock();
// pMemCuts = Dar_ManComputeCuts( p->pAig, 10, 0, 1 );
pManCut = Aig_ComputeCuts( p->pAig, p->nCutsMax, p->nLutSize, 0, p->fVerbose );
if ( p->fVerbose )
{
-//ABC_PRT( "Cuts ", clock() - clk );
+//ABC_PRT( "Cuts ", Abc_Clock() - clk );
}
// collect combinational info for each cut
-clk = clock();
+clk = Abc_Clock();
Aig_ManForEachNode( p->pAig, pObj, i )
{
if ( pObj->Level > (unsigned)p->nLevels )
@@ -810,7 +810,7 @@ clk = clock();
{
printf( "Node = %5d. Cuts = %7d. Clauses = %6d. Clause/cut = %6.2f.\n",
Aig_ManNodeNum(p->pAig), nCuts, Vec_IntSize(p->vClauses), 1.0*Vec_IntSize(p->vClauses)/nCuts );
- ABC_PRT( "Processing sim-info to find candidate clauses (unoptimized)", clock() - clk );
+ ABC_PRT( "Processing sim-info to find candidate clauses (unoptimized)", Abc_Clock() - clk );
}
// filter out clauses that are contained in the already proven clauses
@@ -1624,7 +1624,7 @@ void Fra_ClausEstimateCoverage( Clu_Man_t * p )
unsigned * pResultTot, * pResultOne;
int nCovered, Beg, End, i, w;
int * pStart, * pVar2Id;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// simulate the circuit with nCombSimWords * 32 = 64K patterns
// srand( 0xAABBAABB );
Aig_ManRandom(1);
@@ -1664,7 +1664,7 @@ void Fra_ClausEstimateCoverage( Clu_Man_t * p )
// print the result
printf( "Care states ratio = %f. ", 1.0 * (nCombSimWords * 32 - nCovered) / (nCombSimWords * 32) );
printf( "(%d out of %d patterns) ", nCombSimWords * 32 - nCovered, nCombSimWords * 32 );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
@@ -1682,7 +1682,7 @@ void Fra_ClausEstimateCoverage( Clu_Man_t * p )
int Fra_Claus( Aig_Man_t * pAig, int nFrames, int nPref, int nClausesMax, int nLutSize, int nLevels, int nCutsMax, int nBatches, int fStepUp, int fBmc, int fRefs, int fTarget, int fVerbose, int fVeryVerbose )
{
Clu_Man_t * p;
- clock_t clk, clkTotal = clock(), clkInd;
+ abctime clk, clkTotal = Abc_Clock(), clkInd;
int b, Iter, Counter, nPrefOld;
int nClausesBeg = 0;
@@ -1692,12 +1692,12 @@ if ( p->fVerbose )
{
printf( "PARAMETERS: Frames = %d. Pref = %d. Clauses max = %d. Cut size = %d.\n", nFrames, nPref, nClausesMax, nLutSize );
printf( "Level max = %d. Cuts max = %d. Batches = %d. Increment cut size = %s.\n", nLevels, nCutsMax, nBatches, fStepUp? "yes":"no" );
-//ABC_PRT( "Sim-seq", clock() - clk );
+//ABC_PRT( "Sim-seq", Abc_Clock() - clk );
}
assert( !p->fTarget || Aig_ManCoNum(pAig) - Aig_ManRegNum(pAig) == 1 );
-clk = clock();
+clk = Abc_Clock();
// derive CNF
// if ( p->fTarget )
// p->pAig->nRegs++;
@@ -1706,11 +1706,11 @@ clk = clock();
// p->pAig->nRegs--;
if ( fVerbose )
{
-//ABC_PRT( "CNF ", clock() - clk );
+//ABC_PRT( "CNF ", Abc_Clock() - clk );
}
// check BMC
-clk = clock();
+clk = Abc_Clock();
p->pSatBmc = (sat_solver *)Cnf_DataWriteIntoSolver( p->pCnf, p->nPref + p->nFrames, 1 );
if ( p->pSatBmc == NULL )
{
@@ -1726,11 +1726,11 @@ clk = clock();
}
if ( fVerbose )
{
-//ABC_PRT( "SAT-bmc", clock() - clk );
+//ABC_PRT( "SAT-bmc", Abc_Clock() - clk );
}
// start the SAT solver
-clk = clock();
+clk = Abc_Clock();
p->pSatMain = (sat_solver *)Cnf_DataWriteIntoSolver( p->pCnf, p->nFrames+1, 0 );
if ( p->pSatMain == NULL )
{
@@ -1757,11 +1757,11 @@ clk = clock();
}
if ( fVerbose )
{
-// ABC_PRT( "SAT-ind", clock() - clk );
+// ABC_PRT( "SAT-ind", Abc_Clock() - clk );
}
// collect the candidate inductive clauses using 4-cuts
- clk = clock();
+ clk = Abc_Clock();
nPrefOld = p->nPref; p->nPref = 0; p->nSimWordsPref = 0;
// Fra_ClausProcessClauses( p, fRefs );
Fra_ClausProcessClauses2( p, fRefs );
@@ -1769,25 +1769,25 @@ clk = clock();
p->nSimWordsPref = p->nPref*p->nSimWords/p->nSimFrames;
nClausesBeg = p->nClauses;
- //ABC_PRT( "Clauses", clock() - clk );
+ //ABC_PRT( "Clauses", Abc_Clock() - clk );
// check clauses using BMC
if ( fBmc )
{
- clk = clock();
+ clk = Abc_Clock();
Counter = Fra_ClausBmcClauses( p );
p->nClauses -= Counter;
if ( fVerbose )
{
printf( "BMC disproved %d clauses. ", Counter );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
}
// prove clauses inductively
- clkInd = clk = clock();
+ clkInd = clk = Abc_Clock();
Counter = 1;
for ( Iter = 0; Counter > 0; Iter++ )
{
@@ -1800,9 +1800,9 @@ clk = clock();
{
printf( "End = %5d. Exs = %5d. ", p->nClauses, p->nCexes );
// printf( "\n" );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
- clk = clock();
+ clk = Abc_Clock();
}
// add proved clauses to storage
Fra_ClausAddToStorage( p );
@@ -1815,14 +1815,14 @@ clk = clock();
printf( "Property FAILS during refinement. " );
else
printf( "Property HOLDS inductively after strengthening. " );
- ABC_PRT( "Time ", clock() - clkTotal );
+ ABC_PRT( "Time ", Abc_Clock() - clkTotal );
if ( !p->fFail )
break;
}
else
{
printf( "Finished proving inductive clauses. " );
- ABC_PRT( "Time ", clock() - clkTotal );
+ ABC_PRT( "Time ", Abc_Clock() - clkTotal );
}
}
@@ -1857,8 +1857,8 @@ clk = clock();
fprintf( pTable, "%d ", p->nClauses );
fprintf( pTable, "%d ", Iter );
fprintf( pTable, "%.2f ", (float)(clkInd-clkTotal)/(float)(CLOCKS_PER_SEC) );
- fprintf( pTable, "%.2f ", (float)(clock()-clkInd)/(float)(CLOCKS_PER_SEC) );
- fprintf( pTable, "%.2f ", (float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC) );
+ fprintf( pTable, "%.2f ", (float)(Abc_Clock()-clkInd)/(float)(CLOCKS_PER_SEC) );
+ fprintf( pTable, "%.2f ", (float)(Abc_Clock()-clkTotal)/(float)(CLOCKS_PER_SEC) );
fprintf( pTable, "\n" );
fclose( pTable );
}
diff --git a/src/proof/fra/fraCore.c b/src/proof/fra/fraCore.c
index 35888f43..1e517e7d 100644
--- a/src/proof/fra/fraCore.c
+++ b/src/proof/fra/fraCore.c
@@ -376,10 +376,10 @@ Aig_Man_t * Fra_FraigPerform( Aig_Man_t * pManAig, Fra_Par_t * pPars )
{
Fra_Man_t * p;
Aig_Man_t * pManAigNew;
- clock_t clk;
+ abctime clk;
if ( Aig_ManNodeNum(pManAig) == 0 )
return Aig_ManDupOrdered(pManAig);
-clk = clock();
+clk = Abc_Clock();
p = Fra_ManStart( pManAig, pPars );
p->pManFraig = Fra_ManPrepareComb( p );
p->pSml = Fra_SmlStart( pManAig, 0, 1, pPars->nSimWords );
@@ -402,7 +402,7 @@ Fra_ClassesPrint( p->pCla, 1 );
Fra_ManFinalizeComb( p );
if ( p->pPars->fChoicing )
{
-clock_t clk2 = clock();
+abctime clk2 = Abc_Clock();
Fra_ClassesCopyReprs( p->pCla, p->vTimeouts );
pManAigNew = Aig_ManDupRepr( p->pManAig, 1 );
Aig_ManReprStart( pManAigNew, Aig_ManObjNumMax(pManAigNew) );
@@ -410,7 +410,7 @@ clock_t clk2 = clock();
Aig_ManMarkValidChoices( pManAigNew );
Aig_ManStop( p->pManFraig );
p->pManFraig = NULL;
-p->timeTrav += clock() - clk2;
+p->timeTrav += Abc_Clock() - clk2;
}
else
{
@@ -419,7 +419,7 @@ p->timeTrav += clock() - clk2;
pManAigNew = p->pManFraig;
p->pManFraig = NULL;
}
-p->timeTotal = clock() - clk;
+p->timeTotal = Abc_Clock() - clk;
// collect final stats
p->nLitsEnd = Fra_ClassesCountLits( p->pCla );
p->nNodesEnd = Aig_ManNodeNum(pManAigNew);
diff --git a/src/proof/fra/fraHot.c b/src/proof/fra/fraHot.c
index a91c939f..36bea9e7 100644
--- a/src/proof/fra/fraHot.c
+++ b/src/proof/fra/fraHot.c
@@ -332,7 +332,7 @@ void Fra_OneHotEstimateCoverage( Fra_Man_t * p, Vec_Int_t * vOneHots )
Vec_Ptr_t * vSimInfo;
unsigned * pSim1, * pSim2, * pSimTot;
int i, w, Out1, Out2, nCovered, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// generate random sim-info at register outputs
vSimInfo = Vec_PtrAllocSimInfo( nRegs + 1, nSimWords );
@@ -381,7 +381,7 @@ void Fra_OneHotEstimateCoverage( Fra_Man_t * p, Vec_Int_t * vOneHots )
// print the result
printf( "Care states ratio = %f. ", 1.0 * (nSimWords * 32 - nCovered) / (nSimWords * 32) );
printf( "(%d out of %d patterns) ", nSimWords * 32 - nCovered, nSimWords * 32 );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
diff --git a/src/proof/fra/fraImp.c b/src/proof/fra/fraImp.c
index 809ad8e4..027d8eb2 100644
--- a/src/proof/fra/fraImp.c
+++ b/src/proof/fra/fraImp.c
@@ -328,7 +328,7 @@ Vec_Int_t * Fra_ImpDerive( Fra_Man_t * p, int nImpMaxLimit, int nImpUseLimit, in
int nImpsTotal = 0, nImpsTried = 0, nImpsNonSeq = 0, nImpsComb = 0, nImpsCollected = 0;
int CostMin = ABC_INFINITY, CostMax = 0;
int i, k, Imp, CostRange;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Aig_ManObjNumMax(p->pManAig) < (1 << 15) );
assert( nImpMaxLimit > 0 && nImpUseLimit > 0 && nImpUseLimit <= nImpMaxLimit );
// normalize both managers
@@ -403,7 +403,7 @@ printf( "Implications: All = %d. Try = %d. NonSeq = %d. Comb = %d. Res = %d.\n",
nImpsTotal, nImpsTried, nImpsNonSeq, nImpsComb, nImpsCollected );
printf( "Implication weight: Min = %d. Pivot = %d. Max = %d. ",
CostMin, CostRange, CostMax );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
return vImps;
}
diff --git a/src/proof/fra/fraInd.c b/src/proof/fra/fraInd.c
index e0a54a4e..012f8fc8 100644
--- a/src/proof/fra/fraInd.c
+++ b/src/proof/fra/fraInd.c
@@ -50,7 +50,7 @@ void Fra_FraigInductionRewrite( Fra_Man_t * p )
Aig_Man_t * pTemp;
Aig_Obj_t * pObj, * pObjPo;
int nTruePis, k, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// perform AIG rewriting on the speculated frames
// pTemp = Dar_ManRwsat( pTemp, 1, 0 );
pTemp = Dar_ManRewriteDefault( p->pManFraig );
@@ -77,7 +77,7 @@ void Fra_FraigInductionRewrite( Fra_Man_t * p )
// exchange
Aig_ManStop( p->pManFraig );
p->pManFraig = pTemp;
-p->timeRwr += clock() - clk;
+p->timeRwr += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -260,7 +260,7 @@ Aig_Man_t * Fra_FraigInductionPart( Aig_Man_t * pAig, Fra_Ssw_t * pPars )
int * pMapBack;
int i, nCountPis, nCountRegs;
int nClasses, nPartSize, fVerbose;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// save parameters
nPartSize = pPars->nPartSize; pPars->nPartSize = 0;
@@ -325,7 +325,7 @@ Aig_Man_t * Fra_FraigInductionPart( Aig_Man_t * pAig, Fra_Ssw_t * pPars )
pPars->fVerbose = fVerbose;
if ( fVerbose )
{
- ABC_PRT( "Total time", clock() - clk );
+ ABC_PRT( "Total time", Abc_Clock() - clk );
}
return pNew;
}
@@ -359,8 +359,8 @@ Aig_Man_t * Fra_FraigInduction( Aig_Man_t * pManAig, Fra_Ssw_t * pParams )
int nNodesBeg, nRegsBeg;
int nIter = -1; // Suppress "might be used uninitialized"
int i;
- clock_t clk = clock(), clk2;
- clock_t TimeToStop = pParams->TimeLimit ? pParams->TimeLimit * CLOCKS_PER_SEC + clock() : 0;
+ abctime clk = Abc_Clock(), clk2;
+ abctime TimeToStop = pParams->TimeLimit ? pParams->TimeLimit * CLOCKS_PER_SEC + Abc_Clock() : 0;
if ( Aig_ManNodeNum(pManAig) == 0 )
{
@@ -429,7 +429,7 @@ printf( "Simulating %d AIG nodes for %d cycles ... ", Aig_ManNodeNum(pManAig), p
p->pSml = Fra_SmlSimulateSeq( pManAig, pPars->nFramesP, 32, 1, 1 ); //pPars->nFramesK + 1, 1 );
if ( pPars->fVerbose )
{
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
Fra_ClassesPrepare( p->pCla, p->pPars->fLatchCorr, p->pPars->nMaxLevs );
// Fra_ClassesPostprocess( p->pCla );
@@ -445,7 +445,7 @@ ABC_PRT( "Time", clock() - clk );
if ( pPars->fUseImps )
p->pCla->vImps = Fra_ImpDerive( p, 5000000, pPars->nMaxImps, pPars->fLatchCorr );
- if ( pParams->TimeLimit != 0.0 && clock() > TimeToStop )
+ if ( pParams->TimeLimit != 0.0 && Abc_Clock() > TimeToStop )
{
if ( !pParams->fSilent )
printf( "Fra_FraigInduction(): Runtime limit exceeded.\n" );
@@ -475,9 +475,9 @@ ABC_PRT( "Time", clock() - clk );
int nLitsOld = Fra_ClassesCountLits(p->pCla);
int nImpsOld = p->pCla->vImps? Vec_IntSize(p->pCla->vImps) : 0;
int nHotsOld = p->vOneHots? Fra_OneHotCount(p, p->vOneHots) : 0;
- clock_t clk3 = clock();
+ abctime clk3 = Abc_Clock();
- if ( pParams->TimeLimit != 0.0 && clock() > TimeToStop )
+ if ( pParams->TimeLimit != 0.0 && Abc_Clock() > TimeToStop )
{
if ( !pParams->fSilent )
printf( "Fra_FraigInduction(): Runtime limit exceeded.\n" );
@@ -487,9 +487,9 @@ ABC_PRT( "Time", clock() - clk );
// mark the classes as non-refined
p->pCla->fRefinement = 0;
// derive non-init K-timeframes while implementing e-classes
-clk2 = clock();
+clk2 = Abc_Clock();
p->pManFraig = Fra_FramesWithClasses( p );
-p->timeTrav += clock() - clk2;
+p->timeTrav += Abc_Clock() - clk2;
//Aig_ManDumpBlif( p->pManFraig, "testaig.blif", NULL, NULL );
// perform AIG rewriting
@@ -556,13 +556,13 @@ p->timeTrav += clock() - clk2;
// perform sweeping
p->nSatCallsRecent = 0;
p->nSatCallsSkipped = 0;
-clk2 = clock();
+clk2 = Abc_Clock();
if ( p->pPars->fUse1Hot )
Fra_OneHotCheck( p, p->vOneHots );
Fra_FraigSweep( p );
if ( pPars->fVerbose )
{
- ABC_PRT( "T", clock() - clk3 );
+ ABC_PRT( "T", Abc_Clock() - clk3 );
}
// Sat_SolverPrintStats( stdout, p->pSat );
@@ -591,17 +591,17 @@ clk2 = clock();
if ( p->pCla->vImps && Vec_IntSize(p->pCla->vImps) )
{
int Temp;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( Temp = Fra_ImpVerifyUsingSimulation( p ) )
printf( "Implications failing the simulation test = %d (out of %d). ", Temp, Vec_IntSize(p->pCla->vImps) );
else
printf( "All %d implications have passed the simulation test. ", Vec_IntSize(p->pCla->vImps) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
*/
// move the classes into representatives and reduce AIG
-clk2 = clock();
+clk2 = Abc_Clock();
if ( p->pPars->fWriteImps && p->vOneHots && Fra_OneHotCount(p, p->vOneHots) )
{
extern void Ioa_WriteAiger( Aig_Man_t * pMan, char * pFileName, int fWriteSymbols, int fCompact );
@@ -630,8 +630,8 @@ clk2 = clock();
// if ( pObj->pData && Aig_ObjIsNone(pObj->pData) )
// pObj->pData = NULL;
// Aig_ManCountMergeRegs( pManAigNew );
-p->timeTrav += clock() - clk2;
-p->timeTotal = clock() - clk;
+p->timeTrav += Abc_Clock() - clk2;
+p->timeTotal = Abc_Clock() - clk;
// get the final stats
p->nLitsEnd = Fra_ClassesCountLits( p->pCla );
p->nNodesEnd = Aig_ManNodeNum(pManAigNew);
diff --git a/src/proof/fra/fraIndVer.c b/src/proof/fra/fraIndVer.c
index 26b64647..a219ec52 100644
--- a/src/proof/fra/fraIndVer.c
+++ b/src/proof/fra/fraIndVer.c
@@ -50,7 +50,7 @@ int Fra_InvariantVerify( Aig_Man_t * pAig, int nFrames, Vec_Int_t * vClauses, Ve
int * pStart;
int RetValue, Beg, End, i, k;
int CounterBase = 0, CounterInd = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( nFrames != 1 )
{
@@ -153,7 +153,7 @@ int Fra_InvariantVerify( Aig_Man_t * pAig, int nFrames, Vec_Int_t * vClauses, Ve
if ( CounterBase || CounterInd )
return 0;
printf( "Invariant verification: %d clauses verified correctly. ", Vec_IntSize(vClauses) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
return 1;
}
diff --git a/src/proof/fra/fraLcr.c b/src/proof/fra/fraLcr.c
index 9d573bee..2d8b3d64 100644
--- a/src/proof/fra/fraLcr.c
+++ b/src/proof/fra/fraLcr.c
@@ -54,12 +54,12 @@ struct Fra_Lcr_t_
int nRegsBeg;
int nRegsEnd;
// runtime
- clock_t timeSim;
- clock_t timePart;
- clock_t timeTrav;
- clock_t timeFraig;
- clock_t timeUpdate;
- clock_t timeTotal;
+ abctime timeSim;
+ abctime timePart;
+ abctime timeTrav;
+ abctime timeFraig;
+ abctime timeUpdate;
+ abctime timeTotal;
};
////////////////////////////////////////////////////////////////////////
@@ -538,8 +538,8 @@ Aig_Man_t * Fra_FraigLatchCorrespondence( Aig_Man_t * pAig, int nFramesP, int nC
Aig_Man_t * pAigPart, * pAigTemp, * pAigNew = NULL;
Vec_Int_t * vPart;
int i, nIter;
- clock_t timeSim, clk2, clk3, clk = clock();
- clock_t TimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + clock() : 0;
+ abctime timeSim, clk2, clk3, clk = Abc_Clock();
+ abctime TimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + Abc_Clock() : 0;
if ( Aig_ManNodeNum(pAig) == 0 )
{
if ( pnIter ) *pnIter = 0;
@@ -550,15 +550,15 @@ Aig_Man_t * Fra_FraigLatchCorrespondence( Aig_Man_t * pAig, int nFramesP, int nC
assert( Aig_ManRegNum(pAig) > 0 );
// simulate the AIG
-clk2 = clock();
+clk2 = Abc_Clock();
if ( fVerbose )
printf( "Simulating AIG with %d nodes for %d cycles ... ", Aig_ManNodeNum(pAig), nFramesP + 32 );
pSml = Fra_SmlSimulateSeq( pAig, nFramesP, 32, 1, 1 );
if ( fVerbose )
{
-ABC_PRT( "Time", clock() - clk2 );
+ABC_PRT( "Time", Abc_Clock() - clk2 );
}
-timeSim = clock() - clk2;
+timeSim = Abc_Clock() - clk2;
// check if simulation discovered non-constant-0 POs
if ( fProve && pSml->fNonConstOut )
@@ -586,7 +586,7 @@ timeSim = clock() - clk2;
Fra_SmlStop( pTemp->pSml );
// partition the AIG for latch correspondence computation
-clk2 = clock();
+clk2 = Abc_Clock();
if ( fVerbose )
printf( "Partitioning AIG ... " );
pAigPart = Fra_LcrDeriveAigForPartitioning( p );
@@ -595,8 +595,8 @@ printf( "Partitioning AIG ... " );
Aig_ManStop( pAigPart );
if ( fVerbose )
{
-ABC_PRT( "Time", clock() - clk2 );
-p->timePart += clock() - clk2;
+ABC_PRT( "Time", Abc_Clock() - clk2 );
+p->timePart += Abc_Clock() - clk2;
}
// get the initial stats
@@ -609,13 +609,13 @@ p->timePart += clock() - clk2;
for ( nIter = 0; p->fRefining; nIter++ )
{
p->fRefining = 0;
- clk3 = clock();
+ clk3 = Abc_Clock();
// derive AIGs for each partition
Fra_ClassNodesMark( p );
Vec_PtrClear( p->vFraigs );
Vec_PtrForEachEntry( Vec_Int_t *, p->vParts, vPart, i )
{
- if ( TimeLimit != 0.0 && clock() > TimeToStop )
+ if ( TimeLimit != 0.0 && Abc_Clock() > TimeToStop )
{
Vec_PtrForEachEntry( Aig_Man_t *, p->vFraigs, pAigPart, i )
Aig_ManStop( pAigPart );
@@ -624,12 +624,12 @@ p->timePart += clock() - clk2;
printf( "Fra_FraigLatchCorrespondence(): Runtime limit exceeded.\n" );
goto finish;
}
-clk2 = clock();
+clk2 = Abc_Clock();
pAigPart = Fra_LcrCreatePart( p, vPart );
-p->timeTrav += clock() - clk2;
-clk2 = clock();
+p->timeTrav += Abc_Clock() - clk2;
+clk2 = Abc_Clock();
pAigTemp = Fra_FraigEquivence( pAigPart, nConfMax, 0 );
-p->timeFraig += clock() - clk2;
+p->timeFraig += Abc_Clock() - clk2;
Vec_PtrPush( p->vFraigs, pAigTemp );
/*
{
@@ -638,7 +638,7 @@ p->timeFraig += clock() - clk2;
Aig_ManDumpBlif( pAigPart, Name, NULL, NULL );
}
printf( "Finished part %4d (out of %4d). ", i, Vec_PtrSize(p->vParts) );
-ABC_PRT( "Time", clock() - clk3 );
+ABC_PRT( "Time", Abc_Clock() - clk3 );
*/
Aig_ManStop( pAigPart );
@@ -650,7 +650,7 @@ ABC_PRT( "Time", clock() - clk3 );
printf( "%3d : Const = %6d. Class = %6d. L = %6d. Part = %3d. ",
nIter, Vec_PtrSize(p->pCla->vClasses1), Vec_PtrSize(p->pCla->vClasses),
Fra_ClassesCountLits(p->pCla), Vec_PtrSize(p->vParts) );
- ABC_PRT( "T", clock() - clk3 );
+ ABC_PRT( "T", Abc_Clock() - clk3 );
}
// refine the classes
Fra_LcrAigPrepareTwo( p->pAig, pTemp );
@@ -665,19 +665,19 @@ ABC_PRT( "Time", clock() - clk3 );
// repartition if needed
if ( 1 )
{
-clk2 = clock();
+clk2 = Abc_Clock();
Vec_VecFree( (Vec_Vec_t *)p->vParts );
pAigPart = Fra_LcrDeriveAigForPartitioning( p );
p->vParts = (Vec_Ptr_t *)Aig_ManPartitionSmart( pAigPart, nPartSize, 0, NULL );
Fra_LcrRemapPartitions( p->vParts, p->pCla, p->pInToOutPart, p->pInToOutNum );
Aig_ManStop( pAigPart );
-p->timePart += clock() - clk2;
+p->timePart += Abc_Clock() - clk2;
}
}
p->nIters = nIter;
// move the classes into representatives and reduce AIG
-clk2 = clock();
+clk2 = Abc_Clock();
// Fra_ClassesPrint( p->pCla, 1 );
if ( fReprSelect )
Fra_ClassesSelectRepr( p->pCla );
@@ -685,8 +685,8 @@ clk2 = clock();
pAigNew = Aig_ManDupRepr( p->pAig, 0 );
Aig_ManSeqCleanup( pAigNew );
// Aig_ManCountMergeRegs( pAigNew );
-p->timeUpdate += clock() - clk2;
-p->timeTotal = clock() - clk;
+p->timeUpdate += Abc_Clock() - clk2;
+p->timeTotal = Abc_Clock() - clk;
// get the final stats
p->nLitsEnd = Fra_ClassesCountLits( p->pCla );
p->nNodesEnd = Aig_ManNodeNum(pAigNew);
diff --git a/src/proof/fra/fraPart.c b/src/proof/fra/fraPart.c
index e1c8ddf4..34d6cce2 100644
--- a/src/proof/fra/fraPart.c
+++ b/src/proof/fra/fraPart.c
@@ -53,16 +53,16 @@ void Fra_ManPartitionTest( Aig_Man_t * p, int nComLim )
int i, k, nCommon, CountOver, CountQuant;
int nTotalSupp, nTotalSupp2, Entry, Largest;//, iVar;
double Ratio, R;
- clock_t clk;
+ abctime clk;
nTotalSupp = 0;
nTotalSupp2 = 0;
Ratio = 0.0;
// compute supports
-clk = clock();
+clk = Abc_Clock();
vSupps = (Vec_Vec_t *)Aig_ManSupports( p );
-ABC_PRT( "Supports", clock() - clk );
+ABC_PRT( "Supports", Abc_Clock() - clk );
// remove last entry
Aig_ManForEachCo( p, pObj, i )
{
@@ -73,7 +73,7 @@ ABC_PRT( "Supports", clock() - clk );
}
// create reverse supports
-clk = clock();
+clk = Abc_Clock();
vSuppsIn = Vec_VecStart( Aig_ManCiNum(p) );
Aig_ManForEachCo( p, pObj, i )
{
@@ -81,9 +81,9 @@ clk = clock();
Vec_IntForEachEntry( vSup, Entry, k )
Vec_VecPush( vSuppsIn, Entry, (void *)(ABC_PTRUINT_T)i );
}
-ABC_PRT( "Inverse ", clock() - clk );
+ABC_PRT( "Inverse ", Abc_Clock() - clk );
-clk = clock();
+clk = Abc_Clock();
// compute extended supports
Largest = 0;
vSuppsNew = Vec_PtrAlloc( Aig_ManCoNum(p) );
@@ -156,7 +156,7 @@ clk = clock();
*/
}
// Bar_ProgressStop( pProgress );
-ABC_PRT( "Scanning", clock() - clk );
+ABC_PRT( "Scanning", Abc_Clock() - clk );
// print cumulative statistics
printf( "PIs = %6d. POs = %6d. Lim = %3d. AveS = %3d. SN = %3d. R = %4.2f Max = %5d.\n",
@@ -191,13 +191,13 @@ void Fra_ManPartitionTest2( Aig_Man_t * p )
Aig_Obj_t * pObj;
int Entry, Entry2, Entry3, Counter;
int i, k, m, n;
- clock_t clk;
+ abctime clk;
char * pSupp;
// compute supports
-clk = clock();
+clk = Abc_Clock();
vSupps = (Vec_Vec_t *)Aig_ManSupports( p );
-ABC_PRT( "Supports", clock() - clk );
+ABC_PRT( "Supports", Abc_Clock() - clk );
// remove last entry
Aig_ManForEachCo( p, pObj, i )
{
@@ -208,7 +208,7 @@ ABC_PRT( "Supports", clock() - clk );
}
// create reverse supports
-clk = clock();
+clk = Abc_Clock();
vSuppsIn = Vec_VecStart( Aig_ManCiNum(p) );
Aig_ManForEachCo( p, pObj, i )
{
@@ -218,10 +218,10 @@ clk = clock();
Vec_IntForEachEntry( vSup, Entry, k )
Vec_VecPush( vSuppsIn, Entry, (void *)(ABC_PTRUINT_T)i );
}
-ABC_PRT( "Inverse ", clock() - clk );
+ABC_PRT( "Inverse ", Abc_Clock() - clk );
// create affective supports
-clk = clock();
+clk = Abc_Clock();
pSupp = ABC_ALLOC( char, Aig_ManCiNum(p) );
Aig_ManForEachCo( p, pObj, i )
{
@@ -252,7 +252,7 @@ clk = clock();
printf( "%d(%d) ", Vec_IntSize(vSup), Counter );
}
printf( "\n" );
-ABC_PRT( "Extension ", clock() - clk );
+ABC_PRT( "Extension ", Abc_Clock() - clk );
ABC_FREE( pSupp );
Vec_VecFree( vSupps );
diff --git a/src/proof/fra/fraSat.c b/src/proof/fra/fraSat.c
index fc95fd62..e1e1c57f 100644
--- a/src/proof/fra/fraSat.c
+++ b/src/proof/fra/fraSat.c
@@ -48,7 +48,7 @@ static int Fra_SetActivityFactors( Fra_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t *
int Fra_NodesAreEquiv( Fra_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew )
{
int pLits[4], RetValue, RetValue1, nBTLimit;
- clock_t clk;//, clk2 = clock();
+ abctime clk;//, clk2 = Abc_Clock();
int status;
// make sure the nodes are not complemented
@@ -100,17 +100,17 @@ int Fra_NodesAreEquiv( Fra_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew )
// solve under assumptions
// A = 1; B = 0 OR A = 1; B = 1
-clk = clock();
+clk = Abc_Clock();
pLits[0] = toLitCond( Fra_ObjSatNum(pOld), 0 );
pLits[1] = toLitCond( Fra_ObjSatNum(pNew), pOld->fPhase == pNew->fPhase );
//Sat_SolverWriteDimacs( p->pSat, "temp.cnf", pLits, pLits + 2, 1 );
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0,
p->nBTLimitGlobal, p->nInsLimitGlobal );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -120,14 +120,14 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
Fra_SmlSavePattern( p );
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatFail += clock() - clk;
+p->timeSatFail += Abc_Clock() - clk;
// mark the node as the failed node
if ( pOld != p->pManFraig->pConst1 )
pOld->fMarkB = 1;
@@ -145,16 +145,16 @@ p->timeSatFail += clock() - clk;
// solve under assumptions
// A = 0; B = 1 OR A = 0; B = 0
-clk = clock();
+clk = Abc_Clock();
pLits[0] = toLitCond( Fra_ObjSatNum(pOld), 1 );
pLits[1] = toLitCond( Fra_ObjSatNum(pNew), pOld->fPhase ^ pNew->fPhase );
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0,
p->nBTLimitGlobal, p->nInsLimitGlobal );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -163,14 +163,14 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
Fra_SmlSavePattern( p );
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatFail += clock() - clk;
+p->timeSatFail += Abc_Clock() - clk;
// mark the node as the failed node
pOld->fMarkB = 1;
pNew->fMarkB = 1;
@@ -181,12 +181,12 @@ p->timeSatFail += clock() - clk;
// check BDD proof
{
int RetVal;
- ABC_PRT( "Sat", clock() - clk2 );
- clk2 = clock();
+ ABC_PRT( "Sat", Abc_Clock() - clk2 );
+ clk2 = Abc_Clock();
RetVal = Fra_NodesAreEquivBdd( pOld, pNew );
// printf( "%d ", RetVal );
assert( RetVal );
- ABC_PRT( "Bdd", clock() - clk2 );
+ ABC_PRT( "Bdd", Abc_Clock() - clk2 );
printf( "\n" );
}
*/
@@ -209,7 +209,7 @@ p->timeSatFail += clock() - clk;
int Fra_NodesAreImp( Fra_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew, int fComplL, int fComplR )
{
int pLits[4], RetValue, RetValue1, nBTLimit;
- clock_t clk;//, clk2 = clock();
+ abctime clk;//, clk2 = Abc_Clock();
int status;
// make sure the nodes are not complemented
@@ -261,7 +261,7 @@ int Fra_NodesAreImp( Fra_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew, int fCom
// solve under assumptions
// A = 1; B = 0 OR A = 1; B = 1
-clk = clock();
+clk = Abc_Clock();
// pLits[0] = toLitCond( Fra_ObjSatNum(pOld), 0 );
// pLits[1] = toLitCond( Fra_ObjSatNum(pNew), pOld->fPhase == pNew->fPhase );
pLits[0] = toLitCond( Fra_ObjSatNum(pOld), fComplL );
@@ -270,10 +270,10 @@ clk = clock();
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0,
p->nBTLimitGlobal, p->nInsLimitGlobal );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -283,14 +283,14 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
Fra_SmlSavePattern( p );
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatFail += clock() - clk;
+p->timeSatFail += Abc_Clock() - clk;
// mark the node as the failed node
if ( pOld != p->pManFraig->pConst1 )
pOld->fMarkB = 1;
@@ -317,7 +317,7 @@ p->timeSatFail += clock() - clk;
int Fra_NodesAreClause( Fra_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew, int fComplL, int fComplR )
{
int pLits[4], RetValue, RetValue1, nBTLimit;
- clock_t clk;//, clk2 = clock();
+ abctime clk;//, clk2 = Abc_Clock();
int status;
// make sure the nodes are not complemented
@@ -369,7 +369,7 @@ int Fra_NodesAreClause( Fra_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew, int f
// solve under assumptions
// A = 1; B = 0 OR A = 1; B = 1
-clk = clock();
+clk = Abc_Clock();
// pLits[0] = toLitCond( Fra_ObjSatNum(pOld), 0 );
// pLits[1] = toLitCond( Fra_ObjSatNum(pNew), pOld->fPhase == pNew->fPhase );
pLits[0] = toLitCond( Fra_ObjSatNum(pOld), !fComplL );
@@ -378,10 +378,10 @@ clk = clock();
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 2,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0,
p->nBTLimitGlobal, p->nInsLimitGlobal );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
pLits[1] = lit_neg( pLits[1] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 2 );
@@ -391,14 +391,14 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
Fra_SmlSavePattern( p );
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatFail += clock() - clk;
+p->timeSatFail += Abc_Clock() - clk;
// mark the node as the failed node
if ( pOld != p->pManFraig->pConst1 )
pOld->fMarkB = 1;
@@ -425,7 +425,7 @@ p->timeSatFail += clock() - clk;
int Fra_NodeIsConst( Fra_Man_t * p, Aig_Obj_t * pNew )
{
int pLits[2], RetValue1, RetValue;
- clock_t clk;
+ abctime clk;
// make sure the nodes are not complemented
assert( !Aig_IsComplement(pNew) );
@@ -451,15 +451,15 @@ int Fra_NodeIsConst( Fra_Man_t * p, Aig_Obj_t * pNew )
Fra_SetActivityFactors( p, NULL, pNew );
// solve under assumptions
-clk = clock();
+clk = Abc_Clock();
pLits[0] = toLitCond( Fra_ObjSatNum(pNew), pNew->fPhase );
RetValue1 = sat_solver_solve( p->pSat, pLits, pLits + 1,
(ABC_INT64_T)p->pPars->nBTLimitMiter, (ABC_INT64_T)0,
p->nBTLimitGlobal, p->nInsLimitGlobal );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
pLits[0] = lit_neg( pLits[0] );
RetValue = sat_solver_addclause( p->pSat, pLits, pLits + 1 );
assert( RetValue );
@@ -468,7 +468,7 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
if ( p->pPatWords )
Fra_SmlSavePattern( p );
p->nSatCallsSat++;
@@ -476,7 +476,7 @@ p->timeSatSat += clock() - clk;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatFail += clock() - clk;
+p->timeSatFail += Abc_Clock() - clk;
// mark the node as the failed node
pNew->fMarkB = 1;
p->nSatFailsReal++;
@@ -540,9 +540,9 @@ int Fra_SetActivityFactors_rec( Fra_Man_t * p, Aig_Obj_t * pObj, int LevelMin, i
int Fra_SetActivityFactors( Fra_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew )
{
int LevelMin, LevelMax;
- clock_t clk;
+ abctime clk;
assert( pOld || pNew );
-clk = clock();
+clk = Abc_Clock();
// reset the active variables
veci_resize(&p->pSat->act_vars, 0);
// prepare for traversal
@@ -557,7 +557,7 @@ clk = clock();
if ( pNew && !Aig_ObjIsConst1(pNew) )
Fra_SetActivityFactors_rec( p, pNew, LevelMin, LevelMax );
//Fra_PrintActivity( p );
-p->timeTrav += clock() - clk;
+p->timeTrav += Abc_Clock() - clk;
return 1;
}
diff --git a/src/proof/fra/fraSec.c b/src/proof/fra/fraSec.c
index 04c9d668..dea2c3dc 100644
--- a/src/proof/fra/fraSec.c
+++ b/src/proof/fra/fraSec.c
@@ -99,7 +99,7 @@ int Fra_FraigSec( Aig_Man_t * p, Fra_Sec_t * pParSec, Aig_Man_t ** ppResult )
Fra_Sml_t * pSml;
Aig_Man_t * pNew, * pTemp;
int nFrames, RetValue, nIter;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
int TimeOut = 0;
int fLatchCorr = 0;
float TimeLeft = 0.0;
@@ -123,7 +123,7 @@ int Fra_FraigSec( Aig_Man_t * p, Fra_Sec_t * pParSec, Aig_Man_t ** ppResult )
//Aig_ManDumpBlif( pNew, "after.blif", NULL, NULL );
// perform sequential cleanup
-clk = clock();
+clk = Abc_Clock();
if ( pNew->nRegs )
pNew = Aig_ManReduceLaches( pNew, 0 );
if ( pNew->nRegs )
@@ -132,14 +132,14 @@ clk = clock();
{
printf( "Sequential cleanup: Latches = %5d. Nodes = %6d. ",
Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
RetValue = Fra_FraigMiterStatus( pNew );
if ( RetValue >= 0 )
goto finish;
// perform phase abstraction
-clk = clock();
+clk = Abc_Clock();
if ( pParSec->fPhaseAbstract )
{
extern Aig_Man_t * Saig_ManPhaseAbstractAuto( Aig_Man_t * p, int fVerbose );
@@ -151,14 +151,14 @@ clk = clock();
{
printf( "Phase abstraction: Latches = %5d. Nodes = %6d. ",
Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
// perform forward retiming
if ( pParSec->fRetimeFirst && pNew->nRegs )
{
-clk = clock();
+clk = Abc_Clock();
// pNew = Rtm_ManRetime( pTemp = pNew, 1, 1000, 0 );
pNew = Saig_ManRetimeForward( pTemp = pNew, 100, 0 );
Aig_ManStop( pTemp );
@@ -166,12 +166,12 @@ clk = clock();
{
printf( "Forward retiming: Latches = %5d. Nodes = %6d. ",
Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
// run latch correspondence
-clk = clock();
+clk = Abc_Clock();
if ( pNew->nRegs )
{
pNew = Aig_ManDupOrdered( pTemp = pNew );
@@ -180,7 +180,7 @@ clk = clock();
/*
if ( RetValue == -1 && pParSec->TimeLimit )
{
- TimeLeft = (float)pParSec->TimeLimit - ((float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC));
+ TimeLeft = (float)pParSec->TimeLimit - ((float)(Abc_Clock()-clkTotal)/(float)(CLOCKS_PER_SEC));
TimeLeft = Abc_MaxInt( TimeLeft, 0.0 );
if ( TimeLeft == 0.0 )
{
@@ -223,12 +223,12 @@ clk = clock();
if ( !pParSec->fSilent )
{
printf( "Networks are NOT EQUIVALENT after simulation. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
if ( pParSec->fReportSolution && !pParSec->fRecursive )
{
printf( "SOLUTION: FAIL " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
Aig_ManStop( pTemp );
return RetValue;
@@ -244,13 +244,13 @@ ABC_PRT( "Time", clock() - clkTotal );
{
printf( "Latch-corr (I=%3d): Latches = %5d. Nodes = %6d. ",
nIter, Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
/*
if ( RetValue == -1 && pParSec->TimeLimit )
{
- TimeLeft = (float)pParSec->TimeLimit - ((float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC));
+ TimeLeft = (float)pParSec->TimeLimit - ((float)(Abc_Clock()-clkTotal)/(float)(CLOCKS_PER_SEC));
TimeLeft = Abc_MaxInt( TimeLeft, 0.0 );
if ( TimeLeft == 0.0 )
{
@@ -265,14 +265,14 @@ ABC_PRT( "Time", clock() - clk );
// perform fraiging
if ( pParSec->fFraiging )
{
-clk = clock();
+clk = Abc_Clock();
pNew = Fra_FraigEquivence( pTemp = pNew, 100, 0 );
Aig_ManStop( pTemp );
if ( pParSec->fVerbose )
{
printf( "Fraiging: Latches = %5d. Nodes = %6d. ",
Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
@@ -285,7 +285,7 @@ ABC_PRT( "Time", clock() - clk );
/*
if ( RetValue == -1 && pParSec->TimeLimit )
{
- TimeLeft = (float)pParSec->TimeLimit - ((float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC));
+ TimeLeft = (float)pParSec->TimeLimit - ((float)(Abc_Clock()-clkTotal)/(float)(CLOCKS_PER_SEC));
TimeLeft = Abc_MaxInt( TimeLeft, 0.0 );
if ( TimeLeft == 0.0 )
{
@@ -301,7 +301,7 @@ ABC_PRT( "Time", clock() - clk );
if ( pParSec->fRetimeRegs && pNew->nRegs )
{
// extern Aig_Man_t * Saig_ManRetimeMinArea( Aig_Man_t * p, int nMaxIters, int fForwardOnly, int fBackwardOnly, int fInitial, int fVerbose );
-clk = clock();
+clk = Abc_Clock();
pNew->nTruePis = Aig_ManCiNum(pNew) - Aig_ManRegNum(pNew);
pNew->nTruePos = Aig_ManCoNum(pNew) - Aig_ManRegNum(pNew);
// pNew = Rtm_ManRetime( pTemp = pNew, 1, 1000, 0 );
@@ -313,7 +313,7 @@ clk = clock();
{
printf( "Min-reg retiming: Latches = %5d. Nodes = %6d. ",
Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
@@ -325,7 +325,7 @@ ABC_PRT( "Time", clock() - clk );
/*
if ( RetValue == -1 && pParSec->TimeLimit )
{
- TimeLeft = (float)pParSec->TimeLimit - ((float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC));
+ TimeLeft = (float)pParSec->TimeLimit - ((float)(Abc_Clock()-clkTotal)/(float)(CLOCKS_PER_SEC));
TimeLeft = Abc_MaxInt( TimeLeft, 0.0 );
if ( TimeLeft == 0.0 )
{
@@ -338,7 +338,7 @@ ABC_PRT( "Time", clock() - clk );
}
*/
-clk = clock();
+clk = Abc_Clock();
pPars->nFramesK = nFrames;
pPars->TimeLimit = TimeLeft;
pPars->fSilent = pParSec->fSilent;
@@ -381,7 +381,7 @@ clk = clock();
{
printf( "K-step (K=%2d,I=%3d): Latches = %5d. Nodes = %6d. ",
nFrames, pPars2->nIters, Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( RetValue != -1 )
break;
@@ -391,7 +391,7 @@ ABC_PRT( "Time", clock() - clk );
if ( pNew->nRegs )
{
// extern Aig_Man_t * Saig_ManRetimeMinArea( Aig_Man_t * p, int nMaxIters, int fForwardOnly, int fBackwardOnly, int fInitial, int fVerbose );
-clk = clock();
+clk = Abc_Clock();
pNew->nTruePis = Aig_ManCiNum(pNew) - Aig_ManRegNum(pNew);
pNew->nTruePos = Aig_ManCoNum(pNew) - Aig_ManRegNum(pNew);
// pNew = Rtm_ManRetime( pTemp = pNew, 1, 1000, 0 );
@@ -403,7 +403,7 @@ clk = clock();
{
printf( "Min-reg retiming: Latches = %5d. Nodes = %6d. ",
Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
@@ -411,7 +411,7 @@ ABC_PRT( "Time", clock() - clk );
pNew = Aig_ManConstReduce( pNew, 0, -1, -1, 0, 0 );
// perform rewriting
-clk = clock();
+clk = Abc_Clock();
pNew = Aig_ManDupOrdered( pTemp = pNew );
Aig_ManStop( pTemp );
// pNew = Dar_ManRewriteDefault( pTemp = pNew );
@@ -421,19 +421,19 @@ clk = clock();
{
printf( "Rewriting: Latches = %5d. Nodes = %6d. ",
Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
// perform sequential simulation
if ( pNew->nRegs )
{
-clk = clock();
+clk = Abc_Clock();
pSml = Fra_SmlSimulateSeq( pNew, 0, 128 * nFrames, 1 + 16/(1+Aig_ManNodeNum(pNew)/1000), 1 );
if ( pParSec->fVerbose )
{
printf( "Seq simulation : Latches = %5d. Nodes = %6d. ",
Aig_ManRegNum(pNew), Aig_ManNodeNum(pNew) );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( pSml->fNonConstOut )
{
@@ -454,12 +454,12 @@ ABC_PRT( "Time", clock() - clk );
if ( !pParSec->fSilent )
{
printf( "Networks are NOT EQUIVALENT after simulation. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
if ( pParSec->fReportSolution && !pParSec->fRecursive )
{
printf( "SOLUTION: FAIL " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
return RetValue;
}
@@ -471,7 +471,7 @@ ABC_PRT( "Time", clock() - clkTotal );
RetValue = Fra_FraigMiterStatus( pNew );
// try interplation
-clk = clock();
+clk = Abc_Clock();
Aig_ManSetRegNum( pNew, Aig_ManRegNum(pNew) );
if ( pParSec->fInterpolation && RetValue == -1 && Aig_ManRegNum(pNew) > 0 )
{
@@ -564,7 +564,7 @@ clk = clock();
printf( "Property UNDECIDED after interpolation. " );
else
assert( 0 );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
}
@@ -607,12 +607,12 @@ finish:
if ( !pParSec->fSilent )
{
printf( "Networks are equivalent. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
if ( pParSec->fReportSolution && !pParSec->fRecursive )
{
printf( "SOLUTION: PASS " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
}
else if ( RetValue == 0 )
@@ -631,12 +631,12 @@ ABC_PRT( "Time", clock() - clkTotal );
if ( !pParSec->fSilent )
{
printf( "Networks are NOT EQUIVALENT. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
if ( pParSec->fReportSolution && !pParSec->fRecursive )
{
printf( "SOLUTION: FAIL " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
}
else
@@ -649,12 +649,12 @@ ABC_PRT( "Time", clock() - clkTotal );
if ( !pParSec->fSilent )
{
printf( "Networks are UNDECIDED. " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
if ( pParSec->fReportSolution && !pParSec->fRecursive )
{
printf( "SOLUTION: UNDECIDED " );
-ABC_PRT( "Time", clock() - clkTotal );
+ABC_PRT( "Time", Abc_Clock() - clkTotal );
}
if ( !TimeOut && !pParSec->fSilent )
{
diff --git a/src/proof/fra/fraSim.c b/src/proof/fra/fraSim.c
index bbe68717..2d2ee93f 100644
--- a/src/proof/fra/fraSim.c
+++ b/src/proof/fra/fraSim.c
@@ -664,8 +664,8 @@ void Fra_SmlSimulateOne( Fra_Sml_t * p )
{
Aig_Obj_t * pObj, * pObjLi, * pObjLo;
int f, i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
for ( f = 0; f < p->nFrames; f++ )
{
// simulate the nodes
@@ -684,7 +684,7 @@ clk = clock();
Aig_ManForEachLiLoSeq( p->pAig, pObjLi, pObjLo, i )
Fra_SmlNodeTransferNext( p, pObjLi, pObjLo, f );
}
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
p->nSimRounds++;
}
@@ -703,21 +703,21 @@ p->nSimRounds++;
void Fra_SmlResimulate( Fra_Man_t * p )
{
int nChanges;
- clock_t clk;
+ abctime clk;
Fra_SmlAssignDist1( p->pSml, p->pPatWords );
Fra_SmlSimulateOne( p->pSml );
// if ( p->pPars->fPatScores )
// Fra_CleanPatScores( p );
if ( p->pPars->fProve && Fra_SmlCheckOutput(p) )
return;
-clk = clock();
+clk = Abc_Clock();
nChanges = Fra_ClassesRefine( p->pCla );
nChanges += Fra_ClassesRefine1( p->pCla, 1, NULL );
if ( p->pCla->vImps )
nChanges += Fra_ImpRefineUsingCex( p, p->pCla->vImps );
if ( p->vOneHots )
nChanges += Fra_OneHotRefineUsingCex( p, p->vOneHots );
-p->timeRef += clock() - clk;
+p->timeRef += Abc_Clock() - clk;
if ( !p->pPars->nFramesK && nChanges < 1 )
printf( "Error: A counter-example did not refine classes!\n" );
// assert( nChanges >= 1 );
@@ -739,7 +739,7 @@ void Fra_SmlSimulate( Fra_Man_t * p, int fInit )
{
int fVerbose = 0;
int nChanges, nClasses;
- clock_t clk;
+ abctime clk;
assert( !fInit || Aig_ManRegNum(p->pManAig) );
// start the classes
Fra_SmlInitialize( p->pSml, fInit );
@@ -759,10 +759,10 @@ printf( "Starting classes = %5d. Lits = %6d.\n", Vec_PtrSize(p->pCla->vClasses
Fra_SmlSimulateOne( p->pSml );
if ( p->pPars->fProve && Fra_SmlCheckOutput(p) )
return;
-clk = clock();
+clk = Abc_Clock();
nChanges = Fra_ClassesRefine( p->pCla );
nChanges += Fra_ClassesRefine1( p->pCla, 1, NULL );
-p->timeRef += clock() - clk;
+p->timeRef += Abc_Clock() - clk;
if ( fVerbose )
printf( "Refined classes = %5d. Changes = %4d. Lits = %6d.\n", Vec_PtrSize(p->pCla->vClasses), nChanges, Fra_ClassesCountLits(p->pCla) );
Fra_SmlSavePattern1( p, fInit );
@@ -770,10 +770,10 @@ printf( "Refined classes = %5d. Changes = %4d. Lits = %6d.\n", Vec_PtrSize(
Fra_SmlSimulateOne( p->pSml );
if ( p->pPars->fProve && Fra_SmlCheckOutput(p) )
return;
-clk = clock();
+clk = Abc_Clock();
nChanges = Fra_ClassesRefine( p->pCla );
nChanges += Fra_ClassesRefine1( p->pCla, 1, NULL );
-p->timeRef += clock() - clk;
+p->timeRef += Abc_Clock() - clk;
if ( fVerbose )
printf( "Refined classes = %5d. Changes = %4d. Lits = %6d.\n", Vec_PtrSize(p->pCla->vClasses), nChanges, Fra_ClassesCountLits(p->pCla) );
@@ -784,10 +784,10 @@ printf( "Refined classes = %5d. Changes = %4d. Lits = %6d.\n", Vec_PtrSize(
nClasses = Vec_PtrSize(p->pCla->vClasses);
if ( p->pPars->fProve && Fra_SmlCheckOutput(p) )
return;
-clk = clock();
+clk = Abc_Clock();
nChanges = Fra_ClassesRefine( p->pCla );
nChanges += Fra_ClassesRefine1( p->pCla, 1, NULL );
-p->timeRef += clock() - clk;
+p->timeRef += Abc_Clock() - clk;
if ( fVerbose )
printf( "Refined classes = %5d. Changes = %4d. Lits = %6d.\n", Vec_PtrSize(p->pCla->vClasses), nChanges, Fra_ClassesCountLits(p->pCla) );
} while ( (double)nChanges / nClasses > p->pPars->dSimSatur );
diff --git a/src/proof/fraig/fraigChoice.c b/src/proof/fraig/fraigChoice.c
index e1d6e8a7..4e6a225b 100644
--- a/src/proof/fraig/fraigChoice.c
+++ b/src/proof/fraig/fraigChoice.c
@@ -45,7 +45,7 @@ void Fraig_ManAddChoices( Fraig_Man_t * pMan, int fVerbose, int nLimit )
{
// ProgressBar * pProgress;
char Buffer[100];
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
int i, nNodesBefore, nNodesAfter, nInputs, nMaxNodes;
int /*nMaxLevel,*/ nDistributive;
Fraig_Node_t *pNode, *pRepr;
diff --git a/src/proof/fraig/fraigFeed.c b/src/proof/fraig/fraigFeed.c
index 4cb1276b..020caefa 100644
--- a/src/proof/fraig/fraigFeed.c
+++ b/src/proof/fraig/fraigFeed.c
@@ -81,7 +81,7 @@ void Fraig_FeedBack( Fraig_Man_t * p, int * pModel, Msat_IntVec_t * vVars, Fraig
{
int nVarsPi, nWords;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// get the number of PI vars in the feedback (also sets the PI values)
nVarsPi = Fraig_FeedBackPrepare( p, pModel, vVars );
@@ -107,7 +107,7 @@ void Fraig_FeedBack( Fraig_Man_t * p, int * pModel, Msat_IntVec_t * vVars, Fraig
else // otherwise, update the starting word
p->iWordStart += nWords;
-p->timeFeed += clock() - clk;
+p->timeFeed += Abc_Clock() - clk;
}
/**Function*************************************************************
diff --git a/src/proof/fraig/fraigInt.h b/src/proof/fraig/fraigInt.h
index 0decf6ff..37f00720 100644
--- a/src/proof/fraig/fraigInt.h
+++ b/src/proof/fraig/fraigInt.h
@@ -189,18 +189,18 @@ struct Fraig_ManStruct_t_
int nImplies1;
// runtime statistics
- clock_t timeToAig; // time to transfer to the mapping structure
- clock_t timeSims; // time to compute k-feasible cuts
- clock_t timeTrav; // time to traverse the network
- clock_t timeFeed; // time for solver feedback (recording and resimulating)
- clock_t timeImply; // time to analyze implications
- clock_t timeSat; // time to compute the truth table for each cut
- clock_t timeToNet; // time to transfer back to the network
- clock_t timeTotal; // the total mapping time
- clock_t time1; // time to perform one task
- clock_t time2; // time to perform another task
- clock_t time3; // time to perform another task
- clock_t time4; // time to perform another task
+ abctime timeToAig; // time to transfer to the mapping structure
+ abctime timeSims; // time to compute k-feasible cuts
+ abctime timeTrav; // time to traverse the network
+ abctime timeFeed; // time for solver feedback (recording and resimulating)
+ abctime timeImply; // time to analyze implications
+ abctime timeSat; // time to compute the truth table for each cut
+ abctime timeToNet; // time to transfer back to the network
+ abctime timeTotal; // the total mapping time
+ abctime time1; // time to perform one task
+ abctime time2; // time to perform another task
+ abctime time3; // time to perform another task
+ abctime time4; // time to perform another task
};
// the mapping node
diff --git a/src/proof/fraig/fraigMan.c b/src/proof/fraig/fraigMan.c
index dab3b08d..90c009ef 100644
--- a/src/proof/fraig/fraigMan.c
+++ b/src/proof/fraig/fraigMan.c
@@ -25,8 +25,8 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
-clock_t timeSelect;
-clock_t timeAssign;
+abctime timeSelect;
+abctime timeAssign;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -324,8 +324,8 @@ void Fraig_ManFree( Fraig_Man_t * p )
***********************************************************************/
void Fraig_ManCreateSolver( Fraig_Man_t * p )
{
- extern clock_t timeSelect;
- extern clock_t timeAssign;
+ extern abctime timeSelect;
+ extern abctime timeAssign;
assert( p->pSat == NULL );
// allocate data for SAT solving
p->pSat = Msat_SolverAlloc( 500, 1, 1, 1, 1, 0 );
diff --git a/src/proof/fraig/fraigNode.c b/src/proof/fraig/fraigNode.c
index 5310534b..9bf64bd2 100644
--- a/src/proof/fraig/fraigNode.c
+++ b/src/proof/fraig/fraigNode.c
@@ -88,7 +88,7 @@ Fraig_Node_t * Fraig_NodeCreatePi( Fraig_Man_t * p )
{
Fraig_Node_t * pNode, * pNodeRes;
int i;
- clock_t clk;
+ abctime clk;
// create the node
pNode = (Fraig_Node_t *)Fraig_MemFixedEntryFetch( p->mmNodes );
@@ -110,7 +110,7 @@ Fraig_Node_t * Fraig_NodeCreatePi( Fraig_Man_t * p )
pNode->fInv = 0; // the simulation info of the PI is not complemented
// derive the simulation info for the new node
-clk = clock();
+clk = Abc_Clock();
// set the random simulation info for the primary input
pNode->uHashR = 0;
for ( i = 0; i < p->nWordsRand; i++ )
@@ -136,7 +136,7 @@ clk = clock();
// compute the hash key
pNode->uHashD ^= pNode->puSimD[i] * s_FraigPrimes[i];
}
-p->timeSims += clock() - clk;
+p->timeSims += Abc_Clock() - clk;
// insert it into the hash table
pNodeRes = Fraig_HashTableLookupF( p, pNode );
@@ -160,7 +160,7 @@ p->timeSims += clock() - clk;
Fraig_Node_t * Fraig_NodeCreate( Fraig_Man_t * p, Fraig_Node_t * p1, Fraig_Node_t * p2 )
{
Fraig_Node_t * pNode;
- clock_t clk;
+ abctime clk;
// create the node
pNode = (Fraig_Node_t *)Fraig_MemFixedEntryFetch( p->mmNodes );
@@ -183,7 +183,7 @@ Fraig_Node_t * Fraig_NodeCreate( Fraig_Man_t * p, Fraig_Node_t * p1, Fraig_Node_
pNode->fFailTfo = Fraig_Regular(p1)->fFailTfo | Fraig_Regular(p2)->fFailTfo;
// derive the simulation info
-clk = clock();
+clk = Abc_Clock();
// allocate memory for the simulation info
pNode->puSimR = (unsigned *)Fraig_MemFixedEntryFetch( p->mmSims );
pNode->puSimD = pNode->puSimR + p->nWordsRand;
@@ -198,7 +198,7 @@ clk = clock();
if ( pNode->fInv )
pNode->nOnes = p->nWordsRand * 32 - pNode->nOnes;
// add to the runtime of simulation
-p->timeSims += clock() - clk;
+p->timeSims += Abc_Clock() - clk;
#ifdef FRAIG_ENABLE_FANOUTS
// create the fanout info
diff --git a/src/proof/fraig/fraigSat.c b/src/proof/fraig/fraigSat.c
index fb3f1fec..3c1b2a1b 100644
--- a/src/proof/fraig/fraigSat.c
+++ b/src/proof/fraig/fraigSat.c
@@ -86,12 +86,12 @@ void Fraig_ManProveMiter( Fraig_Man_t * p )
{
Fraig_Node_t * pNode;
int i;
- clock_t clk;
+ abctime clk;
if ( !p->fTryProve )
return;
- clk = clock();
+ clk = Abc_Clock();
// consider all outputs of the multi-output miter
for ( i = 0; i < p->vOutputs->nSize; i++ )
{
@@ -112,7 +112,7 @@ void Fraig_ManProveMiter( Fraig_Man_t * p )
}
if ( p->fVerboseP )
{
-// ABC_PRT( "Final miter proof time", clock() - clk );
+// ABC_PRT( "Final miter proof time", Abc_Clock() - clk );
}
}
@@ -302,7 +302,7 @@ void Fraig_VarsStudy( Fraig_Man_t * p, Fraig_Node_t * pOld, Fraig_Node_t * pNew
int Fraig_NodeIsEquivalent( Fraig_Man_t * p, Fraig_Node_t * pOld, Fraig_Node_t * pNew, int nBTLimit, int nTimeLimit )
{
int RetValue, RetValue1, i, fComp;
- clock_t clk;
+ abctime clk;
int fVerbose = 0;
int fSwitch = 0;
@@ -349,14 +349,14 @@ int Fraig_NodeIsEquivalent( Fraig_Man_t * p, Fraig_Node_t * pOld, Fraig_Node_t *
// get the logic cone
-clk = clock();
+clk = Abc_Clock();
// Fraig_VarsStudy( p, pOld, pNew );
Fraig_OrderVariables( p, pOld, pNew );
// Fraig_PrepareCones( p, pOld, pNew );
-p->timeTrav += clock() - clk;
+p->timeTrav += Abc_Clock() - clk;
// printf( "The number of MUXes detected = %d (%5.2f %% of logic). ", nMuxes, 300.0*nMuxes/(p->vNodes->nSize - p->vInputs->nSize) );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
if ( fVerbose )
printf( "%d(%d) - ", Fraig_CountPis(p,p->vVarsInt), Msat_IntVecReadSize(p->vVarsInt) );
@@ -371,9 +371,9 @@ if ( fVerbose )
////////////////////////////////////////////
// prepare the solver to run incrementally on these variables
-//clk = clock();
+//clk = Abc_Clock();
Msat_SolverPrepare( p->pSat, p->vVarsInt );
-//p->time3 += clock() - clk;
+//p->time3 += Abc_Clock() - clk;
// solve under assumptions
@@ -385,18 +385,18 @@ if ( fVerbose )
//Msat_SolverWriteDimacs( p->pSat, "temp_fraig.cnf" );
// run the solver
-clk = clock();
+clk = Abc_Clock();
RetValue1 = Msat_SolverSolve( p->pSat, p->vProj, nBTLimit, nTimeLimit );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == MSAT_FALSE )
{
-//p->time1 += clock() - clk;
+//p->time1 += Abc_Clock() - clk;
if ( fVerbose )
{
// printf( "unsat %d ", Msat_SolverReadBackTracks(p->pSat) );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
}
// add the clause
@@ -409,12 +409,12 @@ if ( fVerbose )
}
else if ( RetValue1 == MSAT_TRUE )
{
-//p->time2 += clock() - clk;
+//p->time2 += Abc_Clock() - clk;
if ( fVerbose )
{
// printf( "sat %d ", Msat_SolverReadBackTracks(p->pSat) );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
}
// record the counter example
@@ -430,7 +430,7 @@ if ( fVerbose )
}
else // if ( RetValue1 == MSAT_UNKNOWN )
{
-p->time3 += clock() - clk;
+p->time3 += Abc_Clock() - clk;
// if ( pOld->fFailTfo || pNew->fFailTfo )
// printf( "*" );
@@ -453,27 +453,27 @@ p->time3 += clock() - clk;
////////////////////////////////////////////
// prepare the solver to run incrementally
-//clk = clock();
+//clk = Abc_Clock();
Msat_SolverPrepare( p->pSat, p->vVarsInt );
-//p->time3 += clock() - clk;
+//p->time3 += Abc_Clock() - clk;
// solve under assumptions
// A = 0; B = 1 OR A = 0; B = 0
Msat_IntVecClear( p->vProj );
Msat_IntVecPush( p->vProj, MSAT_VAR2LIT(pOld->Num, 1) );
Msat_IntVecPush( p->vProj, MSAT_VAR2LIT(pNew->Num, fComp) );
// run the solver
-clk = clock();
+clk = Abc_Clock();
RetValue1 = Msat_SolverSolve( p->pSat, p->vProj, nBTLimit, nTimeLimit );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == MSAT_FALSE )
{
-//p->time1 += clock() - clk;
+//p->time1 += Abc_Clock() - clk;
if ( fVerbose )
{
// printf( "unsat %d ", Msat_SolverReadBackTracks(p->pSat) );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
}
// add the clause
@@ -486,12 +486,12 @@ if ( fVerbose )
}
else if ( RetValue1 == MSAT_TRUE )
{
-//p->time2 += clock() - clk;
+//p->time2 += Abc_Clock() - clk;
if ( fVerbose )
{
// printf( "sat %d ", Msat_SolverReadBackTracks(p->pSat) );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
}
// record the counter example
@@ -507,7 +507,7 @@ if ( fVerbose )
}
else // if ( RetValue1 == MSAT_UNKNOWN )
{
-p->time3 += clock() - clk;
+p->time3 += Abc_Clock() - clk;
// if ( pOld->fFailTfo || pNew->fFailTfo )
// printf( "*" );
@@ -551,7 +551,7 @@ p->time3 += clock() - clk;
int Fraig_NodeIsImplication( Fraig_Man_t * p, Fraig_Node_t * pOld, Fraig_Node_t * pNew, int nBTLimit )
{
int RetValue, RetValue1, i, fComp;
- clock_t clk;
+ abctime clk;
int fVerbose = 0;
// make sure the nodes are not complemented
@@ -569,10 +569,10 @@ int Fraig_NodeIsImplication( Fraig_Man_t * p, Fraig_Node_t * pOld, Fraig_Node_t
Msat_SolverAddVar( p->pSat, p->vNodes->pArray[i]->Level );
// get the logic cone
-clk = clock();
+clk = Abc_Clock();
Fraig_OrderVariables( p, pOld, pNew );
// Fraig_PrepareCones( p, pOld, pNew );
-p->timeTrav += clock() - clk;
+p->timeTrav += Abc_Clock() - clk;
if ( fVerbose )
printf( "%d(%d) - ", Fraig_CountPis(p,p->vVarsInt), Msat_IntVecReadSize(p->vVarsInt) );
@@ -584,9 +584,9 @@ if ( fVerbose )
////////////////////////////////////////////
// prepare the solver to run incrementally on these variables
-//clk = clock();
+//clk = Abc_Clock();
Msat_SolverPrepare( p->pSat, p->vVarsInt );
-//p->time3 += clock() - clk;
+//p->time3 += Abc_Clock() - clk;
// solve under assumptions
// A = 1; B = 0 OR A = 1; B = 1
@@ -594,18 +594,18 @@ if ( fVerbose )
Msat_IntVecPush( p->vProj, MSAT_VAR2LIT(pOld->Num, 0) );
Msat_IntVecPush( p->vProj, MSAT_VAR2LIT(pNew->Num, !fComp) );
// run the solver
-clk = clock();
+clk = Abc_Clock();
RetValue1 = Msat_SolverSolve( p->pSat, p->vProj, nBTLimit, 1000000 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == MSAT_FALSE )
{
-//p->time1 += clock() - clk;
+//p->time1 += Abc_Clock() - clk;
if ( fVerbose )
{
// printf( "unsat %d ", Msat_SolverReadBackTracks(p->pSat) );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
}
// add the clause
@@ -619,12 +619,12 @@ if ( fVerbose )
}
else if ( RetValue1 == MSAT_TRUE )
{
-//p->time2 += clock() - clk;
+//p->time2 += Abc_Clock() - clk;
if ( fVerbose )
{
// printf( "sat %d ", Msat_SolverReadBackTracks(p->pSat) );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
}
// record the counter example
Fraig_FeedBack( p, Msat_SolverReadModelArray(p->pSat), p->vVarsInt, pOld, pNew );
@@ -633,7 +633,7 @@ if ( fVerbose )
}
else // if ( RetValue1 == MSAT_UNKNOWN )
{
-p->time3 += clock() - clk;
+p->time3 += Abc_Clock() - clk;
p->nSatFailsImp++;
return 0;
}
@@ -654,7 +654,7 @@ int Fraig_ManCheckClauseUsingSat( Fraig_Man_t * p, Fraig_Node_t * pNode1, Fraig_
{
Fraig_Node_t * pNode1R, * pNode2R;
int RetValue, RetValue1, i;
- clock_t clk;
+ abctime clk;
int fVerbose = 0;
pNode1R = Fraig_Regular(pNode1);
@@ -669,16 +669,16 @@ int Fraig_ManCheckClauseUsingSat( Fraig_Man_t * p, Fraig_Node_t * pNode1, Fraig_
Msat_SolverAddVar( p->pSat, p->vNodes->pArray[i]->Level );
// get the logic cone
-clk = clock();
+clk = Abc_Clock();
Fraig_OrderVariables( p, pNode1R, pNode2R );
// Fraig_PrepareCones( p, pNode1R, pNode2R );
-p->timeTrav += clock() - clk;
+p->timeTrav += Abc_Clock() - clk;
////////////////////////////////////////////
// prepare the solver to run incrementally on these variables
-//clk = clock();
+//clk = Abc_Clock();
Msat_SolverPrepare( p->pSat, p->vVarsInt );
-//p->time3 += clock() - clk;
+//p->time3 += Abc_Clock() - clk;
// solve under assumptions
// A = 1; B = 0 OR A = 1; B = 1
@@ -686,18 +686,18 @@ p->timeTrav += clock() - clk;
Msat_IntVecPush( p->vProj, MSAT_VAR2LIT(pNode1R->Num, !Fraig_IsComplement(pNode1)) );
Msat_IntVecPush( p->vProj, MSAT_VAR2LIT(pNode2R->Num, !Fraig_IsComplement(pNode2)) );
// run the solver
-clk = clock();
+clk = Abc_Clock();
RetValue1 = Msat_SolverSolve( p->pSat, p->vProj, nBTLimit, 1000000 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == MSAT_FALSE )
{
-//p->time1 += clock() - clk;
+//p->time1 += Abc_Clock() - clk;
if ( fVerbose )
{
// printf( "unsat %d ", Msat_SolverReadBackTracks(p->pSat) );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
}
// add the clause
@@ -711,12 +711,12 @@ if ( fVerbose )
}
else if ( RetValue1 == MSAT_TRUE )
{
-//p->time2 += clock() - clk;
+//p->time2 += Abc_Clock() - clk;
if ( fVerbose )
{
// printf( "sat %d ", Msat_SolverReadBackTracks(p->pSat) );
-//ABC_PRT( "time", clock() - clk );
+//ABC_PRT( "time", Abc_Clock() - clk );
}
// record the counter example
// Fraig_FeedBack( p, Msat_SolverReadModelArray(p->pSat), p->vVarsInt, pNode1R, pNode2R );
@@ -725,7 +725,7 @@ if ( fVerbose )
}
else // if ( RetValue1 == MSAT_UNKNOWN )
{
-p->time3 += clock() - clk;
+p->time3 += Abc_Clock() - clk;
p->nSatFailsImp++;
return 0;
}
diff --git a/src/proof/fraig/fraigTable.c b/src/proof/fraig/fraigTable.c
index d184ab7f..03a2ac10 100644
--- a/src/proof/fraig/fraigTable.c
+++ b/src/proof/fraig/fraigTable.c
@@ -261,10 +261,10 @@ void Fraig_TableResizeS( Fraig_HashTable_t * p )
Fraig_Node_t ** pBinsNew;
Fraig_Node_t * pEnt, * pEnt2;
int nBinsNew, Counter, i;
- clock_t clk;
+ abctime clk;
unsigned Key;
-clk = clock();
+clk = Abc_Clock();
// get the new table size
nBinsNew = Abc_PrimeCudd(2 * p->nBins);
// allocate a new array
@@ -282,7 +282,7 @@ clk = clock();
}
assert( Counter == p->nEntries );
// printf( "Increasing the structural table size from %6d to %6d. ", p->nBins, nBinsNew );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( p->pBins );
p->pBins = pBinsNew;
@@ -305,10 +305,10 @@ void Fraig_TableResizeF( Fraig_HashTable_t * p, int fUseSimR )
Fraig_Node_t ** pBinsNew;
Fraig_Node_t * pEnt, * pEnt2;
int nBinsNew, Counter, i;
- clock_t clk;
+ abctime clk;
unsigned Key;
-clk = clock();
+clk = Abc_Clock();
// get the new table size
nBinsNew = Abc_PrimeCudd(2 * p->nBins);
// allocate a new array
@@ -329,7 +329,7 @@ clk = clock();
}
assert( Counter == p->nEntries );
// printf( "Increasing the functional table size from %6d to %6d. ", p->nBins, nBinsNew );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// replace the table and the parameters
ABC_FREE( p->pBins );
p->pBins = pBinsNew;
diff --git a/src/proof/fraig/fraigUtil.c b/src/proof/fraig/fraigUtil.c
index 316b492e..7869c6d6 100644
--- a/src/proof/fraig/fraigUtil.c
+++ b/src/proof/fraig/fraigUtil.c
@@ -844,7 +844,7 @@ int Fraig_ManPrintRefs( Fraig_Man_t * pMan )
Fraig_NodeVec_t * vPivots;
Fraig_Node_t * pNode, * pNode2;
int i, k, Counter, nProved;
- clock_t clk;
+ abctime clk;
vPivots = Fraig_NodeVecAlloc( 1000 );
for ( i = 0; i < pMan->vNodes->nSize; i++ )
@@ -862,7 +862,7 @@ int Fraig_ManPrintRefs( Fraig_Man_t * pMan )
}
printf( "Total nodes = %d. Referenced nodes = %d.\n", pMan->vNodes->nSize, vPivots->nSize );
-clk = clock();
+clk = Abc_Clock();
// count implications
Counter = nProved = 0;
for ( i = 0; i < vPivots->nSize; i++ )
@@ -884,7 +884,7 @@ clk = clock();
}
}
printf( "Number of candidate pairs = %d. Proved = %d.\n", Counter, nProved );
-//ABC_PRT( "Time", clock() - clk );
+//ABC_PRT( "Time", Abc_Clock() - clk );
return 0;
}
diff --git a/src/proof/int/intCheck.c b/src/proof/int/intCheck.c
index 28ef54a7..4e58440b 100644
--- a/src/proof/int/intCheck.c
+++ b/src/proof/int/intCheck.c
@@ -217,7 +217,7 @@ void Inter_CheckAddEqual( Inter_Check_t * p, int iVarA, int iVarB )
SeeAlso []
***********************************************************************/
-int Inter_CheckPerform( Inter_Check_t * p, Cnf_Dat_t * pCnfInt, clock_t nTimeNewOut )
+int Inter_CheckPerform( Inter_Check_t * p, Cnf_Dat_t * pCnfInt, abctime nTimeNewOut )
{
Aig_Obj_t * pObj, * pObj2;
int i, f, VarA, VarB, RetValue, Entry, status;
diff --git a/src/proof/int/intCore.c b/src/proof/int/intCore.c
index cfab05dc..dedf987e 100644
--- a/src/proof/int/intCore.c
+++ b/src/proof/int/intCore.c
@@ -83,8 +83,8 @@ int Inter_ManPerformInterpolation( Aig_Man_t * pAig, Inter_ManParams_t * pPars,
Inter_Check_t * pCheck = NULL;
Aig_Man_t * pAigTemp;
int s, i, RetValue, Status;
- clock_t clk, clk2, clkTotal = clock(), timeTemp = 0;
- clock_t nTimeNewOut = pPars->nSecLimit ? pPars->nSecLimit * CLOCKS_PER_SEC + clock() : 0;
+ abctime clk, clk2, clkTotal = Abc_Clock(), timeTemp = 0;
+ abctime nTimeNewOut = pPars->nSecLimit ? pPars->nSecLimit * CLOCKS_PER_SEC + Abc_Clock() : 0;
// enable ORing of the interpolants, if containment check is performed inductively with K > 1
if ( pPars->nFramesK > 1 )
@@ -118,9 +118,9 @@ int Inter_ManPerformInterpolation( Aig_Man_t * pAig, Inter_ManParams_t * pPars,
else
p->pAigTrans = Inter_ManStartDuplicated( pAig );
// derive CNF for the transformed AIG
-clk = clock();
+clk = Abc_Clock();
p->pCnfAig = Cnf_Derive( p->pAigTrans, Aig_ManRegNum(p->pAigTrans) );
-p->timeCnf += clock() - clk;
+p->timeCnf += Abc_Clock() - clk;
if ( pPars->fVerbose )
{
printf( "AIG: PI/PO/Reg = %d/%d/%d. And = %d. Lev = %d. CNF: Var/Cla = %d/%d.\n",
@@ -136,19 +136,19 @@ p->timeCnf += clock() - clk;
{
Cnf_Dat_t * pCnfInter2;
-clk2 = clock();
+clk2 = Abc_Clock();
// initial state
if ( pPars->fUseBackward )
p->pInter = Inter_ManStartOneOutput( pAig, 1 );
else
p->pInter = Inter_ManStartInitState( Aig_ManRegNum(pAig) );
assert( Aig_ManCoNum(p->pInter) == 1 );
-clk = clock();
+clk = Abc_Clock();
p->pCnfInter = Cnf_Derive( p->pInter, 0 );
-p->timeCnf += clock() - clk;
+p->timeCnf += Abc_Clock() - clk;
// timeframes
p->pFrames = Inter_ManFramesInter( pAig, p->nFrames, pPars->fUseBackward, pPars->fUseTwoFrames );
-clk = clock();
+clk = Abc_Clock();
if ( pPars->fRewrite )
{
p->pFrames = Dar_ManRwsat( pAigTemp = p->pFrames, 1, 0 );
@@ -156,21 +156,21 @@ clk = clock();
// p->pFrames = Fra_FraigEquivence( pAigTemp = p->pFrames, 100, 0 );
// Aig_ManStop( pAigTemp );
}
-p->timeRwr += clock() - clk;
+p->timeRwr += Abc_Clock() - clk;
// can also do SAT sweeping on the timeframes...
-clk = clock();
+clk = Abc_Clock();
if ( pPars->fUseBackward )
p->pCnfFrames = Cnf_Derive( p->pFrames, Aig_ManCoNum(p->pFrames) );
else
// p->pCnfFrames = Cnf_Derive( p->pFrames, 0 );
p->pCnfFrames = Cnf_DeriveSimple( p->pFrames, 0 );
-p->timeCnf += clock() - clk;
+p->timeCnf += Abc_Clock() - clk;
// report statistics
if ( pPars->fVerbose )
{
printf( "Step = %2d. Frames = 1 + %d. And = %5d. Lev = %5d. ",
s+1, p->nFrames, Aig_ManNodeNum(p->pFrames), Aig_ManLevelNum(p->pFrames) );
- ABC_PRT( "Time", clock() - clk2 );
+ ABC_PRT( "Time", Abc_Clock() - clk2 );
}
@@ -180,12 +180,12 @@ p->timeCnf += clock() - clk;
{
pCheck = Inter_CheckStart( p->pAigTrans, pPars->nFramesK );
// try new containment check for the initial state
-clk = clock();
+clk = Abc_Clock();
pCnfInter2 = Cnf_Derive( p->pInter, 1 );
-p->timeCnf += clock() - clk;
-clk = clock();
+p->timeCnf += Abc_Clock() - clk;
+clk = Abc_Clock();
RetValue = Inter_CheckPerform( pCheck, pCnfInter2, nTimeNewOut );
-p->timeEqu += clock() - clk;
+p->timeEqu += Abc_Clock() - clk;
// assert( RetValue == 0 );
Cnf_DataFree( pCnfInter2 );
if ( p->vInters )
@@ -200,14 +200,14 @@ p->timeEqu += clock() - clk;
{
if ( pPars->fVerbose )
printf( "Reached limit (%d) on the number of timeframes.\n", pPars->nFramesMax );
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
Inter_ManStop( p, 0 );
Inter_CheckStop( pCheck );
return -1;
}
// perform interpolation
- clk = clock();
+ clk = Abc_Clock();
#ifdef ABC_USE_LIBRARIES
if ( pPars->fUseMiniSat )
{
@@ -222,7 +222,7 @@ p->timeEqu += clock() - clk;
{
printf( " I = %2d. Bmc =%3d. IntAnd =%6d. IntLev =%5d. Conf =%6d. ",
i+1, i + 1 + p->nFrames, Aig_ManNodeNum(p->pInter), Aig_ManLevelNum(p->pInter), p->nConfCur );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// remember the number of timeframes completed
pPars->iFrameMax = i - 1 + p->nFrames;
@@ -232,7 +232,7 @@ p->timeEqu += clock() - clk;
{
if ( pPars->fVerbose )
printf( "Found a real counterexample in frame %d.\n", p->nFrames );
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
*piFrame = p->nFrames;
// pAig->pSeqModel = (Abc_Cex_t *)Inter_ManGetCounterExample( pAig, p->nFrames+1, pPars->fVerbose );
{
@@ -259,7 +259,7 @@ p->timeEqu += clock() - clk;
}
else if ( RetValue == -1 )
{
- if ( pPars->nSecLimit && clock() > nTimeNewOut ) // timed out
+ if ( pPars->nSecLimit && Abc_Clock() > nTimeNewOut ) // timed out
{
if ( pPars->fVerbose )
printf( "Reached timeout (%d seconds).\n", pPars->nSecLimit );
@@ -270,14 +270,14 @@ p->timeEqu += clock() - clk;
if ( pPars->fVerbose )
printf( "Reached limit (%d) on the number of conflicts.\n", p->nConfLimit );
}
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
Inter_ManStop( p, 0 );
Inter_CheckStop( pCheck );
return -1;
}
assert( RetValue == 1 ); // found new interpolant
// compress the interpolant
-clk = clock();
+clk = Abc_Clock();
if ( p->pInterNew )
{
// Ioa_WriteAiger( p->pInterNew, "interpol.aig", 0, 0 );
@@ -285,7 +285,7 @@ clk = clock();
// p->pInterNew = Dar_ManRwsat( pAigTemp = p->pInterNew, 0, 0 );
Aig_ManStop( pAigTemp );
}
-p->timeRwr += clock() - clk;
+p->timeRwr += Abc_Clock() - clk;
// check if interpolant is trivial
if ( p->pInterNew == NULL || Aig_ObjChild0(Aig_ManCo(p->pInterNew,0)) == Aig_ManConst0(p->pInterNew) )
@@ -293,30 +293,30 @@ p->timeRwr += clock() - clk;
// printf( "interpolant is constant 0\n" );
if ( pPars->fVerbose )
printf( "The problem is trivially true for all states.\n" );
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
Inter_ManStop( p, 1 );
Inter_CheckStop( pCheck );
return 1;
}
// check containment of interpolants
-clk = clock();
+clk = Abc_Clock();
if ( pPars->fCheckKstep ) // k-step unique-state induction
{
if ( Aig_ManCiNum(p->pInterNew) == Aig_ManCiNum(p->pInter) )
{
if ( pPars->fTransLoop || pPars->fUseBackward || pPars->nFramesK > 1 )
{
-clk2 = clock();
+clk2 = Abc_Clock();
Status = Inter_ManCheckInductiveContainment( p->pAigTrans, p->pInterNew, Abc_MinInt(i + 1, pPars->nFramesK), pPars->fUseBackward );
-timeTemp = clock() - clk2;
+timeTemp = Abc_Clock() - clk2;
}
else
{ // new containment check
-clk2 = clock();
+clk2 = Abc_Clock();
pCnfInter2 = Cnf_Derive( p->pInterNew, 1 );
-p->timeCnf += clock() - clk2;
-timeTemp = clock() - clk2;
+p->timeCnf += Abc_Clock() - clk2;
+timeTemp = Abc_Clock() - clk2;
Status = Inter_CheckPerform( pCheck, pCnfInter2, nTimeNewOut );
Cnf_DataFree( pCnfInter2 );
@@ -334,20 +334,20 @@ timeTemp = clock() - clk2;
else
Status = 0;
}
-p->timeEqu += clock() - clk - timeTemp;
+p->timeEqu += Abc_Clock() - clk - timeTemp;
if ( Status ) // contained
{
if ( pPars->fVerbose )
printf( "Proved containment of interpolants.\n" );
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
Inter_ManStop( p, 1 );
Inter_CheckStop( pCheck );
return 1;
}
- if ( pPars->nSecLimit && clock() > nTimeNewOut )
+ if ( pPars->nSecLimit && Abc_Clock() > nTimeNewOut )
{
printf( "Reached timeout (%d seconds).\n", pPars->nSecLimit );
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
Inter_ManStop( p, 1 );
Inter_CheckStop( pCheck );
return -1;
@@ -366,10 +366,10 @@ p->timeEqu += clock() - clk - timeTemp;
Aig_ManStop( pAigTemp );
Aig_ManStop( p->pInterNew );
// compress the interpolant
-clk = clock();
+clk = Abc_Clock();
p->pInter = Dar_ManRwsat( pAigTemp = p->pInter, 1, 0 );
Aig_ManStop( pAigTemp );
-p->timeRwr += clock() - clk;
+p->timeRwr += Abc_Clock() - clk;
}
else // forward with the new containment checking (using only the frontier)
{
@@ -379,9 +379,9 @@ p->timeRwr += clock() - clk;
}
p->pInterNew = NULL;
Cnf_DataFree( p->pCnfInter );
-clk = clock();
+clk = Abc_Clock();
p->pCnfInter = Cnf_Derive( p->pInter, 0 );
-p->timeCnf += clock() - clk;
+p->timeCnf += Abc_Clock() - clk;
}
// start containment checking
diff --git a/src/proof/int/intCtrex.c b/src/proof/int/intCtrex.c
index 9b2946e9..91740e6c 100644
--- a/src/proof/int/intCtrex.c
+++ b/src/proof/int/intCtrex.c
@@ -100,7 +100,7 @@ void * Inter_ManGetCounterExample( Aig_Man_t * pAig, int nFrames, int fVerbose )
sat_solver * pSat;
Cnf_Dat_t * pCnf;
int status;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_Int_t * vCiIds;
// create timeframes
assert( Saig_ManPoNum(pAig) == 1 );
@@ -152,7 +152,7 @@ void * Inter_ManGetCounterExample( Aig_Man_t * pAig, int nFrames, int fVerbose )
// report the results
if ( fVerbose )
{
- ABC_PRT( "Total ctrex generation time", clock() - clk );
+ ABC_PRT( "Total ctrex generation time", Abc_Clock() - clk );
}
return pCtrex;
diff --git a/src/proof/int/intInt.h b/src/proof/int/intInt.h
index bf591b7a..37bcf51c 100644
--- a/src/proof/int/intInt.h
+++ b/src/proof/int/intInt.h
@@ -71,13 +71,13 @@ struct Inter_Man_t_
int fVerbose; // the verbosiness flag
char * pFileName;
// runtime
- clock_t timeRwr;
- clock_t timeCnf;
- clock_t timeSat;
- clock_t timeInt;
- clock_t timeEqu;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeRwr;
+ abctime timeCnf;
+ abctime timeSat;
+ abctime timeInt;
+ abctime timeEqu;
+ abctime timeOther;
+ abctime timeTotal;
};
// containment checking manager
@@ -94,7 +94,7 @@ typedef struct Inter_Check_t_ Inter_Check_t;
/*=== intCheck.c ============================================================*/
extern Inter_Check_t * Inter_CheckStart( Aig_Man_t * pTrans, int nFramesK );
extern void Inter_CheckStop( Inter_Check_t * p );
-extern int Inter_CheckPerform( Inter_Check_t * p, Cnf_Dat_t * pCnf, clock_t nTimeNewOut );
+extern int Inter_CheckPerform( Inter_Check_t * p, Cnf_Dat_t * pCnf, abctime nTimeNewOut );
/*=== intContain.c ============================================================*/
extern int Inter_ManCheckContainment( Aig_Man_t * pNew, Aig_Man_t * pOld );
@@ -118,7 +118,7 @@ extern void Inter_ManClean( Inter_Man_t * p );
extern void Inter_ManStop( Inter_Man_t * p, int fProved );
/*=== intM114.c ============================================================*/
-extern int Inter_ManPerformOneStep( Inter_Man_t * p, int fUseBias, int fUseBackward, clock_t nTimeNewOut );
+extern int Inter_ManPerformOneStep( Inter_Man_t * p, int fUseBias, int fUseBackward, abctime nTimeNewOut );
/*=== intM114p.c ============================================================*/
#ifdef ABC_USE_LIBRARIES
diff --git a/src/proof/int/intM114.c b/src/proof/int/intM114.c
index bf44696d..64b18ae0 100644
--- a/src/proof/int/intM114.c
+++ b/src/proof/int/intM114.c
@@ -200,7 +200,7 @@ sat_solver * Inter_ManDeriveSatSolver(
SeeAlso []
***********************************************************************/
-int Inter_ManPerformOneStep( Inter_Man_t * p, int fUseBias, int fUseBackward, clock_t nTimeNewOut )
+int Inter_ManPerformOneStep( Inter_Man_t * p, int fUseBias, int fUseBackward, abctime nTimeNewOut )
{
sat_solver * pSat;
void * pSatCnf = NULL;
@@ -209,7 +209,7 @@ int Inter_ManPerformOneStep( Inter_Man_t * p, int fUseBias, int fUseBackward, cl
int * pGlobalVars;
int status, RetValue;
int i, Var;
- clock_t clk;
+ abctime clk;
// assert( p->pInterNew == NULL );
// derive the SAT solver
@@ -231,10 +231,10 @@ int Inter_ManPerformOneStep( Inter_Man_t * p, int fUseBias, int fUseBackward, cl
pSat->pGlobalVars = fUseBias? pGlobalVars : NULL;
// solve the problem
-clk = clock();
+clk = Abc_Clock();
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)p->nConfLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
p->nConfCur = pSat->stats.conflicts;
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
pSat->pGlobalVars = NULL;
ABC_FREE( pGlobalVars );
@@ -256,7 +256,7 @@ p->timeSat += clock() - clk;
return RetValue;
// create the resulting manager
-clk = clock();
+clk = Abc_Clock();
/*
if ( !fUseIp )
{
@@ -307,7 +307,7 @@ clk = clock();
p->pInterNew = (Aig_Man_t *)Inta_ManInterpolate( pManInterA, (Sto_Man_t *)pSatCnf, p->vVarsAB, 0 );
Inta_ManFree( pManInterA );
-p->timeInt += clock() - clk;
+p->timeInt += Abc_Clock() - clk;
Sto_ManFree( (Sto_Man_t *)pSatCnf );
return RetValue;
}
diff --git a/src/proof/int/intUtil.c b/src/proof/int/intUtil.c
index b93a7453..b7e18f09 100644
--- a/src/proof/int/intUtil.c
+++ b/src/proof/int/intUtil.c
@@ -49,7 +49,7 @@ int Inter_ManCheckInitialState( Aig_Man_t * p )
Aig_Obj_t * pObj;
sat_solver * pSat;
int i, status;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pCnf = Cnf_Derive( p, Saig_ManRegNum(p) );
pSat = (sat_solver *)Cnf_DataWriteIntoSolver( pCnf, 1, 1 );
if ( pSat == NULL )
@@ -58,7 +58,7 @@ int Inter_ManCheckInitialState( Aig_Man_t * p )
return 0;
}
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
if ( status == l_True )
{
p->pSeqModel = Abc_CexAlloc( Aig_ManRegNum(p), Saig_ManPiNum(p), 1 );
@@ -87,7 +87,7 @@ int Inter_ManCheckAllStates( Aig_Man_t * p )
Cnf_Dat_t * pCnf;
sat_solver * pSat;
int status;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pCnf = Cnf_Derive( p, Saig_ManRegNum(p) );
pSat = (sat_solver *)Cnf_DataWriteIntoSolver( pCnf, 1, 0 );
Cnf_DataFree( pCnf );
@@ -95,7 +95,7 @@ int Inter_ManCheckAllStates( Aig_Man_t * p )
return 1;
status = sat_solver_solve( pSat, NULL, NULL, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
sat_solver_delete( pSat );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
return status == l_False;
}
diff --git a/src/proof/live/kliveness.c b/src/proof/live/kliveness.c
index 7ba67155..d9bc416b 100644
--- a/src/proof/live/kliveness.c
+++ b/src/proof/live/kliveness.c
@@ -534,7 +534,7 @@ int Abc_CommandCS_kLiveness( Abc_Frame_t * pAbc, int argc, char ** argv )
int directive = -1;
int c;
int safetyInvariantPO = -1;
- clock_t beginTime, endTime;
+ abctime beginTime, endTime;
double time_spent;
Vec_Ptr_t *vMasterBarrierDisjuncts = NULL;
Aig_Man_t *pWorkingAig;
@@ -606,9 +606,9 @@ int Abc_CommandCS_kLiveness( Abc_Frame_t * pAbc, int argc, char ** argv )
if(directive == kCS_WITH_DISCOVER_MONOTONE_SIGNALS)
{
- beginTime = clock();
+ beginTime = Abc_Clock();
vMasterBarrierDisjuncts = findDisjunctiveMonotoneSignals( pNtk );
- endTime = clock();
+ endTime = Abc_Clock();
time_spent = (double)(endTime - beginTime)/CLOCKS_PER_SEC;
printf("pre-processing time = %f\n",time_spent);
return 0;
@@ -619,9 +619,9 @@ int Abc_CommandCS_kLiveness( Abc_Frame_t * pAbc, int argc, char ** argv )
safetyInvariantPO = collectSafetyInvariantPOIndex(pNtkTemp);
assert( safetyInvariantPO != -1 );
- beginTime = clock();
+ beginTime = Abc_Clock();
vMasterBarrierDisjuncts = findDisjunctiveMonotoneSignals( pNtk );
- endTime = clock();
+ endTime = Abc_Clock();
time_spent = (double)(endTime - beginTime)/CLOCKS_PER_SEC;
printf("pre-processing time = %f\n",time_spent);
@@ -634,9 +634,9 @@ int Abc_CommandCS_kLiveness( Abc_Frame_t * pAbc, int argc, char ** argv )
safetyInvariantPO = collectSafetyInvariantPOIndex(pNtkTemp);
assert( safetyInvariantPO != -1 );
- beginTime = clock();
+ beginTime = Abc_Clock();
vMasterBarrierDisjuncts = collectUserGivenDisjunctiveMonotoneSignals( pNtk );
- endTime = clock();
+ endTime = Abc_Clock();
time_spent = (double)(endTime - beginTime)/CLOCKS_PER_SEC;
printf("pre-processing time = %f\n",time_spent);
diff --git a/src/proof/llb/llb.h b/src/proof/llb/llb.h
index 464f4526..f465359d 100644
--- a/src/proof/llb/llb.h
+++ b/src/proof/llb/llb.h
@@ -65,7 +65,7 @@ struct Gia_ParLlb_t_
int TimeLimit; // time limit for one reachability run
int TimeLimitGlo; // time limit for all reachability runs
// internal parameters
- clock_t TimeTarget; // the time to stop
+ abctime TimeTarget; // the time to stop
int iFrame; // explored up to this frame
};
diff --git a/src/proof/llb/llb1Core.c b/src/proof/llb/llb1Core.c
index 3aa7a6e5..213f2cd9 100644
--- a/src/proof/llb/llb1Core.c
+++ b/src/proof/llb/llb1Core.c
@@ -114,7 +114,7 @@ int Llb_ManModelCheckAig( Aig_Man_t * pAigGlo, Gia_ParLlb_t * pPars, Vec_Int_t *
Llb_Man_t * p = NULL;
Aig_Man_t * pAig;
int RetValue = -1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( pPars->fIndConstr )
{
@@ -176,7 +176,7 @@ int Llb_ManModelCheckAig( Aig_Man_t * pAigGlo, Gia_ParLlb_t * pPars, Vec_Int_t *
RetValue = Llb_ManReachability( p, vHints, pddGlo );
Llb_ManStop( p );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
if ( pPars->fIndConstr )
Vec_IntFreeP( &vHints );
diff --git a/src/proof/llb/llb1Hint.c b/src/proof/llb/llb1Hint.c
index 07877a98..353b4c69 100644
--- a/src/proof/llb/llb1Hint.c
+++ b/src/proof/llb/llb1Hint.c
@@ -165,7 +165,7 @@ int Llb_ManModelCheckAigWithHints( Aig_Man_t * pAigGlo, Gia_ParLlb_t * pPars )
Vec_Int_t * vHints;
Vec_Int_t * vHFCands;
int i, Entry, RetValue = -1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( pPars->nHintDepth > 0 );
/*
// perform reachability without hints
@@ -212,7 +212,7 @@ Finish:
Vec_IntFreeP( &vHFCands );
Vec_IntFreeP( &vHints );
if ( pPars->fVerbose )
- Abc_PrintTime( 1, "Total runtime", clock() - clk );
+ Abc_PrintTime( 1, "Total runtime", Abc_Clock() - clk );
return RetValue;
}
diff --git a/src/proof/llb/llb1Reach.c b/src/proof/llb/llb1Reach.c
index b7d79994..2acd3020 100644
--- a/src/proof/llb/llb1Reach.c
+++ b/src/proof/llb/llb1Reach.c
@@ -48,7 +48,7 @@ DdNode * Llb_ManConstructOutBdd( Aig_Man_t * pAig, Aig_Obj_t * pNode, DdManager
Vec_Ptr_t * vNodes;
Aig_Obj_t * pObj;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
if ( Aig_ObjFanin0(pNode) == Aig_ManConst1(pAig) )
return Cudd_NotCond( Cudd_ReadOne(dd), Aig_ObjFaninC0(pNode) );
TimeStop = dd->TimeStop; dd->TimeStop = 0;
@@ -157,7 +157,7 @@ DdNode * Llb_ManConstructQuantCubeIntern( Llb_Man_t * p, Llb_Grp_t * pGroup, int
Aig_Obj_t * pObj;
DdNode * bRes, * bTemp, * bVar;
int i, iGroupFirst, iGroupLast;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = p->dd->TimeStop; p->dd->TimeStop = 0;
bRes = Cudd_ReadOne( p->dd ); Cudd_Ref( bRes );
Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vIns, pObj, i )
@@ -207,7 +207,7 @@ DdNode * Llb_ManConstructQuantCubeFwd( Llb_Man_t * p, Llb_Grp_t * pGroup, int iG
Aig_Obj_t * pObj;
DdNode * bRes, * bTemp, * bVar;
int i, iGroupLast;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = p->dd->TimeStop; p->dd->TimeStop = 0;
bRes = Cudd_ReadOne( p->dd ); Cudd_Ref( bRes );
Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vIns, pObj, i )
@@ -251,7 +251,7 @@ DdNode * Llb_ManConstructQuantCubeBwd( Llb_Man_t * p, Llb_Grp_t * pGroup, int iG
Aig_Obj_t * pObj;
DdNode * bRes, * bTemp, * bVar;
int i, iGroupFirst;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = p->dd->TimeStop; p->dd->TimeStop = 0;
bRes = Cudd_ReadOne( p->dd ); Cudd_Ref( bRes );
Vec_PtrForEachEntry( Aig_Obj_t *, pGroup->vIns, pObj, i )
@@ -299,7 +299,7 @@ DdNode * Llb_ManComputeInitState( Llb_Man_t * p, DdManager * dd )
Aig_Obj_t * pObj;
DdNode * bRes, * bVar, * bTemp;
int i, iVar;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = dd->TimeStop; dd->TimeStop = 0;
bRes = Cudd_ReadOne( dd ); Cudd_Ref( bRes );
Saig_ManForEachLo( p->pAig, pObj, i )
@@ -414,7 +414,7 @@ DdNode * Llb_ManCreateConstraints( Llb_Man_t * p, Vec_Int_t * vHints, int fUseNs
DdNode * bConstr, * bFunc, * bTemp;
Aig_Obj_t * pObj;
int i, Entry;
- clock_t TimeStop;
+ abctime TimeStop;
if ( vHints == NULL )
return Cudd_ReadOne( p->dd );
TimeStop = p->dd->TimeStop; p->dd->TimeStop = 0;
@@ -586,12 +586,12 @@ int Llb_ManReachability( Llb_Man_t * p, Vec_Int_t * vHints, DdManager ** pddGlo
int * pGlo2Cs = Vec_IntArray( p->vGlo2Cs );
DdNode * bCurrent, * bReached, * bNext, * bTemp, * bCube;
DdNode * bConstrCs, * bConstrNs;
- clock_t clk2, clk = clock();
+ abctime clk2, clk = Abc_Clock();
int nIters, nBddSize = 0;
// int nThreshold = 10000;
// compute time to stop
- p->pPars->TimeTarget = p->pPars->TimeLimit ? p->pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ p->pPars->TimeTarget = p->pPars->TimeLimit ? p->pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
// define variable limits
Llb_ManPrepareVarLimits( p );
@@ -660,9 +660,9 @@ int Llb_ManReachability( Llb_Man_t * p, Vec_Int_t * vHints, DdManager ** pddGlo
//Extra_bddPrintSupport( p->dd, bCurrent ); printf( "\n" );
for ( nIters = 0; nIters < p->pPars->nIterMax; nIters++ )
{
- clk2 = clock();
+ clk2 = Abc_Clock();
// check the runtime limit
- if ( p->pPars->TimeLimit && clock() > p->pPars->TimeTarget )
+ if ( p->pPars->TimeLimit && Abc_Clock() > p->pPars->TimeTarget )
{
if ( !p->pPars->fSilent )
printf( "Reached timeout during image computation (%d seconds).\n", p->pPars->TimeLimit );
@@ -702,7 +702,7 @@ int Llb_ManReachability( Llb_Man_t * p, Vec_Int_t * vHints, DdManager ** pddGlo
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", p->pAigGlo->pSeqModel->iPo, p->pAigGlo->pName, p->pAigGlo->pName, nIters );
else
Abc_Print( 1, "Output ??? of miter \"%s\" was asserted in frame %d (counter-example is not produced). ", p->pAigGlo->pName, nIters );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
p->pPars->iFrame = nIters - 1;
Cudd_RecursiveDeref( p->dd, bCurrent ); bCurrent = NULL;
@@ -839,7 +839,7 @@ int Llb_ManReachability( Llb_Man_t * p, Vec_Int_t * vHints, DdManager ** pddGlo
fprintf( stdout, "(%4d %3d) ", Cudd_ReadReorderings(p->dd), Cudd_ReadGarbageCollections(p->dd) );
fprintf( stdout, "Rea =%6d ", Cudd_DagSize(bReached) );
fprintf( stdout, "(%4d%4d) ", Cudd_ReadReorderings(p->ddG), Cudd_ReadGarbageCollections(p->ddG) );
- Abc_PrintTime( 1, "Time", clock() - clk2 );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk2 );
}
/*
if ( p->pPars->fVerbose )
diff --git a/src/proof/llb/llb2Bad.c b/src/proof/llb/llb2Bad.c
index 57745c1d..ac04b563 100644
--- a/src/proof/llb/llb2Bad.c
+++ b/src/proof/llb/llb2Bad.c
@@ -42,7 +42,7 @@ ABC_NAMESPACE_IMPL_START
SeeAlso []
***********************************************************************/
-DdNode * Llb_BddComputeBad( Aig_Man_t * pInit, DdManager * dd, clock_t TimeOut )
+DdNode * Llb_BddComputeBad( Aig_Man_t * pInit, DdManager * dd, abctime TimeOut )
{
Vec_Ptr_t * vNodes;
DdNode * bBdd0, * bBdd1, * bTemp, * bResult;
@@ -111,7 +111,7 @@ DdNode * Llb_BddQuantifyPis( Aig_Man_t * pInit, DdManager * dd, DdNode * bFunc )
DdNode * bVar, * bCube, * bTemp;
Aig_Obj_t * pObj;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
assert( Cudd_ReadSize(dd) == Aig_ManCiNum(pInit) );
TimeStop = dd->TimeStop; dd->TimeStop = 0;
// create PI cube
diff --git a/src/proof/llb/llb2Core.c b/src/proof/llb/llb2Core.c
index a6f16aeb..3d62b322 100644
--- a/src/proof/llb/llb2Core.c
+++ b/src/proof/llb/llb2Core.c
@@ -69,7 +69,7 @@ DdNode * Llb_CoreComputeCube( DdManager * dd, Vec_Int_t * vVars, int fUseVarInde
{
DdNode * bRes, * bVar, * bTemp;
int i, iVar, Index;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = dd->TimeStop; dd->TimeStop = 0;
bRes = Cudd_ReadOne( dd ); Cudd_Ref( bRes );
Vec_IntForEachEntry( vVars, Index, i )
@@ -210,17 +210,17 @@ int Llb_CoreReachability_int( Llb_Img_t * p, Vec_Ptr_t * vQuant0, Vec_Ptr_t * vQ
int * pLoc2GloR = p->pPars->fBackward? Vec_IntArray( p->vNs2Glo ) : Vec_IntArray( p->vCs2Glo );
int * pGlo2Loc = p->pPars->fBackward? Vec_IntArray( p->vGlo2Ns ) : Vec_IntArray( p->vGlo2Cs );
DdNode * bCurrent, * bReached, * bNext, * bTemp;
- clock_t clk2, clk = clock();
+ abctime clk2, clk = Abc_Clock();
int nIters, nBddSize;//, iOutFail = -1;
/*
// compute time to stop
if ( p->pPars->TimeLimit )
- p->pPars->TimeTarget = clock() + p->pPars->TimeLimit * CLOCKS_PER_SEC;
+ p->pPars->TimeTarget = Abc_Clock() + p->pPars->TimeLimit * CLOCKS_PER_SEC;
else
p->pPars->TimeTarget = 0;
*/
- if ( clock() > p->pPars->TimeTarget )
+ if ( Abc_Clock() > p->pPars->TimeTarget )
{
if ( !p->pPars->fSilent )
printf( "Reached timeout (%d seconds) before image computation.\n", p->pPars->TimeLimit );
@@ -286,9 +286,9 @@ int Llb_CoreReachability_int( Llb_Img_t * p, Vec_Ptr_t * vQuant0, Vec_Ptr_t * vQ
// compute onion rings
for ( nIters = 0; nIters < p->pPars->nIterMax; nIters++ )
{
- clk2 = clock();
+ clk2 = Abc_Clock();
// check the runtime limit
- if ( p->pPars->TimeLimit && clock() > p->pPars->TimeTarget )
+ if ( p->pPars->TimeLimit && Abc_Clock() > p->pPars->TimeTarget )
{
if ( !p->pPars->fSilent )
printf( "Reached timeout (%d seconds) during image computation.\n", p->pPars->TimeLimit );
@@ -326,7 +326,7 @@ int Llb_CoreReachability_int( Llb_Img_t * p, Vec_Ptr_t * vQuant0, Vec_Ptr_t * vQ
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", p->pInit->pSeqModel->iPo, p->pInit->pName, nIters );
else
Abc_Print( 1, "Output ??? was asserted in frame %d (counter-example is not produced). ", nIters );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
p->pPars->iFrame = nIters - 1;
return 0;
@@ -428,7 +428,7 @@ int Llb_CoreReachability_int( Llb_Img_t * p, Vec_Ptr_t * vQuant0, Vec_Ptr_t * vQ
fprintf( stdout, "Reach =%6d ", Cudd_DagSize(bReached) );
fprintf( stdout, "(%4d%4d) ",
Cudd_ReadReorderings(p->ddG), Cudd_ReadGarbageCollections(p->ddG) );
- Abc_PrintTime( 1, "Time", clock() - clk2 );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk2 );
}
// check timeframe limit
@@ -471,7 +471,7 @@ int Llb_CoreReachability_int( Llb_Img_t * p, Vec_Ptr_t * vQuant0, Vec_Ptr_t * vQ
if ( !p->pPars->fSilent )
{
printf( "Verified only for states reachable in %d frames. ", nIters );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
p->pPars->iFrame = p->pPars->nIterMax;
return -1; // undecided
@@ -479,7 +479,7 @@ int Llb_CoreReachability_int( Llb_Img_t * p, Vec_Ptr_t * vQuant0, Vec_Ptr_t * vQ
if ( !p->pPars->fSilent )
{
printf( "The miter is proved unreachable after %d iterations. ", nIters );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
p->pPars->iFrame = nIters - 1;
return 1; // unreachable
@@ -531,7 +531,7 @@ int Llb_CoreReachability( Llb_Img_t * p )
SeeAlso []
***********************************************************************/
-Vec_Ptr_t * Llb_CoreConstructAll( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Int_t * vVarsNs, clock_t TimeTarget )
+Vec_Ptr_t * Llb_CoreConstructAll( Aig_Man_t * p, Vec_Ptr_t * vResult, Vec_Int_t * vVarsNs, abctime TimeTarget )
{
DdManager * dd;
Vec_Ptr_t * vDdMans;
@@ -691,7 +691,7 @@ void Llb_CoreStop( Llb_Img_t * p )
SeeAlso []
***********************************************************************/
-int Llb_CoreExperiment( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * pPars, Vec_Ptr_t * vResult, clock_t TimeTarget )
+int Llb_CoreExperiment( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * pPars, Vec_Ptr_t * vResult, abctime TimeTarget )
{
int RetValue;
Llb_Img_t * p;
@@ -728,10 +728,10 @@ int Llb_ManReachMinCut( Aig_Man_t * pAig, Gia_ParLlb_t * pPars )
Vec_Ptr_t * vResult;
Aig_Man_t * p;
int RetValue = -1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// compute time to stop
- pPars->TimeTarget = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ pPars->TimeTarget = pPars->TimeLimit ? pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
p = Aig_ManDupFlopsOnly( pAig );
//Aig_ManShow( p, 0, NULL );
@@ -743,7 +743,7 @@ int Llb_ManReachMinCut( Aig_Man_t * pAig, Gia_ParLlb_t * pPars )
vResult = Llb_ManComputeCuts( p, pPars->nPartValue, pPars->fVerbose, pPars->fVeryVerbose );
- if ( pPars->TimeLimit && clock() > pPars->TimeTarget )
+ if ( pPars->TimeLimit && Abc_Clock() > pPars->TimeTarget )
{
if ( !pPars->fSilent )
printf( "Reached timeout (%d seconds) after partitioning.\n", pPars->TimeLimit );
@@ -764,7 +764,7 @@ int Llb_ManReachMinCut( Aig_Man_t * pAig, Gia_ParLlb_t * pPars )
Aig_ManStop( p );
if ( RetValue == -1 )
- Abc_PrintTime( 1, "Total runtime of the min-cut-based reachability engine", clock() - clk );
+ Abc_PrintTime( 1, "Total runtime of the min-cut-based reachability engine", Abc_Clock() - clk );
return RetValue;
}
diff --git a/src/proof/llb/llb2Driver.c b/src/proof/llb/llb2Driver.c
index 40d7a116..1471f377 100644
--- a/src/proof/llb/llb2Driver.c
+++ b/src/proof/llb/llb2Driver.c
@@ -130,7 +130,7 @@ DdNode * Llb_DriverPhaseCube( Aig_Man_t * pAig, Vec_Int_t * vDriRefs, DdManager
DdNode * bCube, * bVar, * bTemp;
Aig_Obj_t * pObj;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = dd->TimeStop; dd->TimeStop = 0;
bCube = Cudd_ReadOne( dd ); Cudd_Ref( bCube );
Saig_ManForEachLi( pAig, pObj, i )
@@ -160,7 +160,7 @@ DdNode * Llb_DriverPhaseCube( Aig_Man_t * pAig, Vec_Int_t * vDriRefs, DdManager
SeeAlso []
***********************************************************************/
-DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs, clock_t TimeTarget )
+DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs, abctime TimeTarget )
{
// int fVerbose = 1;
DdManager * dd;
diff --git a/src/proof/llb/llb2Flow.c b/src/proof/llb/llb2Flow.c
index a04998fc..9fa40b9e 100644
--- a/src/proof/llb/llb2Flow.c
+++ b/src/proof/llb/llb2Flow.c
@@ -1227,7 +1227,7 @@ Vec_Ptr_t * Llb_ManComputeCuts( Aig_Man_t * p, int Num, int fVerbose, int fVeryV
int nVolMax = Aig_ManNodeNum(p) / Num;
Vec_Ptr_t * vResult, * vMinCut = NULL, * vLower, * vUpper;
int i, k, nVol;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vResult = Vec_PtrAlloc( 100 );
Vec_PtrPush( vResult, Llb_ManComputeCutLo(p) );
Vec_PtrPush( vResult, Llb_ManComputeCutLi(p) );
@@ -1277,7 +1277,7 @@ Vec_Ptr_t * Llb_ManComputeCuts( Aig_Man_t * p, int Num, int fVerbose, int fVeryV
if ( fVerbose )
{
printf( "Finished computing %d partitions. ", Vec_PtrSize(vResult) - 1 );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
Llb_ManResultPrint( p, vResult );
}
return vResult;
diff --git a/src/proof/llb/llb2Image.c b/src/proof/llb/llb2Image.c
index cfaef13c..36ff2df5 100644
--- a/src/proof/llb/llb2Image.c
+++ b/src/proof/llb/llb2Image.c
@@ -179,7 +179,7 @@ void Llb_ImgSchedule( Vec_Ptr_t * vSupps, Vec_Ptr_t ** pvQuant0, Vec_Ptr_t ** pv
SeeAlso []
***********************************************************************/
-DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUpper, clock_t TimeTarget )
+DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUpper, abctime TimeTarget )
{
Vec_Ptr_t * vNodes, * vRange;
Aig_Obj_t * pObj;
@@ -260,7 +260,7 @@ DdNode * Llb_ImgComputeCube( Aig_Man_t * pAig, Vec_Int_t * vNodeIds, DdManager *
DdNode * bProd, * bTemp;
Aig_Obj_t * pObj;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = dd->TimeStop; dd->TimeStop = 0;
bProd = Cudd_ReadOne(dd); Cudd_Ref( bProd );
Aig_ManForEachObjVec( vNodeIds, pAig, pObj, i )
@@ -289,7 +289,7 @@ void Llb_ImgQuantifyFirst( Aig_Man_t * pAig, Vec_Ptr_t * vDdMans, Vec_Ptr_t * vQ
DdManager * dd;
DdNode * bProd, * bRes, * bTemp;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_PtrForEachEntry( DdManager *, vDdMans, dd, i )
{
// remember unquantified ones
@@ -320,7 +320,7 @@ void Llb_ImgQuantifyFirst( Aig_Man_t * pAig, Vec_Ptr_t * vDdMans, Vec_Ptr_t * vQ
if ( fVerbose )
Abc_Print( 1, "Supp = %3d. ", Cudd_SupportSize(dd, bRes) );
if ( fVerbose )
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
}
@@ -362,13 +362,13 @@ void Llb_ImgQuantifyReset( Vec_Ptr_t * vDdMans )
***********************************************************************/
DdNode * Llb_ImgComputeImage( Aig_Man_t * pAig, Vec_Ptr_t * vDdMans, DdManager * dd, DdNode * bInit,
Vec_Ptr_t * vQuant0, Vec_Ptr_t * vQuant1, Vec_Int_t * vDriRefs,
- clock_t TimeTarget, int fBackward, int fReorder, int fVerbose )
+ abctime TimeTarget, int fBackward, int fReorder, int fVerbose )
{
// int fCheckSupport = 0;
DdManager * ddPart;
DdNode * bImage, * bGroup, * bCube, * bTemp;
int i;
- clock_t clk, clk0 = clock();
+ abctime clk, clk0 = Abc_Clock();
bImage = bInit; Cudd_Ref( bImage );
if ( fBackward )
@@ -397,7 +397,7 @@ DdNode * Llb_ImgComputeImage( Aig_Man_t * pAig, Vec_Ptr_t * vDdMans, DdManager *
// perform image computation
Vec_PtrForEachEntry( DdManager *, vDdMans, ddPart, i )
{
- clk = clock();
+ clk = Abc_Clock();
if ( fVerbose )
printf( " %2d : ", i );
// transfer the BDD from the group manager to the main manager
@@ -434,7 +434,7 @@ printf( "Im0 =%6d. Im1 =%6d. ", Cudd_DagSize(bTemp), Cudd_DagSize(bImage) );
if ( fVerbose )
printf( "Supp =%3d. ", Cudd_SupportSize(dd, bImage) );
if ( fVerbose )
-Abc_PrintTime( 1, "T", clock() - clk );
+Abc_PrintTime( 1, "T", Abc_Clock() - clk );
}
if ( !fBackward )
@@ -464,7 +464,7 @@ Abc_PrintTime( 1, "T", clock() - clk );
// Cudd_ReduceHeap( dd, CUDD_REORDER_SYMM_SIFT, 100 );
// Abc_Print( 1, "After =%5d. ", Cudd_DagSize(bImage) );
if ( fVerbose )
- Abc_PrintTime( 1, "Time", clock() - clk0 );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk0 );
// Abc_Print( 1, "\n" );
}
diff --git a/src/proof/llb/llb3Image.c b/src/proof/llb/llb3Image.c
index dcce8441..72c6120a 100644
--- a/src/proof/llb/llb3Image.c
+++ b/src/proof/llb/llb3Image.c
@@ -79,7 +79,7 @@ static inline Llb_Prt_t * Llb_MgrPart( Llb_Mgr_t * p, int i ) { return p->pPart
for ( i = 0; (i < Vec_IntSize(pVar->vParts)) && (((pPart) = Llb_MgrPart(p, Vec_IntEntry(pVar->vParts,i))), 1); i++ )
// statistics
-clock_t timeBuild, timeAndEx, timeOther;
+abctime timeBuild, timeAndEx, timeOther;
int nSuppMax;
////////////////////////////////////////////////////////////////////////
@@ -141,7 +141,7 @@ DdNode * Llb_NonlinCreateCube1( Llb_Mgr_t * p, Llb_Prt_t * pPart )
DdNode * bCube, * bTemp;
Llb_Var_t * pVar;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = p->dd->TimeStop; p->dd->TimeStop = 0;
bCube = Cudd_ReadOne(p->dd); Cudd_Ref( bCube );
Llb_PartForEachVar( p, pPart, pVar, i )
@@ -174,7 +174,7 @@ DdNode * Llb_NonlinCreateCube2( Llb_Mgr_t * p, Llb_Prt_t * pPart1, Llb_Prt_t * p
DdNode * bCube, * bTemp;
Llb_Var_t * pVar;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = p->dd->TimeStop; p->dd->TimeStop = 0;
bCube = Cudd_ReadOne(p->dd); Cudd_Ref( bCube );
Llb_PartForEachVar( p, pPart1, pVar, i )
@@ -747,7 +747,7 @@ int Llb_NonlinNextPartitions( Llb_Mgr_t * p, Llb_Prt_t ** ppPart1, Llb_Prt_t **
***********************************************************************/
void Llb_NonlinReorder( DdManager * dd, int fTwice, int fVerbose )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( fVerbose )
Abc_Print( 1, "Reordering... Before =%5d. ", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
Cudd_ReduceHeap( dd, CUDD_REORDER_SYMM_SIFT, 100 );
@@ -760,7 +760,7 @@ void Llb_NonlinReorder( DdManager * dd, int fTwice, int fVerbose )
Abc_Print( 1, "After =%5d. ", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
}
if ( fVerbose )
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -888,9 +888,9 @@ DdNode * Llb_NonlinImage( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vRo
Llb_Mgr_t * p;
DdNode * bFunc, * bTemp;
int i, nReorders, timeInside;
- clock_t clk = clock(), clk2;
+ abctime clk = Abc_Clock(), clk2;
// start the manager
- clk2 = clock();
+ clk2 = Abc_Clock();
p = Llb_NonlinAlloc( pAig, vLeaves, vRoots, pVars2Q, dd );
if ( !Llb_NonlinStart( p ) )
{
@@ -903,8 +903,8 @@ DdNode * Llb_NonlinImage( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vRo
Llb_MgrForEachPart( p, pPart, i )
if ( Llb_NonlinHasSingletonVars(p, pPart) )
Llb_NonlinQuantify1( p, pPart, 0 );
- timeBuild += clock() - clk2;
- timeInside = clock() - clk2;
+ timeBuild += Abc_Clock() - clk2;
+ timeInside = Abc_Clock() - clk2;
// compute scores
Llb_NonlinRecomputeScores( p );
// save permutation
@@ -913,15 +913,15 @@ DdNode * Llb_NonlinImage( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vRo
// iteratively quantify variables
while ( Llb_NonlinNextPartitions(p, &pPart1, &pPart2) )
{
- clk2 = clock();
+ clk2 = Abc_Clock();
nReorders = Cudd_ReadReorderings(dd);
if ( !Llb_NonlinQuantify2( p, pPart1, pPart2 ) )
{
Llb_NonlinFree( p );
return NULL;
}
- timeAndEx += clock() - clk2;
- timeInside += clock() - clk2;
+ timeAndEx += Abc_Clock() - clk2;
+ timeInside += Abc_Clock() - clk2;
if ( nReorders < Cudd_ReadReorderings(dd) )
Llb_NonlinRecomputeScores( p );
// else
@@ -939,7 +939,7 @@ DdNode * Llb_NonlinImage( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vRo
// reorder variables
if ( fReorder )
Llb_NonlinReorder( dd, 0, fVerbose );
- timeOther += clock() - clk - timeInside;
+ timeOther += Abc_Clock() - clk - timeInside;
// return
Cudd_Deref( bFunc );
return bFunc;
@@ -960,10 +960,10 @@ static Llb_Mgr_t * p = NULL;
SeeAlso []
***********************************************************************/
-DdManager * Llb_NonlinImageStart( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vRoots, int * pVars2Q, int * pOrder, int fFirst, clock_t TimeTarget )
+DdManager * Llb_NonlinImageStart( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vRoots, int * pVars2Q, int * pOrder, int fFirst, abctime TimeTarget )
{
DdManager * dd;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( p == NULL );
// start a new manager (disable reordering)
dd = Cudd_Init( Aig_ManObjNumMax(pAig), 0, CUDD_UNIQUE_SLOTS, CUDD_CACHE_SLOTS, 0 );
@@ -979,7 +979,7 @@ DdManager * Llb_NonlinImageStart( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr
p = NULL;
return NULL;
}
- timeBuild += clock() - clk;
+ timeBuild += Abc_Clock() - clk;
// if ( !fFirst )
// Cudd_AutodynEnable( dd, CUDD_REORDER_SYMM_SIFT );
return dd;
@@ -1001,7 +1001,7 @@ DdNode * Llb_NonlinImageCompute( DdNode * bCurrent, int fReorder, int fDrop, int
Llb_Prt_t * pPart, * pPart1, * pPart2;
DdNode * bFunc, * bTemp;
int i, nReorders, timeInside = 0;
- clock_t clk = clock(), clk2;
+ abctime clk = Abc_Clock(), clk2;
// add partition
Llb_NonlinAddPartition( p, p->iPartFree++, bCurrent );
@@ -1020,15 +1020,15 @@ DdNode * Llb_NonlinImageCompute( DdNode * bCurrent, int fReorder, int fDrop, int
// iteratively quantify variables
while ( Llb_NonlinNextPartitions(p, &pPart1, &pPart2) )
{
- clk2 = clock();
+ clk2 = Abc_Clock();
nReorders = Cudd_ReadReorderings(p->dd);
if ( !Llb_NonlinQuantify2( p, pPart1, pPart2 ) )
{
Llb_NonlinFree( p );
return NULL;
}
- timeAndEx += clock() - clk2;
- timeInside += clock() - clk2;
+ timeAndEx += Abc_Clock() - clk2;
+ timeInside += Abc_Clock() - clk2;
if ( nReorders < Cudd_ReadReorderings(p->dd) )
Llb_NonlinRecomputeScores( p );
// else
@@ -1055,7 +1055,7 @@ DdNode * Llb_NonlinImageCompute( DdNode * bCurrent, int fReorder, int fDrop, int
// save permutation
// memcpy( pOrder, p->dd->invperm, sizeof(int) * Cudd_ReadSize(p->dd) );
- timeOther += clock() - clk - timeInside;
+ timeOther += Abc_Clock() - clk - timeInside;
// return
Cudd_Deref( bFunc );
return bFunc;
diff --git a/src/proof/llb/llb3Nonlin.c b/src/proof/llb/llb3Nonlin.c
index 22e23337..94a48bbf 100644
--- a/src/proof/llb/llb3Nonlin.c
+++ b/src/proof/llb/llb3Nonlin.c
@@ -54,18 +54,18 @@ struct Llb_Mnn_t_
int ddLocReos;
int ddLocGrbs;
- clock_t timeImage;
- clock_t timeTran1;
- clock_t timeTran2;
- clock_t timeGloba;
- clock_t timeOther;
- clock_t timeTotal;
- clock_t timeReo;
- clock_t timeReoG;
+ abctime timeImage;
+ abctime timeTran1;
+ abctime timeTran2;
+ abctime timeGloba;
+ abctime timeOther;
+ abctime timeTotal;
+ abctime timeReo;
+ abctime timeReoG;
};
-extern clock_t timeBuild, timeAndEx, timeOther;
+extern abctime timeBuild, timeAndEx, timeOther;
extern int nSuppMax;
////////////////////////////////////////////////////////////////////////
@@ -90,7 +90,7 @@ int Llb_NonlinFindBestVar( DdManager * dd, DdNode * bFunc, Aig_Man_t * pAig )
DdNode * bCof, * bVar;
int i, iVar, iVarBest = -1, iValue, iValueBest = ABC_INFINITY, Size0Best = -1;
int Size, Size0, Size1;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Size = Cudd_DagSize(bFunc);
// printf( "Original = %6d. SuppSize = %3d. Vars = %3d.\n",
// Size = Cudd_DagSize(bFunc), Cudd_SupportSize(dd, bFunc), Aig_ManRegNum(pAig) );
@@ -134,7 +134,7 @@ printf( "S =%6d\n", iValue );
}
printf( "BestVar = %4d/%4d. Value =%6d. Orig =%6d. Size0 =%6d. ",
iVarBest, Aig_ObjId(Saig_ManLo(pAig,iVarBest)), iValueBest, Size, Size0Best );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return iVarBest;
}
@@ -216,7 +216,7 @@ DdNode * Llb_NonlinComputeInitState( Aig_Man_t * pAig, DdManager * dd )
Aig_Obj_t * pObj;
DdNode * bRes, * bVar, * bTemp;
int i, iVar;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = dd->TimeStop; dd->TimeStop = 0;
bRes = Cudd_ReadOne( dd ); Cudd_Ref( bRes );
Saig_ManForEachLo( pAig, pObj, i )
@@ -430,11 +430,11 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
{
DdNode * bTemp, * bNext;
int nIters, nBddSize0, nBddSize = -1, NumCmp;//, Limit = p->pPars->nBddMax;
- clock_t clk2, clk3, clk = clock();
+ abctime clk2, clk3, clk = Abc_Clock();
assert( Aig_ManRegNum(p->pAig) > 0 );
// compute time to stop
- p->pPars->TimeTarget = p->pPars->TimeLimit ? p->pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ p->pPars->TimeTarget = p->pPars->TimeLimit ? p->pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
// set the stop time parameter
p->dd->TimeStop = p->pPars->TimeTarget;
@@ -472,8 +472,8 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
for ( nIters = 0; nIters < p->pPars->nIterMax; nIters++ )
{
// check the runtime limit
- clk2 = clock();
- if ( p->pPars->TimeLimit && clock() > p->pPars->TimeTarget )
+ clk2 = Abc_Clock();
+ if ( p->pPars->TimeLimit && Abc_Clock() > p->pPars->TimeTarget )
{
if ( !p->pPars->fSilent )
printf( "Reached timeout (%d seconds) during image computation.\n", p->pPars->TimeLimit );
@@ -507,7 +507,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", p->pInit->pSeqModel->iPo, nIters );
else
Abc_Print( 1, "Output ??? was asserted in frame %d (counter-example is not produced). ", nIters );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
p->pPars->iFrame = nIters - 1;
Llb_NonlinImageQuit();
@@ -515,7 +515,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
}
// compute the next states
- clk3 = clock();
+ clk3 = Abc_Clock();
nBddSize0 = Cudd_DagSize( p->dd->bFunc );
bNext = Llb_NonlinImageCompute( p->dd->bFunc, p->pPars->fReorder, 0, 1, p->pOrderL ); // consumes ref
// bNext = Llb_NonlinImage( p->pAig, p->vLeaves, p->vRoots, p->pVars2Q, p->dd, bCurrent,
@@ -530,11 +530,11 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
}
Cudd_Ref( bNext );
nBddSize = Cudd_DagSize( bNext );
- p->timeImage += clock() - clk3;
+ p->timeImage += Abc_Clock() - clk3;
// transfer to the state manager
- clk3 = clock();
+ clk3 = Abc_Clock();
Cudd_RecursiveDeref( p->ddG, p->ddG->bFunc2 );
p->ddG->bFunc2 = Extra_TransferPermute( p->dd, p->ddG, bNext, Vec_IntArray(p->vNs2Glo) );
// p->ddG->bFunc2 = Extra_bddAndPermute( p->ddG, Cudd_Not(p->ddG->bFunc), p->dd, bNext, Vec_IntArray(p->vNs2Glo) );
@@ -549,7 +549,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
}
Cudd_Ref( p->ddG->bFunc2 );
Cudd_RecursiveDeref( p->dd, bNext );
- p->timeTran1 += clock() - clk3;
+ p->timeTran1 += Abc_Clock() - clk3;
// save permutation
NumCmp = Llb_NonlinCompPerms( p->dd, p->pOrderL2 );
@@ -571,7 +571,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
//Extra_TestAndPerm( p->ddG, Cudd_Not(p->ddG->bFunc), p->ddG->bFunc2 );
// derive new states
- clk3 = clock();
+ clk3 = Abc_Clock();
p->ddG->bFunc2 = Cudd_bddAnd( p->ddG, bTemp = p->ddG->bFunc2, Cudd_Not(p->ddG->bFunc) );
if ( p->ddG->bFunc2 == NULL )
{
@@ -584,12 +584,12 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
}
Cudd_Ref( p->ddG->bFunc2 );
Cudd_RecursiveDeref( p->ddG, bTemp );
- p->timeGloba += clock() - clk3;
+ p->timeGloba += Abc_Clock() - clk3;
if ( Cudd_IsConstant(p->ddG->bFunc2) )
break;
// add to the reached set
- clk3 = clock();
+ clk3 = Abc_Clock();
p->ddG->bFunc = Cudd_bddOr( p->ddG, bTemp = p->ddG->bFunc, p->ddG->bFunc2 );
if ( p->ddG->bFunc == NULL )
{
@@ -602,7 +602,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
}
Cudd_Ref( p->ddG->bFunc );
Cudd_RecursiveDeref( p->ddG, bTemp );
- p->timeGloba += clock() - clk3;
+ p->timeGloba += Abc_Clock() - clk3;
// reset permutation
// RetValue = Cudd_CheckZeroRef( dd );
@@ -610,7 +610,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
// Cudd_ShuffleHeap( dd, pOrderG );
// move new states to the working manager
- clk3 = clock();
+ clk3 = Abc_Clock();
p->dd->bFunc = Extra_TransferPermute( p->ddG, p->dd, p->ddG->bFunc2, Vec_IntArray(p->vGlo2Cs) );
if ( p->dd->bFunc == NULL )
{
@@ -621,7 +621,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
return -1;
}
Cudd_Ref( p->dd->bFunc );
- p->timeTran2 += clock() - clk3;
+ p->timeTran2 += Abc_Clock() - clk3;
// report the results
if ( p->pPars->fVerbose )
@@ -635,7 +635,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
printf( "S =%4d ", nSuppMax );
printf( "cL =%5d ", NumCmp );
printf( "cG =%5d ", Llb_NonlinCompPerms( p->ddG, p->pOrderG ) );
- Abc_PrintTime( 1, "T", clock() - clk2 );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clk2 );
memcpy( p->pOrderG, p->ddG->perm, sizeof(int) * p->ddG->size );
}
/*
@@ -680,7 +680,7 @@ int Llb_NonlinReachability( Llb_Mnn_t * p )
if ( !p->pPars->fSilent )
printf( "The miter is proved unreachable after %d iterations. ", nIters );
p->pPars->iFrame = nIters - 1;
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 1; // unreachable
}
@@ -808,7 +808,7 @@ void Llb_NonlinExperiment( Aig_Man_t * pAig, int Num )
Llb_Mnn_t * pMnn;
Gia_ParLlb_t Pars, * pPars = &Pars;
Aig_Man_t * p;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Llb_ManSetDefaultParams( pPars );
pPars->fVerbose = 1;
@@ -820,7 +820,7 @@ void Llb_NonlinExperiment( Aig_Man_t * pAig, int Num )
pMnn = Llb_MnnStart( pAig, p, pPars );
Llb_NonlinReachability( pMnn );
- pMnn->timeTotal = clock() - clk;
+ pMnn->timeTotal = Abc_Clock() - clk;
Llb_MnnStop( pMnn );
Aig_ManStop( p );
@@ -852,10 +852,10 @@ int Llb_NonlinCoreReach( Aig_Man_t * pAig, Gia_ParLlb_t * pPars )
if ( !pPars->fSkipReach )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pMnn = Llb_MnnStart( pAig, p, pPars );
RetValue = Llb_NonlinReachability( pMnn );
- pMnn->timeTotal = clock() - clk;
+ pMnn->timeTotal = Abc_Clock() - clk;
Llb_MnnStop( pMnn );
}
diff --git a/src/proof/llb/llb4Cex.c b/src/proof/llb/llb4Cex.c
index c676b76e..18aeaf04 100644
--- a/src/proof/llb/llb4Cex.c
+++ b/src/proof/llb/llb4Cex.c
@@ -52,7 +52,7 @@ Abc_Cex_t * Llb4_Nonlin4TransformCex( Aig_Man_t * pAig, Vec_Ptr_t * vStates, int
sat_solver * pSat;
Aig_Obj_t * pObj;
unsigned * pNext, * pThis;
- int i, k, iBit, status, nRegs;//, clk = clock();
+ int i, k, iBit, status, nRegs;//, clk = Abc_Clock();
/*
Vec_PtrForEachEntry( unsigned *, vStates, pNext, i )
{
@@ -187,7 +187,7 @@ Abc_Cex_t * Llb4_Nonlin4TransformCex( Aig_Man_t * pAig, Vec_Ptr_t * vStates, int
}
// report the results
// if ( fVerbose )
-// Abc_PrintTime( 1, "SAT-based cex generation time", clock() - clk );
+// Abc_PrintTime( 1, "SAT-based cex generation time", Abc_Clock() - clk );
return pCex;
}
diff --git a/src/proof/llb/llb4Image.c b/src/proof/llb/llb4Image.c
index 4ae087b5..2ba4fcfd 100644
--- a/src/proof/llb/llb4Image.c
+++ b/src/proof/llb/llb4Image.c
@@ -77,7 +77,7 @@ static inline Llb_Prt_t * Llb_MgrPart( Llb_Mgr_t * p, int i ) { return p->pPart
for ( i = 0; (i < Vec_IntSize(pVar->vParts)) && (((pPart) = Llb_MgrPart(p, Vec_IntEntry(pVar->vParts,i))), 1); i++ )
// statistics
-//clock_t timeBuild, timeAndEx, timeOther;
+//abctime timeBuild, timeAndEx, timeOther;
//int nSuppMax;
////////////////////////////////////////////////////////////////////////
@@ -140,7 +140,7 @@ DdNode * Llb_Nonlin4CreateCube1( Llb_Mgr_t * p, Llb_Prt_t * pPart )
DdNode * bCube, * bTemp;
Llb_Var_t * pVar;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = p->dd->TimeStop; p->dd->TimeStop = 0;
bCube = Cudd_ReadOne(p->dd); Cudd_Ref( bCube );
Llb_PartForEachVar( p, pPart, pVar, i )
@@ -173,7 +173,7 @@ DdNode * Llb_Nonlin4CreateCube2( Llb_Mgr_t * p, Llb_Prt_t * pPart1, Llb_Prt_t *
DdNode * bCube, * bTemp;
Llb_Var_t * pVar;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = p->dd->TimeStop; p->dd->TimeStop = 0;
bCube = Cudd_ReadOne(p->dd); Cudd_Ref( bCube );
Llb_PartForEachVar( p, pPart1, pVar, i )
@@ -808,7 +808,7 @@ Vec_Ptr_t * Llb_Nonlin4Group( DdManager * dd, Vec_Ptr_t * vParts, Vec_Int_t * vV
Vec_Ptr_t * vGroups;
Llb_Prt_t * pPart, * pPart1, * pPart2;
Llb_Mgr_t * p;
- int i, nReorders;//, clk = clock();
+ int i, nReorders;//, clk = Abc_Clock();
// start the manager
p = Llb_Nonlin4Alloc( dd, vParts, NULL, vVars2Q, nSizeMax );
// remove singles
@@ -849,7 +849,7 @@ Vec_Ptr_t * Llb_Nonlin4Group( DdManager * dd, Vec_Ptr_t * vParts, Vec_Int_t * vV
//Extra_bddPrintSupport( p->dd, pPart->bFunc ); printf( "\n" );
}
Llb_Nonlin4Free( p );
-//Abc_PrintTime( 1, "Reparametrization time", clock() - clk );
+//Abc_PrintTime( 1, "Reparametrization time", Abc_Clock() - clk );
return vGroups;
}
diff --git a/src/proof/llb/llb4Nonlin.c b/src/proof/llb/llb4Nonlin.c
index 51f9d602..6d5826a0 100644
--- a/src/proof/llb/llb4Nonlin.c
+++ b/src/proof/llb/llb4Nonlin.c
@@ -47,11 +47,11 @@ struct Llb_Mnx_t_
Vec_Int_t * vOrder; // for each object ID, its BDD variable number or -1
Vec_Int_t * vVars2Q; // 1 if variable is quantifiable; 0 othervise
- clock_t timeImage;
- clock_t timeRemap;
- clock_t timeReo;
- clock_t timeOther;
- clock_t timeTotal;
+ abctime timeImage;
+ abctime timeRemap;
+ abctime timeReo;
+ abctime timeOther;
+ abctime timeTotal;
};
//extern int timeBuild, timeAndEx, timeOther;
@@ -447,7 +447,7 @@ DdNode * Llb_Nonlin4ComputeInitState( DdManager * dd, Aig_Man_t * pAig, Vec_Int_
Aig_Obj_t * pObjLi, * pObjLo;
DdNode * bRes, * bVar, * bTemp;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = dd->TimeStop; dd->TimeStop = 0;
bRes = Cudd_ReadOne( dd ); Cudd_Ref( bRes );
Saig_ManForEachLiLo( pAig, pObjLi, pObjLo, i )
@@ -477,7 +477,7 @@ DdNode * Llb_Nonlin4ComputeCube( DdManager * dd, Aig_Man_t * pAig, Vec_Int_t * v
Aig_Obj_t * pObjLo, * pObjLi, * pObjTemp;
DdNode * bRes, * bVar, * bTemp;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = dd->TimeStop; dd->TimeStop = 0;
bRes = Cudd_ReadOne( dd ); Cudd_Ref( bRes );
Saig_ManForEachLiLo( pAig, pObjLi, pObjLo, i )
@@ -579,7 +579,7 @@ Vec_Ptr_t * Llb_Nonlin4DeriveCex( Llb_Mnx_t * p, int fBackward, int fVerbose )
Vec_Ptr_t * vStates, * vRootsNew;
Aig_Obj_t * pObj;
DdNode * bState = NULL, * bImage, * bOneCube, * bRing;
- int i, v, RetValue;//, clk = clock();
+ int i, v, RetValue;//, clk = Abc_Clock();
char * pValues;
assert( Vec_PtrSize(p->vRings) > 0 );
// disable the timeout
@@ -649,7 +649,7 @@ Vec_Ptr_t * Llb_Nonlin4DeriveCex( Llb_Mnx_t * p, int fBackward, int fVerbose )
if ( fBackward )
Vec_PtrReverseOrder( vStates );
// if ( fVerbose )
-// Abc_PrintTime( 1, "BDD-based cex generation time", clock() - clk );
+// Abc_PrintTime( 1, "BDD-based cex generation time", Abc_Clock() - clk );
return vStates;
}
@@ -669,7 +669,7 @@ int Llb_Nonlin4Reachability( Llb_Mnx_t * p )
{
DdNode * bAux;
int nIters, nBddSizeFr = 0, nBddSizeTo = 0, nBddSizeTo2 = 0;
- clock_t clkTemp, clkIter, clk = clock();
+ abctime clkTemp, clkIter, clk = Abc_Clock();
assert( Aig_ManRegNum(p->pAig) > 0 );
if ( p->pPars->fBackward )
@@ -736,9 +736,9 @@ int Llb_Nonlin4Reachability( Llb_Mnx_t * p )
p->bReached = p->bCurrent; Cudd_Ref( p->bReached );
for ( nIters = 0; nIters < p->pPars->nIterMax; nIters++ )
{
- clkIter = clock();
+ clkIter = Abc_Clock();
// check the runtime limit
- if ( p->pPars->TimeLimit && clock() > p->pPars->TimeTarget )
+ if ( p->pPars->TimeLimit && Abc_Clock() > p->pPars->TimeTarget )
{
if ( !p->pPars->fSilent )
printf( "Reached timeout (%d seconds) during image computation.\n", p->pPars->TimeLimit );
@@ -760,14 +760,14 @@ int Llb_Nonlin4Reachability( Llb_Mnx_t * p )
if ( !p->pPars->fSilent )
{
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", p->pAig->pSeqModel->iPo, p->pAig->pName, nIters );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
p->pPars->iFrame = nIters - 1;
return 0;
}
// compute the next states
- clkTemp = clock();
+ clkTemp = Abc_Clock();
p->bNext = Llb_Nonlin4Image( p->dd, p->vRoots, p->bCurrent, p->vVars2Q );
if ( p->bNext == NULL )
{
@@ -777,10 +777,10 @@ int Llb_Nonlin4Reachability( Llb_Mnx_t * p )
return -1;
}
Cudd_Ref( p->bNext );
- p->timeImage += clock() - clkTemp;
+ p->timeImage += Abc_Clock() - clkTemp;
// remap into current states
- clkTemp = clock();
+ clkTemp = Abc_Clock();
p->bNext = Cudd_bddVarMap( p->dd, bAux = p->bNext );
if ( p->bNext == NULL )
{
@@ -792,7 +792,7 @@ int Llb_Nonlin4Reachability( Llb_Mnx_t * p )
}
Cudd_Ref( p->bNext );
Cudd_RecursiveDeref( p->dd, bAux );
- p->timeRemap += clock() - clkTemp;
+ p->timeRemap += Abc_Clock() - clkTemp;
// collect statistics
if ( p->pPars->fVerbose )
@@ -847,7 +847,7 @@ printf( "Before = %d. After = %d.\n", Cudd_DagSize(bAux), Cudd_DagSize(p->bCurr
printf( "ImCs =%7d ", nBddSizeTo2 );
printf( "Rea =%7d ", Cudd_DagSize(p->bReached) );
printf( "(%4d %4d) ", Cudd_ReadReorderings(p->dd), Cudd_ReadGarbageCollections(p->dd) );
- Abc_PrintTime( 1, "T", clock() - clkIter );
+ Abc_PrintTime( 1, "T", Abc_Clock() - clkIter );
}
/*
if ( pPars->fVerbose )
@@ -889,7 +889,7 @@ printf( "Before = %d. After = %d.\n", Cudd_DagSize(bAux), Cudd_DagSize(p->bCurr
if ( !p->pPars->fSilent )
printf( "The miter is proved unreachable after %d iterations. ", nIters );
p->pPars->iFrame = nIters - 1;
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
return 1; // unreachable
}
@@ -906,7 +906,7 @@ printf( "Before = %d. After = %d.\n", Cudd_DagSize(bAux), Cudd_DagSize(p->bCurr
***********************************************************************/
void Llb_Nonlin4Reorder( DdManager * dd, int fTwice, int fVerbose )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( fVerbose )
Abc_Print( 1, "Reordering... Before =%5d. ", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
Cudd_ReduceHeap( dd, CUDD_REORDER_SYMM_SIFT, 100 );
@@ -919,7 +919,7 @@ void Llb_Nonlin4Reorder( DdManager * dd, int fTwice, int fVerbose )
Abc_Print( 1, "After =%5d. ", Cudd_ReadKeys(dd) - Cudd_ReadDead(dd) );
}
if ( fVerbose )
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
/**Function*************************************************************
@@ -942,7 +942,7 @@ Llb_Mnx_t * Llb_MnxStart( Aig_Man_t * pAig, Gia_ParLlb_t * pPars )
p->pPars = pPars;
// compute time to stop
- p->pPars->TimeTarget = p->pPars->TimeLimit ? p->pPars->TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ p->pPars->TimeTarget = p->pPars->TimeLimit ? p->pPars->TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
if ( pPars->fCluster )
{
@@ -1073,12 +1073,12 @@ int Llb_Nonlin4CoreReach( Aig_Man_t * pAig, Gia_ParLlb_t * pPars )
return RetValue;
}
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pMnn = Llb_MnxStart( pAig, pPars );
//Llb_MnxCheckNextStateVars( pMnn );
if ( !pPars->fSkipReach )
RetValue = Llb_Nonlin4Reachability( pMnn );
- pMnn->timeTotal = clock() - clk;
+ pMnn->timeTotal = Abc_Clock() - clk;
Llb_MnxStop( pMnn );
}
return RetValue;
diff --git a/src/proof/llb/llb4Sweep.c b/src/proof/llb/llb4Sweep.c
index 709bd61a..6b318572 100644
--- a/src/proof/llb/llb4Sweep.c
+++ b/src/proof/llb/llb4Sweep.c
@@ -287,7 +287,7 @@ DdNode * Llb4_Nonlin4SweepBadMonitor( Aig_Man_t * pAig, Vec_Int_t * vOrder, DdMa
Aig_Obj_t * pObj;
DdNode * bRes, * bVar, * bTemp;
int i;
- clock_t TimeStop;
+ abctime TimeStop;
TimeStop = dd->TimeStop; dd->TimeStop = 0;
bRes = Cudd_ReadOne( dd ); Cudd_Ref( bRes );
Saig_ManForEachPo( pAig, pObj, i )
diff --git a/src/proof/llb/llbInt.h b/src/proof/llb/llbInt.h
index 208d291c..0c53c01f 100644
--- a/src/proof/llb/llbInt.h
+++ b/src/proof/llb/llbInt.h
@@ -152,28 +152,28 @@ extern int Llb_ManReachability( Llb_Man_t * p, Vec_Int_t * vHints, D
extern void Llb_MtrSchedule( Llb_Mtr_t * p );
/*=== llb2Bad.c ======================================================*/
-extern DdNode * Llb_BddComputeBad( Aig_Man_t * pInit, DdManager * dd, clock_t TimeOut );
+extern DdNode * Llb_BddComputeBad( Aig_Man_t * pInit, DdManager * dd, abctime TimeOut );
extern DdNode * Llb_BddQuantifyPis( Aig_Man_t * pInit, DdManager * dd, DdNode * bFunc );
/*=== llb2Core.c ======================================================*/
extern DdNode * Llb_CoreComputeCube( DdManager * dd, Vec_Int_t * vVars, int fUseVarIndex, char * pValues );
-extern int Llb_CoreExperiment( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * pPars, Vec_Ptr_t * vResult, clock_t TimeTarget );
+extern int Llb_CoreExperiment( Aig_Man_t * pInit, Aig_Man_t * pAig, Gia_ParLlb_t * pPars, Vec_Ptr_t * vResult, abctime TimeTarget );
/*=== llb2Driver.c ======================================================*/
extern Vec_Int_t * Llb_DriverCountRefs( Aig_Man_t * p );
extern Vec_Int_t * Llb_DriverCollectNs( Aig_Man_t * pAig, Vec_Int_t * vDriRefs );
extern Vec_Int_t * Llb_DriverCollectCs( Aig_Man_t * pAig );
extern DdNode * Llb_DriverPhaseCube( Aig_Man_t * pAig, Vec_Int_t * vDriRefs, DdManager * dd );
-extern DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs, clock_t TimeTarget );
+extern DdManager * Llb_DriverLastPartition( Aig_Man_t * p, Vec_Int_t * vVarsNs, abctime TimeTarget );
/*=== llb2Image.c ======================================================*/
extern Vec_Ptr_t * Llb_ImgSupports( Aig_Man_t * p, Vec_Ptr_t * vDdMans, Vec_Int_t * vStart, Vec_Int_t * vStop, int fAddPis, int fVerbose );
extern void Llb_ImgSchedule( Vec_Ptr_t * vSupps, Vec_Ptr_t ** pvQuant0, Vec_Ptr_t ** pvQuant1, int fVerbose );
-extern DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUpper, clock_t TimeTarget );
+extern DdManager * Llb_ImgPartition( Aig_Man_t * p, Vec_Ptr_t * vLower, Vec_Ptr_t * vUpper, abctime TimeTarget );
extern void Llb_ImgQuantifyFirst( Aig_Man_t * pAig, Vec_Ptr_t * vDdMans, Vec_Ptr_t * vQuant0, int fVerbose );
extern void Llb_ImgQuantifyReset( Vec_Ptr_t * vDdMans );
extern DdNode * Llb_ImgComputeImage( Aig_Man_t * pAig, Vec_Ptr_t * vDdMans, DdManager * dd, DdNode * bInit,
Vec_Ptr_t * vQuant0, Vec_Ptr_t * vQuant1, Vec_Int_t * vDriRefs,
- clock_t TimeTarget, int fBackward, int fReorder, int fVerbose );
+ abctime TimeTarget, int fBackward, int fReorder, int fVerbose );
-extern DdManager * Llb_NonlinImageStart( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vRoots, int * pVars2Q, int * pOrder, int fFirst, clock_t TimeTarget );
+extern DdManager * Llb_NonlinImageStart( Aig_Man_t * pAig, Vec_Ptr_t * vLeaves, Vec_Ptr_t * vRoots, int * pVars2Q, int * pOrder, int fFirst, abctime TimeTarget );
extern DdNode * Llb_NonlinImageCompute( DdNode * bCurrent, int fReorder, int fDrop, int fVerbose, int * pOrder );
extern void Llb_NonlinImageQuit();
diff --git a/src/proof/pdr/pdr.h b/src/proof/pdr/pdr.h
index 10d2af3b..f32fe0b3 100644
--- a/src/proof/pdr/pdr.h
+++ b/src/proof/pdr/pdr.h
@@ -66,7 +66,7 @@ struct Pdr_Par_t_
int RunId; // PDR id in this run
int(*pFuncStop)(int); // callback to terminate
int(*pFuncOnFail)(int,Abc_Cex_t*); // called for a failed output in MO mode
- clock_t timeLastSolved; // the time when the last output was solved
+ abctime timeLastSolved; // the time when the last output was solved
Vec_Int_t * vOutMap; // in the multi-output mode, contains status for each PO (0 = sat; 1 = unsat; negative = undecided)
};
diff --git a/src/proof/pdr/pdrCore.c b/src/proof/pdr/pdrCore.c
index 987a1a3e..7cd60d9e 100644
--- a/src/proof/pdr/pdrCore.c
+++ b/src/proof/pdr/pdrCore.c
@@ -135,7 +135,7 @@ int Pdr_ManPushClauses( Pdr_Man_t * p )
Vec_Ptr_t * vArrayK, * vArrayK1;
int i, j, k, m, RetValue = 0, RetValue2, kMax = Vec_PtrSize(p->vSolvers)-1;
int Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_VecForEachLevelStartStop( p->vClauses, vArrayK, k, 1, kMax )
{
Vec_PtrSort( vArrayK, (int (*)(void))Pdr_SetCompare );
@@ -218,7 +218,7 @@ int Pdr_ManPushClauses( Pdr_Man_t * p )
m--;
}
}
- p->tPush += clock() - clk;
+ p->tPush += Abc_Clock() - clk;
return RetValue;
}
@@ -300,7 +300,7 @@ int Pdr_ManGeneralize( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, Pdr_Set_t ** ppP
{
Pdr_Set_t * pCubeMin, * pCubeTmp = NULL;
int i, j, n, Lit, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int * pOrder;
// if there is no induction, return
*ppCubeMin = NULL;
@@ -309,7 +309,7 @@ int Pdr_ManGeneralize( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, Pdr_Set_t ** ppP
return -1;
if ( RetValue == 0 )
{
- p->tGeneral += clock() - clk;
+ p->tGeneral += Abc_Clock() - clk;
return 0;
}
@@ -403,7 +403,7 @@ int Pdr_ManGeneralize( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, Pdr_Set_t ** ppP
assert( ppCubeMin != NULL );
*ppCubeMin = pCubeMin;
- p->tGeneral += clock() - clk;
+ p->tGeneral += Abc_Clock() - clk;
return 1;
}
@@ -424,7 +424,7 @@ int Pdr_ManBlockCube( Pdr_Man_t * p, Pdr_Set_t * pCube )
Pdr_Set_t * pPred, * pCubeMin;
int i, k, RetValue, Prio = ABC_INFINITY, Counter = 0;
int kMax = Vec_PtrSize(p->vSolvers)-1;
- clock_t clk;
+ abctime clk;
p->nBlocks++;
// create first proof obligation
assert( p->pQueue == NULL );
@@ -447,14 +447,14 @@ int Pdr_ManBlockCube( Pdr_Man_t * p, Pdr_Set_t * pCube )
assert( pThis->iFrame > 0 );
assert( !Pdr_SetIsInit(pThis->pState, -1) );
- clk = clock();
+ clk = Abc_Clock();
if ( Pdr_ManCheckContainment( p, pThis->iFrame, pThis->pState ) )
{
- p->tContain += clock() - clk;
+ p->tContain += Abc_Clock() - clk;
Pdr_OblDeref( pThis );
continue;
}
- p->tContain += clock() - clk;
+ p->tContain += Abc_Clock() - clk;
// check if the cube is already contained
RetValue = Pdr_ManCheckCubeCs( p, pThis->iFrame, pThis->pState );
@@ -536,11 +536,11 @@ int Pdr_ManBlockCube( Pdr_Man_t * p, Pdr_Set_t * pCube )
// check termination
if ( p->pPars->pFuncStop && p->pPars->pFuncStop(p->pPars->RunId) )
return -1;
- if ( p->timeToStop && clock() > p->timeToStop )
+ if ( p->timeToStop && Abc_Clock() > p->timeToStop )
return -1;
- if ( p->timeToStopOne && clock() > p->timeToStopOne )
+ if ( p->timeToStopOne && Abc_Clock() > p->timeToStopOne )
return -1;
- if ( p->pPars->nTimeOutGap && p->pPars->timeLastSolved && clock() > p->pPars->timeLastSolved + p->pPars->nTimeOutGap * CLOCKS_PER_SEC )
+ if ( p->pPars->nTimeOutGap && p->pPars->timeLastSolved && Abc_Clock() > p->pPars->timeLastSolved + p->pPars->nTimeOutGap * CLOCKS_PER_SEC )
return -1;
}
return 1;
@@ -564,11 +564,11 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
Aig_Obj_t * pObj;
int k, RetValue = -1;
int nOutDigits = Abc_Base10Log( Saig_ManPoNum(p->pAig) );
- clock_t clkStart = clock(), clkOne = 0;
- p->timeToStop = p->pPars->nTimeOut ? p->pPars->nTimeOut * CLOCKS_PER_SEC + clock(): 0;
+ abctime clkStart = Abc_Clock(), clkOne = 0;
+ p->timeToStop = p->pPars->nTimeOut ? p->pPars->nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
assert( Vec_PtrSize(p->vSolvers) == 0 );
// create the first timeframe
- p->pPars->timeLastSolved = clock();
+ p->pPars->timeLastSolved = Abc_Clock();
Pdr_ManCreateSolver( p, (k = 0) );
while ( 1 )
{
@@ -604,7 +604,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if ( p->pPars->pFuncOnFail && p->pPars->pFuncOnFail(p->iOutCur, p->pPars->fStoreCex ? (Abc_Cex_t *)Vec_PtrEntry(p->vCexes, p->iOutCur) : NULL) )
{
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( !p->pPars->fSilent )
Abc_Print( 1, "Quitting due to callback on fail.\n" );
p->pPars->iFrame = k;
@@ -612,22 +612,22 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
}
if ( p->pPars->nFailOuts + p->pPars->nDropOuts == Saig_ManPoNum(p->pAig) )
return p->pPars->nFailOuts ? 0 : -1; // SAT or UNDEC
- p->pPars->timeLastSolved = clock();
+ p->pPars->timeLastSolved = Abc_Clock();
continue;
}
// try to solve this output
if ( p->pTime4Outs )
{
assert( p->pTime4Outs[p->iOutCur] > 0 );
- clkOne = clock();
- p->timeToStopOne = p->pTime4Outs[p->iOutCur] + clock();
+ clkOne = Abc_Clock();
+ p->timeToStopOne = p->pTime4Outs[p->iOutCur] + Abc_Clock();
}
while ( 1 )
{
- if ( p->pPars->nTimeOutGap && p->pPars->timeLastSolved && clock() > p->pPars->timeLastSolved + p->pPars->nTimeOutGap * CLOCKS_PER_SEC )
+ if ( p->pPars->nTimeOutGap && p->pPars->timeLastSolved && Abc_Clock() > p->pPars->timeLastSolved + p->pPars->nTimeOutGap * CLOCKS_PER_SEC )
{
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( !p->pPars->fSilent )
Abc_Print( 1, "Reached gap timeout (%d seconds).\n", p->pPars->nTimeOutGap );
p->pPars->iFrame = k;
@@ -639,7 +639,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if ( RetValue == -1 )
{
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( p->pPars->nConfLimit )
Abc_Print( 1, "Reached conflict limit (%d).\n", p->pPars->nConfLimit );
else if ( p->pPars->fVerbose )
@@ -653,14 +653,14 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if ( RetValue == -1 )
{
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( p->pPars->nConfLimit )
Abc_Print( 1, "Reached conflict limit (%d).\n", p->pPars->nConfLimit );
- else if ( p->timeToStop && clock() > p->timeToStop )
+ else if ( p->timeToStop && Abc_Clock() > p->timeToStop )
Abc_Print( 1, "Reached timeout (%d seconds).\n", p->pPars->nTimeOut );
- else if ( p->pPars->nTimeOutGap && p->pPars->timeLastSolved && clock() > p->pPars->timeLastSolved + p->pPars->nTimeOutGap * CLOCKS_PER_SEC )
+ else if ( p->pPars->nTimeOutGap && p->pPars->timeLastSolved && Abc_Clock() > p->pPars->timeLastSolved + p->pPars->nTimeOutGap * CLOCKS_PER_SEC )
Abc_Print( 1, "Reached gap timeout (%d seconds).\n", p->pPars->nTimeOutGap );
- else if ( p->timeToStopOne && clock() > p->timeToStopOne )
+ else if ( p->timeToStopOne && Abc_Clock() > p->timeToStopOne )
{
Pdr_QueueClean( p );
pCube = NULL;
@@ -679,7 +679,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
Pdr_ManPrintClauses( p, 0 );
}
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, !p->pPars->fSolveAll, clock() - clkStart );
+ Pdr_ManPrintProgress( p, !p->pPars->fSolveAll, Abc_Clock() - clkStart );
p->pPars->iFrame = k;
if ( !p->pPars->fSolveAll )
@@ -696,7 +696,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if ( p->pPars->pFuncOnFail && p->pPars->pFuncOnFail(p->iOutCur, p->pPars->fStoreCex ? (Abc_Cex_t *)Vec_PtrEntry(p->vCexes, p->iOutCur) : NULL) )
{
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( !p->pPars->fSilent )
Abc_Print( 1, "Quitting due to callback on fail.\n" );
p->pPars->iFrame = k;
@@ -712,12 +712,12 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
break; // keep solving
}
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 0, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 0, Abc_Clock() - clkStart );
}
}
if ( p->pTime4Outs )
{
- clock_t timeSince = clock() - clkOne;
+ abctime timeSince = Abc_Clock() - clkOne;
assert( p->pTime4Outs[p->iOutCur] > 0 );
p->pTime4Outs[p->iOutCur] = (p->pTime4Outs[p->iOutCur] > timeSince) ? p->pTime4Outs[p->iOutCur] - timeSince : 0;
if ( p->pTime4Outs[p->iOutCur] == 0 && p->vCexes && Vec_PtrEntry(p->vCexes, p->iOutCur) == NULL )
@@ -730,7 +730,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
}
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
// open a new timeframe
p->nQueLim = p->pPars->nRestLimit;
assert( pCube == NULL );
@@ -746,10 +746,10 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if ( RetValue == -1 )
{
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( !p->pPars->fSilent )
{
- if ( p->timeToStop && clock() > p->timeToStop )
+ if ( p->timeToStop && Abc_Clock() > p->timeToStop )
Abc_Print( 1, "Reached timeout (%d seconds).\n", p->pPars->nTimeOut );
else
Abc_Print( 1, "Reached conflict limit (%d).\n", p->pPars->nConfLimit );
@@ -760,7 +760,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if ( RetValue )
{
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( !p->pPars->fSilent )
Pdr_ManReportInvariant( p );
if ( !p->pPars->fSilent )
@@ -776,7 +776,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
return p->vCexes ? 0 : 1; // UNSAT
}
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 0, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 0, Abc_Clock() - clkStart );
// check termination
if ( p->pPars->pFuncStop && p->pPars->pFuncStop(p->pPars->RunId) )
@@ -784,7 +784,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
p->pPars->iFrame = k;
return -1;
}
- if ( p->timeToStop && clock() > p->timeToStop )
+ if ( p->timeToStop && Abc_Clock() > p->timeToStop )
{
if ( fPrintClauses )
{
@@ -792,13 +792,13 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
Pdr_ManPrintClauses( p, 0 );
}
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( !p->pPars->fSilent )
Abc_Print( 1, "Reached timeout (%d seconds).\n", p->pPars->nTimeOut );
p->pPars->iFrame = k;
return -1;
}
- if ( p->pPars->nTimeOutGap && p->pPars->timeLastSolved && clock() > p->pPars->timeLastSolved + p->pPars->nTimeOutGap * CLOCKS_PER_SEC )
+ if ( p->pPars->nTimeOutGap && p->pPars->timeLastSolved && Abc_Clock() > p->pPars->timeLastSolved + p->pPars->nTimeOutGap * CLOCKS_PER_SEC )
{
if ( fPrintClauses )
{
@@ -806,7 +806,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
Pdr_ManPrintClauses( p, 0 );
}
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( !p->pPars->fSilent )
Abc_Print( 1, "Reached gap timeout (%d seconds).\n", p->pPars->nTimeOutGap );
p->pPars->iFrame = k;
@@ -815,7 +815,7 @@ int Pdr_ManSolveInt( Pdr_Man_t * p )
if ( p->pPars->nFrameMax && k >= p->pPars->nFrameMax )
{
if ( p->pPars->fVerbose )
- Pdr_ManPrintProgress( p, 1, clock() - clkStart );
+ Pdr_ManPrintProgress( p, 1, Abc_Clock() - clkStart );
if ( !p->pPars->fSilent )
Abc_Print( 1, "Reached limit on the number of timeframes (%d).\n", p->pPars->nFrameMax );
p->pPars->iFrame = k;
@@ -841,7 +841,7 @@ int Pdr_ManSolve( Aig_Man_t * pAig, Pdr_Par_t * pPars )
{
Pdr_Man_t * p;
int k, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( pPars->nTimeOutOne )
pPars->nTimeOut = pPars->nTimeOutOne * Saig_ManPoNum(pAig) / 1000 + 1;
if ( pPars->nTimeOutOne && !pPars->fSolveAll )
@@ -872,7 +872,7 @@ int Pdr_ManSolve( Aig_Man_t * pAig, Pdr_Par_t * pPars )
}
if ( p->pPars->fDumpInv )
Pdr_ManDumpClauses( p, (char *)"inv.pla", RetValue==1 );
- p->tTotal += clock() - clk;
+ p->tTotal += Abc_Clock() - clk;
Pdr_ManStop( p );
pPars->iFrame--;
// convert all -2 (unknown) entries into -1 (undec)
diff --git a/src/proof/pdr/pdrInt.h b/src/proof/pdr/pdrInt.h
index 3f74dd5f..72393077 100644
--- a/src/proof/pdr/pdrInt.h
+++ b/src/proof/pdr/pdrInt.h
@@ -97,7 +97,7 @@ struct Pdr_Man_t_
Vec_Int_t * vRes; // final result
Vec_Int_t * vSuppLits; // support literals
Pdr_Set_t * pCubeJust; // justification
- clock_t * pTime4Outs;// timeout per output
+ abctime * pTime4Outs;// timeout per output
// statistics
int nBlocks; // the number of times blockState was called
int nObligs; // the number of proof obligations derived
@@ -115,18 +115,18 @@ struct Pdr_Man_t_
int nQueMax;
int nQueLim;
// runtime
- time_t timeToStop;
- time_t timeToStopOne;
+ abctime timeToStop;
+ abctime timeToStopOne;
// time stats
- clock_t tSat;
- clock_t tSatSat;
- clock_t tSatUnsat;
- clock_t tGeneral;
- clock_t tPush;
- clock_t tTsim;
- clock_t tContain;
- clock_t tCnf;
- clock_t tTotal;
+ abctime tSat;
+ abctime tSatSat;
+ abctime tSatUnsat;
+ abctime tGeneral;
+ abctime tPush;
+ abctime tTsim;
+ abctime tContain;
+ abctime tCnf;
+ abctime tTotal;
};
////////////////////////////////////////////////////////////////////////
@@ -135,7 +135,7 @@ struct Pdr_Man_t_
static inline sat_solver * Pdr_ManSolver( Pdr_Man_t * p, int k ) { return (sat_solver *)Vec_PtrEntry(p->vSolvers, k); }
-static inline clock_t Pdr_ManTimeLimit( Pdr_Man_t * p )
+static inline abctime Pdr_ManTimeLimit( Pdr_Man_t * p )
{
if ( p->timeToStop == 0 )
return p->timeToStopOne;
@@ -160,7 +160,7 @@ extern sat_solver * Pdr_ManNewSolver( sat_solver * pSat, Pdr_Man_t * p, int k
/*=== pdrCore.c ==========================================================*/
extern int Pdr_ManCheckContainment( Pdr_Man_t * p, int k, Pdr_Set_t * pSet );
/*=== pdrInv.c ==========================================================*/
-extern void Pdr_ManPrintProgress( Pdr_Man_t * p, int fClose, clock_t Time );
+extern void Pdr_ManPrintProgress( Pdr_Man_t * p, int fClose, abctime Time );
extern void Pdr_ManPrintClauses( Pdr_Man_t * p, int kStart );
extern void Pdr_ManDumpClauses( Pdr_Man_t * p, char * pFileName, int fProved );
extern void Pdr_ManReportInvariant( Pdr_Man_t * p );
diff --git a/src/proof/pdr/pdrInv.c b/src/proof/pdr/pdrInv.c
index bb8d110d..b1bff676 100644
--- a/src/proof/pdr/pdrInv.c
+++ b/src/proof/pdr/pdrInv.c
@@ -44,7 +44,7 @@ ABC_NAMESPACE_IMPL_START
SeeAlso []
***********************************************************************/
-void Pdr_ManPrintProgress( Pdr_Man_t * p, int fClose, clock_t Time )
+void Pdr_ManPrintProgress( Pdr_Man_t * p, int fClose, abctime Time )
{
Vec_Ptr_t * vVec;
int i, ThisSize, Length, LengthStart;
@@ -328,7 +328,7 @@ void Pdr_ManVerifyInvariant( Pdr_Man_t * p )
Vec_Ptr_t * vCubes;
Pdr_Set_t * pCube;
int i, kStart, kThis, RetValue, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect cubes used in the inductive invariant
kStart = Pdr_ManFindInvariantStart( p );
vCubes = Pdr_ManCollectCubes( p, kStart );
@@ -361,7 +361,7 @@ void Pdr_ManVerifyInvariant( Pdr_Man_t * p )
else
{
Abc_Print( 1, "Verification of invariant with %d clauses was successful. ", Vec_PtrSize(vCubes) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
// sat_solver_delete( pSat );
Vec_PtrFree( vCubes );
diff --git a/src/proof/pdr/pdrMan.c b/src/proof/pdr/pdrMan.c
index 36a62029..c5380147 100644
--- a/src/proof/pdr/pdrMan.c
+++ b/src/proof/pdr/pdrMan.c
@@ -77,7 +77,7 @@ Pdr_Man_t * Pdr_ManStart( Aig_Man_t * pAig, Pdr_Par_t * pPars, Vec_Int_t * vPrio
if ( pPars->nTimeOutOne )
{
int i;
- p->pTime4Outs = ABC_ALLOC( clock_t, Saig_ManPoNum(pAig) );
+ p->pTime4Outs = ABC_ALLOC( abctime, Saig_ManPoNum(pAig) );
for ( i = 0; i < Saig_ManPoNum(pAig); i++ )
p->pTime4Outs[i] = pPars->nTimeOutOne * CLOCKS_PER_SEC / 1000 + 1;
}
diff --git a/src/proof/pdr/pdrSat.c b/src/proof/pdr/pdrSat.c
index c9028c24..663a0e2f 100644
--- a/src/proof/pdr/pdrSat.c
+++ b/src/proof/pdr/pdrSat.c
@@ -144,7 +144,7 @@ Vec_Int_t * Pdr_ManCubeToLits( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, int fCom
{
Aig_Obj_t * pObj;
int i, iVar, iVarMax = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Vec_IntClear( p->vLits );
for ( i = 0; i < pCube->nLits; i++ )
{
@@ -159,7 +159,7 @@ Vec_Int_t * Pdr_ManCubeToLits( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, int fCom
Vec_IntPush( p->vLits, toLitCond( iVar, fCompl ^ lit_sign(pCube->Lits[i]) ) );
}
// sat_solver_setnvars( Pdr_ManSolver(p, k), iVarMax + 1 );
- p->tCnf += clock() - clk;
+ p->tCnf += Abc_Clock() - clk;
return p->vLits;
}
@@ -256,7 +256,7 @@ int Pdr_ManCheckCubeCs( Pdr_Man_t * p, int k, Pdr_Set_t * pCube )
{
sat_solver * pSat;
Vec_Int_t * vLits;
- clock_t Limit;
+ abctime Limit;
int RetValue;
pSat = Pdr_ManFetchSolver( p, k );
vLits = Pdr_ManCubeToLits( p, k, pCube, 0, 0 );
@@ -287,12 +287,12 @@ int Pdr_ManCheckCube( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, Pdr_Set_t ** ppPr
sat_solver * pSat;
Vec_Int_t * vLits;
int Lit, RetValue;
- clock_t clk, Limit;
+ abctime clk, Limit;
p->nCalls++;
pSat = Pdr_ManFetchSolver( p, k );
if ( pCube == NULL ) // solve the property
{
- clk = clock();
+ clk = Abc_Clock();
Lit = toLit( Pdr_ObjSatVar(p, k, Aig_ManCo(p->pAig, p->iOutCur)) ); // pos literal (property fails)
Limit = sat_solver_set_runtime_limit( pSat, Pdr_ManTimeLimit(p) );
RetValue = sat_solver_solve( pSat, &Lit, &Lit + 1, nConfLimit, 0, 0, 0 );
@@ -324,7 +324,7 @@ int Pdr_ManCheckCube( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, Pdr_Set_t ** ppPr
vLits = Pdr_ManCubeToLits( p, k, pCube, 0, 1 );
// solve
- clk = clock();
+ clk = Abc_Clock();
Limit = sat_solver_set_runtime_limit( pSat, Pdr_ManTimeLimit(p) );
RetValue = sat_solver_solve( pSat, Vec_IntArray(vLits), Vec_IntArray(vLits) + Vec_IntSize(vLits), nConfLimit, 0, 0, 0 );
sat_solver_set_runtime_limit( pSat, Limit );
@@ -349,7 +349,7 @@ int Pdr_ManCheckCube( Pdr_Man_t * p, int k, Pdr_Set_t * pCube, Pdr_Set_t ** ppPr
}
*/
}
- clk = clock() - clk;
+ clk = Abc_Clock() - clk;
p->tSat += clk;
assert( RetValue != l_Undef );
if ( RetValue == l_False )
diff --git a/src/proof/pdr/pdrTsim.c b/src/proof/pdr/pdrTsim.c
index 1865e14b..32d1c857 100644
--- a/src/proof/pdr/pdrTsim.c
+++ b/src/proof/pdr/pdrTsim.c
@@ -364,7 +364,7 @@ Pdr_Set_t * Pdr_ManTernarySim( Pdr_Man_t * p, int k, Pdr_Set_t * pCube )
Vec_Int_t * vRes = p->vRes; // final result (flop literals)
Aig_Obj_t * pObj;
int i, Entry, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect CO objects
Vec_IntClear( vCoObjs );
@@ -474,7 +474,7 @@ Pdr_ManPrintCex( p->pAig, vCiObjs, vCiVals, vCi2Rem );
// derive the set of resulting registers
Pdr_ManDeriveResult( p->pAig, vCiObjs, vCiVals, vCi2Rem, vRes, vPiLits );
assert( Vec_IntSize(vRes) > 0 );
- p->tTsim += clock() - clk;
+ p->tTsim += Abc_Clock() - clk;
pRes = Pdr_SetCreate( vRes, vPiLits );
assert( k == 0 || !Pdr_SetIsInit(pRes, -1) );
return pRes;
diff --git a/src/proof/ssc/sscCore.c b/src/proof/ssc/sscCore.c
index 411df1e5..4c3f98da 100644
--- a/src/proof/ssc/sscCore.c
+++ b/src/proof/ssc/sscCore.c
@@ -218,9 +218,9 @@ Gia_Man_t * Ssc_PerformSweeping( Gia_Man_t * pAig, Gia_Man_t * pCare, Ssc_Pars_t
Ssc_Man_t * p;
Gia_Man_t * pResult, * pTemp;
Gia_Obj_t * pObj, * pRepr;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
int i, fCompl, nRefined, status;
-clk = clock();
+clk = Abc_Clock();
assert( Gia_ManRegNum(pCare) == 0 );
assert( Gia_ManCiNum(pAig) == Gia_ManCiNum(pCare) );
assert( Gia_ManIsNormalized(pAig) );
@@ -250,7 +250,7 @@ clk = clock();
if ( nRefined <= Gia_ManCandNum(pAig) / 100 )
break;
}
-p->timeSimInit += clock() - clk;
+p->timeSimInit += Abc_Clock() - clk;
// prepare user's AIG
Gia_ManFillValue(pAig);
@@ -267,7 +267,7 @@ p->timeSimInit += clock() - clk;
{
if ( pAig->iPatsPi == 64 * pPars->nWords )
{
-clk = clock();
+clk = Abc_Clock();
Ssc_GiaSimRound( pAig );
Ssc_GiaClassesRefine( pAig );
if ( pPars->fVerbose )
@@ -277,7 +277,7 @@ clk = clock();
// prepare next patterns
Ssc_GiaResetPiPattern( pAig, pPars->nWords );
Ssc_GiaSavePiPattern( pAig, p->vPivot );
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
//printf( "\n" );
}
if ( Gia_ObjIsAnd(pObj) )
@@ -294,7 +294,7 @@ p->timeSimSat += clock() - clk;
fCompl = pRepr->fPhase ^ pObj->fPhase ^ Abc_LitIsCompl(pRepr->Value) ^ Abc_LitIsCompl(pObj->Value);
// perform SAT call
-clk = clock();
+clk = Abc_Clock();
p->nSatCalls++;
status = Ssc_ManCheckEquivalence( p, Abc_Lit2Var(pRepr->Value), Abc_Lit2Var(pObj->Value), fCompl );
if ( status == l_False )
@@ -317,11 +317,11 @@ clk = clock();
else if ( status == l_Undef )
p->nSatCallsUndec++;
else assert( 0 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
}
if ( pAig->iPatsPi > 1 )
{
-clk = clock();
+clk = Abc_Clock();
while ( pAig->iPatsPi < 64 * pPars->nWords )
Ssc_GiaSavePiPattern( pAig, p->vPivot );
Ssc_GiaSimRound( pAig );
@@ -330,7 +330,7 @@ clk = clock();
Gia_ManEquivPrintClasses( pAig, 0, 0 );
Ssc_GiaClassesCheckPairs( pAig, p->vDisPairs );
Vec_IntClear( p->vDisPairs );
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
}
// Gia_ManEquivPrintClasses( pAig, 1, 0 );
// Gia_ManPrint( pAig );
@@ -346,7 +346,7 @@ p->timeSimSat += clock() - clk;
}
pResult = Gia_ManCleanup( pTemp = pResult );
Gia_ManStop( pTemp );
- p->timeTotal = clock() - clkTotal;
+ p->timeTotal = Abc_Clock() - clkTotal;
if ( pPars->fVerbose )
Ssc_ManPrintStats( p );
Ssc_ManStop( p );
@@ -356,7 +356,7 @@ p->timeSimSat += clock() - clk;
Abc_Print( 1, "Reduction in AIG nodes:%8d ->%8d (%6.2f %%). ",
Gia_ManAndNum(pAig), Gia_ManAndNum(pResult),
100.0 - 100.0 * Gia_ManAndNum(pResult) / Gia_ManAndNum(pAig) );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
return pResult;
}
diff --git a/src/proof/ssc/sscInt.h b/src/proof/ssc/sscInt.h
index 0be25174..4e785bce 100644
--- a/src/proof/ssc/sscInt.h
+++ b/src/proof/ssc/sscInt.h
@@ -72,15 +72,15 @@ struct Ssc_Man_t_
int nSatCallsSat; // the number of sat SAT calls
int nSatCallsUndec; // the number of undec SAT calls
// runtime stats
- clock_t timeSimInit; // simulation and class computation
- clock_t timeSimSat; // simulation of the counter-examples
- clock_t timeCnfGen; // generation of CNF
- clock_t timeSat; // total SAT time
- clock_t timeSatSat; // sat
- clock_t timeSatUnsat; // unsat
- clock_t timeSatUndec; // undecided
- clock_t timeOther; // other runtime
- clock_t timeTotal; // total runtime
+ abctime timeSimInit; // simulation and class computation
+ abctime timeSimSat; // simulation of the counter-examples
+ abctime timeCnfGen; // generation of CNF
+ abctime timeSat; // total SAT time
+ abctime timeSatSat; // sat
+ abctime timeSatUnsat; // unsat
+ abctime timeSatUndec; // undecided
+ abctime timeOther; // other runtime
+ abctime timeTotal; // total runtime
};
////////////////////////////////////////////////////////////////////////
diff --git a/src/proof/ssc/sscSat.c b/src/proof/ssc/sscSat.c
index 1de99c2e..9992f18e 100644
--- a/src/proof/ssc/sscSat.c
+++ b/src/proof/ssc/sscSat.c
@@ -209,12 +209,12 @@ static void Ssc_ManCnfNodeAddToSolver( Ssc_Man_t * p, int NodeId )
{
Gia_Obj_t * pNode;
int i, k, Id, Lit;
- clock_t clk;
+ abctime clk;
assert( NodeId > 0 );
// quit if CNF is ready
if ( Ssc_ObjSatVar(p, NodeId) )
return;
-clk = clock();
+clk = Abc_Clock();
// start the frontier
Vec_IntClear( p->vFront );
Ssc_ManCnfAddToFrontier( p, NodeId, p->vFront );
@@ -243,7 +243,7 @@ clk = clock();
}
assert( Vec_IntSize(p->vFanins) > 1 );
}
-p->timeCnfGen += clock() - clk;
+p->timeCnfGen += Abc_Clock() - clk;
}
@@ -346,10 +346,10 @@ Vec_Int_t * Ssc_ManFindPivotSat( Ssc_Man_t * p )
int Ssc_ManCheckEquivalence( Ssc_Man_t * p, int iRepr, int iNode, int fCompl )
{
int pLitsSat[2], RetValue;
- clock_t clk;
+ abctime clk;
assert( iRepr < iNode );
// if ( p->nTimeOut )
-// sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + clock() );
+// sat_solver_set_runtime_limit( p->pSat, p->nTimeOut * CLOCKS_PER_SEC + Abc_Clock() );
// create CNF
if ( iRepr )
@@ -363,7 +363,7 @@ int Ssc_ManCheckEquivalence( Ssc_Man_t * p, int iRepr, int iNode, int fCompl )
// solve under assumptions
// A = 1; B = 0
- clk = clock();
+ clk = Abc_Clock();
RetValue = sat_solver_solve( p->pSat, pLitsSat, pLitsSat + 2, (ABC_INT64_T)p->pPars->nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
if ( RetValue == l_False )
{
@@ -371,17 +371,17 @@ int Ssc_ManCheckEquivalence( Ssc_Man_t * p, int iRepr, int iNode, int fCompl )
pLitsSat[1] = Abc_LitNot( pLitsSat[1] ); // compl
RetValue = sat_solver_addclause( p->pSat, pLitsSat, pLitsSat + 2 );
assert( RetValue );
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
}
else if ( RetValue == l_True )
{
Ssc_ManCollectSatPattern( p, p->vPattern );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
return l_True;
}
else // if ( RetValue1 == l_Undef )
{
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
return l_Undef;
}
@@ -391,7 +391,7 @@ int Ssc_ManCheckEquivalence( Ssc_Man_t * p, int iRepr, int iNode, int fCompl )
// solve under assumptions
// A = 0; B = 1
- clk = clock();
+ clk = Abc_Clock();
RetValue = sat_solver_solve( p->pSat, pLitsSat, pLitsSat + 2, (ABC_INT64_T)p->pPars->nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
if ( RetValue == l_False )
{
@@ -399,17 +399,17 @@ int Ssc_ManCheckEquivalence( Ssc_Man_t * p, int iRepr, int iNode, int fCompl )
pLitsSat[1] = Abc_LitNot( pLitsSat[1] );
RetValue = sat_solver_addclause( p->pSat, pLitsSat, pLitsSat + 2 );
assert( RetValue );
- p->timeSatUnsat += clock() - clk;
+ p->timeSatUnsat += Abc_Clock() - clk;
}
else if ( RetValue == l_True )
{
Ssc_ManCollectSatPattern( p, p->vPattern );
- p->timeSatSat += clock() - clk;
+ p->timeSatSat += Abc_Clock() - clk;
return l_True;
}
else // if ( RetValue1 == l_Undef )
{
- p->timeSatUndec += clock() - clk;
+ p->timeSatUndec += Abc_Clock() - clk;
return l_Undef;
}
return l_False;
diff --git a/src/proof/ssw/sswBmc.c b/src/proof/ssw/sswBmc.c
index c88b2dcc..61c1c2a7 100644
--- a/src/proof/ssw/sswBmc.c
+++ b/src/proof/ssw/sswBmc.c
@@ -129,7 +129,7 @@ int Ssw_BmcDynamic( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, int fVerbo
Ssw_Sat_t * pSat;
Aig_Obj_t * pObj, * pObjFrame;
int status, Lit, i, f, RetValue;
- clock_t clkPart;
+ abctime clkPart;
// start managers
assert( Saig_ManRegNum(pAig) > 0 );
@@ -149,7 +149,7 @@ int Ssw_BmcDynamic( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, int fVerbo
RetValue = -1;
for ( f = 0; f < nFramesMax; f++ )
{
- clkPart = clock();
+ clkPart = Abc_Clock();
Saig_ManForEachPo( pAig, pObj, i )
{
// unroll the circuit for this output
@@ -203,8 +203,8 @@ int Ssw_BmcDynamic( Aig_Man_t * pAig, int nFramesMax, int nConfLimit, int fVerbo
Abc_Print( 1, "Conf =%8.0f. Var =%8d. AIG=%9d. ",
(double)pSat->pSat->stats.conflicts,
pSat->nSatVars, Aig_ManNodeNum(pFrm->pFrames) );
- ABC_PRT( "T", clock() - clkPart );
- clkPart = clock();
+ ABC_PRT( "T", Abc_Clock() - clkPart );
+ clkPart = Abc_Clock();
fflush( stdout );
}
if ( RetValue != 1 )
diff --git a/src/proof/ssw/sswClass.c b/src/proof/ssw/sswClass.c
index 9cf8871b..0613302e 100644
--- a/src/proof/ssw/sswClass.c
+++ b/src/proof/ssw/sswClass.c
@@ -611,25 +611,25 @@ Ssw_Cla_t * Ssw_ClassesPrepare( Aig_Man_t * pAig, int nFramesK, int fLatchCorr,
Vec_Ptr_t * vCands;
Aig_Obj_t * pObj;
int i, k, RetValue;
- clock_t clk;
+ abctime clk;
// start the classes
p = Ssw_ClassesStart( pAig );
p->fConstCorr = fConstCorr;
// perform sequential simulation
-clk = clock();
+clk = Abc_Clock();
pSml = Ssw_SmlSimulateSeq( pAig, 0, nFrames, nWords );
if ( fVerbose )
{
Abc_Print( 1, "Allocated %.2f MB to store simulation information.\n",
1.0*(sizeof(unsigned) * Aig_ManObjNumMax(pAig) * nFrames * nWords)/(1<<20) );
Abc_Print( 1, "Initial simulation of %d frames with %d words. ", nFrames, nWords );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
// set comparison procedures
-clk = clock();
+clk = Abc_Clock();
Ssw_ClassesSetData( p, pSml, (unsigned(*)(void *,Aig_Obj_t *))Ssw_SmlObjHashWord, (int(*)(void *,Aig_Obj_t *))Ssw_SmlObjIsConstWord, (int(*)(void *,Aig_Obj_t *,Aig_Obj_t *))Ssw_SmlObjsAreEqualWord );
// collect nodes to be considered as candidates
@@ -677,10 +677,10 @@ clk = clock();
if ( fVerbose )
{
Abc_Print( 1, "Collecting candidate equivalence classes. " );
-ABC_PRT( "Time", clock() - clk );
+ABC_PRT( "Time", Abc_Clock() - clk );
}
-clk = clock();
+clk = Abc_Clock();
// perform iterative refinement using simulation
for ( i = 1; i < nIters; i++ )
{
@@ -703,7 +703,7 @@ if ( fVerbose )
{
Abc_Print( 1, "Simulation of %d frames with %d words (%2d rounds). ",
nFrames, nWords, i-1 );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
Ssw_ClassesCheck( p );
// Ssw_ClassesPrint( p, 0 );
diff --git a/src/proof/ssw/sswConstr.c b/src/proof/ssw/sswConstr.c
index 3dcf0a34..a9ed17fc 100644
--- a/src/proof/ssw/sswConstr.c
+++ b/src/proof/ssw/sswConstr.c
@@ -409,8 +409,8 @@ int Ssw_ManSweepBmcConstr_old( Ssw_Man_t * p )
Bar_Progress_t * pProgress = NULL;
Aig_Obj_t * pObj, * pObjNew, * pObjLi, * pObjLo;
int i, f, iLits;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// start initialized timeframes
p->pFrames = Aig_ManStart( Aig_ManObjNumMax(p->pAig) * p->pPars->nFramesK );
@@ -480,7 +480,7 @@ clk = clock();
// cleanup
// Ssw_ClassesCheck( p->ppClasses );
-p->timeBmc += clock() - clk;
+p->timeBmc += Abc_Clock() - clk;
return p->fRefined;
}
@@ -499,8 +499,8 @@ int Ssw_ManSweepBmcConstr( Ssw_Man_t * p )
{
Aig_Obj_t * pObj, * pObjNew, * pObjLi, * pObjLo;
int i, f, iLits;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// start initialized timeframes
p->pFrames = Aig_ManStart( Aig_ManObjNumMax(p->pAig) * p->pPars->nFramesK );
@@ -560,7 +560,7 @@ clk = clock();
// cleanup
// Ssw_ClassesCheck( p->ppClasses );
-p->timeBmc += clock() - clk;
+p->timeBmc += Abc_Clock() - clk;
return p->fRefined;
}
@@ -621,11 +621,11 @@ int Ssw_ManSweepConstr( Ssw_Man_t * p )
Bar_Progress_t * pProgress = NULL;
Aig_Obj_t * pObj, * pObj2, * pObjNew;
int nConstrPairs, i, f, iLits;
- clock_t clk;
+ abctime clk;
//Ssw_ManPrintPolarity( p->pAig );
// perform speculative reduction
-clk = clock();
+clk = Abc_Clock();
// create timeframes
p->pFrames = Ssw_FramesWithClasses( p );
// add constants
@@ -656,7 +656,7 @@ clk = clock();
Ssw_ObjSetFrame( p, pObj, f, pObjNew );
}
assert( Vec_IntSize(p->vInits) == iLits );
-p->timeReduce += clock() - clk;
+p->timeReduce += Abc_Clock() - clk;
// add constraints to all timeframes
for ( f = 0; f <= p->pPars->nFramesK; f++ )
diff --git a/src/proof/ssw/sswCore.c b/src/proof/ssw/sswCore.c
index 7a9d4b9f..f944eddc 100644
--- a/src/proof/ssw/sswCore.c
+++ b/src/proof/ssw/sswCore.c
@@ -236,7 +236,7 @@ Aig_Man_t * Ssw_SignalCorrespondenceRefine( Ssw_Man_t * p )
int nSatProof, nSatCallsSat, nRecycles, nSatFailsReal, nUniques;
Aig_Man_t * pAigNew;
int RetValue, nIter = -1;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
// get the starting stats
p->nLitsBeg = Ssw_ClassesLitNum( p->ppClasses );
p->nNodesBeg = Aig_ManNodeNum(p->pAig);
@@ -306,7 +306,7 @@ Aig_Man_t * Ssw_SignalCorrespondenceRefine( Ssw_Man_t * p )
break;
}
-clk = clock();
+clk = Abc_Clock();
p->pMSat = Ssw_SatStart( 0 );
if ( p->pPars->fLatchCorrOpt )
{
@@ -317,7 +317,7 @@ clk = clock();
nIter, Ssw_ClassesCand1Num(p->ppClasses), Ssw_ClassesClassNum(p->ppClasses),
p->nSatProof-nSatProof, p->nSatCallsSat-nSatCallsSat,
p->nRecycles-nRecycles, p->nSatFailsReal-nSatFailsReal );
- ABC_PRT( "T", clock() - clk );
+ ABC_PRT( "T", Abc_Clock() - clk );
}
}
else
@@ -342,7 +342,7 @@ clk = clock();
}
Abc_Print( 1, "F =%5d. %s ", p->nSatFailsReal-nSatFailsReal,
(Saig_ManPoNum(p->pAig)==1 && Ssw_ObjIsConst1Cand(p->pAig,Aig_ObjFanin0(Aig_ManCo(p->pAig,0))))? "+" : "-" );
- ABC_PRT( "T", clock() - clk );
+ ABC_PRT( "T", Abc_Clock() - clk );
}
// if ( p->pPars->fDynamic && p->nSatCallsSat-nSatCallsSat < 100 )
// p->pPars->nBTLimit = 10000;
@@ -384,7 +384,7 @@ clk = clock();
finalize:
p->pPars->nIters = nIter + 1;
-p->timeTotal = clock() - clkTotal;
+p->timeTotal = Abc_Clock() - clkTotal;
Ssw_ManUpdateEquivs( p, p->pAig, p->pPars->fVerbose );
pAigNew = Aig_ManDupRepr( p->pAig, 0 );
diff --git a/src/proof/ssw/sswDyn.c b/src/proof/ssw/sswDyn.c
index 5fc22fdf..316b2e4d 100644
--- a/src/proof/ssw/sswDyn.c
+++ b/src/proof/ssw/sswDyn.c
@@ -263,7 +263,7 @@ void Ssw_ManSweepTransferDyn( Ssw_Man_t * p )
int Ssw_ManSweepResimulateDyn( Ssw_Man_t * p, int f )
{
int RetValue1, RetValue2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// transfer PI simulation information from storage
// Ssw_SmlAssignDist1Plus( p->pSml, p->pPatWords );
Ssw_ManSweepTransferDyn( p );
@@ -277,7 +277,7 @@ int Ssw_ManSweepResimulateDyn( Ssw_Man_t * p, int f )
Vec_PtrCleanSimInfo( p->vSimInfo, 0, 1 );
p->nPatterns = 0;
p->nSimRounds++;
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
return RetValue1 > 0 || RetValue2 > 0;
}
@@ -296,7 +296,7 @@ int Ssw_ManSweepResimulateDynLocal( Ssw_Man_t * p, int f )
{
Aig_Obj_t * pObj, * pRepr, ** ppClass;
int i, k, nSize, RetValue1, RetValue2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p->nSimRounds++;
// transfer PI simulation information from storage
// Ssw_SmlAssignDist1Plus( p->pSml, p->pPatWords );
@@ -355,7 +355,7 @@ int Ssw_ManSweepResimulateDynLocal( Ssw_Man_t * p, int f )
Vec_PtrCleanSimInfo( p->vSimInfo, 0, 1 );
p->nPatterns = 0;
p->nSimRounds++;
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
return RetValue1 > 0 || RetValue2 > 0;
}
@@ -375,10 +375,10 @@ int Ssw_ManSweepDyn( Ssw_Man_t * p )
Bar_Progress_t * pProgress = NULL;
Aig_Obj_t * pObj, * pObjNew;
int i, f;
- clock_t clk;
+ abctime clk;
// perform speculative reduction
-clk = clock();
+clk = Abc_Clock();
// create timeframes
p->pFrames = Ssw_FramesWithClasses( p );
Aig_ManFanoutStart( p->pFrames );
@@ -392,7 +392,7 @@ clk = clock();
Aig_ManSetCioIds( p->pFrames );
// label nodes corresponding to primary inputs
Ssw_ManLabelPiNodes( p );
-p->timeReduce += clock() - clk;
+p->timeReduce += Abc_Clock() - clk;
// prepare simulation info
assert( p->vSimInfo == NULL );
diff --git a/src/proof/ssw/sswFilter.c b/src/proof/ssw/sswFilter.c
index 534fc275..9027d773 100644
--- a/src/proof/ssw/sswFilter.c
+++ b/src/proof/ssw/sswFilter.c
@@ -279,7 +279,7 @@ int Ssw_ManSweepBmcFilter( Ssw_Man_t * p, int TimeLimit )
{
Aig_Obj_t * pObj, * pObjNew, * pObjLi, * pObjLo;
int f, f1, i;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
// start initialized timeframes
p->pFrames = Aig_ManStart( Aig_ManObjNumMax(p->pAig) * p->pPars->nFramesK );
Saig_ManForEachLo( p->pAig, pObj, i )
@@ -349,7 +349,7 @@ int Ssw_ManSweepBmcFilter( Ssw_Man_t * p, int TimeLimit )
break;
}
// check timeout
- if ( TimeLimit && ((float)TimeLimit <= (float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC)) )
+ if ( TimeLimit && ((float)TimeLimit <= (float)(Abc_Clock()-clkTotal)/(float)(CLOCKS_PER_SEC)) )
break;
// transfer latch input to the latch outputs
Aig_ManForEachCo( p->pAig, pObj, i )
@@ -383,8 +383,8 @@ void Ssw_SignalFilter( Aig_Man_t * pAig, int nFramesMax, int nConfMax, int nRoun
{
Ssw_Pars_t Pars, * pPars = &Pars;
Ssw_Man_t * p;
- int r, TimeLimitPart;//, clkTotal = clock();
- clock_t nTimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + clock(): 0;
+ int r, TimeLimitPart;//, clkTotal = Abc_Clock();
+ abctime nTimeToStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + Abc_Clock(): 0;
assert( Aig_ManRegNum(pAig) > 0 );
assert( Aig_ManConstrNum(pAig) == 0 );
// consider the case of empty AIG
@@ -430,7 +430,7 @@ void Ssw_SignalFilter( Aig_Man_t * pAig, int nFramesMax, int nConfMax, int nRoun
Ssw_ClassesPrint( p->ppClasses, 0 );
}
p->pMSat = Ssw_SatStart( 0 );
- TimeLimitPart = TimeLimit ? (nTimeToStop - clock()) / CLOCKS_PER_SEC : 0;
+ TimeLimitPart = TimeLimit ? (nTimeToStop - Abc_Clock()) / CLOCKS_PER_SEC : 0;
if ( TimeLimit2 )
{
if ( TimeLimitPart )
@@ -445,7 +445,7 @@ void Ssw_SignalFilter( Aig_Man_t * pAig, int nFramesMax, int nConfMax, int nRoun
// simulate pattern forward
Ssw_ManRollForward( p, p->pPars->nFramesK );
// check timeout
- if ( TimeLimit && clock() > nTimeToStop )
+ if ( TimeLimit && Abc_Clock() > nTimeToStop )
{
Abc_Print( 1, "Reached timeout (%d seconds).\n", TimeLimit );
break;
diff --git a/src/proof/ssw/sswInt.h b/src/proof/ssw/sswInt.h
index 1edf2087..00681923 100644
--- a/src/proof/ssw/sswInt.h
+++ b/src/proof/ssw/sswInt.h
@@ -127,16 +127,16 @@ struct Ssw_Man_t_
int nRegsBegC;
int nRegsEndC;
// runtime stats
- clock_t timeBmc; // bounded model checking
- clock_t timeReduce; // speculative reduction
- clock_t timeMarkCones; // marking the cones not to be refined
- clock_t timeSimSat; // simulation of the counter-examples
- clock_t timeSat; // solving SAT
- clock_t timeSatSat; // sat
- clock_t timeSatUnsat; // unsat
- clock_t timeSatUndec; // undecided
- clock_t timeOther; // other runtime
- clock_t timeTotal; // total runtime
+ abctime timeBmc; // bounded model checking
+ abctime timeReduce; // speculative reduction
+ abctime timeMarkCones; // marking the cones not to be refined
+ abctime timeSimSat; // simulation of the counter-examples
+ abctime timeSat; // solving SAT
+ abctime timeSatSat; // sat
+ abctime timeSatUnsat; // unsat
+ abctime timeSatUndec; // undecided
+ abctime timeOther; // other runtime
+ abctime timeTotal; // total runtime
};
// internal SAT manager
diff --git a/src/proof/ssw/sswIslands.c b/src/proof/ssw/sswIslands.c
index d1758b75..87df4ebf 100644
--- a/src/proof/ssw/sswIslands.c
+++ b/src/proof/ssw/sswIslands.c
@@ -480,7 +480,7 @@ int Ssw_SecWithSimilarityPairs( Aig_Man_t * p0, Aig_Man_t * p1, Vec_Int_t * vPai
Ssw_Pars_t Pars;
Aig_Man_t * pAigRes;
int RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// derive parameters if not given
if ( pPars == NULL )
Ssw_ManSetDefaultParams( pPars = &Pars );
@@ -495,7 +495,7 @@ int Ssw_SecWithSimilarityPairs( Aig_Man_t * p0, Aig_Man_t * p1, Vec_Int_t * vPai
else
Abc_Print( 1, "Verification UNDECIDED. The number of remaining regs = %d (total = %d). ",
Aig_ManRegNum(pAigRes), Aig_ManRegNum(p0)+Aig_ManRegNum(p1) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
Aig_ManStop( pAigRes );
return RetValue;
}
diff --git a/src/proof/ssw/sswLcorr.c b/src/proof/ssw/sswLcorr.c
index cd212e0b..d020ef00 100644
--- a/src/proof/ssw/sswLcorr.c
+++ b/src/proof/ssw/sswLcorr.c
@@ -78,7 +78,7 @@ void Ssw_ManSweepTransfer( Ssw_Man_t * p )
int Ssw_ManSweepResimulate( Ssw_Man_t * p )
{
int RetValue1, RetValue2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// transfer PI simulation information from storage
Ssw_ManSweepTransfer( p );
// simulate internal nodes
@@ -90,7 +90,7 @@ int Ssw_ManSweepResimulate( Ssw_Man_t * p )
Vec_PtrCleanSimInfo( p->vSimInfo, 0, 1 );
p->nPatterns = 0;
p->nSimRounds++;
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
return RetValue1 > 0 || RetValue2 > 0;
}
@@ -161,7 +161,7 @@ void Ssw_ManSweepLatchOne( Ssw_Man_t * p, Aig_Obj_t * pObjRepr, Aig_Obj_t * pObj
{
Aig_Obj_t * pObjFraig, * pObjReprFraig, * pObjLi;
int RetValue;
- clock_t clk;
+ abctime clk;
assert( Aig_ObjIsCi(pObj) );
assert( Aig_ObjIsCi(pObjRepr) || Aig_ObjIsConst1(pObjRepr) );
// check if it makes sense to skip some calls
@@ -171,7 +171,7 @@ void Ssw_ManSweepLatchOne( Ssw_Man_t * p, Aig_Obj_t * pObjRepr, Aig_Obj_t * pObj
return;
}
p->nCallsDelta = 0;
-clk = clock();
+clk = Abc_Clock();
// get the fraiged node
pObjLi = Saig_ObjLoToLi( p->pAig, pObj );
Ssw_ManBuildCone_rec( p, Aig_ObjFanin0(pObjLi) );
@@ -185,7 +185,7 @@ clk = clock();
}
else
pObjReprFraig = Ssw_ObjFrame( p, pObjRepr, 0 );
-p->timeReduce += clock() - clk;
+p->timeReduce += Abc_Clock() - clk;
// if the fraiged nodes are the same, return
if ( Aig_Regular(pObjFraig) == Aig_Regular(pObjReprFraig) )
return;
diff --git a/src/proof/ssw/sswPairs.c b/src/proof/ssw/sswPairs.c
index 3068adc4..fe389191 100644
--- a/src/proof/ssw/sswPairs.c
+++ b/src/proof/ssw/sswPairs.c
@@ -321,7 +321,7 @@ Aig_Man_t * Ssw_SignalCorrespondeceTestPairs( Aig_Man_t * pAig )
Vec_Int_t * vIds1, * vIds2;
Aig_Obj_t * pObj, * pRepr;
int RetValue, i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Ssw_ManSetDefaultParams( pPars );
pPars->fVerbose = 1;
pAigNew = Ssw_SignalCorrespondence( pAig, pPars );
@@ -360,7 +360,7 @@ Aig_Man_t * Ssw_SignalCorrespondeceTestPairs( Aig_Man_t * pAig )
else
Abc_Print( 1, "Verification UNDECIDED. Remaining registers %d (total %d). ",
Aig_ManRegNum(pAigRes), Aig_ManRegNum(pAig) + Aig_ManRegNum(pAigNew) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// cleanup
Aig_ManStop( pAigNew );
return pAigRes;
@@ -381,7 +381,7 @@ int Ssw_SecWithPairs( Aig_Man_t * pAig1, Aig_Man_t * pAig2, Vec_Int_t * vIds1, V
{
Aig_Man_t * pAigRes;
int RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( vIds1 != NULL && vIds2 != NULL );
// try the new AIGs
Abc_Print( 1, "Performing specialized verification with node pairs.\n" );
@@ -395,7 +395,7 @@ int Ssw_SecWithPairs( Aig_Man_t * pAig1, Aig_Man_t * pAig2, Vec_Int_t * vIds1, V
else
Abc_Print( 1, "Verification UNDECIDED. The number of remaining regs = %d (total = %d). ",
Aig_ManRegNum(pAigRes), Aig_ManRegNum(pAig1) + Aig_ManRegNum(pAig2) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// cleanup
Aig_ManStop( pAigRes );
return RetValue;
@@ -416,7 +416,7 @@ int Ssw_SecGeneral( Aig_Man_t * pAig1, Aig_Man_t * pAig2, Ssw_Pars_t * pPars )
{
Aig_Man_t * pAigRes, * pMiter;
int RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// try the new AIGs
Abc_Print( 1, "Performing general verification without node pairs.\n" );
pMiter = Saig_ManCreateMiter( pAig1, pAig2, 0 );
@@ -432,7 +432,7 @@ int Ssw_SecGeneral( Aig_Man_t * pAig1, Aig_Man_t * pAig2, Ssw_Pars_t * pPars )
else
Abc_Print( 1, "Verification UNDECIDED. The number of remaining regs = %d (total = %d). ",
Aig_ManRegNum(pAigRes), Aig_ManRegNum(pAig1) + Aig_ManRegNum(pAig2) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// cleanup
Aig_ManStop( pAigRes );
return RetValue;
@@ -453,7 +453,7 @@ int Ssw_SecGeneralMiter( Aig_Man_t * pMiter, Ssw_Pars_t * pPars )
{
Aig_Man_t * pAigRes;
int RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// try the new AIGs
// Abc_Print( 1, "Performing general verification without node pairs.\n" );
pAigRes = Ssw_SignalCorrespondence( pMiter, pPars );
@@ -466,7 +466,7 @@ int Ssw_SecGeneralMiter( Aig_Man_t * pMiter, Ssw_Pars_t * pPars )
else
Abc_Print( 1, "Verification UNDECIDED. The number of remaining regs = %d (total = %d). ",
Aig_ManRegNum(pAigRes), Aig_ManRegNum(pMiter) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
// cleanup
Aig_ManStop( pAigRes );
return RetValue;
diff --git a/src/proof/ssw/sswPart.c b/src/proof/ssw/sswPart.c
index dbe8a877..30afddca 100644
--- a/src/proof/ssw/sswPart.c
+++ b/src/proof/ssw/sswPart.c
@@ -53,7 +53,7 @@ Aig_Man_t * Ssw_SignalCorrespondencePart( Aig_Man_t * pAig, Ssw_Pars_t * pPars )
int * pMapBack;
int i, nCountPis, nCountRegs;
int nClasses, nPartSize, fVerbose;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( pPars->fConstrs )
{
Abc_Print( 1, "Cannot use partitioned computation with constraints.\n" );
@@ -126,7 +126,7 @@ Aig_Man_t * Ssw_SignalCorrespondencePart( Aig_Man_t * pAig, Ssw_Pars_t * pPars )
pPars->fVerbose = fVerbose;
if ( fVerbose )
{
- ABC_PRT( "Total time", clock() - clk );
+ ABC_PRT( "Total time", Abc_Clock() - clk );
}
return pNew;
}
diff --git a/src/proof/ssw/sswRarity.c b/src/proof/ssw/sswRarity.c
index d780b915..10e19b5a 100644
--- a/src/proof/ssw/sswRarity.c
+++ b/src/proof/ssw/sswRarity.c
@@ -314,7 +314,7 @@ void TransposeTest()
{
word M[64], N[64];
int i;
- clock_t clk;
+ abctime clk;
Aig_ManRandom64( 1 );
// for ( i = 0; i < 64; i++ )
// M[i] = Aig_ManRandom64( 0 );
@@ -323,15 +323,15 @@ void TransposeTest()
// for ( i = 0; i < 64; i++ )
// Extra_PrintBinary( stdout, (unsigned *)&M[i], 64 ), Abc_Print( 1, "\n" );
- clk = clock();
+ clk = Abc_Clock();
for ( i = 0; i < 100001; i++ )
transpose64Simple( M, N );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
- clk = clock();
+ clk = Abc_Clock();
for ( i = 0; i < 100001; i++ )
transpose64( M );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
for ( i = 0; i < 64; i++ )
if ( M[i] != N[i] )
@@ -594,7 +594,7 @@ int Ssw_RarManObjWhichOne( Ssw_RarMan_t * p, Aig_Obj_t * pObj )
SeeAlso []
***********************************************************************/
-int Ssw_RarManCheckNonConstOutputs( Ssw_RarMan_t * p, int iFrame, clock_t Time )
+int Ssw_RarManCheckNonConstOutputs( Ssw_RarMan_t * p, int iFrame, abctime Time )
{
Aig_Obj_t * pObj;
int i;
@@ -976,9 +976,9 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, Ssw_RarPars_t * pPars )
int fMiter = 1;
Ssw_RarMan_t * p;
int r, f = -1;
- clock_t clk, clkTotal = clock();
- clock_t nTimeToStop = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + clock(): 0;
- clock_t timeLastSolved = 0;
+ abctime clk, clkTotal = Abc_Clock();
+ abctime nTimeToStop = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
+ abctime timeLastSolved = 0;
int nNumRestart = 0;
int nSavedSeed = pPars->nRandSeed;
int RetValue = -1;
@@ -1004,10 +1004,10 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, Ssw_RarPars_t * pPars )
// perform simulation rounds
pPars->nSolved = 0;
- timeLastSolved = clock();
+ timeLastSolved = Abc_Clock();
for ( r = 0; !pPars->nRounds || (nNumRestart * pPars->nRestart + r < pPars->nRounds); r++ )
{
- clk = clock();
+ clk = Abc_Clock();
if ( fTryBmc )
{
Aig_Man_t * pNewAig = Saig_ManDupWithPhase( pAig, p->vInits );
@@ -1022,7 +1022,7 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, Ssw_RarPars_t * pPars )
Ssw_RarManSimulate( p, f ? NULL : p->vInits, 0, 0 );
if ( fMiter )
{
- int Status = Ssw_RarManCheckNonConstOutputs(p, r * p->pPars->nFrames + f, clock() - clkTotal);
+ int Status = Ssw_RarManCheckNonConstOutputs(p, r * p->pPars->nFrames + f, Abc_Clock() - clkTotal);
if ( Status == 2 )
{
Abc_Print( 1, "Quitting due to callback on fail.\n" );
@@ -1041,22 +1041,22 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, Ssw_RarPars_t * pPars )
pAig->pSeqModel = Ssw_RarDeriveCex( p, r * p->pPars->nFrames + f, p->iFailPo, p->iFailPat, pPars->fVerbose );
// print final report
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", pAig->pSeqModel->iPo, pAig->pName, pAig->pSeqModel->iFrame );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
goto finish;
}
- timeLastSolved = clock();
+ timeLastSolved = Abc_Clock();
}
// else - did not find a counter example
}
// check timeout
- if ( pPars->TimeOut && clock() > nTimeToStop )
+ if ( pPars->TimeOut && Abc_Clock() > nTimeToStop )
{
if ( pPars->fVerbose && !pPars->fSolveAll ) Abc_Print( 1, "\n" );
Abc_Print( 1, "Simulated %d frames for %d rounds with %d restarts. ", pPars->nFrames, nNumRestart * pPars->nRestart + r, nNumRestart );
Abc_Print( 1, "Reached timeout (%d sec).\n", pPars->TimeOut );
goto finish;
}
- if ( pPars->TimeOutGap && timeLastSolved && clock() > timeLastSolved + pPars->TimeOutGap * CLOCKS_PER_SEC )
+ if ( pPars->TimeOutGap && timeLastSolved && Abc_Clock() > timeLastSolved + pPars->TimeOutGap * CLOCKS_PER_SEC )
{
if ( pPars->fVerbose && !pPars->fSolveAll ) Abc_Print( 1, "\n" );
Abc_Print( 1, "Simulated %d frames for %d rounds with %d restarts. ", pPars->nFrames, nNumRestart * pPars->nRestart + r, nNumRestart );
@@ -1090,7 +1090,7 @@ int Ssw_RarSimulate( Aig_Man_t * pAig, Ssw_RarPars_t * pPars )
Abc_Print( 1, "Rounds =%6d ", nNumRestart * pPars->nRestart + ((r==-1)?0:r) );
Abc_Print( 1, "Frames =%6d ", (nNumRestart * pPars->nRestart + r) * pPars->nFrames );
Abc_Print( 1, "CEX =%6d (%6.2f %%) ", pPars->nSolved, 100.0*pPars->nSolved/Saig_ManPoNum(p->pAig) );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
else
Abc_Print( 1, "." );
@@ -1108,13 +1108,13 @@ finish:
{
if ( pPars->fVerbose && !pPars->fSolveAll ) Abc_Print( 1, "\n" );
Abc_Print( 1, "Simulation of %d frames for %d rounds with %d restarts asserted %d (out of %d) POs. ", pPars->nFrames, nNumRestart * pPars->nRestart + r, nNumRestart, pPars->nSolved, Saig_ManPoNum(p->pAig) );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
else if ( r == pPars->nRounds && f == pPars->nFrames )
{
if ( pPars->fVerbose ) Abc_Print( 1, "\n" );
Abc_Print( 1, "Simulation of %d frames for %d rounds with %d restarts did not assert POs. ", pPars->nFrames, nNumRestart * pPars->nRestart + r, nNumRestart );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
// cleanup
Ssw_RarManStop( p );
@@ -1161,8 +1161,8 @@ int Ssw_RarSignalFilter( Aig_Man_t * pAig, Ssw_RarPars_t * pPars )
{
Ssw_RarMan_t * p;
int r, f = -1, i, k;
- clock_t clkTotal = clock();
- clock_t nTimeToStop = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + clock(): 0;
+ abctime clkTotal = Abc_Clock();
+ abctime nTimeToStop = pPars->TimeOut ? pPars->TimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
int nNumRestart = 0;
int nSavedSeed = pPars->nRandSeed;
int RetValue = -1;
@@ -1234,12 +1234,12 @@ int Ssw_RarSignalFilter( Aig_Man_t * pAig, Ssw_RarPars_t * pPars )
pAig->pSeqModel = Ssw_RarDeriveCex( p, r * p->pPars->nFrames + f, p->iFailPo, p->iFailPat, 1 );
// print final report
Abc_Print( 1, "Output %d of miter \"%s\" was asserted in frame %d. ", pAig->pSeqModel->iPo, pAig->pName, pAig->pSeqModel->iFrame );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
RetValue = 0;
goto finish;
}
// check timeout
- if ( pPars->TimeOut && clock() > nTimeToStop )
+ if ( pPars->TimeOut && Abc_Clock() > nTimeToStop )
{
if ( pPars->fVerbose ) Abc_Print( 1, "\n" );
Abc_Print( 1, "Simulated %d frames for %d rounds with %d restarts. ", pPars->nFrames, nNumRestart * pPars->nRestart + r, nNumRestart );
@@ -1279,7 +1279,7 @@ finish:
if ( !pPars->fVerbose )
Abc_Print( 1, "%s", Abc_FrameIsBatchMode() ? "\n" : "\r" );
Abc_Print( 1, "Simulation of %d frames for %d rounds with %d restarts did not assert POs. ", pPars->nFrames, nNumRestart * pPars->nRestart + r, nNumRestart );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
// cleanup
Ssw_RarManStop( p );
diff --git a/src/proof/ssw/sswRarity2.c b/src/proof/ssw/sswRarity2.c
index f6b2c319..01f288c1 100644
--- a/src/proof/ssw/sswRarity2.c
+++ b/src/proof/ssw/sswRarity2.c
@@ -309,8 +309,8 @@ int Ssw_RarSimulate2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, i
int fMiter = 1;
Ssw_RarMan_t * p;
int r;
- clock_t clk, clkTotal = clock();
- clock_t nTimeToStop = TimeOut ? TimeOut * CLOCKS_PER_SEC + clock(): 0;
+ abctime clk, clkTotal = Abc_Clock();
+ abctime nTimeToStop = TimeOut ? TimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
int RetValue = -1;
assert( Aig_ManRegNum(pAig) > 0 );
assert( Aig_ManConstrNum(pAig) == 0 );
@@ -331,7 +331,7 @@ int Ssw_RarSimulate2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, i
// perform simulation rounds
for ( r = 0; r < nRounds; r++ )
{
- clk = clock();
+ clk = Abc_Clock();
// simulate
Ssw_SmlSimulateOne( p->pSml );
if ( fMiter && Ssw_SmlCheckNonConstOutputs(p->pSml) )
@@ -349,11 +349,11 @@ int Ssw_RarSimulate2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, i
if ( fVerbose )
{
// Abc_Print( 1, "Round %3d: ", r );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
Abc_Print( 1, "." );
}
// check timeout
- if ( TimeOut && clock() > nTimeToStop )
+ if ( TimeOut && Abc_Clock() > nTimeToStop )
{
if ( fVerbose ) Abc_Print( 1, "\n" );
Abc_Print( 1, "Reached timeout (%d seconds).\n", TimeOut );
@@ -364,7 +364,7 @@ int Ssw_RarSimulate2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, i
{
if ( fVerbose ) Abc_Print( 1, "\n" );
Abc_Print( 1, "Simulation did not assert POs in the first %d frames. ", nRounds * nFrames );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
// cleanup
Ssw_RarManStop( p );
@@ -388,8 +388,8 @@ int Ssw_RarSignalFilter2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSiz
int fMiter = 0;
Ssw_RarMan_t * p;
int r, i, k;
- clock_t clkTotal = clock();
- clock_t nTimeToStop = TimeOut ? TimeOut * CLOCKS_PER_SEC + clock(): 0;
+ abctime clkTotal = Abc_Clock();
+ abctime nTimeToStop = TimeOut ? TimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
int RetValue = -1;
assert( Aig_ManRegNum(pAig) > 0 );
assert( Aig_ManConstrNum(pAig) == 0 );
@@ -462,7 +462,7 @@ int Ssw_RarSignalFilter2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSiz
Ssw_RarTransferPatterns( p, p->vInits );
Ssw_SmlInitializeSpecial( p->pSml, p->vInits );
// check timeout
- if ( TimeOut && clock() > nTimeToStop )
+ if ( TimeOut && Abc_Clock() > nTimeToStop )
{
if ( fVerbose ) Abc_Print( 1, "\n" );
Abc_Print( 1, "Reached timeout (%d seconds).\n", TimeOut );
@@ -472,7 +472,7 @@ int Ssw_RarSignalFilter2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSiz
if ( r == nRounds )
{
Abc_Print( 1, "Simulation did not assert POs in the first %d frames. ", nRounds * nFrames );
- Abc_PrintTime( 1, "Time", clock() - clkTotal );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clkTotal );
}
// cleanup
Ssw_RarManStop( p );
diff --git a/src/proof/ssw/sswSat.c b/src/proof/ssw/sswSat.c
index e5971a64..59ed6945 100644
--- a/src/proof/ssw/sswSat.c
+++ b/src/proof/ssw/sswSat.c
@@ -46,7 +46,7 @@ int Ssw_NodesAreEquiv( Ssw_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew )
{
int nBTLimit = p->pPars->nBTLimit;
int pLits[3], nLits, RetValue, RetValue1;
- clock_t clk;//, status;
+ abctime clk;//, status;
p->nSatCalls++;
p->pMSat->nSolverCalls++;
@@ -80,13 +80,13 @@ int Ssw_NodesAreEquiv( Ssw_Man_t * p, Aig_Obj_t * pOld, Aig_Obj_t * pNew )
assert( RetValue != 0 );
}
-clk = clock();
+clk = Abc_Clock();
RetValue1 = sat_solver_solve( p->pMSat->pSat, pLits, pLits + nLits,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
if ( nLits == 2 )
{
pLits[0] = lit_neg( pLits[0] );
@@ -105,13 +105,13 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatFailsReal++;
return -1;
}
@@ -142,13 +142,13 @@ p->timeSatUndec += clock() - clk;
assert( RetValue != 0 );
}
-clk = clock();
+clk = Abc_Clock();
RetValue1 = sat_solver_solve( p->pMSat->pSat, pLits, pLits + nLits,
(ABC_INT64_T)nBTLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
-p->timeSat += clock() - clk;
+p->timeSat += Abc_Clock() - clk;
if ( RetValue1 == l_False )
{
-p->timeSatUnsat += clock() - clk;
+p->timeSatUnsat += Abc_Clock() - clk;
if ( nLits == 2 )
{
pLits[0] = lit_neg( pLits[0] );
@@ -167,13 +167,13 @@ p->timeSatUnsat += clock() - clk;
}
else if ( RetValue1 == l_True )
{
-p->timeSatSat += clock() - clk;
+p->timeSatSat += Abc_Clock() - clk;
p->nSatCallsSat++;
return 0;
}
else // if ( RetValue1 == l_Undef )
{
-p->timeSatUndec += clock() - clk;
+p->timeSatUndec += Abc_Clock() - clk;
p->nSatFailsReal++;
return -1;
}
diff --git a/src/proof/ssw/sswSemi.c b/src/proof/ssw/sswSemi.c
index 822f63f5..d5af1394 100644
--- a/src/proof/ssw/sswSemi.c
+++ b/src/proof/ssw/sswSemi.c
@@ -180,8 +180,8 @@ int Ssw_ManFilterBmc( Ssw_Sem_t * pBmc, int iPat, int fCheckTargets )
Aig_Obj_t * pObj, * pObjNew, * pObjLi, * pObjLo;
unsigned * pInfo;
int i, f, RetValue, fFirst = 0;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// start initialized timeframes
p->pFrames = Aig_ManStart( Aig_ManObjNumMax(p->pAig) * 3 );
@@ -243,7 +243,7 @@ clk = clock();
// cleanup
Ssw_ClassesCheck( p->ppClasses );
-p->timeBmc += clock() - clk;
+p->timeBmc += Abc_Clock() - clk;
return RetValue;
}
@@ -262,7 +262,7 @@ int Ssw_FilterUsingSemi( Ssw_Man_t * pMan, int fCheckTargets, int nConfMax, int
{
Ssw_Sem_t * p;
int RetValue, Frames, Iter;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
p = Ssw_SemManStart( pMan, nConfMax, fVerbose );
if ( fCheckTargets && Ssw_SemCheckTargets( p ) )
{
@@ -279,7 +279,7 @@ int Ssw_FilterUsingSemi( Ssw_Man_t * pMan, int fCheckTargets, int nConfMax, int
RetValue = 0;
for ( Iter = 0; Iter < p->nPatterns; Iter++ )
{
-clk = clock();
+clk = Abc_Clock();
pMan->pMSat = Ssw_SatStart( 0 );
Frames = Ssw_ManFilterBmc( p, Iter, fCheckTargets );
if ( fVerbose )
@@ -288,7 +288,7 @@ clk = clock();
Iter, Ssw_ClassesCand1Num(p->pMan->ppClasses), Ssw_ClassesClassNum(p->pMan->ppClasses),
Aig_ManNodeNum(p->pMan->pFrames), Frames, (int)p->pMan->pMSat->pSat->stats.conflicts, p->nPatterns,
p->pMan->nSatFailsReal? "f" : " " );
- ABC_PRT( "T", clock() - clk );
+ ABC_PRT( "T", Abc_Clock() - clk );
}
Ssw_ManCleanup( p->pMan );
if ( fCheckTargets && Ssw_SemCheckTargets( p ) )
diff --git a/src/proof/ssw/sswSim.c b/src/proof/ssw/sswSim.c
index 469af654..c458855d 100644
--- a/src/proof/ssw/sswSim.c
+++ b/src/proof/ssw/sswSim.c
@@ -38,7 +38,7 @@ struct Ssw_Sml_t_
int nWordsPref; // the number of word in the prefix
int fNonConstOut; // have seen a non-const-0 output during simulation
int nSimRounds; // statistics
- clock_t timeSim; // statistics
+ abctime timeSim; // statistics
unsigned pData[0]; // simulation data for the nodes
};
@@ -1006,8 +1006,8 @@ void Ssw_SmlSimulateOne( Ssw_Sml_t * p )
{
Aig_Obj_t * pObj, * pObjLi, * pObjLo;
int f, i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
for ( f = 0; f < p->nFrames; f++ )
{
// simulate the nodes
@@ -1026,7 +1026,7 @@ clk = clock();
Saig_ManForEachLiLo( p->pAig, pObjLi, pObjLo, i )
Ssw_SmlNodeTransferNext( p, pObjLi, pObjLo, f );
}
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
p->nSimRounds++;
}
@@ -1118,8 +1118,8 @@ void Ssw_SmlSimulateOneFrame( Ssw_Sml_t * p )
{
Aig_Obj_t * pObj, * pObjLi, * pObjLo;
int i;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// simulate the nodes
Aig_ManForEachNode( p->pAig, pObj, i )
Ssw_SmlNodeSimulate( p, pObj, 0 );
@@ -1129,7 +1129,7 @@ clk = clock();
// copy simulation info into the inputs
Saig_ManForEachLiLo( p->pAig, pObjLi, pObjLo, i )
Ssw_SmlNodeTransferNext( p, pObjLi, pObjLo, 0 );
-p->timeSim += clock() - clk;
+p->timeSim += Abc_Clock() - clk;
p->nSimRounds++;
}
diff --git a/src/proof/ssw/sswSimSat.c b/src/proof/ssw/sswSimSat.c
index 6e5944d1..74c65c00 100644
--- a/src/proof/ssw/sswSimSat.c
+++ b/src/proof/ssw/sswSimSat.c
@@ -46,7 +46,7 @@ void Ssw_ManResimulateBit( Ssw_Man_t * p, Aig_Obj_t * pCand, Aig_Obj_t * pRepr )
{
Aig_Obj_t * pObj;
int i, RetValue1, RetValue2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// set the PI simulation information
Aig_ManConst1(p->pAig)->fMarkB = 1;
Aig_ManForEachCi( p->pAig, pObj, i )
@@ -75,7 +75,7 @@ void Ssw_ManResimulateBit( Ssw_Man_t * p, Aig_Obj_t * pCand, Aig_Obj_t * pRepr )
Abc_Print( 1, "\nSsw_ManResimulateBit() Error: RetValue2 does not hold.\n" );
}
}
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -92,7 +92,7 @@ p->timeSimSat += clock() - clk;
void Ssw_ManResimulateWord( Ssw_Man_t * p, Aig_Obj_t * pCand, Aig_Obj_t * pRepr, int f )
{
int RetValue1, RetValue2;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// set the PI simulation information
Ssw_SmlAssignDist1Plus( p->pSml, p->pPatWords );
// simulate internal nodes
@@ -113,7 +113,7 @@ void Ssw_ManResimulateWord( Ssw_Man_t * p, Aig_Obj_t * pCand, Aig_Obj_t * pRepr,
if ( RetValue2 == 0 )
Abc_Print( 1, "\nSsw_ManResimulateWord() Error: RetValue2 does not hold.\n" );
}
-p->timeSimSat += clock() - clk;
+p->timeSimSat += Abc_Clock() - clk;
}
////////////////////////////////////////////////////////////////////////
diff --git a/src/proof/ssw/sswSweep.c b/src/proof/ssw/sswSweep.c
index bccc6aa4..6db673cc 100644
--- a/src/proof/ssw/sswSweep.c
+++ b/src/proof/ssw/sswSweep.c
@@ -188,7 +188,7 @@ int Ssw_ManSweepNode( Ssw_Man_t * p, Aig_Obj_t * pObj, int f, int fBmc, Vec_Int_
{
Aig_Obj_t * pObjRepr, * pObjFraig, * pObjFraig2, * pObjReprFraig;
int RetValue;
- clock_t clk;
+ abctime clk;
// get representative of this class
pObjRepr = Aig_ObjRepr( p->pAig, pObj );
if ( pObjRepr == NULL )
@@ -206,10 +206,10 @@ int Ssw_ManSweepNode( Ssw_Man_t * p, Aig_Obj_t * pObj, int f, int fBmc, Vec_Int_
// add constraints on demand
if ( !fBmc && p->pPars->fDynamic )
{
-clk = clock();
+clk = Abc_Clock();
Ssw_ManLoadSolver( p, pObjRepr, pObj );
p->nRecycleCalls++;
-p->timeMarkCones += clock() - clk;
+p->timeMarkCones += Abc_Clock() - clk;
}
// call equivalence checking
if ( Aig_Regular(pObjFraig) != Aig_ManConst1(p->pFrames) )
@@ -269,8 +269,8 @@ int Ssw_ManSweepBmc( Ssw_Man_t * p )
Bar_Progress_t * pProgress = NULL;
Aig_Obj_t * pObj, * pObjNew, * pObjLi, * pObjLo;
int i, f;
- clock_t clk;
-clk = clock();
+ abctime clk;
+clk = Abc_Clock();
// start initialized timeframes
p->pFrames = Aig_ManStart( Aig_ManObjNumMax(p->pAig) * p->pPars->nFramesK );
@@ -315,7 +315,7 @@ clk = clock();
// cleanup
// Ssw_ClassesCheck( p->ppClasses );
-p->timeBmc += clock() - clk;
+p->timeBmc += Abc_Clock() - clk;
return p->fRefined;
}
@@ -368,11 +368,11 @@ int Ssw_ManSweep( Ssw_Man_t * p )
Bar_Progress_t * pProgress = NULL;
Aig_Obj_t * pObj, * pObj2, * pObjNew;
int nConstrPairs, i, f;
- clock_t clk;
+ abctime clk;
Vec_Int_t * vDisproved;
// perform speculative reduction
-clk = clock();
+clk = Abc_Clock();
// create timeframes
p->pFrames = Ssw_FramesWithClasses( p );
// add constants
@@ -397,7 +397,7 @@ clk = clock();
Ssw_ObjSetFrame( p, Aig_ManConst1(p->pAig), f, Aig_ManConst1(p->pFrames) );
Saig_ManForEachPi( p->pAig, pObj, i )
Ssw_ObjSetFrame( p, pObj, f, Aig_ObjCreateCi(p->pFrames) );
-p->timeReduce += clock() - clk;
+p->timeReduce += Abc_Clock() - clk;
// sweep internal nodes
p->fRefined = 0;
diff --git a/src/sat/bmc/bmc.h b/src/sat/bmc/bmc.h
index b5f07151..6e1fd62a 100644
--- a/src/sat/bmc/bmc.h
+++ b/src/sat/bmc/bmc.h
@@ -64,7 +64,7 @@ struct Saig_ParBmc_t_
int iFrame; // explored up to this frame
int nFailOuts; // the number of failed outputs
int nDropOuts; // the number of dropped outputs
- clock_t timeLastSolved; // the time when the last output was solved
+ abctime timeLastSolved; // the time when the last output was solved
int(*pFuncOnFail)(int,Abc_Cex_t*); // called for a failed output in MO mode
};
diff --git a/src/sat/bmc/bmcBmc.c b/src/sat/bmc/bmcBmc.c
index 7a7c8940..bcad9013 100644
--- a/src/sat/bmc/bmcBmc.c
+++ b/src/sat/bmc/bmcBmc.c
@@ -191,10 +191,10 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim
Aig_Man_t * pFrames, * pAigTemp;
Aig_Obj_t * pObj;
int status, Lit, i, RetValue = -1;
- clock_t clk;
+ abctime clk;
// derive the timeframes
- clk = clock();
+ clk = Abc_Clock();
if ( nCofFanLit )
{
pFrames = Gia_ManCofactorAig( pAig, nFrames, nCofFanLit );
@@ -218,13 +218,13 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim
printf( "Time-frames (%d): PI/PO = %d/%d. Node = %6d. Lev = %5d. ",
nFrames, Aig_ManCiNum(pFrames), Aig_ManCoNum(pFrames),
Aig_ManNodeNum(pFrames), Aig_ManLevelNum(pFrames) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
fflush( stdout );
}
// rewrite the timeframes
if ( fRewrite )
{
- clk = clock();
+ clk = Abc_Clock();
// pFrames = Dar_ManBalance( pAigTemp = pFrames, 0 );
pFrames = Dar_ManRwsat( pAigTemp = pFrames, 1, 0 );
Aig_ManStop( pAigTemp );
@@ -232,12 +232,12 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim
{
printf( "Time-frames after rewriting: Node = %6d. Lev = %5d. ",
Aig_ManNodeNum(pFrames), Aig_ManLevelNum(pFrames) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
fflush( stdout );
}
}
// create the SAT solver
- clk = clock();
+ clk = Abc_Clock();
pCnf = Cnf_Derive( pFrames, Aig_ManCoNum(pFrames) );
//if ( s_fInterrupt )
//return -1;
@@ -251,7 +251,7 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim
if ( fVerbose )
{
printf( "CNF: Variables = %6d. Clauses = %7d. Literals = %8d. ", pCnf->nVars, pCnf->nClauses, pCnf->nLiterals );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
fflush( stdout );
}
status = sat_solver_simplify(pSat);
@@ -265,7 +265,7 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim
}
else
{
- clock_t clkPart = clock();
+ abctime clkPart = Abc_Clock();
Aig_ManForEachCo( pFrames, pObj, i )
{
//if ( s_fInterrupt )
@@ -276,15 +276,15 @@ int Saig_ManBmcSimple( Aig_Man_t * pAig, int nFrames, int nSizeMax, int nConfLim
printf( "Solving output %2d of frame %3d ... \r",
i % Saig_ManPoNum(pAig), i / Saig_ManPoNum(pAig) );
}
- clk = clock();
+ clk = Abc_Clock();
status = sat_solver_solve( pSat, &Lit, &Lit + 1, (ABC_INT64_T)nConfLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
if ( fVerbose && (i % Saig_ManPoNum(pAig) == Saig_ManPoNum(pAig) - 1) )
{
printf( "Solved %2d outputs of frame %3d. ",
Saig_ManPoNum(pAig), i / Saig_ManPoNum(pAig) );
printf( "Conf =%8.0f. Imp =%11.0f. ", (double)pSat->stats.conflicts, (double)pSat->stats.propagations );
- ABC_PRT( "T", clock() - clkPart );
- clkPart = clock();
+ ABC_PRT( "T", Abc_Clock() - clkPart );
+ clkPart = Abc_Clock();
fflush( stdout );
}
if ( status == l_False )
diff --git a/src/sat/bmc/bmcBmc2.c b/src/sat/bmc/bmcBmc2.c
index 658010c0..47bfc008 100644
--- a/src/sat/bmc/bmcBmc2.c
+++ b/src/sat/bmc/bmcBmc2.c
@@ -202,7 +202,7 @@ Vec_Ptr_t * Abs_ManTernarySimulate( Aig_Man_t * p, int nFramesMax, int fVerbose
Vec_Ptr_t * vSimInfo;
Aig_Obj_t * pObj;
int i, f, nFramesLimit, nFrameWords;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
assert( Aig_ManRegNum(p) > 0 );
// the maximum number of frames will be determined to use at most 200Mb of RAM
nFramesLimit = 1 + (200000000 * 4)/Aig_ManObjNum(p);
@@ -231,7 +231,7 @@ Vec_Ptr_t * Abs_ManTernarySimulate( Aig_Man_t * p, int nFramesMax, int fVerbose
{
printf( "Ternary sim found non-zero output in frame %d. Used %5.2f MB. ",
f, 0.25 * (f+1) * Aig_ManObjNum(p) / (1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
return vSimInfo;
}
@@ -240,7 +240,7 @@ Vec_Ptr_t * Abs_ManTernarySimulate( Aig_Man_t * p, int nFramesMax, int fVerbose
{
printf( "Ternary sim proved all outputs in the first %d frames. Used %5.2f MB. ",
nFramesLimit, 0.25 * nFramesLimit * Aig_ManObjNum(p) / (1<<20) );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
return vSimInfo;
}
@@ -765,8 +765,8 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
Cnf_Dat_t * pCnf;
int nOutsSolved = 0;
int Iter, RetValue = -1;
- clock_t nTimeToStop = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + clock(): 0;
- clock_t clk = clock(), clk2, clkTotal = clock();
+ abctime nTimeToStop = nTimeOut ? nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
+ abctime clk = Abc_Clock(), clk2, clkTotal = Abc_Clock();
int Status = -1;
/*
Vec_Ptr_t * vSimInfo;
@@ -788,7 +788,7 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
sat_solver_set_runtime_limit( p->pSat, nTimeToStop );
for ( Iter = 0; ; Iter++ )
{
- clk2 = clock();
+ clk2 = Abc_Clock();
// add new logic interval to frames
Saig_BmcInterval( p );
// Saig_BmcAddTargetsAsPos( p );
@@ -812,14 +812,14 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
printf( "%4d : F =%5d. O =%4d. And =%8d. Var =%8d. Conf =%7d. ",
Iter, p->iFrameLast, p->iOutputLast, Aig_ManNodeNum(p->pFrm), p->nSatVars, (int)p->pSat->stats.conflicts );
printf( "%4.0f MB", 4.0*(p->iFrameLast+1)*p->nObjs/(1<<20) );
- printf( "%9.2f sec", (float)(clock() - clkTotal)/(float)(CLOCKS_PER_SEC) );
+ printf( "%9.2f sec", (float)(Abc_Clock() - clkTotal)/(float)(CLOCKS_PER_SEC) );
printf( "\n" );
fflush( stdout );
}
if ( RetValue != l_False )
break;
// check the timeout
- if ( nTimeOut && clock() > nTimeToStop )
+ if ( nTimeOut && Abc_Clock() > nTimeToStop )
{
if ( !fSilent )
printf( "Reached timeout (%d seconds).\n", nTimeOut );
@@ -855,11 +855,11 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
{
if ( fVerbOverwrite )
{
- ABC_PRTr( "Time", clock() - clk );
+ ABC_PRTr( "Time", Abc_Clock() - clk );
}
else
{
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
if ( RetValue != l_True )
{
@@ -867,7 +867,7 @@ int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFramesMax, int nNodesMax
printf( "Reached limit on the number of timeframes (%d).\n", p->nFramesMax );
else if ( p->nConfMaxAll && p->pSat->stats.conflicts > p->nConfMaxAll )
printf( "Reached global conflict limit (%d).\n", p->nConfMaxAll );
- else if ( nTimeOut && clock() > nTimeToStop )
+ else if ( nTimeOut && Abc_Clock() > nTimeToStop )
printf( "Reached timeout (%d seconds).\n", nTimeOut );
else
printf( "Reached local conflict limit (%d).\n", p->nConfMaxOne );
diff --git a/src/sat/bmc/bmcBmc3.c b/src/sat/bmc/bmcBmc3.c
index 87edbb5f..9d399a20 100644
--- a/src/sat/bmc/bmcBmc3.c
+++ b/src/sat/bmc/bmcBmc3.c
@@ -44,7 +44,7 @@ struct Gia_ManBmc_t_
Vec_Int_t * vId2Num; // number of each node
Vec_Ptr_t * vTerInfo; // ternary information
Vec_Ptr_t * vId2Var; // SAT vars for each object
- clock_t * pTime4Outs; // timeout per output
+ abctime * pTime4Outs; // timeout per output
// hash table
Vec_Int_t * vData; // storage for cuts
Hsh_IntMan_t * vHash; // hash table
@@ -742,7 +742,7 @@ Gia_ManBmc_t * Saig_Bmc3ManStart( Aig_Man_t * pAig, int nTimeOutOne )
// time spent on each outputs
if ( nTimeOutOne )
{
- p->pTime4Outs = ABC_ALLOC( clock_t, Saig_ManPoNum(pAig) );
+ p->pTime4Outs = ABC_ALLOC( abctime, Saig_ManPoNum(pAig) );
for ( i = 0; i < Saig_ManPoNum(pAig); i++ )
p->pTime4Outs[i] = nTimeOutOne * CLOCKS_PER_SEC / 1000 + 1;
}
@@ -1243,10 +1243,10 @@ void Saig_ParBmcSetDefaultParams( Saig_ParBmc_t * p )
SeeAlso []
***********************************************************************/
-clock_t Saig_ManBmcTimeToStop( Saig_ParBmc_t * pPars, clock_t nTimeToStopNG )
+abctime Saig_ManBmcTimeToStop( Saig_ParBmc_t * pPars, abctime nTimeToStopNG )
{
- clock_t nTimeToStopGap = pPars->nTimeOutGap ? pPars->nTimeOutGap * CLOCKS_PER_SEC + clock(): 0;
- clock_t nTimeToStop = 0;
+ abctime nTimeToStopGap = pPars->nTimeOutGap ? pPars->nTimeOutGap * CLOCKS_PER_SEC + Abc_Clock(): 0;
+ abctime nTimeToStop = 0;
if ( nTimeToStopNG && nTimeToStopGap )
nTimeToStop = Abc_MinInt( nTimeToStopNG, nTimeToStopGap );
else if ( nTimeToStopNG )
@@ -1302,14 +1302,14 @@ int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars )
int RetValue = -1, fFirst = 1, nJumpFrame = 0, fUnfinished = 0;
int nOutDigits = Abc_Base10Log( Saig_ManPoNum(pAig) );
int i, f, k, Lit, status;
- clock_t clk, clk2, clkOther = 0, clkTotal = clock();
- clock_t nTimeUnsat = 0, nTimeSat = 0, nTimeUndec = 0, clkOne = 0;
- clock_t nTimeToStopNG, nTimeToStop;
+ abctime clk, clk2, clkOther = 0, clkTotal = Abc_Clock();
+ abctime nTimeUnsat = 0, nTimeSat = 0, nTimeUndec = 0, clkOne = 0;
+ abctime nTimeToStopNG, nTimeToStop;
if ( pPars->nTimeOutOne )
pPars->nTimeOut = pPars->nTimeOutOne * Saig_ManPoNum(pAig) / 1000 + 1;
if ( pPars->nTimeOutOne && !pPars->fSolveAll )
pPars->nTimeOutOne = 0;
- nTimeToStopNG = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + clock(): 0;
+ nTimeToStopNG = pPars->nTimeOut ? pPars->nTimeOut * CLOCKS_PER_SEC + Abc_Clock(): 0;
nTimeToStop = Saig_ManBmcTimeToStop( pPars, nTimeToStopNG );
// create BMC manager
p = Saig_Bmc3ManStart( pAig, pPars->nTimeOutOne );
@@ -1332,7 +1332,7 @@ int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars )
sat_solver_set_runtime_limit( p->pSat, nTimeToStop );
// perform frames
Aig_ManRandom( 1 );
- pPars->timeLastSolved = clock();
+ pPars->timeLastSolved = Abc_Clock();
for ( f = 0; f < pPars->nFramesMax; f++ )
{
// stop BMC after exploring all reachable states
@@ -1379,18 +1379,18 @@ int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars )
if ( (pPars->nStart && f < pPars->nStart) || (nJumpFrame && f < nJumpFrame) )
continue;
// solve SAT
- clk = clock();
+ clk = Abc_Clock();
Saig_ManForEachPo( pAig, pObj, i )
{
if ( i >= Saig_ManPoNum(pAig) )
break;
// check for timeout
- if ( pPars->nTimeOutGap && pPars->timeLastSolved && clock() > pPars->timeLastSolved + pPars->nTimeOutGap * CLOCKS_PER_SEC )
+ if ( pPars->nTimeOutGap && pPars->timeLastSolved && Abc_Clock() > pPars->timeLastSolved + pPars->nTimeOutGap * CLOCKS_PER_SEC )
{
printf( "Reached gap timeout (%d seconds).\n", pPars->nTimeOutGap );
goto finish;
}
- if ( nTimeToStop && clock() > nTimeToStop )
+ if ( nTimeToStop && Abc_Clock() > nTimeToStop )
{
printf( "Reached timeout (%d seconds).\n", pPars->nTimeOut );
goto finish;
@@ -1402,9 +1402,9 @@ int Saig_ManBmcScalable( Aig_Man_t * pAig, Saig_ParBmc_t * pPars )
if ( p->pTime4Outs && p->pTime4Outs[i] == 0 )
continue;
// add constraints for this output
-clk2 = clock();
+clk2 = Abc_Clock();
Lit = Saig_ManBmcCreateCnf( p, pObj, f );
-clkOther += clock() - clk2;
+clkOther += Abc_Clock() - clk2;
if ( Lit == 0 )
continue;
if ( Lit == 1 )
@@ -1431,7 +1431,7 @@ clkOther += clock() - clk2;
goto finish;
}
// reset the timeout
- pPars->timeLastSolved = clock();
+ pPars->timeLastSolved = Abc_Clock();
nTimeToStop = Saig_ManBmcTimeToStop( pPars, nTimeToStopNG );
if ( nTimeToStop )
sat_solver_set_runtime_limit( p->pSat, nTimeToStop );
@@ -1440,17 +1440,17 @@ clkOther += clock() - clk2;
// solve this output
fUnfinished = 0;
sat_solver_compress( p->pSat );
-clk2 = clock();
+clk2 = Abc_Clock();
if ( p->pTime4Outs )
{
assert( p->pTime4Outs[i] > 0 );
- clkOne = clock();
- sat_solver_set_runtime_limit( p->pSat, p->pTime4Outs[i] + clock() );
+ clkOne = Abc_Clock();
+ sat_solver_set_runtime_limit( p->pSat, p->pTime4Outs[i] + Abc_Clock() );
}
status = sat_solver_solve( p->pSat, &Lit, &Lit + 1, (ABC_INT64_T)pPars->nConfLimit, (ABC_INT64_T)0, (ABC_INT64_T)0, (ABC_INT64_T)0 );
if ( p->pTime4Outs )
{
- clock_t timeSince = clock() - clkOne;
+ abctime timeSince = Abc_Clock() - clkOne;
assert( p->pTime4Outs[i] > 0 );
p->pTime4Outs[i] = (p->pTime4Outs[i] > timeSince) ? p->pTime4Outs[i] - timeSince : 0;
if ( p->pTime4Outs[i] == 0 && status != l_True )
@@ -1458,7 +1458,7 @@ clk2 = clock();
}
if ( status == l_False )
{
-nTimeUnsat += clock() - clk2;
+nTimeUnsat += Abc_Clock() - clk2;
if ( 1 )
{
// add final unit clause
@@ -1479,7 +1479,7 @@ nTimeUnsat += clock() - clk2;
}
else if ( status == l_True )
{
-nTimeSat += clock() - clk2;
+nTimeSat += Abc_Clock() - clk2;
RetValue = 0;
fFirst = 0;
if ( !pPars->fSolveAll )
@@ -1492,10 +1492,10 @@ nTimeSat += clock() - clk2;
printf( "Conf =%7.0f. ", (double)p->pSat->stats.conflicts );
// printf( "Imp =%10.0f. ", (double)p->pSat->stats.propagations );
printf( "Uni =%7.0f. ",(double)sat_solver_count_assigned(p->pSat) );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
printf( "%4.0f MB", 4.25*(f+1)*p->nObjNums /(1<<20) );
printf( "%4.0f MB", 1.0*sat_solver_memory(p->pSat)/(1<<20) );
- printf( "%9.2f sec ", (float)(clock() - clkTotal)/(float)(CLOCKS_PER_SEC) );
+ printf( "%9.2f sec ", (float)(Abc_Clock() - clkTotal)/(float)(CLOCKS_PER_SEC) );
// printf( "\n" );
// ABC_PRMn( "Id2Var", (f+1)*p->nObjNums*4 );
// ABC_PRMn( "SAT", 42 * p->pSat->size + 16 * (int)p->pSat->stats.clauses + 4 * (int)p->pSat->stats.clauses_literals );
@@ -1521,14 +1521,14 @@ nTimeSat += clock() - clk2;
goto finish;
}
// reset the timeout
- pPars->timeLastSolved = clock();
+ pPars->timeLastSolved = Abc_Clock();
nTimeToStop = Saig_ManBmcTimeToStop( pPars, nTimeToStopNG );
if ( nTimeToStop )
sat_solver_set_runtime_limit( p->pSat, nTimeToStop );
}
else
{
-nTimeUndec += clock() - clk2;
+nTimeUndec += Abc_Clock() - clk2;
assert( status == l_Undef );
if ( pPars->nFramesJump )
{
@@ -1559,12 +1559,12 @@ nTimeUndec += clock() - clk2;
printf( "CEX =%5d. ", pPars->nFailOuts );
if ( pPars->nTimeOutOne )
printf( "T/O =%4d. ", pPars->nDropOuts );
-// ABC_PRT( "Time", clock() - clk );
+// ABC_PRT( "Time", Abc_Clock() - clk );
// printf( "%4.0f MB", 4.0*Vec_IntSize(p->vVisited) /(1<<20) );
printf( "%4.0f MB", 4.0*(f+1)*p->nObjNums /(1<<20) );
printf( "%4.0f MB", 1.0*sat_solver_memory(p->pSat)/(1<<20) );
// printf( " %6d %6d ", p->nLitUsed, p->nLitUseless );
- printf( "%9.2f sec ", 1.0*(clock() - clkTotal)/CLOCKS_PER_SEC );
+ printf( "%9.2f sec ", 1.0*(Abc_Clock() - clkTotal)/CLOCKS_PER_SEC );
// printf( "\n" );
// ABC_PRMn( "Id2Var", (f+1)*p->nObjNums*4 );
// ABC_PRMn( "SAT", 42 * p->pSat->size + 16 * (int)p->pSat->stats.clauses + 4 * (int)p->pSat->stats.clauses_literals );
@@ -1584,10 +1584,10 @@ finish:
if ( pPars->fVerbose )
{
printf( "Runtime: " );
- printf( "CNF = %.1f sec (%.1f %%) ", 1.0*clkOther/CLOCKS_PER_SEC, 100.0*clkOther/(clock() - clkTotal) );
- printf( "UNSAT = %.1f sec (%.1f %%) ", 1.0*nTimeUnsat/CLOCKS_PER_SEC, 100.0*nTimeUnsat/(clock() - clkTotal) );
- printf( "SAT = %.1f sec (%.1f %%) ", 1.0*nTimeSat/CLOCKS_PER_SEC, 100.0*nTimeSat/(clock() - clkTotal) );
- printf( "UNDEC = %.1f sec (%.1f %%)", 1.0*nTimeUndec/CLOCKS_PER_SEC, 100.0*nTimeUndec/(clock() - clkTotal) );
+ printf( "CNF = %.1f sec (%.1f %%) ", 1.0*clkOther/CLOCKS_PER_SEC, 100.0*clkOther/(Abc_Clock() - clkTotal) );
+ printf( "UNSAT = %.1f sec (%.1f %%) ", 1.0*nTimeUnsat/CLOCKS_PER_SEC, 100.0*nTimeUnsat/(Abc_Clock() - clkTotal) );
+ printf( "SAT = %.1f sec (%.1f %%) ", 1.0*nTimeSat/CLOCKS_PER_SEC, 100.0*nTimeSat/(Abc_Clock() - clkTotal) );
+ printf( "UNDEC = %.1f sec (%.1f %%)", 1.0*nTimeUndec/CLOCKS_PER_SEC, 100.0*nTimeUndec/(Abc_Clock() - clkTotal) );
printf( "\n" );
}
Saig_Bmc3ManStop( p );
diff --git a/src/sat/bmc/bmcCexDepth.c b/src/sat/bmc/bmcCexDepth.c
index b28a7ba7..7bdfd0ad 100644
--- a/src/sat/bmc/bmcCexDepth.c
+++ b/src/sat/bmc/bmcCexDepth.c
@@ -343,7 +343,7 @@ Gia_Man_t * Bmc_CexBuildNetwork2Test( Gia_Man_t * p, Abc_Cex_t * pCex, int nFram
{
Gia_Man_t * pNew, * pTemp;
Vec_Ptr_t * vCones;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i;
nFramesMax = Abc_MinInt( nFramesMax, pCex->iFrame );
printf( "Processing CEX in frame %d (max frames %d).\n", pCex->iFrame, nFramesMax );
@@ -357,13 +357,13 @@ Gia_Man_t * Bmc_CexBuildNetwork2Test( Gia_Man_t * p, Abc_Cex_t * pCex, int nFram
}
pNew = Gia_ManDupAppendCones( p, (Gia_Man_t **)Vec_PtrArray(vCones), Vec_PtrSize(vCones), 1 );
Gia_AigerWrite( pNew, "miter2.aig", 0, 0 );
-//Bmc_CexDumpAogStats( pNew, clock() - clk );
+//Bmc_CexDumpAogStats( pNew, Abc_Clock() - clk );
Vec_PtrForEachEntry( Gia_Man_t *, vCones, pTemp, i )
Gia_ManStop( pTemp );
Vec_PtrFree( vCones );
printf( "GIA with additional properties is written into \"miter2.aig\".\n" );
// printf( "CE-induced network is written into file \"unate.aig\".\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// Gia_ManStop( pNew );
return pNew;
}
@@ -383,7 +383,7 @@ Gia_Man_t * Bmc_CexBuildNetwork2Test( Gia_Man_t * p, Abc_Cex_t * pCex, int nFram
Gia_Man_t * Bmc_CexDepthTest( Gia_Man_t * p, Abc_Cex_t * pCex, int nFrames, int fVerbose )
{
Gia_Man_t * pNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Abc_Cex_t * pCexImpl = NULL;
Abc_Cex_t * pCexStates = Bmc_CexInnerStates( p, pCex, &pCexImpl, fVerbose );
Abc_Cex_t * pCexCare = Bmc_CexCareBits( p, pCexStates, pCexImpl, NULL, 1, fVerbose );
@@ -398,9 +398,9 @@ Gia_Man_t * Bmc_CexDepthTest( Gia_Man_t * p, Abc_Cex_t * pCex, int nFrames, int
// if ( !Bmc_CexVerify( p, pCex, pCexMin ) )
// printf( "Counter-example min-set verification has failed.\n" );
-// Bmc_CexDumpStats( p, pCex, pCexCare, pCexEss, pCexMin, clock() - clk );
+// Bmc_CexDumpStats( p, pCex, pCexCare, pCexEss, pCexMin, Abc_Clock() - clk );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
pNew = Bmc_CexBuildNetwork2Test( p, pCexStates, nFrames );
// Bmc_CexPerformUnrollingTest( p, pCex );
diff --git a/src/sat/bmc/bmcCexTools.c b/src/sat/bmc/bmcCexTools.c
index bbf7d1ad..0260b537 100644
--- a/src/sat/bmc/bmcCexTools.c
+++ b/src/sat/bmc/bmcCexTools.c
@@ -75,7 +75,7 @@ int Bmc_CexBitCount( Abc_Cex_t * p, int nInputs )
SeeAlso []
***********************************************************************/
-void Bmc_CexDumpStats( Gia_Man_t * p, Abc_Cex_t * pCex, Abc_Cex_t * pCexCare, Abc_Cex_t * pCexEss, Abc_Cex_t * pCexMin, clock_t clk )
+void Bmc_CexDumpStats( Gia_Man_t * p, Abc_Cex_t * pCex, Abc_Cex_t * pCexCare, Abc_Cex_t * pCexEss, Abc_Cex_t * pCexMin, abctime clk )
{
int nInputs = Gia_ManPiNum(p);
int nBitsTotal = (pCex->iFrame + 1) * nInputs;
@@ -112,7 +112,7 @@ void Bmc_CexDumpStats( Gia_Man_t * p, Abc_Cex_t * pCex, Abc_Cex_t * pCexCare, Ab
SeeAlso []
***********************************************************************/
-void Bmc_CexDumpAogStats( Gia_Man_t * p, clock_t clk )
+void Bmc_CexDumpAogStats( Gia_Man_t * p, abctime clk )
{
FILE * pTable = fopen( "cex/aig_stats.txt", "a+" );
fprintf( pTable, "%s ", p->pName );
@@ -170,14 +170,14 @@ Gia_Man_t * Bmc_CexPerformUnrolling( Gia_Man_t * p, Abc_Cex_t * pCex )
void Bmc_CexPerformUnrollingTest( Gia_Man_t * p, Abc_Cex_t * pCex )
{
Gia_Man_t * pNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pNew = Bmc_CexPerformUnrolling( p, pCex );
Gia_ManPrintStats( pNew, 0, 0, 0 );
Gia_AigerWrite( pNew, "unroll.aig", 0, 0 );
-//Bmc_CexDumpAogStats( pNew, clock() - clk );
+//Bmc_CexDumpAogStats( pNew, Abc_Clock() - clk );
Gia_ManStop( pNew );
printf( "CE-induced network is written into file \"unroll.aig\".\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
@@ -282,14 +282,14 @@ Gia_Man_t * Bmc_CexBuildNetwork( Gia_Man_t * p, Abc_Cex_t * pCex )
void Bmc_CexBuildNetworkTest( Gia_Man_t * p, Abc_Cex_t * pCex )
{
Gia_Man_t * pNew;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
pNew = Bmc_CexBuildNetwork( p, pCex );
Gia_ManPrintStats( pNew, 0, 0, 0 );
Gia_AigerWrite( pNew, "unate.aig", 0, 0 );
-//Bmc_CexDumpAogStats( pNew, clock() - clk );
+//Bmc_CexDumpAogStats( pNew, Abc_Clock() - clk );
Gia_ManStop( pNew );
printf( "CE-induced network is written into file \"unate.aig\".\n" );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
@@ -756,7 +756,7 @@ Abc_Cex_t * Bmc_CexEssentialBits( Gia_Man_t * p, Abc_Cex_t * pCexState, Abc_Cex_
{
Abc_Cex_t * pNew, * pTemp, * pPrev = NULL;
int b, fEqual = 0, fPrevStatus = 0;
-// clock_t clk = clock();
+// abctime clk = Abc_Clock();
assert( pCexState->nBits == pCexCare->nBits );
// start the counter-example
pNew = Abc_CexAlloc( 0, Gia_ManCiNum(p), pCexState->iFrame + 1 );
@@ -795,7 +795,7 @@ Abc_Cex_t * Bmc_CexEssentialBits( Gia_Man_t * p, Abc_Cex_t * pCexState, Abc_Cex_
Abc_InfoSetBit( pNew->pData, b );
}
Abc_CexFreeP( &pPrev );
-// Abc_PrintTime( 1, "Time", clock() - clk );
+// Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
printf( "Essentials: " );
Bmc_CexPrint( pNew, Gia_ManPiNum(p), fVerbose );
return pNew;
@@ -815,7 +815,7 @@ Abc_Cex_t * Bmc_CexEssentialBits( Gia_Man_t * p, Abc_Cex_t * pCexState, Abc_Cex_
***********************************************************************/
void Bmc_CexTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose )
{
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
Abc_Cex_t * pCexImpl = NULL;
Abc_Cex_t * pCexStates = Bmc_CexInnerStates( p, pCex, &pCexImpl, fVerbose );
Abc_Cex_t * pCexCare = Bmc_CexCareBits( p, pCexStates, pCexImpl, NULL, 1, fVerbose );
@@ -830,7 +830,7 @@ void Bmc_CexTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose )
if ( !Bmc_CexVerify( p, pCex, pCexMin ) )
printf( "Counter-example min-set verification has failed.\n" );
-// Bmc_CexDumpStats( p, pCex, pCexCare, pCexEss, pCexMin, clock() - clk );
+// Bmc_CexDumpStats( p, pCex, pCexCare, pCexEss, pCexMin, Abc_Clock() - clk );
Abc_CexFreeP( &pCexStates );
Abc_CexFreeP( &pCexImpl );
@@ -838,7 +838,7 @@ void Bmc_CexTest( Gia_Man_t * p, Abc_Cex_t * pCex, int fVerbose )
Abc_CexFreeP( &pCexEss );
Abc_CexFreeP( &pCexMin );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// Bmc_CexBuildNetworkTest( p, pCex );
// Bmc_CexPerformUnrollingTest( p, pCex );
}
diff --git a/src/sat/bmc/bmcUnroll.c b/src/sat/bmc/bmcUnroll.c
index 83848c49..dd1abde6 100644
--- a/src/sat/bmc/bmcUnroll.c
+++ b/src/sat/bmc/bmcUnroll.c
@@ -177,7 +177,7 @@ void Unr_ManSetup( Unr_Man_t * p )
Gia_Obj_t * pObj, * pObjRi;
Unr_Obj_t * pUnrObj;
int i, k, t, iObj, nInts, * pInts;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
vRoots = Vec_IntAlloc( 100 );
vRoots2 = Vec_IntAlloc( 100 );
// create zero rank
@@ -268,7 +268,7 @@ Unr_ManProfileRanks( p->vRanks );
Vec_IntFreeP( &vMap );
printf( "Memory usage = %6.2f MB\n", 4.0 * nInts / (1<<20) );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
}
diff --git a/src/sat/bsat/satInter.c b/src/sat/bsat/satInter.c
index 6bd07fb7..45908225 100644
--- a/src/sat/bsat/satInter.c
+++ b/src/sat/bsat/satInter.c
@@ -71,9 +71,9 @@ struct Int_Man_t_
int nResLits; // the number of literals of the resolvent
int nResLitsAlloc;// the number of literals of the resolvent
// runtime stats
- clock_t timeBcp; // the runtime for BCP
- clock_t timeTrace; // the runtime of trace construction
- clock_t timeTotal; // the total runtime of interpolation
+ abctime timeBcp; // the runtime for BCP
+ abctime timeTrace; // the runtime of trace construction
+ abctime timeTotal; // the total runtime of interpolation
};
// procedure to get hold of the clauses' truth table
@@ -535,17 +535,17 @@ Sto_Cls_t * Int_ManPropagate( Int_Man_t * p, int Start )
{
Sto_Cls_t * pClause;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for ( i = Start; i < p->nTrailSize; i++ )
{
pClause = Int_ManPropagateOne( p, p->pTrail[i] );
if ( pClause )
{
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return pClause;
}
}
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return NULL;
}
@@ -591,7 +591,7 @@ int Int_ManProofTraceOne( Int_Man_t * p, Sto_Cls_t * pConflict, Sto_Cls_t * pFin
Sto_Cls_t * pReason;
int i, v, Var, PrevId;
int fPrint = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect resolvent literals
if ( p->fProofVerif )
@@ -743,7 +743,7 @@ int Int_ManProofTraceOne( Int_Man_t * p, Sto_Cls_t * pConflict, Sto_Cls_t * pFin
assert( p->nResLits == (int)pFinal->nLits );
}
}
-p->timeTrace += clock() - clk;
+p->timeTrace += Abc_Clock() - clk;
// return the proof pointer
if ( p->pCnf->nClausesA )
@@ -1006,7 +1006,7 @@ int Int_ManInterpolate( Int_Man_t * p, Sto_Man_t * pCnf, int fVerbose, unsigned
{
Sto_Cls_t * pClause;
int RetValue = 1;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
// check that the CNF makes sense
assert( pCnf->nVars > 0 && pCnf->nClauses > 0 );
@@ -1061,7 +1061,7 @@ int Int_ManInterpolate( Int_Man_t * p, Sto_Man_t * pCnf, int fVerbose, unsigned
p->pCnf->nVars, p->pCnf->nRoots, p->pCnf->nClauses-p->pCnf->nRoots, p->Counter,
1.0*(p->Counter-p->pCnf->nRoots)/(p->pCnf->nClauses-p->pCnf->nRoots),
1.0*Sto_ManMemoryReport(p->pCnf)/(1<<20) );
-p->timeTotal += clock() - clkTotal;
+p->timeTotal += Abc_Clock() - clkTotal;
}
*ppResult = Int_ManTruthRead( p, p->pCnf->pTail );
diff --git a/src/sat/bsat/satInterA.c b/src/sat/bsat/satInterA.c
index a4a06439..dabb10a3 100644
--- a/src/sat/bsat/satInterA.c
+++ b/src/sat/bsat/satInterA.c
@@ -70,9 +70,9 @@ struct Inta_Man_t_
int nResLits; // the number of literals of the resolvent
int nResLitsAlloc;// the number of literals of the resolvent
// runtime stats
- clock_t timeBcp; // the runtime for BCP
- clock_t timeTrace; // the runtime of trace construction
- clock_t timeTotal; // the total runtime of interpolation
+ abctime timeBcp; // the runtime for BCP
+ abctime timeTrace; // the runtime of trace construction
+ abctime timeTotal; // the total runtime of interpolation
};
// procedure to get hold of the clauses' truth table
@@ -491,17 +491,17 @@ Sto_Cls_t * Inta_ManPropagate( Inta_Man_t * p, int Start )
{
Sto_Cls_t * pClause;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for ( i = Start; i < p->nTrailSize; i++ )
{
pClause = Inta_ManPropagateOne( p, p->pTrail[i] );
if ( pClause )
{
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return pClause;
}
}
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return NULL;
}
@@ -547,7 +547,7 @@ int Inta_ManProofTraceOne( Inta_Man_t * p, Sto_Cls_t * pConflict, Sto_Cls_t * pF
Sto_Cls_t * pReason;
int i, v, Var, PrevId;
int fPrint = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect resolvent literals
if ( p->fProofVerif )
@@ -697,7 +697,7 @@ int Inta_ManProofTraceOne( Inta_Man_t * p, Sto_Cls_t * pConflict, Sto_Cls_t * pF
assert( p->nResLits == (int)pFinal->nLits );
}
}
-p->timeTrace += clock() - clk;
+p->timeTrace += Abc_Clock() - clk;
// return the proof pointer
if ( p->pCnf->nClausesA )
@@ -954,7 +954,7 @@ void * Inta_ManInterpolate( Inta_Man_t * p, Sto_Man_t * pCnf, void * vVarsAB, in
Aig_Obj_t * pObj;
Sto_Cls_t * pClause;
int RetValue = 1;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
// check that the CNF makes sense
assert( pCnf->nVars > 0 && pCnf->nClauses > 0 );
@@ -1008,12 +1008,12 @@ void * Inta_ManInterpolate( Inta_Man_t * p, Sto_Man_t * pCnf, void * vVarsAB, in
if ( fVerbose )
{
-// ABC_PRT( "Interpo", clock() - clkTotal );
+// ABC_PRT( "Interpo", Abc_Clock() - clkTotal );
printf( "Vars = %d. Roots = %d. Learned = %d. Resol steps = %d. Ave = %.2f. Mem = %.2f MB\n",
p->pCnf->nVars, p->pCnf->nRoots, p->pCnf->nClauses-p->pCnf->nRoots, p->Counter,
1.0*(p->Counter-p->pCnf->nRoots)/(p->pCnf->nClauses-p->pCnf->nRoots),
1.0*Sto_ManMemoryReport(p->pCnf)/(1<<20) );
-p->timeTotal += clock() - clkTotal;
+p->timeTotal += Abc_Clock() - clkTotal;
}
pObj = *Inta_ManAigRead( p, p->pCnf->pTail );
diff --git a/src/sat/bsat/satInterB.c b/src/sat/bsat/satInterB.c
index 07edf7a8..8226fb6d 100644
--- a/src/sat/bsat/satInterB.c
+++ b/src/sat/bsat/satInterB.c
@@ -70,9 +70,9 @@ struct Intb_Man_t_
int nResLits; // the number of literals of the resolvent
int nResLitsAlloc;// the number of literals of the resolvent
// runtime stats
- clock_t timeBcp; // the runtime for BCP
- clock_t timeTrace; // the runtime of trace construction
- clock_t timeTotal; // the total runtime of interpolation
+ abctime timeBcp; // the runtime for BCP
+ abctime timeTrace; // the runtime of trace construction
+ abctime timeTotal; // the total runtime of interpolation
};
// procedure to get hold of the clauses' truth table
@@ -493,17 +493,17 @@ Sto_Cls_t * Intb_ManPropagate( Intb_Man_t * p, int Start )
{
Sto_Cls_t * pClause;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for ( i = Start; i < p->nTrailSize; i++ )
{
pClause = Intb_ManPropagateOne( p, p->pTrail[i] );
if ( pClause )
{
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return pClause;
}
}
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return NULL;
}
@@ -570,7 +570,7 @@ int Intb_ManProofTraceOne( Intb_Man_t * p, Sto_Cls_t * pConflict, Sto_Cls_t * pF
Sto_Cls_t * pReason;
int i, v, Var, PrevId;
int fPrint = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect resolvent literals
if ( p->fProofVerif )
@@ -733,7 +733,7 @@ int Intb_ManProofTraceOne( Intb_Man_t * p, Sto_Cls_t * pConflict, Sto_Cls_t * pF
assert( p->nResLits == (int)pFinal->nLits );
}
}
-p->timeTrace += clock() - clk;
+p->timeTrace += Abc_Clock() - clk;
// return the proof pointer
if ( p->pCnf->nClausesA )
@@ -990,7 +990,7 @@ void * Intb_ManInterpolate( Intb_Man_t * p, Sto_Man_t * pCnf, void * vVarsAB, in
Aig_Obj_t * pObj;
Sto_Cls_t * pClause;
int RetValue = 1;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
// check that the CNF makes sense
assert( pCnf->nVars > 0 && pCnf->nClauses > 0 );
@@ -1044,12 +1044,12 @@ void * Intb_ManInterpolate( Intb_Man_t * p, Sto_Man_t * pCnf, void * vVarsAB, in
if ( fVerbose )
{
-// ABC_PRT( "Interpo", clock() - clkTotal );
+// ABC_PRT( "Interpo", Abc_Clock() - clkTotal );
printf( "Vars = %d. Roots = %d. Learned = %d. Resol steps = %d. Ave = %.2f. Mem = %.2f MB\n",
p->pCnf->nVars, p->pCnf->nRoots, p->pCnf->nClauses-p->pCnf->nRoots, p->Counter,
1.0*(p->Counter-p->pCnf->nRoots)/(p->pCnf->nClauses-p->pCnf->nRoots),
1.0*Sto_ManMemoryReport(p->pCnf)/(1<<20) );
-p->timeTotal += clock() - clkTotal;
+p->timeTotal += Abc_Clock() - clkTotal;
}
pObj = *Intb_ManAigRead( p, p->pCnf->pTail );
diff --git a/src/sat/bsat/satInterP.c b/src/sat/bsat/satInterP.c
index 404d5503..414879b6 100644
--- a/src/sat/bsat/satInterP.c
+++ b/src/sat/bsat/satInterP.c
@@ -69,9 +69,9 @@ struct Intp_Man_t_
int nResLits; // the number of literals of the resolvent
int nResLitsAlloc;// the number of literals of the resolvent
// runtime stats
- clock_t timeBcp; // the runtime for BCP
- clock_t timeTrace; // the runtime of trace construction
- clock_t timeTotal; // the total runtime of interpolation
+ abctime timeBcp; // the runtime for BCP
+ abctime timeTrace; // the runtime of trace construction
+ abctime timeTotal; // the total runtime of interpolation
};
// reading/writing the proof for a clause
@@ -419,17 +419,17 @@ Sto_Cls_t * Intp_ManPropagate( Intp_Man_t * p, int Start )
{
Sto_Cls_t * pClause;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for ( i = Start; i < p->nTrailSize; i++ )
{
pClause = Intp_ManPropagateOne( p, p->pTrail[i] );
if ( pClause )
{
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return pClause;
}
}
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return NULL;
}
@@ -475,7 +475,7 @@ int Intp_ManProofTraceOne( Intp_Man_t * p, Sto_Cls_t * pConflict, Sto_Cls_t * pF
Sto_Cls_t * pReason;
int i, v, Var, PrevId;
int fPrint = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect resolvent literals
if ( p->fProofVerif )
@@ -639,7 +639,7 @@ int Intp_ManProofTraceOne( Intp_Man_t * p, Sto_Cls_t * pConflict, Sto_Cls_t * pF
assert( p->nResLits == (int)pFinal->nLits );
}
}
-p->timeTrace += clock() - clk;
+p->timeTrace += Abc_Clock() - clk;
// return the proof pointer
// if ( p->pCnf->nClausesA )
@@ -864,7 +864,7 @@ void Intp_ManUnsatCoreVerify( Sto_Man_t * pCnf, Vec_Int_t * vCore )
Sto_Cls_t * pClause;
Vec_Ptr_t * vClauses;
int i, iClause, RetValue;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect the clauses
vClauses = Vec_PtrAlloc( 1000 );
Sto_ManForEachClauseRoot( pCnf, pClause )
@@ -896,7 +896,7 @@ void Intp_ManUnsatCoreVerify( Sto_Man_t * pCnf, Vec_Int_t * vCore )
printf( "UNSAT core verification FAILED. " );
else
printf( "UNSAT core verification succeeded. " );
- ABC_PRT( "Time", clock() - clk );
+ ABC_PRT( "Time", Abc_Clock() - clk );
}
else
{
@@ -962,7 +962,7 @@ void * Intp_ManUnsatCore( Intp_Man_t * p, Sto_Man_t * pCnf, int fVerbose )
Vec_Int_t * vVisited;
Sto_Cls_t * pClause;
int RetValue = 1;
- clock_t clkTotal = clock();
+ abctime clkTotal = Abc_Clock();
// check that the CNF makes sense
assert( pCnf->nVars > 0 && pCnf->nClauses > 0 );
@@ -1021,12 +1021,12 @@ void * Intp_ManUnsatCore( Intp_Man_t * p, Sto_Man_t * pCnf, int fVerbose )
if ( fVerbose )
{
- ABC_PRT( "Core", clock() - clkTotal );
+ ABC_PRT( "Core", Abc_Clock() - clkTotal );
printf( "Vars = %d. Roots = %d. Learned = %d. Resol steps = %d. Ave = %.2f. Mem = %.2f MB\n",
p->pCnf->nVars, p->pCnf->nRoots, p->pCnf->nClauses-p->pCnf->nRoots, p->Counter,
1.0*(p->Counter-p->pCnf->nRoots)/(p->pCnf->nClauses-p->pCnf->nRoots),
1.0*Sto_ManMemoryReport(p->pCnf)/(1<<20) );
-p->timeTotal += clock() - clkTotal;
+p->timeTotal += Abc_Clock() - clkTotal;
}
// derive the UNSAT core
diff --git a/src/sat/bsat/satProof.c b/src/sat/bsat/satProof.c
index e70a60ef..a4067160 100644
--- a/src/sat/bsat/satProof.c
+++ b/src/sat/bsat/satProof.c
@@ -146,7 +146,7 @@ Vec_Int_t * Proof_CollectUsedIter( Vec_Set_t * vProof, Vec_Int_t * vRoots, int f
{
int fVerify = 0;
Vec_Int_t * vUsed, * vStack;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
int i, Entry, iPrev = 0;
vUsed = Vec_IntAlloc( 1000 );
vStack = Vec_IntAlloc( 1000 );
@@ -154,10 +154,10 @@ Vec_Int_t * Proof_CollectUsedIter( Vec_Set_t * vProof, Vec_Int_t * vRoots, int f
if ( Entry >= 0 )
Proof_CollectUsed_iter( vProof, Entry, vUsed, vStack );
Vec_IntFree( vStack );
-// Abc_PrintTime( 1, "Iterative clause collection time", clock() - clk );
- clk = clock();
+// Abc_PrintTime( 1, "Iterative clause collection time", Abc_Clock() - clk );
+ clk = Abc_Clock();
Abc_MergeSort( Vec_IntArray(vUsed), Vec_IntSize(vUsed) );
-// Abc_PrintTime( 1, "Postprocessing with sorting time", clock() - clk );
+// Abc_PrintTime( 1, "Postprocessing with sorting time", Abc_Clock() - clk );
// verify topological order
if ( fVerify )
{
@@ -314,8 +314,8 @@ void Sat_ProofReduce2( sat_solver2 * s )
Vec_Int_t * vUsed;
satset * pNode, * pFanin, * pPivot;
int i, k, hTemp;
- clock_t clk = clock();
- static clock_t TimeTotal = 0;
+ abctime clk = Abc_Clock();
+ static abctime TimeTotal = 0;
// collect visited nodes
vUsed = Proof_CollectUsedIter( vProof, vRoots, 1 );
@@ -359,7 +359,7 @@ void Sat_ProofReduce2( sat_solver2 * s )
printf( "The proof was reduced from %6.2f MB to %6.2f MB (by %6.2f %%) ",
1.0 * Vec_SetMemory(vProof) / (1<<20), 1.0 * Vec_SetMemoryS(vProof) / (1<<20),
100.0 * (Vec_SetMemory(vProof) - Vec_SetMemoryS(vProof)) / Vec_SetMemory(vProof) );
- TimeTotal += clock() - clk;
+ TimeTotal += Abc_Clock() - clk;
Abc_PrintTime( 1, "Time", TimeTotal );
}
Vec_SetShrink( vProof, Vec_SetHandCurrentS(vProof) );
@@ -390,8 +390,8 @@ int Sat_ProofReduce( Vec_Set_t * vProof, void * pRoots, int hProofPivot )
Vec_Ptr_t * vUsed;
satset * pNode, * pFanin, * pPivot;
int i, j, k, hTemp, nSize;
- clock_t clk = clock();
- static clock_t TimeTotal = 0;
+ abctime clk = Abc_Clock();
+ static abctime TimeTotal = 0;
int RetValue;
//Sat_ProofCheck0( vProof );
@@ -448,7 +448,7 @@ int Sat_ProofReduce( Vec_Set_t * vProof, void * pRoots, int hProofPivot )
printf( "The proof was reduced from %6.2f MB to %6.2f MB (by %6.2f %%) ",
1.0 * Vec_SetMemory(vProof) / (1<<20), 1.0 * Vec_SetMemoryS(vProof) / (1<<20),
100.0 * (Vec_SetMemory(vProof) - Vec_SetMemoryS(vProof)) / Vec_SetMemory(vProof) );
- TimeTotal += clock() - clk;
+ TimeTotal += Abc_Clock() - clk;
Abc_PrintTime( 1, "Time", TimeTotal );
}
Vec_SetShrink( vProof, Vec_SetHandCurrentS(vProof) );
@@ -554,7 +554,7 @@ void Sat_ProofCheck( sat_solver2 * s )
Vec_Int_t * vUsed, * vTemp;
satset * pSet, * pSet0 = NULL, * pSet1;
int i, k, hRoot, Handle, Counter = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
hRoot = s->hProofLast;
if ( hRoot == -1 )
return;
@@ -586,7 +586,7 @@ void Sat_ProofCheck( sat_solver2 * s )
printf( "Derived clause with %d lits instead of the empty clause. ", pSet0->nEnts );
else
printf( "Proof verification successful. " );
- Abc_PrintTime( 1, "Time", clock() - clk );
+ Abc_PrintTime( 1, "Time", Abc_Clock() - clk );
// cleanup
Vec_SetFree( vResolves );
Vec_IntFree( vUsed );
diff --git a/src/sat/bsat/satSolver.c b/src/sat/bsat/satSolver.c
index d1310c81..8d1bd455 100644
--- a/src/sat/bsat/satSolver.c
+++ b/src/sat/bsat/satSolver.c
@@ -224,16 +224,16 @@ static inline void act_var_rescale(sat_solver* s) {
s->var_inc *= 1e-100;
}
static inline void act_clause_rescale(sat_solver* s) {
-// static clock_t Total = 0;
+// static abctime Total = 0;
clause** cs = (clause**)veci_begin(&s->learnts);
- int i;//, clk = clock();
+ int i;//, clk = Abc_Clock();
for (i = 0; i < veci_size(&s->learnts); i++){
float a = clause_activity(cs[i]);
clause_setactivity(cs[i], a * (float)1e-20);
}
s->cla_inc *= (float)1e-20;
- Total += clock() - clk;
+ Total += Abc_Clock() - clk;
// printf( "Rescaling... Cla inc = %10.3f Conf = %10d ", s->cla_inc, s->stats.conflicts );
// Abc_PrintTime( 1, "Time", Total );
}
@@ -282,15 +282,15 @@ static inline void act_var_rescale(sat_solver* s) {
}
static inline void act_clause_rescale(sat_solver* s) {
- static clock_t Total = 0;
- clock_t clk = clock();
+ static abctime Total = 0;
+ abctime clk = Abc_Clock();
unsigned* activity = (unsigned *)veci_begin(&s->act_clas);
int i;
for (i = 0; i < veci_size(&s->act_clas); i++)
activity[i] >>= 14;
s->cla_inc >>= 14;
s->cla_inc = Abc_MaxInt( s->cla_inc, (1<<10) );
- Total += clock() - clk;
+ Total += Abc_Clock() - clk;
// printf( "Rescaling... Cla inc = %5d Conf = %10d ", s->cla_inc, s->stats.conflicts );
// Abc_PrintTime( 1, "Time", Total );
}
@@ -1226,8 +1226,8 @@ int sat_solver_simplify(sat_solver* s)
void sat_solver_reducedb(sat_solver* s)
{
- static clock_t TimeTotal = 0;
- clock_t clk = clock();
+ static abctime TimeTotal = 0;
+ abctime clk = Abc_Clock();
Sat_Mem_t * pMem = &s->Mem;
int nLearnedOld = veci_size(&s->act_clas);
int * act_clas = veci_begin(&s->act_clas);
@@ -1330,7 +1330,7 @@ void sat_solver_reducedb(sat_solver* s)
assert( Counter == (int)s->stats.learnts );
// report the results
- TimeTotal += clock() - clk;
+ TimeTotal += Abc_Clock() - clk;
if ( s->fVerbose )
{
Abc_Print(1, "reduceDB: Keeping %7d out of %7d clauses (%5.2f %%) ",
@@ -1576,7 +1576,7 @@ static lbool sat_solver_search(sat_solver* s, ABC_INT64_T nof_conflicts)
int next;
// Reached bound on number of conflicts:
- if ((nof_conflicts >= 0 && conflictC >= nof_conflicts) || (s->nRuntimeLimit && clock() > s->nRuntimeLimit)){
+ if ((nof_conflicts >= 0 && conflictC >= nof_conflicts) || (s->nRuntimeLimit && Abc_Clock() > s->nRuntimeLimit)){
s->progress_estimate = sat_solver_progress(s);
sat_solver_canceluntil(s,s->root_level);
veci_delete(&learnt_clause);
@@ -1786,7 +1786,7 @@ int sat_solver_solve(sat_solver* s, lit* begin, lit* end, ABC_INT64_T nConfLimit
while (status == l_Undef){
double Ratio = (s->stats.learnts == 0)? 0.0 :
s->stats.learnts_literals / (double)s->stats.learnts;
- if ( s->nRuntimeLimit && clock() > s->nRuntimeLimit )
+ if ( s->nRuntimeLimit && Abc_Clock() > s->nRuntimeLimit )
break;
if (s->verbosity >= 1)
{
@@ -1810,7 +1810,7 @@ int sat_solver_solve(sat_solver* s, lit* begin, lit* end, ABC_INT64_T nConfLimit
break;
if ( s->nInsLimit && s->stats.propagations > s->nInsLimit )
break;
- if ( s->nRuntimeLimit && clock() > s->nRuntimeLimit )
+ if ( s->nRuntimeLimit && Abc_Clock() > s->nRuntimeLimit )
break;
}
if (s->verbosity >= 1)
diff --git a/src/sat/bsat/satSolver.h b/src/sat/bsat/satSolver.h
index e5ea1ba5..50a4727c 100644
--- a/src/sat/bsat/satSolver.h
+++ b/src/sat/bsat/satSolver.h
@@ -160,7 +160,7 @@ struct sat_solver_t
ABC_INT64_T nConfLimit; // external limit on the number of conflicts
ABC_INT64_T nInsLimit; // external limit on the number of implications
- clock_t nRuntimeLimit; // external limit on runtime
+ abctime nRuntimeLimit; // external limit on runtime
veci act_vars; // variables whose activity has changed
double* factors; // the activity factors
@@ -223,9 +223,9 @@ static int sat_solver_final(sat_solver* s, int ** ppArray)
return s->conf_final.size;
}
-static clock_t sat_solver_set_runtime_limit(sat_solver* s, clock_t Limit)
+static abctime sat_solver_set_runtime_limit(sat_solver* s, abctime Limit)
{
- clock_t nRuntimeLimit = s->nRuntimeLimit;
+ abctime nRuntimeLimit = s->nRuntimeLimit;
s->nRuntimeLimit = Limit;
return nRuntimeLimit;
}
diff --git a/src/sat/bsat/satSolver2.c b/src/sat/bsat/satSolver2.c
index 12d74c0d..cde1d3b1 100644
--- a/src/sat/bsat/satSolver2.c
+++ b/src/sat/bsat/satSolver2.c
@@ -304,15 +304,15 @@ static inline void act_var_rescale(sat_solver2* s) {
s->var_inc *= 1e-100;
}
static inline void act_clause2_rescale(sat_solver2* s) {
- static clock_t Total = 0;
+ static abctime Total = 0;
float * act_clas = (float *)veci_begin(&s->act_clas);
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for (i = 0; i < veci_size(&s->act_clas); i++)
act_clas[i] *= (float)1e-20;
s->cla_inc *= (float)1e-20;
- Total += clock() - clk;
+ Total += Abc_Clock() - clk;
Abc_Print(1, "Rescaling... Cla inc = %10.3f Conf = %10d ", s->cla_inc, s->stats.conflicts );
Abc_PrintTime( 1, "Time", Total );
}
@@ -344,15 +344,15 @@ static inline void act_var_rescale(sat_solver2* s) {
s->var_inc = Abc_MaxInt( s->var_inc, (1<<4) );
}
static inline void act_clause2_rescale(sat_solver2* s) {
-// static clock_t Total = 0;
-// clock_t clk = clock();
+// static abctime Total = 0;
+// abctime clk = Abc_Clock();
int i;
unsigned * act_clas = (unsigned *)veci_begin(&s->act_clas);
for (i = 0; i < veci_size(&s->act_clas); i++)
act_clas[i] >>= 14;
s->cla_inc >>= 14;
s->cla_inc = Abc_MaxInt( s->cla_inc, (1<<10) );
-// Total += clock() - clk;
+// Total += Abc_Clock() - clk;
// Abc_Print(1, "Rescaling... Cla inc = %5d Conf = %10d ", s->cla_inc, s->stats.conflicts );
// Abc_PrintTime( 1, "Time", Total );
}
@@ -1037,7 +1037,7 @@ static lbool solver2_search(sat_solver2* s, ABC_INT64_T nof_conflicts)
// NO CONFLICT
int next;
- if ((nof_conflicts >= 0 && conflictC >= nof_conflicts) || (s->nRuntimeLimit && clock() > s->nRuntimeLimit)){
+ if ((nof_conflicts >= 0 && conflictC >= nof_conflicts) || (s->nRuntimeLimit && Abc_Clock() > s->nRuntimeLimit)){
// Reached bound on number of conflicts:
s->progress_estimate = solver2_progress(s);
solver2_canceluntil(s,s->root_level);
@@ -1390,7 +1390,7 @@ void luby2_test()
// updates clauses, watches, units, and proof
void sat_solver2_reducedb(sat_solver2* s)
{
- static clock_t TimeTotal = 0;
+ static abctime TimeTotal = 0;
Sat_Mem_t * pMem = &s->Mem;
clause * c = NULL;
int nLearnedOld = veci_size(&s->act_clas);
@@ -1398,7 +1398,7 @@ void sat_solver2_reducedb(sat_solver2* s)
int * pPerm, * pSortValues, nCutoffValue, * pClaProofs;
int i, j, k, Id, nSelected;//, LastSize = 0;
int Counter, CounterStart;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
static int Count = 0;
Count++;
assert( s->nLearntMax );
@@ -1558,7 +1558,7 @@ void sat_solver2_reducedb(sat_solver2* s)
}
// report the results
- TimeTotal += clock() - clk;
+ TimeTotal += Abc_Clock() - clk;
if ( s->fVerbose )
{
Abc_Print(1, "reduceDB: Keeping %7d out of %7d clauses (%5.2f %%) ",
@@ -1943,7 +1943,7 @@ int sat_solver2_solve(sat_solver2* s, lit* begin, lit* end, ABC_INT64_T nConfLim
s->progress_estimate*100);
fflush(stdout);
}
- if ( s->nRuntimeLimit && clock() > s->nRuntimeLimit )
+ if ( s->nRuntimeLimit && Abc_Clock() > s->nRuntimeLimit )
break;
// reduce the set of learnt clauses
if ( s->nLearntMax && veci_size(&s->act_clas) >= s->nLearntMax && s->pPrf2 == NULL )
diff --git a/src/sat/bsat/satSolver2.h b/src/sat/bsat/satSolver2.h
index 8c32cbde..d7d16d73 100644
--- a/src/sat/bsat/satSolver2.h
+++ b/src/sat/bsat/satSolver2.h
@@ -161,7 +161,7 @@ struct sat_solver2_t
stats_t stats;
ABC_INT64_T nConfLimit; // external limit on the number of conflicts
ABC_INT64_T nInsLimit; // external limit on the number of implications
- clock_t nRuntimeLimit; // external limit on runtime
+ abctime nRuntimeLimit; // external limit on runtime
};
static inline clause * clause2_read( sat_solver2 * s, cla h ) { return Sat_MemClauseHand( &s->Mem, h ); }
@@ -220,9 +220,9 @@ static inline int sat_solver2_final(sat_solver2* s, int ** ppArray)
return s->conf_final.size;
}
-static inline clock_t sat_solver2_set_runtime_limit(sat_solver2* s, clock_t Limit)
+static inline abctime sat_solver2_set_runtime_limit(sat_solver2* s, abctime Limit)
{
- clock_t temp = s->nRuntimeLimit;
+ abctime temp = s->nRuntimeLimit;
s->nRuntimeLimit = Limit;
return temp;
}
diff --git a/src/sat/cnf/cnf.h b/src/sat/cnf/cnf.h
index 61fa7f14..e5079a46 100644
--- a/src/sat/cnf/cnf.h
+++ b/src/sat/cnf/cnf.h
@@ -87,9 +87,9 @@ struct Cnf_Man_t_
int nMergeLimit; // the limit on the size of merged cut
unsigned * pTruths[4]; // temporary truth tables
Vec_Int_t * vMemory; // memory for intermediate ISOP representation
- clock_t timeCuts;
- clock_t timeMap;
- clock_t timeSave;
+ abctime timeCuts;
+ abctime timeMap;
+ abctime timeSave;
};
diff --git a/src/sat/cnf/cnfCore.c b/src/sat/cnf/cnfCore.c
index 9a845007..8cb86f87 100644
--- a/src/sat/cnf/cnfCore.c
+++ b/src/sat/cnf/cnfCore.c
@@ -81,30 +81,30 @@ Vec_Int_t * Cnf_DeriveMappingArray( Aig_Man_t * pAig )
Cnf_Man_t * p;
Vec_Ptr_t * vMapped;
Aig_MmFixed_t * pMemCuts;
- clock_t clk;
+ abctime clk;
// allocate the CNF manager
p = Cnf_ManStart();
p->pManAig = pAig;
// generate cuts for all nodes, assign cost, and find best cuts
-clk = clock();
+clk = Abc_Clock();
pMemCuts = Dar_ManComputeCuts( pAig, 10, 0, 0 );
-p->timeCuts = clock() - clk;
+p->timeCuts = Abc_Clock() - clk;
// find the mapping
-clk = clock();
+clk = Abc_Clock();
Cnf_DeriveMapping( p );
-p->timeMap = clock() - clk;
+p->timeMap = Abc_Clock() - clk;
// Aig_ManScanMapping( p, 1 );
// convert it into CNF
-clk = clock();
+clk = Abc_Clock();
Cnf_ManTransferCuts( p );
vMapped = Cnf_ManScanMapping( p, 1, 0 );
vResult = Cnf_ManWriteCnfMapping( p, vMapped );
Vec_PtrFree( vMapped );
Aig_MmFixedStop( pMemCuts, 0 );
-p->timeSave = clock() - clk;
+p->timeSave = Abc_Clock() - clk;
// reset reference counters
Aig_ManResetRefs( pAig );
@@ -131,29 +131,29 @@ Cnf_Dat_t * Cnf_DeriveWithMan( Cnf_Man_t * p, Aig_Man_t * pAig, int nOutputs )
Cnf_Dat_t * pCnf;
Vec_Ptr_t * vMapped;
Aig_MmFixed_t * pMemCuts;
- clock_t clk;
+ abctime clk;
// connect the managers
p->pManAig = pAig;
// generate cuts for all nodes, assign cost, and find best cuts
-clk = clock();
+clk = Abc_Clock();
pMemCuts = Dar_ManComputeCuts( pAig, 10, 0, 0 );
-p->timeCuts = clock() - clk;
+p->timeCuts = Abc_Clock() - clk;
// find the mapping
-clk = clock();
+clk = Abc_Clock();
Cnf_DeriveMapping( p );
-p->timeMap = clock() - clk;
+p->timeMap = Abc_Clock() - clk;
// Aig_ManScanMapping( p, 1 );
// convert it into CNF
-clk = clock();
+clk = Abc_Clock();
Cnf_ManTransferCuts( p );
vMapped = Cnf_ManScanMapping( p, 1, 1 );
pCnf = Cnf_ManWriteCnf( p, vMapped, nOutputs );
Vec_PtrFree( vMapped );
Aig_MmFixedStop( pMemCuts, 0 );
-p->timeSave = clock() - clk;
+p->timeSave = Abc_Clock() - clk;
// reset reference counters
Aig_ManResetRefs( pAig );
@@ -184,30 +184,30 @@ Cnf_Dat_t * Cnf_DeriveOtherWithMan( Cnf_Man_t * p, Aig_Man_t * pAig, int fSkipTt
Cnf_Dat_t * pCnf;
Vec_Ptr_t * vMapped;
Aig_MmFixed_t * pMemCuts;
- clock_t clk;
+ abctime clk;
// connect the managers
p->pManAig = pAig;
// generate cuts for all nodes, assign cost, and find best cuts
-clk = clock();
+clk = Abc_Clock();
pMemCuts = Dar_ManComputeCuts( pAig, 10, fSkipTtMin, 0 );
-p->timeCuts = clock() - clk;
+p->timeCuts = Abc_Clock() - clk;
// find the mapping
-clk = clock();
+clk = Abc_Clock();
Cnf_DeriveMapping( p );
-p->timeMap = clock() - clk;
+p->timeMap = Abc_Clock() - clk;
// Aig_ManScanMapping( p, 1 );
// convert it into CNF
-clk = clock();
+clk = Abc_Clock();
Cnf_ManTransferCuts( p );
vMapped = Cnf_ManScanMapping( p, 1, 1 );
pCnf = Cnf_ManWriteCnfOther( p, vMapped );
pCnf->vMapping = Cnf_ManWriteCnfMapping( p, vMapped );
Vec_PtrFree( vMapped );
Aig_MmFixedStop( pMemCuts, 0 );
-p->timeSave = clock() - clk;
+p->timeSave = Abc_Clock() - clk;
// reset reference counters
Aig_ManResetRefs( pAig );
@@ -241,17 +241,17 @@ Cnf_Dat_t * Cnf_Derive_old( Aig_Man_t * pAig )
// iteratively improve area flow
for ( i = 0; i < nIters; i++ )
{
-clk = clock();
+clk = Abc_Clock();
Cnf_ManScanMapping( p, 0 );
Cnf_ManMapForCnf( p );
-ABC_PRT( "iter ", clock() - clk );
+ABC_PRT( "iter ", Abc_Clock() - clk );
}
*/
// write the file
vMapped = Aig_ManScanMapping( p, 1 );
Vec_PtrFree( vMapped );
-clk = clock();
+clk = Abc_Clock();
Cnf_ManTransferCuts( p );
Cnf_ManPostprocess( p );
@@ -262,7 +262,7 @@ clk = clock();
Cnf_ManPostprocess( p );
Cnf_ManScanMapping( p, 0 );
*/
-ABC_PRT( "Ext ", clock() - clk );
+ABC_PRT( "Ext ", Abc_Clock() - clk );
/*
vMapped = Cnf_ManScanMapping( p, 1 );
diff --git a/src/sat/cnf/cnfFast.c b/src/sat/cnf/cnfFast.c
index 87af9520..4ab4e77f 100644
--- a/src/sat/cnf/cnfFast.c
+++ b/src/sat/cnf/cnfFast.c
@@ -666,20 +666,20 @@ Cnf_Dat_t * Cnf_DeriveFastClauses( Aig_Man_t * p, int nOutputs )
Cnf_Dat_t * Cnf_DeriveFast( Aig_Man_t * p, int nOutputs )
{
Cnf_Dat_t * pCnf = NULL;
- clock_t clk;//, clkTotal = clock();
+ abctime clk;//, clkTotal = Abc_Clock();
// printf( "\n" );
Aig_ManCleanMarkAB( p );
// create initial marking
- clk = clock();
+ clk = Abc_Clock();
Cnf_DeriveFastMark( p );
-// Abc_PrintTime( 1, "Marking", clock() - clk );
+// Abc_PrintTime( 1, "Marking", Abc_Clock() - clk );
// compute CNF size
- clk = clock();
+ clk = Abc_Clock();
pCnf = Cnf_DeriveFastClauses( p, nOutputs );
-// Abc_PrintTime( 1, "Clauses", clock() - clk );
+// Abc_PrintTime( 1, "Clauses", Abc_Clock() - clk );
// derive the resulting CNF
Aig_ManCleanMarkA( p );
-// Abc_PrintTime( 1, "TOTAL ", clock() - clkTotal );
+// Abc_PrintTime( 1, "TOTAL ", Abc_Clock() - clkTotal );
// printf( "Vars = %6d. Clauses = %7d. Literals = %8d. \n", pCnf->nVars, pCnf->nClauses, pCnf->nLiterals );
diff --git a/src/sat/msat/msatOrderH.c b/src/sat/msat/msatOrderH.c
index d0c9c997..90568ec2 100644
--- a/src/sat/msat/msatOrderH.c
+++ b/src/sat/msat/msatOrderH.c
@@ -58,7 +58,7 @@ static void Msat_HeapIncrease( Msat_Order_t * p, int n );
static void Msat_HeapPercolateUp( Msat_Order_t * p, int i );
static void Msat_HeapPercolateDown( Msat_Order_t * p, int i );
-extern clock_t timeSelect;
+extern abctime timeSelect;
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
@@ -191,7 +191,7 @@ int Msat_OrderVarSelect( Msat_Order_t * p )
// return var_Undef;
int Var;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
while ( !HEMPTY(p) )
{
@@ -199,7 +199,7 @@ int Msat_OrderVarSelect( Msat_Order_t * p )
if ( (p)->pSat->pAssigns[Var] == MSAT_VAR_UNASSIGNED )
{
//assert( Msat_OrderCheck(p) );
-timeSelect += clock() - clk;
+timeSelect += Abc_Clock() - clk;
return Var;
}
}
@@ -237,10 +237,10 @@ void Msat_OrderVarUnassigned( Msat_Order_t * p, int Var )
// if (!heap.inHeap(x))
// heap.insert(x);
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( !HINHEAP(p,Var) )
Msat_HeapInsert( p, Var );
-timeSelect += clock() - clk;
+timeSelect += Abc_Clock() - clk;
}
/**Function*************************************************************
@@ -259,10 +259,10 @@ void Msat_OrderUpdate( Msat_Order_t * p, int Var )
// if (heap.inHeap(x))
// heap.increase(x);
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
if ( HINHEAP(p,Var) )
Msat_HeapIncrease( p, Var );
-timeSelect += clock() - clk;
+timeSelect += Abc_Clock() - clk;
}
diff --git a/src/sat/msat/msatSolverCore.c b/src/sat/msat/msatSolverCore.c
index eff1d6d7..352a4a5a 100644
--- a/src/sat/msat/msatSolverCore.c
+++ b/src/sat/msat/msatSolverCore.c
@@ -140,7 +140,7 @@ int Msat_SolverSolve( Msat_Solver_t * p, Msat_IntVec_t * vAssumps, int nBackTra
Msat_SearchParams_t Params = { 0.95, 0.999 };
double nConflictsLimit, nLearnedLimit;
Msat_Type_t Status;
- clock_t timeStart = clock();
+ abctime timeStart = Abc_Clock();
// p->pFreq = ABC_ALLOC( int, p->nVarsAlloc );
// memset( p->pFreq, 0, sizeof(int) * p->nVarsAlloc );
@@ -181,13 +181,13 @@ int Msat_SolverSolve( Msat_Solver_t * p, Msat_IntVec_t * vAssumps, int nBackTra
if ( nBackTrackLimit > 0 && (int)p->Stats.nConflicts - p->nBackTracks > nBackTrackLimit )
break;
// if the runtime limit is exceeded, quit the restart loop
- if ( nTimeLimit > 0 && clock() - timeStart >= nTimeLimit * CLOCKS_PER_SEC )
+ if ( nTimeLimit > 0 && Abc_Clock() - timeStart >= nTimeLimit * CLOCKS_PER_SEC )
break;
}
Msat_SolverCancelUntil( p, 0 );
p->nBackTracks = (int)p->Stats.nConflicts - p->nBackTracks;
/*
- ABC_PRT( "True solver runtime", clock() - timeStart );
+ ABC_PRT( "True solver runtime", Abc_Clock() - timeStart );
// print the statistics
{
int i, Counter = 0;
@@ -200,7 +200,7 @@ int Msat_SolverSolve( Msat_Solver_t * p, Msat_IntVec_t * vAssumps, int nBackTra
if ( Counter )
printf( "\n" );
printf( "Total = %d. Used = %d. Decisions = %d. Imps = %d. Conflicts = %d. ", p->nVars, Counter, (int)p->Stats.nDecisions, (int)p->Stats.nPropagations, (int)p->Stats.nConflicts );
- ABC_PRT( "Time", clock() - timeStart );
+ ABC_PRT( "Time", Abc_Clock() - timeStart );
}
*/
return Status;
diff --git a/src/sat/proof/pr.c b/src/sat/proof/pr.c
index 2727997a..7683affc 100644
--- a/src/sat/proof/pr.c
+++ b/src/sat/proof/pr.c
@@ -88,10 +88,10 @@ struct Pr_Man_t_
int nResLits; // the number of literals of the resolvent
int nResLitsAlloc;// the number of literals of the resolvent
// runtime stats
- clock_t timeBcp;
- clock_t timeTrace;
- clock_t timeRead;
- clock_t timeTotal;
+ abctime timeBcp;
+ abctime timeTrace;
+ abctime timeRead;
+ abctime timeTotal;
};
// variable assignments
@@ -578,17 +578,17 @@ Pr_Cls_t * Pr_ManPropagate( Pr_Man_t * p, int Start )
{
Pr_Cls_t * pClause;
int i;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
for ( i = Start; i < p->nTrailSize; i++ )
{
pClause = Pr_ManPropagateOne( p, p->pTrail[i] );
if ( pClause )
{
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return pClause;
}
}
-p->timeBcp += clock() - clk;
+p->timeBcp += Abc_Clock() - clk;
return NULL;
}
@@ -674,7 +674,7 @@ int Pr_ManProofTraceOne( Pr_Man_t * p, Pr_Cls_t * pConflict, Pr_Cls_t * pFinal )
Pr_Cls_t * pReason;
int i, v, Var, PrevId;
int fPrint = 0;
- clock_t clk = clock();
+ abctime clk = Abc_Clock();
// collect resolvent literals
if ( p->fProofVerif )
@@ -805,7 +805,7 @@ int Pr_ManProofTraceOne( Pr_Man_t * p, Pr_Cls_t * pConflict, Pr_Cls_t * pFinal )
Pr_ManPrintClause( pFinal );
}
}
-p->timeTrace += clock() - clk;
+p->timeTrace += Abc_Clock() - clk;
// return the proof pointer
if ( p->nClausesA )
@@ -1226,11 +1226,11 @@ int Pr_ManProofCount_rec( Pr_Cls_t * pClause )
int Pr_ManProofTest( char * pFileName )
{
Pr_Man_t * p;
- clock_t clk, clkTotal = clock();
+ abctime clk, clkTotal = Abc_Clock();
-clk = clock();
+clk = Abc_Clock();
p = Pr_ManProofRead( pFileName );
-p->timeRead = clock() - clk;
+p->timeRead = Abc_Clock() - clk;
if ( p == NULL )
return 0;
@@ -1249,7 +1249,7 @@ p->timeRead = clock() - clk;
1.0*(p->Counter-p->nRoots)/(p->nClauses-p->nRoots),
1.0*Pr_ManMemoryReport(p)/(1<<20) );
-p->timeTotal = clock() - clkTotal;
+p->timeTotal = Abc_Clock() - clkTotal;
Pr_ManFree( p );
return 1;
}