mirror of https://github.com/YosysHQ/abc.git
Fix the problem of not identifying divisors when its originating cubes had only 2 literals.
With this change, 'empty' sub-cubes (sub-cubes with an ID equal to zero) are inserted in the 0th bin of the hash table.
This commit is contained in:
parent
4ffbd0b2df
commit
f93fbc2303
|
|
@ -120,7 +120,7 @@ static inline void Fxch_ManDivDoubleCube( Fxch_Man_t* pFxchMan,
|
|||
iCube, iLit0, 0,
|
||||
(char)fAdd, (char)fUpdate );
|
||||
|
||||
if ( Vec_IntSize( vCube ) > 3 )
|
||||
if ( Vec_IntSize( vCube ) >= 3 )
|
||||
{
|
||||
int Lit1,
|
||||
iLit1;
|
||||
|
|
@ -266,7 +266,7 @@ void Fxch_ManSCHashTablesInit( Fxch_Man_t* pFxchMan )
|
|||
Vec_WecForEachLevel( vCubes, vCube, iCube )
|
||||
{
|
||||
int nLits = Vec_IntSize( vCube ) - 1,
|
||||
nSubCubes = nLits == 2? nLits : ( nLits * nLits + nLits ) / 2;
|
||||
nSubCubes = nLits <= 2? nLits + 1: ( nLits * nLits + nLits ) / 2;
|
||||
|
||||
Vec_IntPush( vCubeLinks, ( nTotalHashed + 1 ) );
|
||||
nTotalHashed += nSubCubes + 1;
|
||||
|
|
|
|||
Loading…
Reference in New Issue