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
8248691d
Commit
8248691d
authored
Sep 12, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added limit on the number of flops to add in one iteration of &abs_refine.
parent
583bc4d7
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
40 additions
and
9 deletions
+40
-9
src/aig/gia/gia.h
+1
-1
src/aig/gia/giaAbs.c
+2
-2
src/aig/saig/saig.h
+1
-1
src/aig/saig/saigAbsStart.c
+20
-2
src/base/abci/abc.c
+16
-3
No files found.
src/aig/gia/gia.h
View file @
8248691d
...
@@ -599,7 +599,7 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re
...
@@ -599,7 +599,7 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re
/*=== giaAbs.c ===========================================================*/
/*=== giaAbs.c ===========================================================*/
extern
void
Gia_ManCexAbstractionStart
(
Gia_Man_t
*
p
,
Gia_ParAbs_t
*
pPars
);
extern
void
Gia_ManCexAbstractionStart
(
Gia_Man_t
*
p
,
Gia_ParAbs_t
*
pPars
);
Gia_Man_t
*
Gia_ManCexAbstractionDerive
(
Gia_Man_t
*
pGia
);
Gia_Man_t
*
Gia_ManCexAbstractionDerive
(
Gia_Man_t
*
pGia
);
int
Gia_ManCexAbstractionRefine
(
Gia_Man_t
*
pGia
,
Abc_Cex_t
*
pCex
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
);
int
Gia_ManCexAbstractionRefine
(
Gia_Man_t
*
pGia
,
Abc_Cex_t
*
pCex
,
int
nFfToAddMax
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
);
extern
int
Gia_ManPbaPerform
(
Gia_Man_t
*
pGia
,
int
nStart
,
int
nFrames
,
int
nConfLimit
,
int
nTimeLimit
,
int
fVerbose
,
int
*
piFrame
);
extern
int
Gia_ManPbaPerform
(
Gia_Man_t
*
pGia
,
int
nStart
,
int
nFrames
,
int
nConfLimit
,
int
nTimeLimit
,
int
fVerbose
,
int
*
piFrame
);
extern
int
Gia_ManCbaPerform
(
Gia_Man_t
*
pGia
,
void
*
pPars
);
extern
int
Gia_ManCbaPerform
(
Gia_Man_t
*
pGia
,
void
*
pPars
);
/*=== giaAiger.c ===========================================================*/
/*=== giaAiger.c ===========================================================*/
...
...
src/aig/gia/giaAbs.c
View file @
8248691d
...
@@ -177,7 +177,7 @@ void Gia_ManCexAbstractionStart( Gia_Man_t * pGia, Gia_ParAbs_t * pPars )
...
@@ -177,7 +177,7 @@ void Gia_ManCexAbstractionStart( Gia_Man_t * pGia, Gia_ParAbs_t * pPars )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Gia_ManCexAbstractionRefine
(
Gia_Man_t
*
pGia
,
Abc_Cex_t
*
pCex
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
)
int
Gia_ManCexAbstractionRefine
(
Gia_Man_t
*
pGia
,
Abc_Cex_t
*
pCex
,
int
nFfToAddMax
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
)
{
{
Aig_Man_t
*
pNew
;
Aig_Man_t
*
pNew
;
Vec_Int_t
*
vFlops
;
Vec_Int_t
*
vFlops
;
...
@@ -188,7 +188,7 @@ int Gia_ManCexAbstractionRefine( Gia_Man_t * pGia, Abc_Cex_t * pCex, int fTryFou
...
@@ -188,7 +188,7 @@ int Gia_ManCexAbstractionRefine( Gia_Man_t * pGia, Abc_Cex_t * pCex, int fTryFou
}
}
pNew
=
Gia_ManToAig
(
pGia
,
0
);
pNew
=
Gia_ManToAig
(
pGia
,
0
);
vFlops
=
Gia_ManClasses2Flops
(
pGia
->
vFlopClasses
);
vFlops
=
Gia_ManClasses2Flops
(
pGia
->
vFlopClasses
);
if
(
!
Saig_ManCexRefineStep
(
pNew
,
vFlops
,
p
Ce
x
,
fTryFour
,
fSensePath
,
fVerbose
)
)
if
(
!
Saig_ManCexRefineStep
(
pNew
,
vFlops
,
p
Gia
->
vFlopClasses
,
pCex
,
nFfToAddMa
x
,
fTryFour
,
fSensePath
,
fVerbose
)
)
{
{
pGia
->
pCexSeq
=
pNew
->
pSeqModel
;
pNew
->
pSeqModel
=
NULL
;
pGia
->
pCexSeq
=
pNew
->
pSeqModel
;
pNew
->
pSeqModel
=
NULL
;
Vec_IntFree
(
vFlops
);
Vec_IntFree
(
vFlops
);
...
...
src/aig/saig/saig.h
View file @
8248691d
...
@@ -139,7 +139,7 @@ extern Vec_Int_t * Saig_ManCbaPerform( Aig_Man_t * pAig, int nInputs, Saig
...
@@ -139,7 +139,7 @@ extern Vec_Int_t * Saig_ManCbaPerform( Aig_Man_t * pAig, int nInputs, Saig
/*=== sswAbsPba.c ==========================================================*/
/*=== sswAbsPba.c ==========================================================*/
extern
Vec_Int_t
*
Saig_ManPbaDerive
(
Aig_Man_t
*
pAig
,
int
nInputs
,
int
nStart
,
int
nFrames
,
int
nConfLimit
,
int
nTimeLimit
,
int
fVerbose
,
int
*
piFrame
);
extern
Vec_Int_t
*
Saig_ManPbaDerive
(
Aig_Man_t
*
pAig
,
int
nInputs
,
int
nStart
,
int
nFrames
,
int
nConfLimit
,
int
nTimeLimit
,
int
fVerbose
,
int
*
piFrame
);
/*=== sswAbsStart.c ==========================================================*/
/*=== sswAbsStart.c ==========================================================*/
extern
int
Saig_ManCexRefineStep
(
Aig_Man_t
*
p
,
Vec_Int_t
*
vFlops
,
Abc_Cex_t
*
pCe
x
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
);
extern
int
Saig_ManCexRefineStep
(
Aig_Man_t
*
p
,
Vec_Int_t
*
vFlops
,
Vec_Int_t
*
vFlopClasses
,
Abc_Cex_t
*
pCex
,
int
nFfToAddMa
x
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
);
extern
Vec_Int_t
*
Saig_ManCexAbstractionFlops
(
Aig_Man_t
*
p
,
Gia_ParAbs_t
*
pPars
);
extern
Vec_Int_t
*
Saig_ManCexAbstractionFlops
(
Aig_Man_t
*
p
,
Gia_ParAbs_t
*
pPars
);
/*=== saigBmc.c ==========================================================*/
/*=== saigBmc.c ==========================================================*/
extern
int
Saig_ManBmcSimple
(
Aig_Man_t
*
pAig
,
int
nFrames
,
int
nSizeMax
,
int
nBTLimit
,
int
fRewrite
,
int
fVerbose
,
int
*
piFrame
,
int
nCofFanLit
);
extern
int
Saig_ManBmcSimple
(
Aig_Man_t
*
pAig
,
int
nFrames
,
int
nSizeMax
,
int
nBTLimit
,
int
fRewrite
,
int
fVerbose
,
int
*
piFrame
,
int
nCofFanLit
);
...
...
src/aig/saig/saigAbsStart.c
View file @
8248691d
...
@@ -168,7 +168,7 @@ Aig_Man_t * Saig_ManCexRefine( Aig_Man_t * p, Aig_Man_t * pAbs, Vec_Int_t * vFlo
...
@@ -168,7 +168,7 @@ Aig_Man_t * Saig_ManCexRefine( Aig_Man_t * p, Aig_Man_t * pAbs, Vec_Int_t * vFlo
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Saig_ManCexRefineStep
(
Aig_Man_t
*
p
,
Vec_Int_t
*
vFlops
,
Abc_Cex_t
*
pCe
x
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
)
int
Saig_ManCexRefineStep
(
Aig_Man_t
*
p
,
Vec_Int_t
*
vFlops
,
Vec_Int_t
*
vFlopClasses
,
Abc_Cex_t
*
pCex
,
int
nFfToAddMa
x
,
int
fTryFour
,
int
fSensePath
,
int
fVerbose
)
{
{
Aig_Man_t
*
pAbs
;
Aig_Man_t
*
pAbs
;
Vec_Int_t
*
vFlopsNew
;
Vec_Int_t
*
vFlopsNew
;
...
@@ -198,7 +198,25 @@ int Saig_ManCexRefineStep( Aig_Man_t * p, Vec_Int_t * vFlops, Abc_Cex_t * pCex,
...
@@ -198,7 +198,25 @@ int Saig_ManCexRefineStep( Aig_Man_t * p, Vec_Int_t * vFlops, Abc_Cex_t * pCex,
printf
(
"Adding %d registers to the abstraction (total = %d). "
,
Vec_IntSize
(
vFlopsNew
),
Aig_ManRegNum
(
p
)
+
Vec_IntSize
(
vFlopsNew
)
);
printf
(
"Adding %d registers to the abstraction (total = %d). "
,
Vec_IntSize
(
vFlopsNew
),
Aig_ManRegNum
(
p
)
+
Vec_IntSize
(
vFlopsNew
)
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
}
}
// vFlopsNew contains PI number that should be kept in pAbs
// vFlopsNew contains PI numbers that should be kept in pAbs
// select the most useful flops among those to be added
if
(
nFfToAddMax
>
0
&&
Vec_IntSize
(
vFlopsNew
)
>
nFfToAddMax
)
{
Vec_Int_t
*
vFlopsNewBest
;
// shift the indices
Vec_IntForEachEntry
(
vFlopsNew
,
Entry
,
i
)
Vec_IntAddToEntry
(
vFlopsNew
,
i
,
-
Saig_ManPiNum
(
p
)
);
// create new flops
vFlopsNewBest
=
Saig_ManCbaFilterFlops
(
p
,
pCex
,
vFlopClasses
,
vFlopsNew
,
nFfToAddMax
);
assert
(
Vec_IntSize
(
vFlopsNewBest
)
==
nFfToAddMax
);
printf
(
"Filtering flops based on cost (%d -> %d).
\n
"
,
Vec_IntSize
(
vFlopsNew
),
Vec_IntSize
(
vFlopsNewBest
)
);
// update
Vec_IntFree
(
vFlopsNew
);
vFlopsNew
=
vFlopsNewBest
;
// shift the indices
Vec_IntForEachEntry
(
vFlopsNew
,
Entry
,
i
)
Vec_IntAddToEntry
(
vFlopsNew
,
i
,
Saig_ManPiNum
(
p
)
);
}
// add to the abstraction
// add to the abstraction
Vec_IntForEachEntry
(
vFlopsNew
,
Entry
,
i
)
Vec_IntForEachEntry
(
vFlopsNew
,
Entry
,
i
)
{
{
...
...
src/base/abci/abc.c
View file @
8248691d
...
@@ -28408,15 +28408,27 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -28408,15 +28408,27 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
{
{
Gia_Man_t
*
pTemp
=
NULL
;
Gia_Man_t
*
pTemp
=
NULL
;
int
c
;
int
c
;
int
nFfToAddMax
=
0
;
int
fTryFour
=
1
;
int
fTryFour
=
1
;
int
fSensePath
=
0
;
int
fSensePath
=
0
;
int
fVerbose
=
0
;
int
fVerbose
=
0
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"tsvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"
M
tsvh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
case
'M'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-M
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nFfToAddMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nFfToAddMax
<
0
)
goto
usage
;
break
;
case
't'
:
case
't'
:
fTryFour
^=
1
;
fTryFour
^=
1
;
break
;
break
;
...
@@ -28447,13 +28459,14 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -28447,13 +28459,14 @@ int Abc_CommandAbc9AbsRefine( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
-
1
,
"Abc_CommandAbc9AbsRefine(): There is no counter-example.
\n
"
);
Abc_Print
(
-
1
,
"Abc_CommandAbc9AbsRefine(): There is no counter-example.
\n
"
);
return
1
;
return
1
;
}
}
pAbc
->
Status
=
Gia_ManCexAbstractionRefine
(
pAbc
->
pGia
,
pAbc
->
pCex
,
fTryFour
,
fSensePath
,
fVerbose
);
pAbc
->
Status
=
Gia_ManCexAbstractionRefine
(
pAbc
->
pGia
,
pAbc
->
pCex
,
nFfToAddMax
,
fTryFour
,
fSensePath
,
fVerbose
);
Abc_FrameReplaceCex
(
pAbc
,
&
pAbc
->
pGia
->
pCexSeq
);
Abc_FrameReplaceCex
(
pAbc
,
&
pAbc
->
pGia
->
pCexSeq
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &abs_refine [-tsvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &abs_refine [-
M <num>] [-
tsvh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
refines the pre-computed flop map using the counter-example
\n
"
);
Abc_Print
(
-
2
,
"
\t
refines the pre-computed flop map using the counter-example
\n
"
);
Abc_Print
(
-
2
,
"
\t
-M num : the max number of flops to add (0 = not used) [default = %d]
\n
"
,
nFfToAddMax
);
Abc_Print
(
-
2
,
"
\t
-t : toggle trying four abstractions instead of one [default = %s]
\n
"
,
fTryFour
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-t : toggle trying four abstractions instead of one [default = %s]
\n
"
,
fTryFour
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using the path sensitization algorithm [default = %s]
\n
"
,
fSensePath
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle using the path sensitization algorithm [default = %s]
\n
"
,
fSensePath
?
"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"
);
...
...
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