Gate sizing with barrier buffers.

This commit is contained in:
Alan Mishchenko
2014-12-21 22:22:31 -08:00
parent fa32acde61
commit 58d28539a7
6 changed files with 123 additions and 1 deletions
+1
View File
@@ -577,6 +577,7 @@ extern void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_S
/*=== sclUtil.c ===============================================================*/
extern void Abc_SclMioGates2SclGates( SC_Lib * pLib, Abc_Ntk_t * p );
extern void Abc_SclSclGates2MioGates( SC_Lib * pLib, Abc_Ntk_t * p );
extern void Abc_SclTransferGates( Abc_Ntk_t * pOld, Abc_Ntk_t * pNew );
extern void Abc_SclPrintGateSizes( SC_Lib * pLib, Abc_Ntk_t * p );
extern void Abc_SclMinsizePerform( SC_Lib * pLib, Abc_Ntk_t * p, int fUseMax, int fVerbose );
extern int Abc_SclCountMinSize( SC_Lib * pLib, Abc_Ntk_t * p, int fUseMax );
+24 -1
View File
@@ -865,7 +865,7 @@ void Abc_SclUpsizeRemoveDangling( SC_Man * p, Abc_Ntk_t * pNtk )
SeeAlso []
***********************************************************************/
void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars )
void Abc_SclUpsizePerformInt( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars )
{
SC_Man * p;
Vec_Int_t * vPathPos = NULL; // critical POs
@@ -1013,6 +1013,29 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars
// Abc_NtkCleanMarkAB( pNtk );
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, SC_SizePars * pPars )
{
Abc_Ntk_t * pNtkNew = pNtk;
if ( pNtk->nBarBufs2 > 0 )
pNtkNew = Abc_NtkDupDfsNoBarBufs( pNtk );
Abc_SclUpsizePerformInt( pLib, pNtkNew, pPars );
if ( pNtk->nBarBufs2 > 0 )
Abc_SclTransferGates( pNtk, pNtkNew );
if ( pNtk->nBarBufs2 > 0 )
Abc_NtkDelete( pNtkNew );
}
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
+27
View File
@@ -94,6 +94,33 @@ void Abc_SclSclGates2MioGates( SC_Lib * pLib, Abc_Ntk_t * p )
p->pSCLib = NULL;
}
/**Function*************************************************************
Synopsis [Transfer gate sizes from AIG without barbufs.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void Abc_SclTransferGates( Abc_Ntk_t * pOld, Abc_Ntk_t * pNew )
{
Abc_Obj_t * pObj; int i;
assert( pOld->nBarBufs2 > 0 );
assert( pNew->nBarBufs2 == 0 );
Abc_NtkForEachNode( pOld, pObj, i )
{
if ( pObj->pCopy == NULL )
continue;
if ( Abc_ObjIsBarBuf(pObj) )
continue;
assert( Abc_ObjNtk(pObj->pCopy) == pNew );
pObj->pData = pObj->pCopy->pData;
}
}
/**Function*************************************************************
Synopsis [Reports percentage of gates of each size.]