New API for external calls.

This commit is contained in:
Alan Mishchenko 2021-10-26 16:58:59 -07:00
parent 456e381a02
commit d13e33cdd8
2 changed files with 17 additions and 0 deletions

View File

@ -681,6 +681,22 @@ int * Abc_FrameReadMiniLutSwitching( Abc_Frame_t * pAbc )
Vec_IntFree( vSwitching );
return pRes;
}
int * Abc_FrameReadMiniLutSwitchingPo( Abc_Frame_t * pAbc )
{
Vec_Int_t * vSwitching;
int i, iObj, * pRes = NULL;
if ( pAbc->pGiaMiniAig == NULL )
{
printf( "GIA derived from MiniAIG is not available.\n" );
return NULL;
}
vSwitching = Gia_ManComputeSwitchProbs( pAbc->pGiaMiniAig, 48, 16, 0 );
pRes = ABC_CALLOC( int, Gia_ManCoNum(pAbc->pGiaMiniAig) );
Gia_ManForEachCoDriverId( pAbc->pGiaMiniAig, iObj, i )
pRes[i] = (int)(10000*Vec_FltEntry( (Vec_Flt_t *)vSwitching, iObj ));
Vec_IntFree( vSwitching );
return pRes;
}
/**Function*************************************************************

View File

@ -82,6 +82,7 @@ extern ABC_DLL void Abc_FrameGiaInputMiniLut2( Abc_Frame_t * pAbc, void * pMin
extern ABC_DLL void * Abc_FrameGiaOutputMiniLut( Abc_Frame_t * pAbc );
extern ABC_DLL char * Abc_FrameGiaOutputMiniLutAttr( Abc_Frame_t * pAbc, void * pMiniLut );
extern ABC_DLL int * Abc_FrameReadMiniLutSwitching( Abc_Frame_t * pAbc );
extern ABC_DLL int * Abc_FrameReadMiniLutSwitchingPo( Abc_Frame_t * pAbc );
// procedures to input/output NDR data-structure
extern ABC_DLL void Abc_FrameInputNdr( Abc_Frame_t * pAbc, void * pData );