mirror of https://github.com/YosysHQ/abc.git
Fixing corner-cases in 'tempor' and in 'unfold'.
This commit is contained in:
parent
edf6c13721
commit
bfebc0751c
|
|
@ -3068,6 +3068,11 @@ Gia_Man_t * Gia_ManDupWithConstr( Gia_Man_t * p )
|
||||||
printf( "The miter's output is not AND-decomposable.\n" );
|
printf( "The miter's output is not AND-decomposable.\n" );
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if ( Gia_ObjFaninId0p(p, pObj) == 0 )
|
||||||
|
{
|
||||||
|
printf( "The miter's output is a constant.\n" );
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
vSuper = Vec_IntAlloc( 100 );
|
vSuper = Vec_IntAlloc( 100 );
|
||||||
Gia_ManDupWithConstrCollectAnd_rec( p, Gia_ObjChild0(pObj), vSuper, 1 );
|
Gia_ManDupWithConstrCollectAnd_rec( p, Gia_ObjChild0(pObj), vSuper, 1 );
|
||||||
assert( Vec_IntSize(vSuper) > 1 );
|
assert( Vec_IntSize(vSuper) > 1 );
|
||||||
|
|
|
||||||
|
|
@ -23548,6 +23548,11 @@ int Abc_CommandTempor( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
Abc_Print( 0, "The current network is combinational.\n");
|
Abc_Print( 0, "The current network is combinational.\n");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
if ( Abc_NtkPiNum(pNtk) == 0 )
|
||||||
|
{
|
||||||
|
Abc_Print( 0, "The current network does not have primary inputs. Use \"addpi\".\n");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
if ( fUpdateCex )
|
if ( fUpdateCex )
|
||||||
{
|
{
|
||||||
Abc_Cex_t * pCexNew;
|
Abc_Cex_t * pCexNew;
|
||||||
|
|
@ -24020,12 +24025,12 @@ int Abc_CommandUnfold( Abc_Frame_t * pAbc, int argc, char ** argv )
|
||||||
Gia_Man_t * pGia = Gia_ManFromAigSimple( pAig );
|
Gia_Man_t * pGia = Gia_ManFromAigSimple( pAig );
|
||||||
Aig_ManStop( pAig );
|
Aig_ManStop( pAig );
|
||||||
pNew = Gia_ManDupWithConstr( pGia );
|
pNew = Gia_ManDupWithConstr( pGia );
|
||||||
|
Gia_ManStop( pGia );
|
||||||
if ( pNew == NULL )
|
if ( pNew == NULL )
|
||||||
{
|
{
|
||||||
Abc_Print( -1, "Cannot extract constrains from the miter.\n" );
|
Abc_Print( -1, "Cannot extract constrains from the miter.\n" );
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
Gia_ManStop( pGia );
|
|
||||||
pAig = Gia_ManToAigSimple( pNew );
|
pAig = Gia_ManToAigSimple( pNew );
|
||||||
Gia_ManStop( pNew );
|
Gia_ManStop( pNew );
|
||||||
pNtkRes = Abc_NtkFromAigPhase( pAig );
|
pNtkRes = Abc_NtkFromAigPhase( pAig );
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue