summaryrefslogtreecommitdiffstats
path: root/src/aig/gia/giaIf.c
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2019-10-26 18:54:10 +0300
committerAlan Mishchenko <alanmi@berkeley.edu>2019-10-26 18:54:10 +0300
commitf9309ce949cbfc432af1ee543fab15fe1ac99d2e (patch)
treed2dde6c21967f2f142d30b62f71c7955a21d232f /src/aig/gia/giaIf.c
parentfeb3e7943de06c7c5ba16c53a23df00aa3c46cd0 (diff)
downloadabc-f9309ce949cbfc432af1ee543fab15fe1ac99d2e.tar.gz
abc-f9309ce949cbfc432af1ee543fab15fe1ac99d2e.tar.bz2
abc-f9309ce949cbfc432af1ee543fab15fe1ac99d2e.zip
Adding a new feature to decompose special 6-input cuts.
Diffstat (limited to 'src/aig/gia/giaIf.c')
-rw-r--r--src/aig/gia/giaIf.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c
index c22a63a7..37ca6d4b 100644
--- a/src/aig/gia/giaIf.c
+++ b/src/aig/gia/giaIf.c
@@ -1091,6 +1091,34 @@ int Gia_ManFromIfLogicNode( void * pIfMan, Gia_Man_t * pNew, int iObj, Vec_Int_t
}
return Gia_ManFromIfLogicCreateLutSpecial( pNew, pRes, vLeaves, vLeavesTemp, vCover, vMapping, vMapping2, vPacking );
}
+ if ( ((If_Man_t *)pIfMan)->pPars->fLut6Filter && Vec_IntSize(vLeaves) == 6 )
+ {
+ extern word If_Dec6Perform( word t, int fDerive );
+ extern void If_Dec6Verify( word t, word z );
+ Vec_Int_t * vLeaves2 = Vec_IntAlloc( 4 );
+ word t = pRes[0];
+ word z = If_Dec6Perform( t, 1 );
+ //If_DecPrintConfig( z );
+ If_Dec6Verify( t, z );
+
+ t = Abc_Tt6Stretch( z & 0xffff, 4 );
+ Vec_IntClear( vLeaves2 );
+ for ( i = 0; i < 4; i++ )
+ Vec_IntPush( vLeaves2, Vec_IntEntry( vLeaves, (int)((z >> (16+i*4)) & 7) ) );
+ iObjLit1 = Gia_ManFromIfLogicCreateLut( pNew, &t, vLeaves2, vCover, vMapping, vMapping2 );
+
+ t = Abc_Tt6Stretch( (z >> 32) & 0xffff, 4 );
+ Vec_IntClear( vLeaves2 );
+ for ( i = 0; i < 4; i++ )
+ if ( ((z >> (48+i*4)) & 7) == 7 )
+ Vec_IntPush( vLeaves2, iObjLit1 );
+ else
+ Vec_IntPush( vLeaves2, Vec_IntEntry( vLeaves, (int)((z >> (48+i*4)) & 7) ) );
+ iObjLit1 = Gia_ManFromIfLogicCreateLut( pNew, &t, vLeaves2, vCover, vMapping, vMapping2 );
+
+ Vec_IntFree( vLeaves2 );
+ return iObjLit1;
+ }
// check if there is no LUT structures
if ( pStr == NULL )
return Gia_ManFromIfLogicCreateLut( pNew, pRes, vLeaves, vCover, vMapping, vMapping2 );