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
a564e2ab
Commit
a564e2ab
authored
Nov 01, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Sweeper internal verification and new switch for &cfraig.
parent
a509fa8e
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
21 additions
and
9 deletions
+21
-9
src/aig/gia/gia.h
+1
-1
src/aig/gia/giaSweeper.c
+5
-4
src/base/abci/abc.c
+6
-2
src/proof/ssc/ssc.h
+1
-0
src/proof/ssc/sscCore.c
+8
-2
No files found.
src/aig/gia/gia.h
View file @
a564e2ab
...
...
@@ -1194,7 +1194,7 @@ extern int Gia_SweeperCheckEquiv( Gia_Man_t * p, int ProbeId1, i
extern
Gia_Man_t
*
Gia_SweeperExtractUserLogic
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
Vec_Ptr_t
*
vInNames
,
Vec_Ptr_t
*
vOutNames
);
extern
Gia_Man_t
*
Gia_SweeperCleanup
(
Gia_Man_t
*
p
,
char
*
pCommLime
);
extern
Vec_Int_t
*
Gia_SweeperGraft
(
Gia_Man_t
*
pDst
,
Vec_Int_t
*
vProbes
,
Gia_Man_t
*
pSrc
);
extern
int
Gia_SweeperFraig
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
char
*
pCommLime
,
int
nWords
,
int
nConfs
,
int
fVerbose
);
extern
int
Gia_SweeperFraig
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
char
*
pCommLime
,
int
nWords
,
int
nConfs
,
int
fVer
ify
,
int
fVer
bose
);
extern
int
Gia_SweeperRun
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
char
*
pCommLime
,
int
fVerbose
);
/*=== giaSwitch.c ============================================================*/
extern
float
Gia_ManEvaluateSwitching
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaSweeper.c
View file @
a564e2ab
...
...
@@ -979,7 +979,7 @@ Vec_Int_t * Gia_SweeperGraft( Gia_Man_t * pDst, Vec_Int_t * vProbes, Gia_Man_t *
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Gia_SweeperSweep
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeOuts
,
int
nWords
,
int
nConfs
,
int
fVerbose
)
Gia_Man_t
*
Gia_SweeperSweep
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeOuts
,
int
nWords
,
int
nConfs
,
int
fVer
ify
,
int
fVer
bose
)
{
Vec_Int_t
*
vProbeConds
;
Gia_Man_t
*
pGiaCond
,
*
pGiaOuts
,
*
pGiaRes
;
...
...
@@ -987,6 +987,7 @@ Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts, int nWords,
Ssc_ManSetDefaultParams
(
pPars
);
pPars
->
nWords
=
nWords
;
pPars
->
nBTLimit
=
nConfs
;
pPars
->
fVerify
=
fVerify
;
pPars
->
fVerbose
=
fVerbose
;
// sweeper is running
assert
(
Gia_SweeperIsRunning
(
p
)
);
...
...
@@ -1025,7 +1026,7 @@ Gia_Man_t * Gia_SweeperSweep( Gia_Man_t * p, Vec_Int_t * vProbeOuts, int nWords,
SeeAlso []
***********************************************************************/
int
Gia_SweeperFraig
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
char
*
pCommLime
,
int
nWords
,
int
nConfs
,
int
fVerbose
)
int
Gia_SweeperFraig
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vProbeIds
,
char
*
pCommLime
,
int
nWords
,
int
nConfs
,
int
fVer
ify
,
int
fVer
bose
)
{
Gia_Man_t
*
pNew
;
Vec_Int_t
*
vLits
;
...
...
@@ -1033,7 +1034,7 @@ int Gia_SweeperFraig( Gia_Man_t * p, Vec_Int_t * vProbeIds, char * pCommLime, in
// sweeper is running
assert
(
Gia_SweeperIsRunning
(
p
)
);
// sweep the logic
pNew
=
Gia_SweeperSweep
(
p
,
vProbeIds
,
nWords
,
nConfs
,
fVerbose
);
pNew
=
Gia_SweeperSweep
(
p
,
vProbeIds
,
nWords
,
nConfs
,
fVer
ify
,
fVer
bose
);
if
(
pNew
==
NULL
)
return
0
;
// execute command line
...
...
@@ -1131,7 +1132,7 @@ Gia_Man_t * Gia_SweeperFraigTest( Gia_Man_t * pInit, int nWords, int nConfs, int
else
// this is a constraint
Gia_SweeperCondPush
(
p
,
Gia_SweeperProbeCreate
(
p
,
Gia_ObjFaninLit0p
(
p
,
pObj
)
)
);
// perform the sweeping
pGia
=
Gia_SweeperSweep
(
p
,
vOuts
,
nWords
,
nConfs
,
fVerbose
);
pGia
=
Gia_SweeperSweep
(
p
,
vOuts
,
nWords
,
nConfs
,
fVerbose
,
0
);
// pGia = Gia_ManDup( p );
Vec_IntFree
(
vOuts
);
// sop the sweeper
...
...
src/base/abci/abc.c
View file @
a564e2ab
...
...
@@ -28733,7 +28733,7 @@ int Abc_CommandAbc9CFraig( Abc_Frame_t * pAbc, int argc, char ** argv )
Ssc_Pars_t
Pars
,
*
pPars
=
&
Pars
;
Ssc_ManSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WCavh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WCa
c
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -28762,6 +28762,9 @@ int Abc_CommandAbc9CFraig( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'a'
:
pPars
->
fAppend
^=
1
;
break
;
case
'c'
:
pPars
->
fVerify
^=
1
;
break
;
case
'v'
:
pPars
->
fVerbose
^=
1
;
break
;
...
...
@@ -28779,13 +28782,14 @@ int Abc_CommandAbc9CFraig( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &cfraig [-WC <num>] [-avh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &cfraig [-WC <num>] [-a
c
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs combinational SAT sweeping under constraints
\n
"
);
Abc_Print
(
-
2
,
"
\t
which are present in the AIG or set manually using
\"
constr
\"\n
"
);
Abc_Print
(
-
2
,
"
\t
(constraints are listed as last POs and true when they are 0)
\n
"
);
Abc_Print
(
-
2
,
"
\t
-W num : the number of simulation words [default = %d]
\n
"
,
pPars
->
nWords
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of conflicts at a node [default = %d]
\n
"
,
pPars
->
nBTLimit
);
Abc_Print
(
-
2
,
"
\t
-a : toggle appending constraints to the result [default = %s]
\n
"
,
pPars
->
fAppend
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle performing internal verification [default = %s]
\n
"
,
pPars
->
fVerify
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
src/proof/ssc/ssc.h
View file @
a564e2ab
...
...
@@ -49,6 +49,7 @@ struct Ssc_Pars_t_
int
nCallsRecycle
;
// calls to perform before recycling SAT solver
int
fAppend
;
// append constraints to the resulting AIG
int
fVerbose
;
// verbose stats
int
fVerify
;
// enable internal verification
};
////////////////////////////////////////////////////////////////////////
...
...
src/proof/ssc/sscCore.c
View file @
a564e2ab
...
...
@@ -261,7 +261,7 @@ int Ssc_PerformVerification( Gia_Man_t * p0, Gia_Man_t * p1, Gia_Man_t * pC )
SeeAlso []
***********************************************************************/
Gia_Man_t
*
Ssc_PerformSweeping
(
Gia_Man_t
*
pAig
,
Gia_Man_t
*
pCare
,
Ssc_Pars_t
*
pPars
)
Gia_Man_t
*
Ssc_PerformSweeping
Int
(
Gia_Man_t
*
pAig
,
Gia_Man_t
*
pCare
,
Ssc_Pars_t
*
pPars
)
{
Ssc_Man_t
*
p
;
Gia_Man_t
*
pResult
,
*
pTemp
;
...
...
@@ -410,6 +410,13 @@ p->timeSimSat += Abc_Clock() - clk;
}
return
pResult
;
}
Gia_Man_t
*
Ssc_PerformSweeping
(
Gia_Man_t
*
pAig
,
Gia_Man_t
*
pCare
,
Ssc_Pars_t
*
pPars
)
{
Gia_Man_t
*
pResult
=
Ssc_PerformSweepingInt
(
pAig
,
pCare
,
pPars
);
if
(
pPars
->
fVerify
)
Ssc_PerformVerification
(
pAig
,
pResult
,
pCare
);
return
pResult
;
}
Gia_Man_t
*
Ssc_PerformSweepingConstr
(
Gia_Man_t
*
p
,
Ssc_Pars_t
*
pPars
)
{
Gia_Man_t
*
pAig
,
*
pCare
,
*
pResult
;
...
...
@@ -443,7 +450,6 @@ Gia_Man_t * Ssc_PerformSweepingConstr( Gia_Man_t * p, Ssc_Pars_t * pPars )
pAig
=
Gia_ManDupLevelized
(
pResult
=
pAig
);
Gia_ManStop
(
pResult
);
pResult
=
Ssc_PerformSweeping
(
pAig
,
pCare
,
pPars
);
Ssc_PerformVerification
(
pAig
,
pResult
,
pCare
);
if
(
pPars
->
fAppend
)
{
Gia_ManDupAppendShare
(
pResult
,
pCare
);
...
...
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