diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-04-06 10:56:14 +0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-04-06 10:56:14 +0700 |
commit | b3e5ccd25609c1d38411de86551a2309ca190027 (patch) | |
tree | 62a86fd419bfc36406719473e0b9d300d33cf271 | |
parent | c0c7723f1da0436935dff848caf012e467e055df (diff) | |
download | abc-b3e5ccd25609c1d38411de86551a2309ca190027.tar.gz abc-b3e5ccd25609c1d38411de86551a2309ca190027.tar.bz2 abc-b3e5ccd25609c1d38411de86551a2309ca190027.zip |
Getting default AND-node delay from Genlib library.
-rw-r--r-- | src/base/abc/abcNtk.c | 2 | ||||
-rw-r--r-- | src/base/abci/abcIf.c | 13 | ||||
-rw-r--r-- | src/map/mio/mio.h | 1 | ||||
-rw-r--r-- | src/map/mio/mioApi.c | 1 |
4 files changed, 16 insertions, 1 deletions
diff --git a/src/base/abc/abcNtk.c b/src/base/abc/abcNtk.c index ed00968b..89a7d22c 100644 --- a/src/base/abc/abcNtk.c +++ b/src/base/abc/abcNtk.c @@ -144,6 +144,8 @@ Abc_Ntk_t * Abc_NtkStartFrom( Abc_Ntk_t * pNtk, Abc_NtkType_t Type, Abc_NtkFunc_ if ( pNtk->vObjPerm ) pNtkNew->vObjPerm = Vec_IntDup( pNtk->vObjPerm ); pNtkNew->AndGateDelay = pNtk->AndGateDelay; + if ( pNtkNew->pManTime && Abc_FrameReadLibGen() && pNtkNew->AndGateDelay == 0.0 ) + pNtkNew->AndGateDelay = Mio_LibraryReadDelayAigNode((Mio_Library_t *)Abc_FrameReadLibGen()); // initialize logic level of the CIs if ( pNtk->AndGateDelay != 0.0 && pNtk->pManTime != NULL && pNtk->ntkType != ABC_NTK_STRASH && Type == ABC_NTK_STRASH ) { diff --git a/src/base/abci/abcIf.c b/src/base/abci/abcIf.c index 1ffb9581..9ad5e41e 100644 --- a/src/base/abci/abcIf.c +++ b/src/base/abci/abcIf.c @@ -23,6 +23,7 @@ #include "map/if/if.h" #include "bool/kit/kit.h" #include "aig/aig/aig.h" +#include "map/mio/mio.h" ABC_NAMESPACE_IMPL_START @@ -115,9 +116,19 @@ Abc_Ntk_t * Abc_NtkIf( Abc_Ntk_t * pNtk, If_Par_t * pPars ) pPars->pTimesReq = Abc_NtkGetCoRequiredFloats(pNtk); // update timing info to reflect logic level - if ( (pPars->fDelayOpt || pPars->fDsdBalance || pPars->fUserRecLib) && pNtk->AndGateDelay != 0.0 ) + if ( (pPars->fDelayOpt || pPars->fDsdBalance || pPars->fUserRecLib) && pNtk->pManTime ) { int c; + if ( pNtk->AndGateDelay == 0.0 ) + { + if ( Abc_FrameReadLibGen() ) + pNtk->AndGateDelay = Mio_LibraryReadDelayAigNode((Mio_Library_t *)Abc_FrameReadLibGen()); + if ( pNtk->AndGateDelay == 0.0 ) + { + pNtk->AndGateDelay = 1.0; + printf( "The AIG-node delay is not set. Assuming unit-delay.\n" ); + } + } for ( c = 0; c < Abc_NtkCiNum(pNtk); c++ ) pPars->pTimesArr[c] /= pNtk->AndGateDelay; for ( c = 0; c < Abc_NtkCoNum(pNtk); c++ ) diff --git a/src/map/mio/mio.h b/src/map/mio/mio.h index d1abd6fc..94fe671b 100644 --- a/src/map/mio/mio.h +++ b/src/map/mio/mio.h @@ -112,6 +112,7 @@ extern float Mio_LibraryReadDelayNand2Rise( Mio_Library_t * pLib ); extern float Mio_LibraryReadDelayNand2Fall( Mio_Library_t * pLib ); extern float Mio_LibraryReadDelayNand2Max( Mio_Library_t * pLib ); extern float Mio_LibraryReadDelayAnd2Max( Mio_Library_t * pLib ); +extern float Mio_LibraryReadDelayAigNode( Mio_Library_t * pLib ); extern float Mio_LibraryReadAreaInv ( Mio_Library_t * pLib ); extern float Mio_LibraryReadAreaBuf ( Mio_Library_t * pLib ); extern float Mio_LibraryReadAreaNand2 ( Mio_Library_t * pLib ); diff --git a/src/map/mio/mioApi.c b/src/map/mio/mioApi.c index 62ace42f..f323df47 100644 --- a/src/map/mio/mioApi.c +++ b/src/map/mio/mioApi.c @@ -57,6 +57,7 @@ float Mio_LibraryReadDelayNand2Rise( Mio_Library_t * pLib ) { retur float Mio_LibraryReadDelayNand2Fall( Mio_Library_t * pLib ) { return (float)(pLib->pGateNand2? pLib->pGateNand2->pPins->dDelayBlockFall : 0.0); } float Mio_LibraryReadDelayNand2Max ( Mio_Library_t * pLib ) { return (float)(pLib->pGateNand2? pLib->pGateNand2->pPins->dDelayBlockMax : 0.0); } float Mio_LibraryReadDelayAnd2Max ( Mio_Library_t * pLib ) { return (float)(pLib->pGateAnd2? pLib->pGateAnd2->pPins->dDelayBlockMax : 0.0); } +float Mio_LibraryReadDelayAigNode ( Mio_Library_t * pLib ) { return pLib->pGateAnd2 ? Mio_LibraryReadDelayAnd2Max(pLib) : Mio_LibraryReadDelayNand2Max(pLib); } // approximate delay of the AIG node float Mio_LibraryReadAreaInv ( Mio_Library_t * pLib ) { return (float)(pLib->pGateInv? pLib->pGateInv->dArea : 0.0); } float Mio_LibraryReadAreaBuf ( Mio_Library_t * pLib ) { return (float)(pLib->pGateBuf? pLib->pGateBuf->dArea : 0.0); } float Mio_LibraryReadAreaNand2 ( Mio_Library_t * pLib ) { return (float)(pLib->pGateNand2? pLib->pGateNand2->dArea : 0.0); } |