diff options
Diffstat (limited to 'src/aig/gia')
-rw-r--r-- | src/aig/gia/giaMini.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/aig/gia/giaMini.c b/src/aig/gia/giaMini.c index 9a6102fe..e14a9a9e 100644 --- a/src/aig/gia/giaMini.c +++ b/src/aig/gia/giaMini.c @@ -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************************************************************* |