From 6ab0d68d5653b5411c298116c9502a23a50cdbf0 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Fri, 4 Apr 2014 16:38:46 -0700 Subject: Tuning LUT mapping to work while saving the best network. --- src/map/if/ifTime.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/map/if/ifTime.c') diff --git a/src/map/if/ifTime.c b/src/map/if/ifTime.c index f07b502e..7ad685b3 100644 --- a/src/map/if/ifTime.c +++ b/src/map/if/ifTime.c @@ -378,12 +378,17 @@ int If_CutDelaySopCost( If_Man_t * p, If_Cut_t * pCut ) } // get the cost If_AndClear( &Leaf ); - if ( Vec_WrdSize(vAnds) ) + if ( Vec_WrdSize(vAnds) > 0 ) Leaf = If_WrdToAnd( Vec_WrdEntryLast(vAnds) ); - if ( pCut->nLeaves > 2 && Vec_WrdSize(vAnds) > (int)pCut->nLeaves ) - pCut->Cost = Vec_WrdSize(vAnds) - pCut->nLeaves; else + Leaf.Delay = 0; + if ( Vec_WrdSize(vAnds) > (int)pCut->nLeaves ) + pCut->Cost = Vec_WrdSize(vAnds) - pCut->nLeaves; + else if ( pCut->nLeaves == 1 ) pCut->Cost = 1; + else if ( pCut->nLeaves == 0 ) + pCut->Cost = 0; + else assert( 0 ); // get the permutation for ( i = 0; i < (int)pCut->nLeaves; i++ ) { -- cgit v1.2.3