summaryrefslogtreecommitdiffstats
path: root/src/map/if/ifTime.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-04-04 16:38:46 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-04-04 16:38:46 -0700
commit6ab0d68d5653b5411c298116c9502a23a50cdbf0 (patch)
tree3f3f84327a1e81688bc06300315d128b54976949 /src/map/if/ifTime.c
parentf6ae0e41f338a109ad2c973ace13b728f4947e14 (diff)
downloadabc-6ab0d68d5653b5411c298116c9502a23a50cdbf0.tar.gz
abc-6ab0d68d5653b5411c298116c9502a23a50cdbf0.tar.bz2
abc-6ab0d68d5653b5411c298116c9502a23a50cdbf0.zip
Tuning LUT mapping to work while saving the best network.
Diffstat (limited to 'src/map/if/ifTime.c')
-rw-r--r--src/map/if/ifTime.c11
1 files changed, 8 insertions, 3 deletions
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++ )
{