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
3c43fbba
Commit
3c43fbba
authored
Jul 05, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Other improvements to &vta and &gla.
parent
ce6e6551
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
21 deletions
+34
-21
src/aig/gia/gia.h
+3
-1
src/aig/gia/giaAbsGla.c
+26
-18
src/aig/gia/giaAbsVta.c
+0
-0
src/aig/gia/giaMan.c
+5
-2
src/base/abci/abc.c
+0
-0
No files found.
src/aig/gia/gia.h
View file @
3c43fbba
...
...
@@ -213,6 +213,7 @@ struct Gia_ParVta_t_
int
fUseTermVars
;
// use terminal variables
int
fUseRollback
;
// use rollback to the starting number of frames
int
fPropFanout
;
// propagate fanout implications
int
fAddLayer
;
// refinement strategy by adding layers
int
fDumpVabs
;
// dumps the abstracted model
char
*
pFileVabs
;
// dumps the abstracted model into this file
int
fVerbose
;
// verbose flag
...
...
@@ -704,7 +705,8 @@ extern int Gia_GlaPerform( Gia_Man_t * p, Gia_ParVta_t * pPars,
extern
void
Gia_VtaSetDefaultParams
(
Gia_ParVta_t
*
p
);
extern
Vec_Ptr_t
*
Gia_VtaAbsToFrames
(
Vec_Int_t
*
vAbs
);
extern
Vec_Int_t
*
Gia_VtaFramesToAbs
(
Vec_Vec_t
*
vFrames
);
extern
Vec_Int_t
*
Gia_VtaConvertToGla
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vAbs
);
extern
Vec_Int_t
*
Gia_VtaConvertToGla
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vVta
);
extern
Vec_Int_t
*
Gia_VtaConvertFromGla
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vGla
,
int
nFrames
);
extern
int
Gia_VtaPerform
(
Gia_Man_t
*
pAig
,
Gia_ParVta_t
*
pPars
);
/*=== giaAiger.c ===========================================================*/
extern
int
Gia_FileSize
(
char
*
pFileName
);
...
...
src/aig/gia/giaAbsGla.c
View file @
3c43fbba
...
...
@@ -445,7 +445,7 @@ void Gla_ManCollect( Gla_Man_t * p, Vec_Int_t * vPis, Vec_Int_t * vPPis, Vec_Int
***********************************************************************/
void
Gia_ManRefSetAndPropFanout_rec
(
Gla_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
int
f
,
Vec_Int_t
*
vSelect
,
int
Sign
)
{
int
i
,
Id
=
Gia_ObjId
(
p
->
pGia
,
pObj
);
int
i
;
//
, Id = Gia_ObjId(p->pGia, pObj);
Rfn_Obj_t
*
pRef0
,
*
pRef1
,
*
pRef
=
Gla_ObjRef
(
p
,
pObj
,
f
);
Gia_Obj_t
*
pFanout
;
int
k
;
...
...
@@ -506,7 +506,7 @@ void Gia_ManRefSetAndPropFanout_rec( Gla_Man_t * p, Gia_Obj_t * pObj, int f, Vec
***********************************************************************/
void
Gla_ManRefSelect_rec
(
Gla_Man_t
*
p
,
Gia_Obj_t
*
pObj
,
int
f
,
Vec_Int_t
*
vSelect
,
int
Sign
)
{
int
i
,
Id
=
Gia_ObjId
(
p
->
pGia
,
pObj
);
int
i
;
//
, Id = Gia_ObjId(p->pGia, pObj);
Rfn_Obj_t
*
pRef
=
Gla_ObjRef
(
p
,
pObj
,
f
);
assert
(
(
int
)
pRef
->
Sign
==
Sign
);
if
(
pRef
->
fVisit
)
...
...
@@ -1100,6 +1100,8 @@ Gla_Man_t * Gla_ManStart( Gia_Man_t * pGia0, Gia_ParVta_t * pPars )
// other
p
->
vCla2Obj
=
Vec_IntAlloc
(
1000
);
Vec_IntPush
(
p
->
vCla2Obj
,
-
1
);
p
->
pSat
=
sat_solver2_new
();
// p->pSat->fVerbose = p->pPars->fVerbose;
sat_solver2_set_learntmax
(
p
->
pSat
,
pPars
->
nLearntMax
);
p
->
nSatVars
=
1
;
return
p
;
}
...
...
@@ -1214,7 +1216,7 @@ void Gla_ManStop( Gla_Man_t * p )
Gla_Obj_t
*
pGla
;
int
i
;
// if ( p->pPars->fVerbose )
Abc_Print
(
1
,
"SAT solver: Vars = %d
. Clauses = %d. Confs = %d. Cexes = %d. Obj
Added = %d
\n
"
,
Abc_Print
(
1
,
"SAT solver: Vars = %d
Clauses = %d Confs = %d Cexes = %d Objs
Added = %d
\n
"
,
sat_solver2_nvars
(
p
->
pSat
),
sat_solver2_nclauses
(
p
->
pSat
),
sat_solver2_nconflicts
(
p
->
pSat
),
p
->
nCexes
,
p
->
nObjAdded
);
for
(
i
=
0
;
i
<
Gia_ManObjNum
(
p
->
pGia
);
i
++
)
ABC_FREE
(
p
->
pvRefis
[
i
].
pArray
);
...
...
@@ -1754,8 +1756,6 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
clk
=
clock
();
p
=
Gla_ManStart
(
pAig
,
pPars
);
p
->
timeInit
=
clock
()
-
clk
;
p
->
pSat
->
fVerbose
=
p
->
pPars
->
fVerbose
;
sat_solver2_set_learntmax
(
p
->
pSat
,
pPars
->
nLearntMax
);
// set runtime limit
if
(
p
->
pPars
->
nTimeOut
)
sat_solver2_set_runtime_limit
(
p
->
pSat
,
time
(
NULL
)
+
p
->
pPars
->
nTimeOut
-
1
);
...
...
@@ -1763,21 +1763,23 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
if
(
p
->
pPars
->
fVerbose
)
{
Abc_Print
(
1
,
"Running gate-level abstraction (GLA) with the following parameters:
\n
"
);
Abc_Print
(
1
,
"Frame
Start = %d FrameMax = %d Conf = %d Timeout = %d.
RatioMin = %d %%.
\n
"
,
p
->
pPars
->
nFramesStart
,
p
->
pPars
->
nFramesMax
,
p
->
pPars
->
nConfLimit
,
p
->
pPars
->
nTimeOut
,
pPars
->
nRatioMin
);
Abc_Print
(
1
,
"Frame %% Abs PPI FF
AND
Confl Cex SatVar Core Time
\n
"
);
Abc_Print
(
1
,
"Frame
Max = %d ConfMax = %d LearnMax = %d Timeout = %d
RatioMin = %d %%.
\n
"
,
p
Pars
->
nFramesMax
,
pPars
->
nConfLimit
,
pPars
->
nLearntMax
,
pPars
->
nTimeOut
,
pPars
->
nRatioMin
);
Abc_Print
(
1
,
"Frame %% Abs PPI FF
LUT
Confl Cex SatVar Core Time
\n
"
);
}
for
(
f
=
i
=
0
;
!
p
->
pPars
->
nFramesMax
||
f
<
p
->
pPars
->
nFramesMax
;
f
++
)
{
int
nConflsBeg
=
sat_solver2_nconflicts
(
p
->
pSat
);
p
->
pPars
->
iFrame
=
f
;
// load timeframe
Gia_GlaAddTimeFrame
(
p
,
f
);
// create bookmark to be used for rollback
// sat_solver2_reducedb( p->pSat );
sat_solver2_bookmark
(
p
->
pSat
);
Vec_IntClear
(
p
->
vAddedNew
);
p
->
nAbsOld
=
Vec_IntSize
(
p
->
vAbs
);
// iterate as long as there are counter-examples
for
(
i
=
0
;
;
i
++
)
{
...
...
@@ -1805,17 +1807,20 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
p
->
nCexes
++
;
// perform the refinement
clk2
=
clock
();
vPPis
=
Gla_ManRefinement
(
p
);
if
(
vPPis
==
NULL
)
if
(
pPars
->
fAddLayer
)
{
pCex
=
p
->
pGia
->
pCexSeq
;
p
->
pGia
->
pCexSeq
=
NULL
;
break
;
vPPis
=
Gla_ManCollectPPis
(
p
,
NULL
);
// Gla_ManExplorePPis( p, vPPis );
}
else
{
vPPis
=
Gla_ManRefinement
(
p
);
if
(
vPPis
==
NULL
)
{
pCex
=
p
->
pGia
->
pCexSeq
;
p
->
pGia
->
pCexSeq
=
NULL
;
break
;
}
}
// vPPis = Gla_ManCollectPPis( p, NULL );
// Gla_ManExplorePPis( p, vPPis );
Gia_GlaAddToAbs
(
p
,
vPPis
,
1
);
Gia_GlaAddOneSlice
(
p
,
f
,
vPPis
);
Vec_IntFree
(
vPPis
);
...
...
@@ -1905,7 +1910,10 @@ finish:
Abc_Print
(
1
,
"Abstraction stopped for unknown reason in frame %d. "
,
f
);
}
else
{
p
->
pPars
->
iFrame
++
;
Abc_Print
(
1
,
"SAT solver completed %d frames and produced an abstraction. "
,
f
);
}
}
else
{
...
...
src/aig/gia/giaAbsVta.c
View file @
3c43fbba
This diff is collapsed.
Click to expand it.
src/aig/gia/giaMan.c
View file @
3c43fbba
...
...
@@ -202,6 +202,7 @@ void Gia_ManPrintFlopClasses( Gia_Man_t * p )
void
Gia_ManPrintGateClasses
(
Gia_Man_t
*
p
)
{
Vec_Int_t
*
vPis
,
*
vPPis
,
*
vFlops
,
*
vNodes
;
int
nTotal
;
if
(
p
->
vGateClasses
==
NULL
)
return
;
if
(
Vec_IntSize
(
p
->
vGateClasses
)
!=
Gia_ManObjNum
(
p
)
)
...
...
@@ -211,10 +212,12 @@ void Gia_ManPrintGateClasses( Gia_Man_t * p )
}
// create additional arrays
Gia_ManGlaCollect
(
p
,
p
->
vGateClasses
,
&
vPis
,
&
vPPis
,
&
vFlops
,
&
vNodes
);
printf
(
"Gate-level abstraction: PI = %d PPI = %d FF = %d (%.2f %%) AND = %d (%.2f %%)
\n
"
,
nTotal
=
1
+
Vec_IntSize
(
vFlops
)
+
Vec_IntSize
(
vNodes
);
printf
(
"Gate-level abstraction: PI = %d PPI = %d FF = %d (%.2f %%) AND = %d (%.2f %%) Obj = %d (%.2f %%)
\n
"
,
Vec_IntSize
(
vPis
),
Vec_IntSize
(
vPPis
),
Vec_IntSize
(
vFlops
),
100
.
0
*
Vec_IntSize
(
vFlops
)
/
(
Gia_ManRegNum
(
p
)
+
1
),
Vec_IntSize
(
vNodes
),
100
.
0
*
Vec_IntSize
(
vNodes
)
/
(
Gia_ManAndNum
(
p
)
+
1
)
);
Vec_IntSize
(
vNodes
),
100
.
0
*
Vec_IntSize
(
vNodes
)
/
(
Gia_ManAndNum
(
p
)
+
1
),
nTotal
,
100
.
0
*
nTotal
/
(
Gia_ManRegNum
(
p
)
+
Gia_ManAndNum
(
p
)
+
1
)
);
Vec_IntFree
(
vPis
);
Vec_IntFree
(
vPPis
);
Vec_IntFree
(
vFlops
);
...
...
src/base/abci/abc.c
View file @
3c43fbba
This diff is collapsed.
Click to expand it.
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