Skip to content

Commit

Permalink
Merge pull request berkeley-abc#31 from davidar/fix-55
Browse files Browse the repository at this point in the history
Fix Assertion using &if: `pCutSet->nCuts > 0'
  • Loading branch information
nakengelhardt committed Apr 11, 2024
2 parents ccc02c4 + accf504 commit 078afe9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/map/if/ifMap.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
pCut->Delay = If_CutDelay( p, pObj, pCut );
if ( pCut->Delay == -1 )
continue;
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon )
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon && pCutSet->nCuts > 0 )
continue;
// compute area of the cut (this area may depend on the application specific cost)
pCut->Area = (Mode == 2)? If_CutAreaDerefed( p, pCut ) : If_CutAreaFlow( p, pCut );
Expand Down Expand Up @@ -542,7 +542,7 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP
continue;
// check if the cut satisfies the required times
// assert( pCut->Delay == If_CutDelay( p, pTemp, pCut ) );
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon )
if ( Mode && pCut->Delay > pObj->Required + p->fEpsilon && pCutSet->nCuts > 0 )
continue;
// set the phase attribute
pCut->fCompl = pObj->fPhase ^ pTemp->fPhase;
Expand Down

0 comments on commit 078afe9

Please sign in to comment.