Commit 181a7629 by Alan Mishchenko

Producing AIG after structural mapping.

parent 73ba1458
...@@ -30,6 +30,7 @@ ABC_NAMESPACE_IMPL_START ...@@ -30,6 +30,7 @@ ABC_NAMESPACE_IMPL_START
extern int Kit_TruthToGia( Gia_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory, Vec_Int_t * vLeaves, int fHash ); extern int Kit_TruthToGia( Gia_Man_t * pMan, unsigned * pTruth, int nVars, Vec_Int_t * vMemory, Vec_Int_t * vLeaves, int fHash );
#define DAU_DSD_MAX_VAR 8
static int m_Calls = 0; static int m_Calls = 0;
static int m_NonDsd = 0; static int m_NonDsd = 0;
...@@ -86,11 +87,8 @@ int Dau_DsdToGia_rec( Gia_Man_t * pGia, char * pStr, char ** p, int * pMatches, ...@@ -86,11 +87,8 @@ int Dau_DsdToGia_rec( Gia_Man_t * pGia, char * pStr, char ** p, int * pMatches,
int fCompl = 0; int fCompl = 0;
if ( **p == '!' ) if ( **p == '!' )
(*p)++, fCompl = 1; (*p)++, fCompl = 1;
if ( **p >= 'a' && **p <= 'f' ) // var if ( **p >= 'a' && **p < 'a' + DAU_DSD_MAX_VAR ) // var
{
assert( **p - 'a' >= 0 && **p - 'a' < 6 );
return Abc_LitNotCond( pLits[**p - 'a'], fCompl ); return Abc_LitNotCond( pLits[**p - 'a'], fCompl );
}
if ( **p == '(' ) // and/or if ( **p == '(' ) // and/or
{ {
char * q = pStr + pMatches[ *p - pStr ]; char * q = pStr + pMatches[ *p - pStr ];
...@@ -121,7 +119,7 @@ int Dau_DsdToGia_rec( Gia_Man_t * pGia, char * pStr, char ** p, int * pMatches, ...@@ -121,7 +119,7 @@ int Dau_DsdToGia_rec( Gia_Man_t * pGia, char * pStr, char ** p, int * pMatches,
{ {
int nVars = 0; int nVars = 0;
int Temp[3], * pTemp = Temp, Res; int Temp[3], * pTemp = Temp, Res;
int Fanins[6], * pLits2; int Fanins[DAU_DSD_MAX_VAR], * pLits2;
char * pOld = *p; char * pOld = *p;
char * q = pStr + pMatches[ *p - pStr ]; char * q = pStr + pMatches[ *p - pStr ];
// read fanins // read fanins
...@@ -164,7 +162,7 @@ int Dau_DsdToGia_rec( Gia_Man_t * pGia, char * pStr, char ** p, int * pMatches, ...@@ -164,7 +162,7 @@ int Dau_DsdToGia_rec( Gia_Man_t * pGia, char * pStr, char ** p, int * pMatches,
if ( (**p >= 'A' && **p <= 'F') || (**p >= '0' && **p <= '9') ) if ( (**p >= 'A' && **p <= 'F') || (**p >= '0' && **p <= '9') )
{ {
word Func; word Func;
int Fanins[6], Res; int Fanins[DAU_DSD_MAX_VAR], Res;
Vec_Int_t vLeaves; Vec_Int_t vLeaves;
char * q; char * q;
int i, nVars = Abc_TtReadHex( &Func, *p ); int i, nVars = Abc_TtReadHex( &Func, *p );
...@@ -216,6 +214,7 @@ int Dsm_ManDeriveGia( void * p, word * pTruth, Vec_Int_t * vLeaves, Vec_Int_t * ...@@ -216,6 +214,7 @@ int Dsm_ManDeriveGia( void * p, word * pTruth, Vec_Int_t * vLeaves, Vec_Int_t *
char pDsd[1000]; char pDsd[1000];
int nSizeNonDec; int nSizeNonDec;
m_Calls++; m_Calls++;
assert( Vec_IntSize(vLeaves) <= DAU_DSD_MAX_VAR );
// static int Counter = 0; Counter++; // static int Counter = 0; Counter++;
nSizeNonDec = Dau_DsdDecompose( pTruth, Vec_IntSize(vLeaves), 0, 1, pDsd ); nSizeNonDec = Dau_DsdDecompose( pTruth, Vec_IntSize(vLeaves), 0, 1, pDsd );
if ( nSizeNonDec ) if ( nSizeNonDec )
......
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