summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-02-12 22:09:44 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2014-02-12 22:09:44 -0800
commit61ce18e1ef5cb59f5e038abb06b2b145860ef60d (patch)
tree44ea32cd3a7ca7a9bdad63df98b75c6107aeeef4
parent48e04c8f220505dd8d587096931d97997febc5df (diff)
downloadabc-61ce18e1ef5cb59f5e038abb06b2b145860ef60d.tar.gz
abc-61ce18e1ef5cb59f5e038abb06b2b145860ef60d.tar.bz2
abc-61ce18e1ef5cb59f5e038abb06b2b145860ef60d.zip
Adding APIs to specified input/output arrival/required times.
-rw-r--r--src/aig/miniaig/abcapis.h4
-rw-r--r--src/base/abci/abcMap.c41
2 files changed, 45 insertions, 0 deletions
diff --git a/src/aig/miniaig/abcapis.h b/src/aig/miniaig/abcapis.h
index ccece1d0..6f7f9164 100644
--- a/src/aig/miniaig/abcapis.h
+++ b/src/aig/miniaig/abcapis.h
@@ -53,6 +53,10 @@ extern int Cmd_CommandExecute( void * pAbc, char * pCommandLine );
extern void Abc_NtkInputMiniAig( void * pAbc, void * pMiniAig );
extern void * Abc_NtkOutputMiniAig( void * pAbc );
+// procedures to set CI/CO arrival/required times
+extern void Abc_NtkSetCiArrivalTime( void * pAbc, int iCi, float Rise, float Fall );
+extern void Abc_NtkSetCoRequiredTime( void * pAbc, int iCo, float Rise, float Fall );
+
// procedures to return the mapped network
extern int * Abc_NtkOutputMiniMapping( void * pAbc );
extern void Abc_NtkPrintMiniMapping( int * pArray );
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 ///