summaryrefslogtreecommitdiffstats
path: root/src/map/if
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2012-07-15 15:54:36 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2012-07-15 15:54:36 -0700
commit96d7699698d439b279cf37367b4c32ef5d1c2d7a (patch)
tree2d32eb0235f882029d5ba8fabe13e3dd39533dc6 /src/map/if
parent1ca94c102333ebb905b4ad8186ade01cd5f073fe (diff)
downloadabc-96d7699698d439b279cf37367b4c32ef5d1c2d7a.tar.gz
abc-96d7699698d439b279cf37367b4c32ef5d1c2d7a.tar.bz2
abc-96d7699698d439b279cf37367b4c32ef5d1c2d7a.zip
Updated code for lazy man's synthesis.
Diffstat (limited to 'src/map/if')
-rw-r--r--src/map/if/if.h6
-rw-r--r--src/map/if/ifMap.c18
2 files changed, 21 insertions, 3 deletions
diff --git a/src/map/if/if.h b/src/map/if/if.h
index bebcd3ef..cff9adfe 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -525,9 +525,13 @@ extern int If_ManCountSpecialPos( If_Man_t * p );
/*=== abcRec.c ============================================================*/
extern int If_CutDelayRecCost(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj);
+extern int If_CutDelayRecCost2(If_Man_t* p, If_Cut_t* pCut, If_Obj_t * pObj);
+/*=== abcRec2.c ============================================================*/
+extern int Abc_NtkRecIsRunning();
+extern int Abc_NtkRecIsRunning2();
// othe packages
-extern int Bat_ManCellFuncLookup( unsigned * pTruth, int nVars, int nLeaves );
+extern int Bat_ManCellFuncLookup( unsigned * pTruth, int nVars, int nLeaves );
ABC_NAMESPACE_HEADER_END
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 1293521a..6fcb8799 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -156,7 +156,14 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
/// if ( p->pPars->pLutStruct )
/// pCut->Delay = If_CutDelayLutStruct( p, pCut, p->pPars->pLutStruct, p->pPars->WireDelay );
if ( p->pPars->fUserRecLib )
- pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
+ {
+ if((Abc_NtkRecIsRunning2()&& Abc_NtkRecIsRunning()) || (!Abc_NtkRecIsRunning2()&& !Abc_NtkRecIsRunning()))
+ assert(0);
+ else if(Abc_NtkRecIsRunning())
+ pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
+ else
+ pCut->Delay = If_CutDelayRecCost2(p, pCut, pObj);
+ }
else if(p->pPars->fDelayOpt)
pCut->Delay = If_CutDelaySopCost(p,pCut);
else if(p->pPars->nGateSize > 0)
@@ -228,7 +235,14 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
/// if ( p->pPars->pLutStruct )
/// pCut->Delay = If_CutDelayLutStruct( p, pCut, p->pPars->pLutStruct, p->pPars->WireDelay );
if ( p->pPars->fUserRecLib )
- pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
+ {
+ if((Abc_NtkRecIsRunning2()&& Abc_NtkRecIsRunning()) || (!Abc_NtkRecIsRunning2()&& !Abc_NtkRecIsRunning()))
+ assert(0);
+ else if(Abc_NtkRecIsRunning())
+ pCut->Delay = If_CutDelayRecCost(p, pCut, pObj);
+ else
+ pCut->Delay = If_CutDelayRecCost2(p, pCut, pObj);
+ }
else if (p->pPars->fDelayOpt)
pCut->Delay = If_CutDelaySopCost(p, pCut);
else if(p->pPars->nGateSize > 0)