Commit 61abba95 by Alan Mishchenko

Improvements to the new technology mapper.

parent 211ac730
...@@ -746,7 +746,7 @@ int Gia_ObjIsMuxType( Gia_Obj_t * pNode ) ...@@ -746,7 +746,7 @@ int Gia_ObjIsMuxType( Gia_Obj_t * pNode )
// check that the node is regular // check that the node is regular
assert( !Gia_IsComplement(pNode) ); assert( !Gia_IsComplement(pNode) );
// if the node is not AND, this is not MUX // if the node is not AND, this is not MUX
if ( !Gia_ObjIsAnd(pNode) ) if ( !Gia_ObjIsAnd(pNode) || Gia_ObjIsBuf(pNode) )
return 0; return 0;
// if the children are not complemented, this is not MUX // if the children are not complemented, this is not MUX
if ( !Gia_ObjFaninC0(pNode) || !Gia_ObjFaninC1(pNode) ) if ( !Gia_ObjFaninC0(pNode) || !Gia_ObjFaninC1(pNode) )
...@@ -780,7 +780,7 @@ int Gia_ObjRecognizeExor( Gia_Obj_t * pObj, Gia_Obj_t ** ppFan0, Gia_Obj_t ** pp ...@@ -780,7 +780,7 @@ int Gia_ObjRecognizeExor( Gia_Obj_t * pObj, Gia_Obj_t ** ppFan0, Gia_Obj_t ** pp
{ {
Gia_Obj_t * p0, * p1; Gia_Obj_t * p0, * p1;
assert( !Gia_IsComplement(pObj) ); assert( !Gia_IsComplement(pObj) );
if ( !Gia_ObjIsAnd(pObj) ) if ( !Gia_ObjIsAnd(pObj) || Gia_ObjIsBuf(pObj) )
return 0; return 0;
assert( Gia_ObjIsAnd(pObj) ); assert( Gia_ObjIsAnd(pObj) );
p0 = Gia_ObjChild0(pObj); p0 = Gia_ObjChild0(pObj);
......
...@@ -692,7 +692,7 @@ void Sdm_ManPrintDsdStats( Sdm_Man_t * p, int fVerbose ) ...@@ -692,7 +692,7 @@ void Sdm_ManPrintDsdStats( Sdm_Man_t * p, int fVerbose )
} }
} }
printf( "Unused classes = %d (%.2f %%). ", Absent, 100.0 * Absent / DSD_CLASS_NUM ); printf( "Unused classes = %d (%.2f %%). ", Absent, 100.0 * Absent / DSD_CLASS_NUM );
printf( "Non-DSD cuts = %d (%.2f %%). ", p->nNonDsd, 100.0 * p->nNonDsd / p->nAllDsd ); printf( "Non-DSD cuts = %d (%.2f %%). ", p->nNonDsd, 100.0 * p->nNonDsd / Abc_MaxInt(1, p->nAllDsd) );
printf( "\n" ); printf( "\n" );
} }
...@@ -919,6 +919,7 @@ int Sdm_ManCheckDsd6( Sdm_Man_t * p, word t ) ...@@ -919,6 +919,7 @@ int Sdm_ManCheckDsd6( Sdm_Man_t * p, word t )
***********************************************************************/ ***********************************************************************/
int Sdm_ManComputeFunc( Sdm_Man_t * p, int iDsdLit0, int iDsdLit1, int * pCut, int uMask, int fXor ) int Sdm_ManComputeFunc( Sdm_Man_t * p, int iDsdLit0, int iDsdLit1, int * pCut, int uMask, int fXor )
{ {
// int fVerbose = 0;
int i, Config, iClass, fCompl, Res; int i, Config, iClass, fCompl, Res;
int PermMask = uMask & 0x3FFFF; int PermMask = uMask & 0x3FFFF;
int ComplMask = uMask >> 18; int ComplMask = uMask >> 18;
...@@ -928,7 +929,6 @@ int Sdm_ManComputeFunc( Sdm_Man_t * p, int iDsdLit0, int iDsdLit1, int * pCut, i ...@@ -928,7 +929,6 @@ int Sdm_ManComputeFunc( Sdm_Man_t * p, int iDsdLit0, int iDsdLit1, int * pCut, i
assert( uMask > 1 ); assert( uMask > 1 );
assert( iDsdLit0 < DSD_CLASS_NUM * 2 ); assert( iDsdLit0 < DSD_CLASS_NUM * 2 );
assert( iDsdLit1 < DSD_CLASS_NUM * 2 ); assert( iDsdLit1 < DSD_CLASS_NUM * 2 );
// Sdm_ManPrintPerm( PermMask ); printf( "\n" );
Truth0 = p->pDsd6[Abc_Lit2Var(iDsdLit0)].uTruth; Truth0 = p->pDsd6[Abc_Lit2Var(iDsdLit0)].uTruth;
Truth1p = Vec_WrdEntry( p->vPerm6, Abc_Lit2Var(iDsdLit1) * 720 + Vec_IntEntry(p->vMap2Perm, PermMask ) ); Truth1p = Vec_WrdEntry( p->vPerm6, Abc_Lit2Var(iDsdLit1) * 720 + Vec_IntEntry(p->vMap2Perm, PermMask ) );
if ( ComplMask ) if ( ComplMask )
...@@ -939,9 +939,10 @@ int Sdm_ManComputeFunc( Sdm_Man_t * p, int iDsdLit0, int iDsdLit1, int * pCut, i ...@@ -939,9 +939,10 @@ int Sdm_ManComputeFunc( Sdm_Man_t * p, int iDsdLit0, int iDsdLit1, int * pCut, i
t1 = Abc_LitIsCompl(iDsdLit1) ? ~Truth1p : Truth1p; t1 = Abc_LitIsCompl(iDsdLit1) ? ~Truth1p : Truth1p;
t = fXor ? t0 ^ t1 : t0 & t1; t = fXor ? t0 ^ t1 : t0 & t1;
/* /*
if ( 0 ) if ( fVerbose )
{ {
Sdm_ManPrintPerm( PermMask ); printf( "\n" ); Sdm_ManPrintPerm( PermMask ); printf( "\n" );
Extra_PrintBinary( stdout, &ComplMask, 6 ); printf( "\n" );
Kit_DsdPrintFromTruth( (unsigned *)&Truth0, 6 ); printf( "\n" ); Kit_DsdPrintFromTruth( (unsigned *)&Truth0, 6 ); printf( "\n" );
Kit_DsdPrintFromTruth( (unsigned *)&Truth1p, 6 ); printf( "\n" ); Kit_DsdPrintFromTruth( (unsigned *)&Truth1p, 6 ); printf( "\n" );
Kit_DsdPrintFromTruth( (unsigned *)&t, 6 ); printf( "\n" ); Kit_DsdPrintFromTruth( (unsigned *)&t, 6 ); printf( "\n" );
...@@ -951,12 +952,6 @@ Kit_DsdPrintFromTruth( (unsigned *)&t, 6 ); printf( "\n" ); ...@@ -951,12 +952,6 @@ Kit_DsdPrintFromTruth( (unsigned *)&t, 6 ); printf( "\n" );
Config = Sdm_ManCheckDsd6( p, t ); Config = Sdm_ManCheckDsd6( p, t );
if ( Config == -1 ) if ( Config == -1 )
{ {
/*
Sdm_ManPrintPerm( PermMask ); printf( "\n" );
Kit_DsdPrintFromTruth( (unsigned *)&Truth0, 6 ); printf( "\n" );
Kit_DsdPrintFromTruth( (unsigned *)&Truth1p, 6 ); printf( "\n" );
Kit_DsdPrintFromTruth( (unsigned *)&t, 6 ); printf( "\n" );
*/
p->nNonDsd++; p->nNonDsd++;
return -1; return -1;
} }
......
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