diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/aig/gia/gia.h | 2 | ||||
-rw-r--r-- | src/aig/gia/giaIf.c | 2 | ||||
-rw-r--r-- | src/base/abc/abc.h | 2 | ||||
-rw-r--r-- | src/base/abci/abc.c | 6 | ||||
-rw-r--r-- | src/base/abci/abcTiming.c | 10 | ||||
-rw-r--r-- | src/base/io/ioReadBlif.c | 2 | ||||
-rw-r--r-- | src/base/io/ioWriteBlif.c | 9 |
7 files changed, 27 insertions, 6 deletions
diff --git a/src/aig/gia/gia.h b/src/aig/gia/gia.h index 2319a82d..57b25ab0 100644 --- a/src/aig/gia/gia.h +++ b/src/aig/gia/gia.h @@ -151,6 +151,8 @@ struct Gia_Man_t_ Gia_Man_t * pAigExtra; // combinational logic of holes Vec_Flt_t * vInArrs; // PI arrival times Vec_Flt_t * vOutReqs; // PO required times + float DefInArrs; // default PI arrival times + float DefOutReqs; // default PO required times Vec_Int_t * vSwitching; // switching activity int * pTravIds; // separate traversal ID representation int nTravIdsAlloc; // the number of trav IDs allocated diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c index 8a45701d..ba824a5e 100644 --- a/src/aig/gia/giaIf.c +++ b/src/aig/gia/giaIf.c @@ -2035,6 +2035,8 @@ void Gia_ManTransferTiming( Gia_Man_t * p, Gia_Man_t * pGia ) { p->vInArrs = pGia->vInArrs; pGia->vInArrs = NULL; p->vOutReqs = pGia->vOutReqs; pGia->vOutReqs = NULL; + p->DefInArrs = pGia->DefInArrs; + p->DefOutReqs = pGia->DefOutReqs; } if ( pGia->pManTime == NULL || p == pGia ) return; diff --git a/src/base/abc/abc.h b/src/base/abc/abc.h index 1ec030cb..fa5a61a1 100644 --- a/src/base/abc/abc.h +++ b/src/base/abc/abc.h @@ -923,6 +923,8 @@ extern ABC_DLL Abc_Time_t * Abc_NtkReadDefaultArrival( Abc_Ntk_t * pNtk ); extern ABC_DLL Abc_Time_t * Abc_NtkReadDefaultRequired( Abc_Ntk_t * pNtk ); extern ABC_DLL Abc_Time_t * Abc_NodeReadArrival( Abc_Obj_t * pNode ); extern ABC_DLL Abc_Time_t * Abc_NodeReadRequired( Abc_Obj_t * pNode ); +extern ABC_DLL float Abc_NtkReadDefaultArrivalWorst( Abc_Ntk_t * pNtk ); +extern ABC_DLL float Abc_NtkReadDefaultRequiredWorst( Abc_Ntk_t * pNtk ); extern ABC_DLL float Abc_NodeReadArrivalAve( Abc_Obj_t * pNode ); extern ABC_DLL float Abc_NodeReadRequiredAve( Abc_Obj_t * pNode ); extern ABC_DLL float Abc_NodeReadArrivalWorst( Abc_Obj_t * pNode ); diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index 2fd6c633..0e53610d 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -25968,7 +25968,9 @@ int Abc_CommandAbc9Get( Abc_Frame_t * pAbc, int argc, char ** argv ) Abc_Ntk_t * pNtk = pAbc->pNtkCur; Vec_FltFreeP( &pGia->vInArrs ); Vec_FltFreeP( &pGia->vOutReqs ); - pGia->vInArrs = Vec_FltAllocArray( Abc_NtkGetCiArrivalFloats(pNtk), Abc_NtkCiNum(pNtk) ); + pGia->DefInArrs = Abc_NtkReadDefaultArrivalWorst(pNtk); + pGia->DefOutReqs = Abc_NtkReadDefaultRequiredWorst(pNtk); + pGia->vInArrs = Vec_FltAllocArray( Abc_NtkGetCiArrivalFloats(pNtk), Abc_NtkCiNum(pNtk) ); pGia->vOutReqs = Vec_FltAllocArray( Abc_NtkGetCoRequiredFloats(pNtk), Abc_NtkCoNum(pNtk) ); } Abc_FrameUpdateGia( pAbc, pGia ); @@ -26089,6 +26091,8 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pAbc, int argc, char ** argv ) { Abc_Obj_t * pObj; int i; Abc_NtkTimeInitialize( pNtk, NULL ); + Abc_NtkTimeSetDefaultArrival( pNtk, pAbc->pGia->DefInArrs, pAbc->pGia->DefInArrs ); + Abc_NtkTimeSetDefaultRequired( pNtk, pAbc->pGia->DefOutReqs, pAbc->pGia->DefOutReqs ); if ( pAbc->pGia->vInArrs ) Abc_NtkForEachCi( pNtk, pObj, i ) Abc_NtkTimeSetArrival( pNtk, Abc_ObjId(pObj), Vec_FltEntry(pAbc->pGia->vInArrs, i), Vec_FltEntry(pAbc->pGia->vInArrs, i) ); diff --git a/src/base/abci/abcTiming.c b/src/base/abci/abcTiming.c index c3a9d313..bcbedeee 100644 --- a/src/base/abci/abcTiming.c +++ b/src/base/abci/abcTiming.c @@ -90,6 +90,14 @@ Abc_Time_t * Abc_NodeReadRequired( Abc_Obj_t * pNode ) assert( pNode->pNtk->pManTime ); return Abc_NodeRequired(pNode); } +float Abc_NtkReadDefaultArrivalWorst( Abc_Ntk_t * pNtk ) +{ + return 0.5 * pNtk->pManTime->tArrDef.Rise + 0.5 * pNtk->pManTime->tArrDef.Fall; +} +float Abc_NtkReadDefaultRequiredWorst( Abc_Ntk_t * pNtk ) +{ + return 0.5 * pNtk->pManTime->tReqDef.Rise + 0.5 * pNtk->pManTime->tReqDef.Fall; +} float Abc_NodeReadArrivalAve( Abc_Obj_t * pNode ) { return 0.5 * Abc_NodeArrival(pNode)->Rise + 0.5 * Abc_NodeArrival(pNode)->Fall; @@ -531,6 +539,8 @@ void Abc_ManTimeStop( Abc_ManTime_t * p ) ***********************************************************************/ void Abc_ManTimeDup( Abc_Ntk_t * pNtkOld, Abc_Ntk_t * pNtkNew ) { + extern void Abc_NtkTimePrint( Abc_Ntk_t * pNtk ); + Abc_Obj_t * pObj; Abc_Time_t ** ppTimesOld, ** ppTimesNew; int i; diff --git a/src/base/io/ioReadBlif.c b/src/base/io/ioReadBlif.c index e9e5b329..08024b96 100644 --- a/src/base/io/ioReadBlif.c +++ b/src/base/io/ioReadBlif.c @@ -107,7 +107,7 @@ Abc_Ntk_t * Io_ReadBlif( char * pFileName, int fCheck ) return NULL; } pNtk->pSpec = Extra_UtilStrsav( pFileName ); - Abc_NtkTimeInitialize( pNtk, NULL ); + //Abc_NtkTimeInitialize( pNtk, NULL ); Io_ReadBlifFree( p ); // make sure that everything is okay with the network structure diff --git a/src/base/io/ioWriteBlif.c b/src/base/io/ioWriteBlif.c index ca7d04a9..66664ddc 100644 --- a/src/base/io/ioWriteBlif.c +++ b/src/base/io/ioWriteBlif.c @@ -688,6 +688,11 @@ void Io_WriteTimingInfo( FILE * pFile, Abc_Ntk_t * pNtk ) pTimeDef = Abc_NtkReadDefaultArrival( pNtk ); if ( pTimeDef->Rise != 0.0 || pTimeDef->Fall != 0.0 ) fprintf( pFile, ".default_input_arrival %g %g\n", pTimeDef->Rise, pTimeDef->Fall ); + pTimeDef = Abc_NtkReadDefaultRequired( pNtk ); + if ( pTimeDef->Rise != ABC_INFINITY || pTimeDef->Fall != ABC_INFINITY ) + fprintf( pFile, ".default_output_required %g %g\n", pTimeDef->Rise, pTimeDef->Fall ); + + fprintf( pFile, "\n" ); Abc_NtkForEachPi( pNtk, pNode, i ) { pTime = Abc_NodeReadArrival(pNode); @@ -695,10 +700,6 @@ void Io_WriteTimingInfo( FILE * pFile, Abc_Ntk_t * pNtk ) continue; fprintf( pFile, ".input_arrival %s %g %g\n", Abc_ObjName(Abc_ObjFanout0(pNode)), pTime->Rise, pTime->Fall ); } - - pTimeDef = Abc_NtkReadDefaultRequired( pNtk ); - if ( pTimeDef->Rise != ABC_INFINITY || pTimeDef->Fall != ABC_INFINITY ) - fprintf( pFile, ".default_output_required %g %g\n", pTimeDef->Rise, pTimeDef->Fall ); Abc_NtkForEachPo( pNtk, pNode, i ) { pTime = Abc_NodeReadRequired(pNode); |