summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-11-04 14:43:00 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2015-11-04 14:43:00 -0800
commitdf6c9415c138e90bbd15c1dc519a463b344aabd8 (patch)
treefacfd538743e4b4e9c301a5405cd2b17a8a134d7
parentae96723ad6636edb43bbd6dd0fe95d59a25905c5 (diff)
downloadabc-df6c9415c138e90bbd15c1dc519a463b344aabd8.tar.gz
abc-df6c9415c138e90bbd15c1dc519a463b344aabd8.tar.bz2
abc-df6c9415c138e90bbd15c1dc519a463b344aabd8.zip
Adding procedure Abc_NtkSetAndGateDelay().
-rw-r--r--src/aig/miniaig/abcapis.h3
-rw-r--r--src/base/abci/abcMap.c51
2 files changed, 52 insertions, 2 deletions
diff --git a/src/aig/miniaig/abcapis.h b/src/aig/miniaig/abcapis.h
index 036018d4..f62612e8 100644
--- a/src/aig/miniaig/abcapis.h
+++ b/src/aig/miniaig/abcapis.h
@@ -58,6 +58,9 @@ extern void Abc_NtkSetFlopNum( void * pAbc, int nFlops );
extern void Abc_NtkSetCiArrivalTime( void * pAbc, int iCi, float Rise, float Fall );
extern void Abc_NtkSetCoRequiredTime( void * pAbc, int iCo, float Rise, float Fall );
+// procedure to set AND-gate delay to tech-independent synthesis and mapping
+extern void Abc_NtkSetAndGateDelay( void * pAbc, float Delay );
+
// 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 c40029f7..ce5bc5e8 100644
--- a/src/base/abci/abcMap.c
+++ b/src/base/abci/abcMap.c
@@ -918,7 +918,7 @@ void Abc_NtkTestMiniMapping( Abc_Ntk_t * p )
/**Function*************************************************************
- Synopsis [These APIs set arriva/required times of CIs/COs.]
+ Synopsis [These APIs set arrival/required times of CIs/COs.]
Description []
@@ -933,12 +933,21 @@ void Abc_NtkSetCiArrivalTime( void * pAbc0, int iCi, float Rise, float Fall )
Abc_Ntk_t * pNtk;
Abc_Obj_t * pNode;
if ( pAbc == NULL )
+ {
printf( "ABC framework is not initialized by calling Abc_Start()\n" );
+ return;
+ }
pNtk = Abc_FrameReadNtk( pAbc );
if ( pNtk == NULL )
+ {
printf( "Current network in ABC framework is not defined.\n" );
+ return;
+ }
if ( iCi < 0 || iCi >= Abc_NtkCiNum(pNtk) )
+ {
printf( "CI index is not valid.\n" );
+ return;
+ }
pNode = Abc_NtkCi( pNtk, iCi );
Abc_NtkTimeSetArrival( pNtk, Abc_ObjId(pNode), Rise, Fall );
}
@@ -947,17 +956,55 @@ 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 )
+ if ( pAbc == NULL )\
+ {
printf( "ABC framework is not initialized by calling Abc_Start()\n" );
+ return;
+ }
pNtk = Abc_FrameReadNtk( pAbc );
if ( pNtk == NULL )
+ {
printf( "Current network in ABC framework is not defined.\n" );
+ return;
+ }
if ( iCo < 0 || iCo >= Abc_NtkCoNum(pNtk) )
+ {
printf( "CO index is not valid.\n" );
+ return;
+ }
pNode = Abc_NtkCo( pNtk, iCo );
Abc_NtkTimeSetRequired( pNtk, Abc_ObjId(pNode), Rise, Fall );
}
+/**Function*************************************************************
+
+ Synopsis [This APIs set AND gate delay.]
+
+ Description []
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+void Abc_NtkSetAndGateDelay( void * pAbc0, float Delay )
+{
+ Abc_Frame_t * pAbc = (Abc_Frame_t *)pAbc0;
+ Abc_Ntk_t * pNtk;
+ if ( pAbc == NULL )
+ {
+ printf( "ABC framework is not initialized by calling Abc_Start()\n" );
+ return;
+ }
+ pNtk = Abc_FrameReadNtk( pAbc );
+ if ( pNtk == NULL )
+ {
+ printf( "Current network in ABC framework is not defined.\n" );
+ return;
+ }
+ pNtk->AndGateDelay = Delay;
+}
+
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////