Skip to content

Commit

Permalink
Adding new external APIs.
Browse files Browse the repository at this point in the history
  • Loading branch information
alanminko committed Mar 4, 2025
1 parent e462cae commit c25bf73
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/aig/gia/giaMini.c
Original file line number Diff line number Diff line change
Expand Up @@ -555,6 +555,23 @@ char * Abc_FrameGiaOutputMiniLutAttr( Abc_Frame_t * pAbc, void * pMiniLut )
printf( "Current network in ABC framework is not defined.\n" );
return Gia_ManToMiniLutAttr( pGia, pMiniLut );
}
int * Abc_FrameGiaOutputMiniLutObj( Abc_Frame_t * pAbc )
{
int * pRes = NULL;
if ( pAbc == NULL )
printf( "ABC framework is not initialized by calling Abc_Start()\n" );
if ( pAbc->vMiniLutObjs == NULL )
printf( "MiniLut objects are not defined.\n" );
pRes = Vec_IntReleaseArray( pAbc->vMiniLutObjs );
Vec_IntFreeP( &pAbc->vMiniLutObjs );
return pRes;
}
void Abc_FrameSetObjDelays( Abc_Frame_t * pAbc, int * pDelays, int nDelays )
{
Vec_IntFreeP( &pAbc->vObjDelays );
pAbc->vObjDelays = Vec_IntAllocArrayCopy( pDelays, nDelays );
}


/**Function*************************************************************
Expand Down
2 changes: 2 additions & 0 deletions src/base/main/abcapis.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ extern ABC_DLL void Abc_FrameGiaInputMiniLut( Abc_Frame_t * pAbc, void * pMini
extern ABC_DLL void Abc_FrameGiaInputMiniLut2( Abc_Frame_t * pAbc, void * pMiniLut );
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_FrameGiaOutputMiniLutObj( Abc_Frame_t * pAbc );
extern ABC_DLL void Abc_FrameSetObjDelays( Abc_Frame_t * pAbc, int * pDelays, int nDelays );
extern ABC_DLL int * Abc_FrameReadMiniLutSwitching( Abc_Frame_t * pAbc );
extern ABC_DLL int * Abc_FrameReadMiniLutSwitching2( Abc_Frame_t * pAbc, int nRandPiFactor );
extern ABC_DLL int * Abc_FrameReadMiniLutSwitchingPo( Abc_Frame_t * pAbc );
Expand Down
2 changes: 2 additions & 0 deletions src/base/main/mainInt.h
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,8 @@ struct Abc_Frame_t_
Gia_Man_t * pGiaMiniLut;
Vec_Int_t * vCopyMiniAig;
Vec_Int_t * vCopyMiniLut;
Vec_Int_t * vMiniLutObjs;
Vec_Int_t * vObjDelays;
int * pArray;
int * pBoxes;
void * pNdr;
Expand Down

0 comments on commit c25bf73

Please sign in to comment.