Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
abc
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
abc
Commits
f591f1cd
Commit
f591f1cd
authored
Sep 04, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Python API status_get_vector() similar to cex_get_vector().
parent
30c2c48a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
0 deletions
+34
-0
src/base/main/main.h
+1
-0
src/base/main/mainFrame.c
+1
-0
src/python/pyabc.i
+32
-0
No files found.
src/base/main/main.h
View file @
f591f1cd
...
...
@@ -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
);
...
...
src/base/main/mainFrame.c
View file @
f591f1cd
...
...
@@ -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
;
}
...
...
src/python/pyabc.i
View file @
f591f1cd
...
...
@@ -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() )
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment