Commit fd390aae by Alan Mishchenko

Extending MiniLUT to return attributes.

parent f716948c
......@@ -375,6 +375,15 @@ Mini_Lut_t * Gia_ManToMiniLut( Gia_Man_t * pGia )
//printf( "Added %d inverters.\n", Count );
return p;
}
char * Gia_ManToMiniLutAttr( Gia_Man_t * pGia, void * pMiniLut )
{
Mini_Lut_t * p = (Mini_Lut_t *)pMiniLut; int i;
char * pAttrs = ABC_CALLOC( char, Mini_LutNodeNum(p) );
Gia_ManForEachLut( pGia, i )
if ( Gia_ObjLutIsMux(pGia, i) )
pAttrs[Gia_ManObj(pGia, i)->Value] = 1;
return pAttrs;
}
/**Function*************************************************************
......@@ -411,6 +420,16 @@ void * Abc_FrameGiaOutputMiniLut( Abc_Frame_t * pAbc )
pAbc->pGiaMiniLut = Gia_ManFromMiniLut( pRes, &pAbc->vCopyMiniLut );
return pRes;
}
char * Abc_FrameGiaOutputMiniLutAttr( Abc_Frame_t * pAbc, void * pMiniLut )
{
Gia_Man_t * pGia;
if ( pAbc == NULL )
printf( "ABC framework is not initialized by calling Abc_Start()\n" );
pGia = Abc_FrameReadGia( pAbc );
if ( pGia == NULL )
printf( "Current network in ABC framework is not defined.\n" );
return Gia_ManToMiniLutAttr( pGia, pMiniLut );
}
/**Function*************************************************************
......
......@@ -79,6 +79,7 @@ extern ABC_DLL void Abc_NtkSetFlopNum( Abc_Frame_t * pAbc, int nFlops );
// procedures to input/output 'mini LUT'
extern ABC_DLL void Abc_FrameGiaInputMiniLut( 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 );
// procedures to set CI/CO arrival/required times
extern ABC_DLL void Abc_NtkSetCiArrivalTime( Abc_Frame_t * pAbc, int iCi, float Rise, float Fall );
......
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