summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2018-01-19 12:22:48 -0800
committerAlan Mishchenko <alanmi@berkeley.edu>2018-01-19 12:22:48 -0800
commitc2b6e03c6100c351533a5e2b4bd0daab4e8a7b06 (patch)
treeca829bb2d31ba2cdcf73698c946ca7a6ee010e0a
parent0ec5d2f7bcdf61c240e9664ad9b59e0aaed8db1e (diff)
downloadabc-c2b6e03c6100c351533a5e2b4bd0daab4e8a7b06.tar.gz
abc-c2b6e03c6100c351533a5e2b4bd0daab4e8a7b06.tar.bz2
abc-c2b6e03c6100c351533a5e2b4bd0daab4e8a7b06.zip
Backing up node's truth-table to make sure it is not destroyed while deriving AIG.
-rw-r--r--src/opt/dau/dauGia.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/opt/dau/dauGia.c b/src/opt/dau/dauGia.c
index b1df5db0..424ec53f 100644
--- a/src/opt/dau/dauGia.c
+++ b/src/opt/dau/dauGia.c
@@ -445,6 +445,8 @@ int Dsm_ManTruthToGia( void * p, word * pTruth, Vec_Int_t * vLeaves, Vec_Int_t *
Gia_Man_t * pGia = (Gia_Man_t *)p;
int nSizeNonDec;
char pDsd[1000];
+ word pTruthCopy[DAU_MAX_WORD];
+ Abc_TtCopy( pTruthCopy, pTruth, Abc_TtWordNum(Vec_IntSize(vLeaves)), 0 );
m_Calls++;
assert( Vec_IntSize(vLeaves) <= DAU_DSD_MAX_VAR );
// collect delay information
@@ -453,10 +455,10 @@ int Dsm_ManTruthToGia( void * p, word * pTruth, Vec_Int_t * vLeaves, Vec_Int_t *
int i, iLit, pVarLevels[DAU_DSD_MAX_VAR];
Vec_IntForEachEntry( vLeaves, iLit, i )
pVarLevels[i] = Gia_ObjLevelId( pGia, Abc_Lit2Var(iLit) );
- nSizeNonDec = Dau_DsdDecomposeLevel( pTruth, Vec_IntSize(vLeaves), fUseMuxes, 1, pDsd, pVarLevels );
+ nSizeNonDec = Dau_DsdDecomposeLevel( pTruthCopy, Vec_IntSize(vLeaves), fUseMuxes, 1, pDsd, pVarLevels );
}
else
- nSizeNonDec = Dau_DsdDecompose( pTruth, Vec_IntSize(vLeaves), fUseMuxes, 1, pDsd );
+ nSizeNonDec = Dau_DsdDecompose( pTruthCopy, Vec_IntSize(vLeaves), fUseMuxes, 1, pDsd );
if ( nSizeNonDec )
m_NonDsd++;
// printf( "%s\n", pDsd );