summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-08-02 17:01:48 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-08-02 17:01:48 -0700
commitedba505d9d9b18af430ee0fa68f0957d0a3b9f1e (patch)
tree8635bad8ea35ba94d66358e2cd3297b1f6df5f1d /src/base
parent62bc45d1fb5bd44bf3342b123819e24a13f2d48f (diff)
downloadabc-edba505d9d9b18af430ee0fa68f0957d0a3b9f1e.tar.gz
abc-edba505d9d9b18af430ee0fa68f0957d0a3b9f1e.tar.bz2
abc-edba505d9d9b18af430ee0fa68f0957d0a3b9f1e.zip
Profiling code for SOP/DSD/LMS balancing.
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abci/abcRec3.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/base/abci/abcRec3.c b/src/base/abci/abcRec3.c
index e96a6a52..1d61ffae 100644
--- a/src/base/abci/abcRec3.c
+++ b/src/base/abci/abcRec3.c
@@ -979,6 +979,26 @@ p->timeCanon += Abc_Clock() - clk;
pCut->Cost = Vec_StrEntry(p->vAreas, iBestPo);
for ( i = 0; i < nLeaves; i++ )
pPerm[(int)pCanonPerm[i]] = Lms_DelayGet(DelayProfile, i);
+ if ( 0 )
+ {
+ int Max = 0, Two = 0, pTimes[16];
+ for ( i = 0; i < nLeaves; i++ )
+ pTimes[i] = (int)If_ObjCutBest(If_CutLeaf(pIfMan, pCut, i))->Delay;
+ for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
+ Max = Abc_MaxInt( Max, pTimes[i] );
+ for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
+ if ( pTimes[i] != Max )
+ Two = Abc_MaxInt( Two, pTimes[i] );
+ if ( Two + 2 < Max && Max + 3 < BestDelay )
+ {
+ for ( i = 0; i < If_CutLeaveNum(pCut); i++ )
+ printf( "%3d ", pTimes[i] );
+ for ( ; i < pIfMan->pPars->nLutSize; i++ )
+ printf( " " );
+ printf( "-> %3d ", BestDelay );
+ Dau_DsdPrintFromTruth( If_CutTruthW(pIfMan, pCut), If_CutLeaveNum(pCut) );
+ }
+ }
return BestDelay;
}
int If_CutDelayRecCost3( If_Man_t * pIfMan, If_Cut_t * pCut, If_Obj_t * pObj )