mirror of
https://github.com/YosysHQ/abc.git
synced 2026-08-29 17:27:46 +02:00
Added Python API status_get_vector() similar to cex_get_vector().
This commit is contained in:
@@ -247,6 +247,32 @@ Abc_Cex_t* _cex_get_vec(int i)
|
||||
return Abc_CexDup( pCex, -1 );
|
||||
}
|
||||
|
||||
int _status_get_vec_len()
|
||||
{
|
||||
Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame();
|
||||
Vec_Int_t* vStatusVec = Abc_FrameReadStatusVec(pAbc);
|
||||
|
||||
if( ! vStatusVec )
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
return Vec_IntSize(vStatusVec);
|
||||
}
|
||||
|
||||
int _status_get_vec(int i)
|
||||
{
|
||||
Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame();
|
||||
Vec_Int_t* vStatusVec = Abc_FrameReadStatusVec(pAbc);
|
||||
|
||||
if( ! vStatusVec )
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return Vec_IntEntry( vStatusVec, i );
|
||||
}
|
||||
|
||||
void _cex_put(Abc_Cex_t* pCex)
|
||||
{
|
||||
if ( pCex )
|
||||
@@ -649,6 +675,8 @@ int is_const_po( int iPoNum );
|
||||
Abc_Cex_t* _cex_get();
|
||||
int _cex_get_vec_len();
|
||||
Abc_Cex_t* _cex_get_vec(int i);
|
||||
int _status_get_vec_len();
|
||||
int _status_get_vec(int i);
|
||||
void _cex_put(Abc_Cex_t* pCex);
|
||||
void _cex_free(Abc_Cex_t* pCex);
|
||||
int _cex_n_regs(Abc_Cex_t* pCex);
|
||||
@@ -711,6 +739,10 @@ def cex_get_vector():
|
||||
|
||||
return [ _Cex(_cex_get_vec(i)) for i in xrange(_cex_get_vec_len()) ]
|
||||
|
||||
def status_get_vector():
|
||||
|
||||
return [ _Cex(_status_get_vec(i)) for i in xrange(_status_get_vec_len()) ]
|
||||
|
||||
def cex_get():
|
||||
|
||||
return _Cex( _cex_get() )
|
||||
|
||||
Reference in New Issue
Block a user