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
2eb2402b
Commit
2eb2402b
authored
Nov 14, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added command 'cexcut' and 'cexmerge'.
parent
9173799c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
11 deletions
+24
-11
src/base/abci/abc.c
+16
-6
src/sat/bmc/bmc.h
+2
-2
src/sat/bmc/bmcCexCut.c
+6
-3
No files found.
src/base/abci/abc.c
View file @
2eb2402b
...
@@ -22592,9 +22592,10 @@ int Abc_CommandCexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22592,9 +22592,10 @@ int Abc_CommandCexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
int
c
;
int
iFrStart
=
0
;
int
iFrStart
=
0
;
int
iFrStop
=
ABC_INFINITY
;
int
iFrStop
=
ABC_INFINITY
;
int
fCombOnly
=
0
;
int
fVerbose
=
0
;
int
fVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FGvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FG
c
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -22620,6 +22621,9 @@ int Abc_CommandCexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22620,6 +22621,9 @@ int Abc_CommandCexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
iFrStop
<
0
)
if
(
iFrStop
<
0
)
goto
usage
;
goto
usage
;
break
;
break
;
case
'c'
:
fCombOnly
^=
1
;
break
;
case
'v'
:
case
'v'
:
fVerbose
^=
1
;
fVerbose
^=
1
;
break
;
break
;
...
@@ -22654,7 +22658,7 @@ int Abc_CommandCexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22654,7 +22658,7 @@ int Abc_CommandCexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
extern
Abc_Ntk_t
*
Abc_NtkFromAigPhase
(
Aig_Man_t
*
pMan
);
extern
Abc_Ntk_t
*
Abc_NtkFromAigPhase
(
Aig_Man_t
*
pMan
);
Abc_Ntk_t
*
pNtkNew
;
Abc_Ntk_t
*
pNtkNew
;
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pAbc
->
pNtkCur
,
0
,
1
);
Aig_Man_t
*
pAig
=
Abc_NtkToDar
(
pAbc
->
pNtkCur
,
0
,
1
);
Aig_Man_t
*
pAigNew
=
Bmc_AigTargetStates
(
pAig
,
pAbc
->
pCex
,
iFrStart
,
iFrStop
,
fVerbose
);
Aig_Man_t
*
pAigNew
=
Bmc_AigTargetStates
(
pAig
,
pAbc
->
pCex
,
iFrStart
,
iFrStop
,
f
CombOnly
,
f
Verbose
);
Aig_ManStop
(
pAig
);
Aig_ManStop
(
pAig
);
if
(
pAigNew
==
NULL
)
if
(
pAigNew
==
NULL
)
{
{
...
@@ -22670,10 +22674,11 @@ int Abc_CommandCexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -22670,10 +22674,11 @@ int Abc_CommandCexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: cexcut [-FG num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: cexcut [-FG num] [-
c
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
creates logic for bad states using the current CEX
\n
"
);
Abc_Print
(
-
2
,
"
\t
creates logic for bad states using the current CEX
\n
"
);
Abc_Print
(
-
2
,
"
\t
-F num : 0-based number of the starting frame [default = %d]
\n
"
,
iFrStart
);
Abc_Print
(
-
2
,
"
\t
-F num : 0-based number of the starting frame [default = %d]
\n
"
,
iFrStart
);
Abc_Print
(
-
2
,
"
\t
-G num : 0-based number of the ending frame [default = %d]
\n
"
,
iFrStop
);
Abc_Print
(
-
2
,
"
\t
-G num : 0-based number of the ending frame [default = %d]
\n
"
,
iFrStop
);
Abc_Print
(
-
2
,
"
\t
-c : toggle outputting combinational unate circuit [default = %s]
\n
"
,
fCombOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
@@ -28812,9 +28817,10 @@ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -28812,9 +28817,10 @@ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
int
c
;
int
iFrStart
=
0
;
int
iFrStart
=
0
;
int
iFrStop
=
ABC_INFINITY
;
int
iFrStop
=
ABC_INFINITY
;
int
fCombOnly
=
0
;
int
fVerbose
=
0
;
int
fVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FGvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FG
c
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -28840,6 +28846,9 @@ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -28840,6 +28846,9 @@ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
iFrStop
<
0
)
if
(
iFrStop
<
0
)
goto
usage
;
goto
usage
;
break
;
break
;
case
'c'
:
fCombOnly
^=
1
;
break
;
case
'v'
:
case
'v'
:
fVerbose
^=
1
;
fVerbose
^=
1
;
break
;
break
;
...
@@ -28869,7 +28878,7 @@ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -28869,7 +28878,7 @@ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
iFrStop
==
ABC_INFINITY
)
if
(
iFrStop
==
ABC_INFINITY
)
iFrStop
=
pAbc
->
pCex
->
iFrame
;
iFrStop
=
pAbc
->
pCex
->
iFrame
;
pGiaNew
=
Bmc_GiaTargetStates
(
pAbc
->
pGia
,
pAbc
->
pCex
,
iFrStart
,
iFrStop
,
fVerbose
);
pGiaNew
=
Bmc_GiaTargetStates
(
pAbc
->
pGia
,
pAbc
->
pCex
,
iFrStart
,
iFrStop
,
f
CombOnly
,
f
Verbose
);
if
(
pGiaNew
==
NULL
)
if
(
pGiaNew
==
NULL
)
{
{
Abc_Print
(
1
,
"Command has failed.
\n
"
);
Abc_Print
(
1
,
"Command has failed.
\n
"
);
...
@@ -28879,10 +28888,11 @@ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -28879,10 +28888,11 @@ int Abc_CommandAbc9CexCut( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &cexcut [-FG num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &cexcut [-FG num] [-
c
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
creates logic for bad states using the current CEX
\n
"
);
Abc_Print
(
-
2
,
"
\t
creates logic for bad states using the current CEX
\n
"
);
Abc_Print
(
-
2
,
"
\t
-F num : 0-based number of the starting frame [default = %d]
\n
"
,
iFrStart
);
Abc_Print
(
-
2
,
"
\t
-F num : 0-based number of the starting frame [default = %d]
\n
"
,
iFrStart
);
Abc_Print
(
-
2
,
"
\t
-G num : 0-based number of the ending frame [default = %d]
\n
"
,
iFrStop
);
Abc_Print
(
-
2
,
"
\t
-G num : 0-based number of the ending frame [default = %d]
\n
"
,
iFrStop
);
Abc_Print
(
-
2
,
"
\t
-c : toggle producing combinational unate circuit [default = %s]
\n
"
,
fCombOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
...
src/sat/bmc/bmc.h
View file @
2eb2402b
...
@@ -75,8 +75,8 @@ extern int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFra
...
@@ -75,8 +75,8 @@ extern int Saig_BmcPerform( Aig_Man_t * pAig, int nStart, int nFra
extern
void
Saig_ParBmcSetDefaultParams
(
Saig_ParBmc_t
*
p
);
extern
void
Saig_ParBmcSetDefaultParams
(
Saig_ParBmc_t
*
p
);
extern
int
Saig_ManBmcScalable
(
Aig_Man_t
*
pAig
,
Saig_ParBmc_t
*
pPars
);
extern
int
Saig_ManBmcScalable
(
Aig_Man_t
*
pAig
,
Saig_ParBmc_t
*
pPars
);
/*=== bmcCexCut.c ==========================================================*/
/*=== bmcCexCut.c ==========================================================*/
extern
Gia_Man_t
*
Bmc_GiaTargetStates
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
fVerbose
);
extern
Gia_Man_t
*
Bmc_GiaTargetStates
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
f
CombOnly
,
int
f
Verbose
);
extern
Aig_Man_t
*
Bmc_AigTargetStates
(
Aig_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
fVerbose
);
extern
Aig_Man_t
*
Bmc_AigTargetStates
(
Aig_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
f
CombOnly
,
int
f
Verbose
);
/*=== bmcCexMin.c ==========================================================*/
/*=== bmcCexMin.c ==========================================================*/
extern
Abc_Cex_t
*
Saig_ManCexMinPerform
(
Aig_Man_t
*
pAig
,
Abc_Cex_t
*
pCex
);
extern
Abc_Cex_t
*
Saig_ManCexMinPerform
(
Aig_Man_t
*
pAig
,
Abc_Cex_t
*
pCex
);
...
...
src/sat/bmc/bmcCexCut.c
View file @
2eb2402b
...
@@ -43,7 +43,7 @@ ABC_NAMESPACE_IMPL_START
...
@@ -43,7 +43,7 @@ ABC_NAMESPACE_IMPL_START
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
Gia_Man_t
*
Bmc_GiaTargetStates
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
fVerbose
)
Gia_Man_t
*
Bmc_GiaTargetStates
(
Gia_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
f
CombOnly
,
int
f
Verbose
)
{
{
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Man_t
*
pNew
,
*
pTemp
;
Gia_Obj_t
*
pObj
,
*
pObjRo
,
*
pObjRi
;
Gia_Obj_t
*
pObj
,
*
pObjRo
,
*
pObjRi
;
...
@@ -141,6 +141,8 @@ Gia_Man_t * Bmc_GiaTargetStates( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, in
...
@@ -141,6 +141,8 @@ Gia_Man_t * Bmc_GiaTargetStates( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, in
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
pNew
=
Gia_ManCleanup
(
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
Gia_ManStop
(
pTemp
);
if
(
!
fCombOnly
)
{
// create new GIA
// create new GIA
pNew
=
Gia_ManDupWithNewPo
(
p
,
pTemp
=
pNew
);
pNew
=
Gia_ManDupWithNewPo
(
p
,
pTemp
=
pNew
);
Gia_ManStop
(
pTemp
);
Gia_ManStop
(
pTemp
);
...
@@ -148,6 +150,7 @@ Gia_Man_t * Bmc_GiaTargetStates( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, in
...
@@ -148,6 +150,7 @@ Gia_Man_t * Bmc_GiaTargetStates( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, in
// create new initial state
// create new initial state
pNew
=
Gia_ManDupFlip
(
pTemp
=
pNew
,
Vec_BitArray
(
vInitNew
)
);
pNew
=
Gia_ManDupFlip
(
pTemp
=
pNew
,
Vec_BitArray
(
vInitNew
)
);
Gia_ManStop
(
pTemp
);
Gia_ManStop
(
pTemp
);
}
Vec_BitFree
(
vInitNew
);
Vec_BitFree
(
vInitNew
);
return
pNew
;
return
pNew
;
...
@@ -164,7 +167,7 @@ Gia_Man_t * Bmc_GiaTargetStates( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, in
...
@@ -164,7 +167,7 @@ Gia_Man_t * Bmc_GiaTargetStates( Gia_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, in
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
Aig_Man_t
*
Bmc_AigTargetStates
(
Aig_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
fVerbose
)
Aig_Man_t
*
Bmc_AigTargetStates
(
Aig_Man_t
*
p
,
Abc_Cex_t
*
pCex
,
int
iFrBeg
,
int
iFrEnd
,
int
f
CombOnly
,
int
f
Verbose
)
{
{
Aig_Man_t
*
pAig
;
Aig_Man_t
*
pAig
;
Gia_Man_t
*
pGia
,
*
pRes
;
Gia_Man_t
*
pGia
,
*
pRes
;
...
@@ -175,7 +178,7 @@ Aig_Man_t * Bmc_AigTargetStates( Aig_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, in
...
@@ -175,7 +178,7 @@ Aig_Man_t * Bmc_AigTargetStates( Aig_Man_t * p, Abc_Cex_t * pCex, int iFrBeg, in
Gia_ManStop
(
pGia
);
Gia_ManStop
(
pGia
);
return
NULL
;
return
NULL
;
}
}
pRes
=
Bmc_GiaTargetStates
(
pGia
,
pCex
,
iFrBeg
,
iFrEnd
,
fVerbose
);
pRes
=
Bmc_GiaTargetStates
(
pGia
,
pCex
,
iFrBeg
,
iFrEnd
,
f
CombOnly
,
f
Verbose
);
pAig
=
Gia_ManToAigSimple
(
pRes
);
pAig
=
Gia_ManToAigSimple
(
pRes
);
Gia_ManStop
(
pGia
);
Gia_ManStop
(
pGia
);
Gia_ManStop
(
pRes
);
Gia_ManStop
(
pRes
);
...
...
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