Commit df6c9415 by Alan Mishchenko

Adding procedure Abc_NtkSetAndGateDelay().

parent ae96723a
...@@ -58,6 +58,9 @@ extern void Abc_NtkSetFlopNum( void * pAbc, int nFlops ); ...@@ -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_NtkSetCiArrivalTime( void * pAbc, int iCi, float Rise, float Fall );
extern void Abc_NtkSetCoRequiredTime( void * pAbc, int iCo, 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 // procedures to return the mapped network
extern int * Abc_NtkOutputMiniMapping( void * pAbc ); extern int * Abc_NtkOutputMiniMapping( void * pAbc );
extern void Abc_NtkPrintMiniMapping( int * pArray ); extern void Abc_NtkPrintMiniMapping( int * pArray );
......
...@@ -918,7 +918,7 @@ void Abc_NtkTestMiniMapping( Abc_Ntk_t * p ) ...@@ -918,7 +918,7 @@ void Abc_NtkTestMiniMapping( Abc_Ntk_t * p )
/**Function************************************************************* /**Function*************************************************************
Synopsis [These APIs set arriva/required times of CIs/COs.] Synopsis [These APIs set arrival/required times of CIs/COs.]
Description [] Description []
...@@ -933,12 +933,21 @@ void Abc_NtkSetCiArrivalTime( void * pAbc0, int iCi, float Rise, float Fall ) ...@@ -933,12 +933,21 @@ void Abc_NtkSetCiArrivalTime( void * pAbc0, int iCi, float Rise, float Fall )
Abc_Ntk_t * pNtk; Abc_Ntk_t * pNtk;
Abc_Obj_t * pNode; Abc_Obj_t * pNode;
if ( pAbc == NULL ) if ( pAbc == NULL )
{
printf( "ABC framework is not initialized by calling Abc_Start()\n" ); printf( "ABC framework is not initialized by calling Abc_Start()\n" );
return;
}
pNtk = Abc_FrameReadNtk( pAbc ); pNtk = Abc_FrameReadNtk( pAbc );
if ( pNtk == NULL ) if ( pNtk == NULL )
{
printf( "Current network in ABC framework is not defined.\n" ); printf( "Current network in ABC framework is not defined.\n" );
return;
}
if ( iCi < 0 || iCi >= Abc_NtkCiNum(pNtk) ) if ( iCi < 0 || iCi >= Abc_NtkCiNum(pNtk) )
{
printf( "CI index is not valid.\n" ); printf( "CI index is not valid.\n" );
return;
}
pNode = Abc_NtkCi( pNtk, iCi ); pNode = Abc_NtkCi( pNtk, iCi );
Abc_NtkTimeSetArrival( pNtk, Abc_ObjId(pNode), Rise, Fall ); Abc_NtkTimeSetArrival( pNtk, Abc_ObjId(pNode), Rise, Fall );
} }
...@@ -947,17 +956,55 @@ void Abc_NtkSetCoRequiredTime( void * pAbc0, int iCo, float Rise, float 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_Frame_t * pAbc = (Abc_Frame_t *)pAbc0;
Abc_Ntk_t * pNtk; Abc_Ntk_t * pNtk;
Abc_Obj_t * pNode; Abc_Obj_t * pNode;
if ( pAbc == NULL ) if ( pAbc == NULL )\
{
printf( "ABC framework is not initialized by calling Abc_Start()\n" ); printf( "ABC framework is not initialized by calling Abc_Start()\n" );
return;
}
pNtk = Abc_FrameReadNtk( pAbc ); pNtk = Abc_FrameReadNtk( pAbc );
if ( pNtk == NULL ) if ( pNtk == NULL )
{
printf( "Current network in ABC framework is not defined.\n" ); printf( "Current network in ABC framework is not defined.\n" );
return;
}
if ( iCo < 0 || iCo >= Abc_NtkCoNum(pNtk) ) if ( iCo < 0 || iCo >= Abc_NtkCoNum(pNtk) )
{
printf( "CO index is not valid.\n" ); printf( "CO index is not valid.\n" );
return;
}
pNode = Abc_NtkCo( pNtk, iCo ); pNode = Abc_NtkCo( pNtk, iCo );
Abc_NtkTimeSetRequired( pNtk, Abc_ObjId(pNode), Rise, Fall ); 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 /// /// END OF FILE ///
//////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment