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
825b0b5e
Commit
825b0b5e
authored
Aug 02, 2011
by
Baruch Sterin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added support for getting a cex vector
parent
49df91f0
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
50 additions
and
1 deletions
+50
-1
src/python/pyabc.i
+50
-1
No files found.
src/python/pyabc.i
View file @
825b0b5e
...
@@ -182,6 +182,39 @@ Abc_Cex_t* _cex_get()
...
@@ -182,6 +182,39 @@ Abc_Cex_t* _cex_get()
return Abc_CexDup( pCex, -1 );
return Abc_CexDup( pCex, -1 );
}
}
int _cex_get_vec_len()
{
Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame();
Vec_Ptr_t* vCexVec = Abc_FrameReadCexVec(pAbc);
if( ! vCexVec )
{
return 0;
}
return Vec_PtrSize(vCexVec);
}
Abc_Cex_t* _cex_get_vec(int i)
{
Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame();
Vec_Ptr_t* vCexVec = Abc_FrameReadCexVec(pAbc);
if( ! vCexVec )
{
return NULL;
}
Abc_Cex_t* pCex = Vec_PtrEntry( vCexVec, i );
if ( ! pCex )
{
return NULL;
}
return Abc_CexDup( pCex, -1 );
}
void _cex_put(Abc_Cex_t* pCex)
void _cex_put(Abc_Cex_t* pCex)
{
{
Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame();
Abc_Frame_t* pAbc = Abc_FrameGetGlobalFrame();
...
@@ -523,6 +556,8 @@ int cex_frame();
...
@@ -523,6 +556,8 @@ int cex_frame();
int n_phases();
int n_phases();
Abc_Cex_t* _cex_get();
Abc_Cex_t* _cex_get();
int _cex_get_vec_len();
Abc_Cex_t* _cex_get_vec(int i);
void _cex_put(Abc_Cex_t* pCex);
void _cex_put(Abc_Cex_t* pCex);
void _cex_free(Abc_Cex_t* pCex);
void _cex_free(Abc_Cex_t* pCex);
int _cex_n_regs(Abc_Cex_t* pCex);
int _cex_n_regs(Abc_Cex_t* pCex);
...
@@ -571,6 +606,20 @@ class _Cex(object):
...
@@ -571,6 +606,20 @@ class _Cex(object):
def get_frame(self):
def get_frame(self):
return _cex_get_frame(self.pCex)
return _cex_get_frame(self.pCex)
def cex_get_vector():
res = []
for i in xrange(_cex_get_vec_len()):
cex = _cex_get_vec(i)
if cex is None:
res.append(None)
else:
res.append(_Cex(cex))
return res
def cex_get():
def cex_get():
cex = _cex_get()
cex = _cex_get()
...
@@ -578,7 +627,7 @@ def cex_get():
...
@@ -578,7 +627,7 @@ def cex_get():
if cex is None:
if cex is None:
return None
return None
return _Cex(
_cex_get()
)
return _Cex(
cex
)
def cex_put(cex):
def cex_put(cex):
...
...
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