Commit f591f1cd by Alan Mishchenko

Added Python API status_get_vector() similar to cex_get_vector().

parent 30c2c48a
......@@ -116,6 +116,7 @@ extern ABC_DLL int Abc_FrameReadBmcFrames( Abc_Frame_t * p );
extern ABC_DLL int Abc_FrameReadProbStatus( Abc_Frame_t * p );
extern ABC_DLL Abc_Cex_t * Abc_FrameReadCex( Abc_Frame_t * p );
extern ABC_DLL Vec_Ptr_t * Abc_FrameReadCexVec( Abc_Frame_t * p );
extern ABC_DLL Vec_Int_t * Abc_FrameReadStatusVec( Abc_Frame_t * p );
extern ABC_DLL Vec_Ptr_t * Abc_FrameReadPoEquivs( Abc_Frame_t * p );
extern ABC_DLL Vec_Int_t * Abc_FrameReadPoStatuses( Abc_Frame_t * p );
extern ABC_DLL Vec_Int_t * Abc_FrameReadObjIds( Abc_Frame_t * p );
......
......@@ -65,6 +65,7 @@ int Abc_FrameReadBmcFrames( Abc_Frame_t * p ) { return s_GlobalFr
int Abc_FrameReadProbStatus( Abc_Frame_t * p ) { return s_GlobalFrame->Status; }
Abc_Cex_t * Abc_FrameReadCex( Abc_Frame_t * p ) { return s_GlobalFrame->pCex; }
Vec_Ptr_t * Abc_FrameReadCexVec( Abc_Frame_t * p ) { return s_GlobalFrame->vCexVec; }
Vec_Int_t * Abc_FrameReadStatusVec( Abc_Frame_t * p ) { return s_GlobalFrame->vStatuses; }
Vec_Ptr_t * Abc_FrameReadPoEquivs( Abc_Frame_t * p ) { return s_GlobalFrame->vPoEquivs; }
Vec_Int_t * Abc_FrameReadPoStatuses( Abc_Frame_t * p ) { return s_GlobalFrame->vStatuses; }
Vec_Int_t * Abc_FrameReadObjIds( Abc_Frame_t * p ) { return s_GlobalFrame->vAbcObjIds; }
......
......@@ -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() )
......
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