summaryrefslogtreecommitdiffstats
path: root/src/aig
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2021-11-02 20:28:01 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2021-11-02 20:28:01 -0700
commita80a91e45f5edf59fb7475ae1a461ba3602c6731 (patch)
treeda1dbf75d8451da0644549aa5d182ffd7b759e09 /src/aig
parentd13e33cdd8451ad4ecfcb9093fbaa628f0e6659d (diff)
downloadabc-a80a91e45f5edf59fb7475ae1a461ba3602c6731.tar.gz
abc-a80a91e45f5edf59fb7475ae1a461ba3602c6731.tar.bz2
abc-a80a91e45f5edf59fb7475ae1a461ba3602c6731.zip
Bug fix and new procedures.
Diffstat (limited to 'src/aig')
-rw-r--r--src/aig/gia/giaAiger.c8
-rw-r--r--src/aig/gia/giaPat2.c2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/aig/gia/giaAiger.c b/src/aig/gia/giaAiger.c
index 1bb70612..aafe311b 100644
--- a/src/aig/gia/giaAiger.c
+++ b/src/aig/gia/giaAiger.c
@@ -1702,8 +1702,8 @@ int * Aiger_Read( char * pFileName, int * pnObjs, int * pnIns, int * pnLats, int
int uLit = 2*(1 + nIns + nLats + i);
int uLit1 = uLit - Aiger_ReadUnsigned( pFile );
int uLit0 = uLit1 - Aiger_ReadUnsigned( pFile );
- pObjs[2*(1+nIns+i)+0] = uLit0;
- pObjs[2*(1+nIns+i)+1] = uLit1;
+ pObjs[2*(1+nIns+nLats+i)+0] = uLit0;
+ pObjs[2*(1+nIns+nLats+i)+1] = uLit1;
}
fclose( pFile );
if ( pnObjs ) *pnObjs = nObjs;
@@ -1729,8 +1729,8 @@ void Aiger_Write( char * pFileName, int * pObjs, int nObjs, int nIns, int nLats,
for ( i = 0; i < nAnds; i++ )
{
int uLit = 2*(1 + nIns + nLats + i);
- int uLit0 = pObjs[2*(1+nIns+i)+0];
- int uLit1 = pObjs[2*(1+nIns+i)+1];
+ int uLit0 = pObjs[2*(1+nIns+nLats+i)+0];
+ int uLit1 = pObjs[2*(1+nIns+nLats+i)+1];
Aiger_WriteUnsigned( pFile, uLit - uLit1 );
Aiger_WriteUnsigned( pFile, uLit1 - uLit0 );
}
diff --git a/src/aig/gia/giaPat2.c b/src/aig/gia/giaPat2.c
index 094bdee1..f14ce34a 100644
--- a/src/aig/gia/giaPat2.c
+++ b/src/aig/gia/giaPat2.c
@@ -1242,6 +1242,8 @@ Vec_Wrd_t * Min_ManRemapSims( int nInputs, Vec_Int_t * vMap, Vec_Wrd_t * vSimsPi
{
int i, iObj, nWords = Vec_WrdSize(vSimsPi)/Vec_IntSize(vMap);
Vec_Wrd_t * vSimsNew = Vec_WrdStart( 2 * nInputs * nWords );
+ //Vec_Wrd_t * vSimsNew = Vec_WrdStartRandom( nInputs * nWords );
+ //Vec_WrdFillExtra( vSimsNew, 2 * nInputs * nWords, 0 );
assert( Vec_WrdSize(vSimsPi)%Vec_IntSize(vMap) == 0 );
Vec_WrdShrink( vSimsNew, Vec_WrdSize(vSimsNew)/2 );
Vec_IntForEachEntry( vMap, iObj, i )