summaryrefslogtreecommitdiffstats
path: root/src/aig/nwk/nwkFlow.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/aig/nwk/nwkFlow.c')
-rw-r--r--src/aig/nwk/nwkFlow.c28
1 files changed, 18 insertions, 10 deletions
diff --git a/src/aig/nwk/nwkFlow.c b/src/aig/nwk/nwkFlow.c
index 3a7e6df6..48496158 100644
--- a/src/aig/nwk/nwkFlow.c
+++ b/src/aig/nwk/nwkFlow.c
@@ -20,6 +20,14 @@
#include "nwk.h"
+/*
+ This code is based on the papers:
+ A. Hurst, A. Mishchenko, and R. Brayton, "Fast minimum-register retiming
+ via binary maximum-flow", Proc. FMCAD '07, pp. 181-187.
+ A. Hurst, A. Mishchenko, and R. Brayton, "Scalable min-area retiming
+ under simultaneous delay and initial state constraints". Proc. DAC'08.
+*/
+
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
@@ -368,7 +376,7 @@ int Nwk_ManVerifyCut_rec( Nwk_Obj_t * pObj )
return 0;
return 1;
}
-
+
/**Function*************************************************************
Synopsis [Verifies the forward cut.]
@@ -453,7 +461,7 @@ Vec_Ptr_t * Nwk_ManRetimeCutForward( Nwk_Man_t * pMan, int nLatches, int fVerbos
Counter++;
}
if ( fVerbose )
- printf( "Forward: Max-flow1 = %5d. ", Counter );
+ printf( "Forward: Max-flow = %4d -> ", Counter );
// continue flow computation from each LO
Nwk_ManIncrementTravIdFlow( pMan );
Nwk_ManForEachLoSeq( pMan, pObj, i )
@@ -464,7 +472,7 @@ Vec_Ptr_t * Nwk_ManRetimeCutForward( Nwk_Man_t * pMan, int nLatches, int fVerbos
Counter2++;
}
if ( fVerbose )
- printf( "Max-flow2 = %5d. ", Counter+Counter2 );
+ printf( "%4d. ", Counter+Counter2 );
// repeat flow computation from each LO
if ( Counter2 > 0 )
{
@@ -489,10 +497,10 @@ Vec_Ptr_t * Nwk_ManRetimeCutForward( Nwk_Man_t * pMan, int nLatches, int fVerbos
}
}
Nwk_ManCleanMarks( pMan );
- assert( Nwk_ManRetimeVerifyCutForward(pMan, vNodes) );
+// assert( Nwk_ManRetimeVerifyCutForward(pMan, vNodes) );
if ( fVerbose )
{
- printf( "Min-cut = %5d. Unmoved regs = %5d. ", Vec_PtrSize(vNodes), Counter );
+ printf( "Min-cut = %4d. Unmoved = %4d. ", Vec_PtrSize(vNodes), Counter );
PRT( "Time", clock() - clk );
}
return vNodes;
@@ -536,8 +544,8 @@ Vec_Ptr_t * Nwk_ManRetimeCutBackward( Nwk_Man_t * pMan, int nLatches, int fVerbo
Nwk_ManIncrementTravIdFlow( pMan );
Counter++;
}
- if ( fVerbose )
- printf( "Backward: Max-flow1 = %5d. ", Counter );
+ if ( fVerbose )
+ printf( "Backward: Max-flow = %4d -> ", Counter );
// continue flow computation from each LI driver
Nwk_ManIncrementTravIdFlow( pMan );
Nwk_ManForEachLiSeq( pMan, pObj, i )
@@ -548,7 +556,7 @@ Vec_Ptr_t * Nwk_ManRetimeCutBackward( Nwk_Man_t * pMan, int nLatches, int fVerbo
Counter2++;
}
if ( fVerbose )
- printf( "Max-flow2 = %5d. ", Counter+Counter2 );
+ printf( "%4d. ", Counter+Counter2 );
// repeat flow computation from each LI driver
if ( Counter2 > 0 )
{
@@ -576,10 +584,10 @@ Vec_Ptr_t * Nwk_ManRetimeCutBackward( Nwk_Man_t * pMan, int nLatches, int fVerbo
if ( Nwk_ObjVisitedBotOnly( Nwk_ObjFanin0(pObj) ) )
Counter++;
Nwk_ManCleanMarks( pMan );
- assert( Nwk_ManRetimeVerifyCutBackward(pMan, vNodes) );
+// assert( Nwk_ManRetimeVerifyCutBackward(pMan, vNodes) );
if ( fVerbose )
{
- printf( "Min-cut = %5d. Unmoved regs = %5d. ", Vec_PtrSize(vNodes), Counter );
+ printf( "Min-cut = %4d. Unmoved = %4d. ", Vec_PtrSize(vNodes), Counter );
PRT( "Time", clock() - clk );
}
return vNodes;