Commit 26edc73b by Alan Mishchenko

Bug fix in miter generation.

parent 2c9937e0
......@@ -5420,7 +5420,7 @@ Gia_Man_t * Gia_ManDupBlackBox( Gia_Man_t * p )
***********************************************************************/
Gia_Man_t * Gia_ManDupWithCare( Gia_Man_t * p, Gia_Man_t * pCare )
{
Gia_Man_t * pNew;
Gia_Man_t * pNew, * pTemp;
Gia_Obj_t * pObj;
int i, iCare = -1;
assert( Gia_ManCiNum(pCare) == Gia_ManCiNum(p) );
......@@ -5429,11 +5429,12 @@ Gia_Man_t * Gia_ManDupWithCare( Gia_Man_t * p, Gia_Man_t * pCare )
assert( Gia_ManRegNum(pCare) == 0 );
pNew = Gia_ManStart( 2*Gia_ManObjNum(p) + Gia_ManObjNum(pCare) );
pNew->pName = Abc_UtilStrsavTwo( pNew->pName ? pNew->pName : (char *)"test", (char *)"_care" );
Gia_ManHashAlloc( pNew );
Gia_ManConst0(pCare)->Value = 0;
Gia_ManForEachCi( pCare, pObj, i )
pObj->Value = Gia_ManAppendCi( pNew );
Gia_ManForEachAnd( pCare, pObj, i )
pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
Gia_ManForEachCo( pCare, pObj, i )
iCare = Gia_ObjFanin0Copy(pObj);
Gia_ManConst0(p)->Value = 0;
......@@ -5441,11 +5442,17 @@ Gia_Man_t * Gia_ManDupWithCare( Gia_Man_t * p, Gia_Man_t * pCare )
pObj->Value = Gia_ManCi(pCare, i)->Value;
Gia_ManForEachAnd( p, pObj, i )
{
pObj->Value = Gia_ManAppendAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
pObj->Value = Gia_ManAppendAnd( pNew, iCare, pObj->Value );
pObj->Value = Gia_ManHashAnd( pNew, Gia_ObjFanin0Copy(pObj), Gia_ObjFanin1Copy(pObj) );
pObj->Value = Gia_ManHashAnd( pNew, iCare, pObj->Value );
}
Gia_ManForEachCo( p, pObj, i )
Gia_ManAppendCo( pNew, Gia_ObjFanin0Copy(pObj) );
{
pObj->Value = Gia_ObjFanin0Copy(pObj);
pObj->Value = Gia_ManHashAnd( pNew, iCare, pObj->Value );
Gia_ManAppendCo( pNew, pObj->Value );
}
pNew = Gia_ManCleanup( pTemp = pNew );
Gia_ManStop( pTemp );
return pNew;
}
......
......@@ -3673,7 +3673,7 @@ Vec_Str_t * Gia_ManComputeRange( Gia_Man_t * p )
Vec_Wrd_t * vSims = Gia_ManSimPatSimOut( p, vSimsPi, 1 );
int n, nWords = Vec_WrdSize(vSimsPi) / Gia_ManCiNum(p);
int i, nLimit = Gia_ManCiNum(p) < 6 ? 1 << Gia_ManCiNum(p) : 64*nWords;
Vec_Str_t * vOut = Vec_StrAlloc( nLimit*(Gia_ManCoNum(p) + 3) );
Vec_Str_t * vOut = Vec_StrAlloc( nLimit*(Gia_ManCoNum(p) + 3)+1 );
assert( Vec_WrdSize(vSims) == nWords * Gia_ManCoNum(p) );
for ( n = 0; n < nLimit; n++ )
{
......
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