summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
Diffstat (limited to 'src/base')
-rw-r--r--src/base/abci/abcMap.c41
1 files changed, 41 insertions, 0 deletions
diff --git a/src/base/abci/abcMap.c b/src/base/abci/abcMap.c
index aca51c88..ea99938e 100644
--- a/src/base/abci/abcMap.c
+++ b/src/base/abci/abcMap.c
@@ -927,6 +927,47 @@ void Abc_NtkTestMiniMapping( Abc_Ntk_t * p )
Vec_IntFree( vMapping );
}
+/**Function*************************************************************
+
+ Synopsis [These APIs set arriva/required times of CIs/COs.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Abc_NtkSetCiArrivalTime( void * pAbc0, int iCi, float Rise, float Fall )
+{
+ Abc_Frame_t * pAbc = (Abc_Frame_t *)pAbc0;
+ Abc_Ntk_t * pNtk;
+ Abc_Obj_t * pNode;
+ if ( pAbc == NULL )
+ printf( "ABC framework is not initialized by calling Abc_Start()\n" );
+ pNtk = Abc_FrameReadNtk( pAbc );
+ if ( pNtk == NULL )
+ printf( "Current network in ABC framework is not defined.\n" );
+ if ( iCi < 0 || iCi >= Abc_NtkCiNum(pNtk) )
+ printf( "CI index is not valid.\n" );
+ pNode = Abc_NtkCi( pNtk, iCi );
+ Abc_NtkTimeSetArrival( pNtk, Abc_ObjId(pNode), Rise, Fall );
+}
+void Abc_NtkSetCoRequiredTime( void * pAbc0, int iCo, float Rise, float Fall )
+{
+ Abc_Frame_t * pAbc = (Abc_Frame_t *)pAbc0;
+ Abc_Ntk_t * pNtk;
+ Abc_Obj_t * pNode;
+ if ( pAbc == NULL )
+ printf( "ABC framework is not initialized by calling Abc_Start()\n" );
+ pNtk = Abc_FrameReadNtk( pAbc );
+ if ( pNtk == NULL )
+ printf( "Current network in ABC framework is not defined.\n" );
+ if ( iCo < 0 || iCo >= Abc_NtkCoNum(pNtk) )
+ printf( "CO index is not valid.\n" );
+ pNode = Abc_NtkCo( pNtk, iCo );
+ Abc_NtkTimeSetRequired( pNtk, Abc_ObjId(pNode), Rise, Fall );
+}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///