From 316eec6d3f7addf81424bd51f846731f3b8696d7 Mon Sep 17 00:00:00 2001 From: David A Roberts Date: Mon, 1 Apr 2024 09:40:41 +1000 Subject: [PATCH 1/2] Fix Assertion using &if: `pCutSet->nCuts > 0' --- src/map/if/ifMap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index b3a4caf66..b4242adbb 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -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 ); From accf50468a0fb88db8de9743b751ab9226e8f343 Mon Sep 17 00:00:00 2001 From: David A Roberts Date: Mon, 1 Apr 2024 10:03:10 +1000 Subject: [PATCH 2/2] Apply patch to If_ObjPerformMappingChoice too --- src/map/if/ifMap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index b4242adbb..ffc1e3846 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -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;