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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
257 additions
and
188 deletions
+257
-188
src/aig/gia/gia.h
+3
-1
src/aig/gia/giaAbsGla.c
+26
-18
src/aig/gia/giaAbsVta.c
+132
-138
src/aig/gia/giaMan.c
+5
-2
src/base/abci/abc.c
+91
-29
No files found.
src/aig/gia/gia.h
View file @
3c43fbba
...
@@ -213,6 +213,7 @@ struct Gia_ParVta_t_
...
@@ -213,6 +213,7 @@ struct Gia_ParVta_t_
int
fUseTermVars
;
// use terminal variables
int
fUseTermVars
;
// use terminal variables
int
fUseRollback
;
// use rollback to the starting number of frames
int
fUseRollback
;
// use rollback to the starting number of frames
int
fPropFanout
;
// propagate fanout implications
int
fPropFanout
;
// propagate fanout implications
int
fAddLayer
;
// refinement strategy by adding layers
int
fDumpVabs
;
// dumps the abstracted model
int
fDumpVabs
;
// dumps the abstracted model
char
*
pFileVabs
;
// dumps the abstracted model into this file
char
*
pFileVabs
;
// dumps the abstracted model into this file
int
fVerbose
;
// verbose flag
int
fVerbose
;
// verbose flag
...
@@ -704,7 +705,8 @@ extern int Gia_GlaPerform( Gia_Man_t * p, Gia_ParVta_t * pPars,
...
@@ -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
void
Gia_VtaSetDefaultParams
(
Gia_ParVta_t
*
p
);
extern
Vec_Ptr_t
*
Gia_VtaAbsToFrames
(
Vec_Int_t
*
vAbs
);
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_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
);
extern
int
Gia_VtaPerform
(
Gia_Man_t
*
pAig
,
Gia_ParVta_t
*
pPars
);
/*=== giaAiger.c ===========================================================*/
/*=== giaAiger.c ===========================================================*/
extern
int
Gia_FileSize
(
char
*
pFileName
);
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
...
@@ -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
)
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
);
Rfn_Obj_t
*
pRef0
,
*
pRef1
,
*
pRef
=
Gla_ObjRef
(
p
,
pObj
,
f
);
Gia_Obj_t
*
pFanout
;
Gia_Obj_t
*
pFanout
;
int
k
;
int
k
;
...
@@ -506,7 +506,7 @@ void Gia_ManRefSetAndPropFanout_rec( Gla_Man_t * p, Gia_Obj_t * pObj, int f, Vec
...
@@ -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
)
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
);
Rfn_Obj_t
*
pRef
=
Gla_ObjRef
(
p
,
pObj
,
f
);
assert
(
(
int
)
pRef
->
Sign
==
Sign
);
assert
(
(
int
)
pRef
->
Sign
==
Sign
);
if
(
pRef
->
fVisit
)
if
(
pRef
->
fVisit
)
...
@@ -1100,6 +1100,8 @@ Gla_Man_t * Gla_ManStart( Gia_Man_t * pGia0, Gia_ParVta_t * pPars )
...
@@ -1100,6 +1100,8 @@ Gla_Man_t * Gla_ManStart( Gia_Man_t * pGia0, Gia_ParVta_t * pPars )
// other
// other
p
->
vCla2Obj
=
Vec_IntAlloc
(
1000
);
Vec_IntPush
(
p
->
vCla2Obj
,
-
1
);
p
->
vCla2Obj
=
Vec_IntAlloc
(
1000
);
Vec_IntPush
(
p
->
vCla2Obj
,
-
1
);
p
->
pSat
=
sat_solver2_new
();
p
->
pSat
=
sat_solver2_new
();
// p->pSat->fVerbose = p->pPars->fVerbose;
sat_solver2_set_learntmax
(
p
->
pSat
,
pPars
->
nLearntMax
);
p
->
nSatVars
=
1
;
p
->
nSatVars
=
1
;
return
p
;
return
p
;
}
}
...
@@ -1214,7 +1216,7 @@ void Gla_ManStop( Gla_Man_t * p )
...
@@ -1214,7 +1216,7 @@ void Gla_ManStop( Gla_Man_t * p )
Gla_Obj_t
*
pGla
;
Gla_Obj_t
*
pGla
;
int
i
;
int
i
;
// if ( p->pPars->fVerbose )
// 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
);
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
++
)
for
(
i
=
0
;
i
<
Gia_ManObjNum
(
p
->
pGia
);
i
++
)
ABC_FREE
(
p
->
pvRefis
[
i
].
pArray
);
ABC_FREE
(
p
->
pvRefis
[
i
].
pArray
);
...
@@ -1754,8 +1756,6 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
...
@@ -1754,8 +1756,6 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
clk
=
clock
();
clk
=
clock
();
p
=
Gla_ManStart
(
pAig
,
pPars
);
p
=
Gla_ManStart
(
pAig
,
pPars
);
p
->
timeInit
=
clock
()
-
clk
;
p
->
timeInit
=
clock
()
-
clk
;
p
->
pSat
->
fVerbose
=
p
->
pPars
->
fVerbose
;
sat_solver2_set_learntmax
(
p
->
pSat
,
pPars
->
nLearntMax
);
// set runtime limit
// set runtime limit
if
(
p
->
pPars
->
nTimeOut
)
if
(
p
->
pPars
->
nTimeOut
)
sat_solver2_set_runtime_limit
(
p
->
pSat
,
time
(
NULL
)
+
p
->
pPars
->
nTimeOut
-
1
);
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 )
...
@@ -1763,21 +1763,23 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
if
(
p
->
pPars
->
fVerbose
)
if
(
p
->
pPars
->
fVerbose
)
{
{
Abc_Print
(
1
,
"Running gate-level abstraction (GLA) with the following parameters:
\n
"
);
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
"
,
Abc_Print
(
1
,
"Frame
Max = %d ConfMax = %d LearnMax = %d Timeout = %d
RatioMin = %d %%.
\n
"
,
p
->
pPars
->
nFramesStart
,
p
->
pPars
->
nFramesMax
,
p
->
pPars
->
nConfLimit
,
p
->
pPars
->
nTimeOut
,
pPars
->
nRatioMin
);
p
Pars
->
nFramesMax
,
pPars
->
nConfLimit
,
pPars
->
nLearntMax
,
pPars
->
nTimeOut
,
pPars
->
nRatioMin
);
Abc_Print
(
1
,
"Frame %% Abs PPI FF
AND
Confl Cex SatVar Core Time
\n
"
);
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
++
)
for
(
f
=
i
=
0
;
!
p
->
pPars
->
nFramesMax
||
f
<
p
->
pPars
->
nFramesMax
;
f
++
)
{
{
int
nConflsBeg
=
sat_solver2_nconflicts
(
p
->
pSat
);
int
nConflsBeg
=
sat_solver2_nconflicts
(
p
->
pSat
);
p
->
pPars
->
iFrame
=
f
;
p
->
pPars
->
iFrame
=
f
;
// load timeframe
// load timeframe
Gia_GlaAddTimeFrame
(
p
,
f
);
Gia_GlaAddTimeFrame
(
p
,
f
);
// create bookmark to be used for rollback
// create bookmark to be used for rollback
// sat_solver2_reducedb( p->pSat );
sat_solver2_bookmark
(
p
->
pSat
);
sat_solver2_bookmark
(
p
->
pSat
);
Vec_IntClear
(
p
->
vAddedNew
);
Vec_IntClear
(
p
->
vAddedNew
);
p
->
nAbsOld
=
Vec_IntSize
(
p
->
vAbs
);
p
->
nAbsOld
=
Vec_IntSize
(
p
->
vAbs
);
// iterate as long as there are counter-examples
// iterate as long as there are counter-examples
for
(
i
=
0
;
;
i
++
)
for
(
i
=
0
;
;
i
++
)
{
{
...
@@ -1805,17 +1807,20 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
...
@@ -1805,17 +1807,20 @@ int Gia_GlaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars, int fStartVta )
p
->
nCexes
++
;
p
->
nCexes
++
;
// perform the refinement
// perform the refinement
clk2
=
clock
();
clk2
=
clock
();
if
(
pPars
->
fAddLayer
)
vPPis
=
Gla_ManRefinement
(
p
);
if
(
vPPis
==
NULL
)
{
{
pCex
=
p
->
pGia
->
pCexSeq
;
p
->
pGia
->
pCexSeq
=
NULL
;
vPPis
=
Gla_ManCollectPPis
(
p
,
NULL
);
break
;
// 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_GlaAddToAbs
(
p
,
vPPis
,
1
);
Gia_GlaAddOneSlice
(
p
,
f
,
vPPis
);
Gia_GlaAddOneSlice
(
p
,
f
,
vPPis
);
Vec_IntFree
(
vPPis
);
Vec_IntFree
(
vPPis
);
...
@@ -1905,7 +1910,10 @@ finish:
...
@@ -1905,7 +1910,10 @@ finish:
Abc_Print
(
1
,
"Abstraction stopped for unknown reason in frame %d. "
,
f
);
Abc_Print
(
1
,
"Abstraction stopped for unknown reason in frame %d. "
,
f
);
}
}
else
else
{
p
->
pPars
->
iFrame
++
;
Abc_Print
(
1
,
"SAT solver completed %d frames and produced an abstraction. "
,
f
);
Abc_Print
(
1
,
"SAT solver completed %d frames and produced an abstraction. "
,
f
);
}
}
}
else
else
{
{
...
...
src/aig/gia/giaAbsVta.c
View file @
3c43fbba
...
@@ -61,6 +61,7 @@ struct Vta_Man_t_
...
@@ -61,6 +61,7 @@ struct Vta_Man_t_
Vec_Ptr_t
*
vFrames
;
// start abstraction for each frame
Vec_Ptr_t
*
vFrames
;
// start abstraction for each frame
int
nWords
;
// the number of words in the record
int
nWords
;
// the number of words in the record
int
nCexes
;
// the number of CEXes
int
nCexes
;
// the number of CEXes
int
nObjAdded
;
// objects added to the abstraction
Vec_Int_t
*
vSeens
;
// seen objects
Vec_Int_t
*
vSeens
;
// seen objects
Vec_Bit_t
*
vSeenGla
;
// seen objects in all frames
Vec_Bit_t
*
vSeenGla
;
// seen objects in all frames
int
nSeenGla
;
// seen objects in all frames
int
nSeenGla
;
// seen objects in all frames
...
@@ -149,10 +150,10 @@ void Gia_VtaSetDefaultParams( Gia_ParVta_t * p )
...
@@ -149,10 +150,10 @@ void Gia_VtaSetDefaultParams( Gia_ParVta_t * p )
{
{
memset
(
p
,
0
,
sizeof
(
Gia_ParVta_t
)
);
memset
(
p
,
0
,
sizeof
(
Gia_ParVta_t
)
);
p
->
nFramesMax
=
0
;
// maximum frames
p
->
nFramesMax
=
0
;
// maximum frames
p
->
nFramesStart
=
5
;
// starting frame
p
->
nFramesStart
=
0
;
// starting frame
p
->
nFramesPast
=
4
;
// overlap frames
p
->
nFramesPast
=
4
;
// overlap frames
p
->
nConfLimit
=
0
;
// conflict limit
p
->
nConfLimit
=
0
;
// conflict limit
p
->
nLearntMax
=
15
000
;
// max number of learned clauses
p
->
nLearntMax
=
1
000
;
// max number of learned clauses
p
->
nTimeOut
=
0
;
// timeout in seconds
p
->
nTimeOut
=
0
;
// timeout in seconds
p
->
nRatioMin
=
10
;
// stop when less than this % of object is abstracted
p
->
nRatioMin
=
10
;
// stop when less than this % of object is abstracted
p
->
fUseTermVars
=
1
;
// use terminal variables
p
->
fUseTermVars
=
1
;
// use terminal variables
...
@@ -236,31 +237,31 @@ Vec_Int_t * Gia_VtaFramesToAbs( Vec_Vec_t * vFrames )
...
@@ -236,31 +237,31 @@ Vec_Int_t * Gia_VtaFramesToAbs( Vec_Vec_t * vFrames )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
Vec_Int_t
*
Gia_VtaConvertToGla
(
Gia_Man_t
*
p
,
Vec_Int_t
*
v
Abs
)
Vec_Int_t
*
Gia_VtaConvertToGla
(
Gia_Man_t
*
p
,
Vec_Int_t
*
v
Vta
)
{
{
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
Vec_Int_t
*
v
Present
;
Vec_Int_t
*
v
Gla
;
int
nObjMask
,
nObjs
=
Gia_ManObjNum
(
p
);
int
nObjMask
,
nObjs
=
Gia_ManObjNum
(
p
);
int
i
,
Entry
,
nFrames
=
Vec_IntEntry
(
v
Abs
,
0
);
int
i
,
Entry
,
nFrames
=
Vec_IntEntry
(
v
Vta
,
0
);
assert
(
Vec_IntEntry
(
v
Abs
,
nFrames
+
1
)
==
Vec_IntSize
(
vAbs
)
);
assert
(
Vec_IntEntry
(
v
Vta
,
nFrames
+
1
)
==
Vec_IntSize
(
vVta
)
);
// get the bitmask
// get the bitmask
nObjMask
=
(
1
<<
Abc_Base2Log
(
nObjs
))
-
1
;
nObjMask
=
(
1
<<
Abc_Base2Log
(
nObjs
))
-
1
;
assert
(
nObjs
<=
nObjMask
);
assert
(
nObjs
<=
nObjMask
);
// go through objects
// go through objects
v
Present
=
Vec_IntStart
(
nObjs
);
v
Gla
=
Vec_IntStart
(
nObjs
);
Vec_IntWriteEntry
(
v
Present
,
0
,
1
);
Vec_IntWriteEntry
(
v
Gla
,
0
,
1
);
Vec_IntForEachEntryStart
(
v
Abs
,
Entry
,
i
,
nFrames
+
2
)
Vec_IntForEachEntryStart
(
v
Vta
,
Entry
,
i
,
nFrames
+
2
)
{
{
pObj
=
Gia_ManObj
(
p
,
(
Entry
&
nObjMask
)
);
pObj
=
Gia_ManObj
(
p
,
(
Entry
&
nObjMask
)
);
assert
(
Gia_ObjIsRo
(
p
,
pObj
)
||
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsConst0
(
pObj
)
);
assert
(
Gia_ObjIsRo
(
p
,
pObj
)
||
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsConst0
(
pObj
)
);
Vec_IntWriteEntry
(
v
Present
,
(
Entry
&
nObjMask
),
1
);
Vec_IntWriteEntry
(
v
Gla
,
(
Entry
&
nObjMask
),
1
);
}
}
return
v
Present
;
return
v
Gla
;
}
}
/**Function*************************************************************
/**Function*************************************************************
Synopsis [
Detects how many frames are completed
.]
Synopsis [
Converting GLA vector to VTA vector
.]
Description []
Description []
...
@@ -269,26 +270,31 @@ Vec_Int_t * Gia_VtaConvertToGla( Gia_Man_t * p, Vec_Int_t * vAbs )
...
@@ -269,26 +270,31 @@ Vec_Int_t * Gia_VtaConvertToGla( Gia_Man_t * p, Vec_Int_t * vAbs )
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
static
inline
int
Vta_ManReadFrameStart
(
Vec_Int_t
*
p
,
int
nWord
s
)
Vec_Int_t
*
Gia_VtaConvertFromGla
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vGla
,
int
nFrame
s
)
{
{
unsigned
*
pTotal
,
*
pThis
;
Vec_Int_t
*
vVta
;
int
i
,
w
,
nObjs
=
Vec_IntSize
(
p
)
/
nWords
;
int
nObjBits
,
nObjMask
,
nObjs
=
Gia_ManObjNum
(
p
);
assert
(
Vec_IntSize
(
p
)
%
nWords
==
0
);
int
i
,
k
,
j
,
Entry
,
Counter
,
nGlaSize
;
pTotal
=
ABC_CALLOC
(
unsigned
,
nWords
);
//. get the GLA size
for
(
i
=
0
;
i
<
nObjs
;
i
++
)
nGlaSize
=
Vec_IntSum
(
vGla
);
{
// get the bitmask
pThis
=
(
unsigned
*
)
Vec_IntEntryP
(
p
,
nWords
*
i
);
nObjBits
=
Abc_Base2Log
(
nObjs
);
for
(
w
=
0
;
w
<
nWords
;
w
++
)
nObjMask
=
(
1
<<
Abc_Base2Log
(
nObjs
))
-
1
;
pTotal
[
w
]
|=
pThis
[
i
];
assert
(
nObjs
<=
nObjMask
);
}
// go through objects
for
(
i
=
nWords
*
32
-
1
;
i
>=
0
;
i
--
)
vVta
=
Vec_IntAlloc
(
1000
);
if
(
Abc_InfoHasBit
(
pTotal
,
i
)
)
Vec_IntPush
(
vVta
,
nFrames
);
{
Counter
=
nFrames
+
2
;
ABC_FREE
(
pTotal
);
for
(
i
=
0
;
i
<=
nFrames
;
i
++
,
Counter
+=
i
*
nGlaSize
)
return
i
+
1
;
Vec_IntPush
(
vVta
,
Counter
);
}
for
(
i
=
0
;
i
<
nFrames
;
i
++
)
ABC_FREE
(
pTotal
);
for
(
k
=
0
;
k
<=
i
;
k
++
)
return
-
1
;
Vec_IntForEachEntry
(
vGla
,
Entry
,
j
)
if
(
Entry
)
Vec_IntPush
(
vVta
,
(
k
<<
nObjBits
)
|
j
);
Counter
=
Vec_IntEntry
(
vVta
,
nFrames
+
1
);
assert
(
Vec_IntEntry
(
vVta
,
nFrames
+
1
)
==
Vec_IntSize
(
vVta
)
);
return
vVta
;
}
}
/**Function*************************************************************
/**Function*************************************************************
...
@@ -949,25 +955,28 @@ Abc_Cex_t * Vta_ManRefineAbstraction( Vta_Man_t * p, int f )
...
@@ -949,25 +955,28 @@ Abc_Cex_t * Vta_ManRefineAbstraction( Vta_Man_t * p, int f )
assert
(
0
);
assert
(
0
);
}
}
// mark those currently included
if
(
p
->
pPars
->
fAddLayer
)
Vta_ManForEachObjVec
(
vTermsToAdd
,
p
,
pThis
,
i
)
{
assert
(
pThis
->
fVisit
==
0
);
pThis
->
fVisit
=
1
;
}
// add used terms, which have close relationship
Counter
=
Vec_IntSize
(
vTermsToAdd
);
Vec_PtrForEachEntry
(
Vta_Obj_t
*
,
vTermsUsed
,
pThis
,
i
)
{
{
if
(
pThis
->
fVisit
)
// mark those currently included
continue
;
Vta_ManForEachObjVec
(
vTermsToAdd
,
p
,
pThis
,
i
)
// Vta_ObjPreds( p, pThis, Gia_ManObj(p->pGia, pThis->iObj), &pThis0, &pThis1 );
{
// if ( (pThis0 && (pThis0->fAdded || pThis0->fVisit)) || (pThis1 && (pThis1->fAdded || pThis1->fVisit)) )
assert
(
pThis
->
fVisit
==
0
);
Vec_IntPush
(
vTermsToAdd
,
Vta_ObjId
(
p
,
pThis
)
);
pThis
->
fVisit
=
1
;
}
// add used terms, which have close relationship
Counter
=
Vec_IntSize
(
vTermsToAdd
);
Vec_PtrForEachEntry
(
Vta_Obj_t
*
,
vTermsUsed
,
pThis
,
i
)
{
if
(
pThis
->
fVisit
)
continue
;
// Vta_ObjPreds( p, pThis, Gia_ManObj(p->pGia, pThis->iObj), &pThis0, &pThis1 );
// if ( (pThis0 && (pThis0->fAdded || pThis0->fVisit)) || (pThis1 && (pThis1->fAdded || pThis1->fVisit)) )
Vec_IntPush
(
vTermsToAdd
,
Vta_ObjId
(
p
,
pThis
)
);
}
// remove those currenty included
Vta_ManForEachObjVec
(
vTermsToAdd
,
p
,
pThis
,
i
)
pThis
->
fVisit
=
0
;
}
}
// remove those currenty included
Vta_ManForEachObjVec
(
vTermsToAdd
,
p
,
pThis
,
i
)
pThis
->
fVisit
=
0
;
// printf( "\n%d -> %d\n", Counter, Vec_IntSize(vTermsToAdd) );
// printf( "\n%d -> %d\n", Counter, Vec_IntSize(vTermsToAdd) );
//Vec_IntReverseOrder( vTermsToAdd );
//Vec_IntReverseOrder( vTermsToAdd );
//Vec_IntSort( vTermsToAdd, 1 );
//Vec_IntSort( vTermsToAdd, 1 );
...
@@ -1054,6 +1063,7 @@ Abc_Cex_t * Vta_ManRefineAbstraction( Vta_Man_t * p, int f )
...
@@ -1054,6 +1063,7 @@ Abc_Cex_t * Vta_ManRefineAbstraction( Vta_Man_t * p, int f )
Vga_ManAddClausesOne
(
p
,
pThis
->
iObj
,
pThis
->
iFrame
);
Vga_ManAddClausesOne
(
p
,
pThis
->
iObj
,
pThis
->
iFrame
);
sat_solver2_simplify
(
p
->
pSat
);
sat_solver2_simplify
(
p
->
pSat
);
}
}
p
->
nObjAdded
+=
Vec_IntSize
(
vTermsToAdd
);
Vec_IntFree
(
vTermsToAdd
);
Vec_IntFree
(
vTermsToAdd
);
return
pCex
;
return
pCex
;
}
}
...
@@ -1091,28 +1101,15 @@ Vta_Man_t * Vga_ManStart( Gia_Man_t * pGia, Gia_ParVta_t * pPars )
...
@@ -1091,28 +1101,15 @@ Vta_Man_t * Vga_ManStart( Gia_Man_t * pGia, Gia_ParVta_t * pPars )
p
->
vSeenGla
=
Vec_BitStart
(
Gia_ManObjNum
(
pGia
)
);
p
->
vSeenGla
=
Vec_BitStart
(
Gia_ManObjNum
(
pGia
)
);
p
->
nSeenGla
=
1
;
p
->
nSeenGla
=
1
;
p
->
nSeenAll
=
1
;
p
->
nSeenAll
=
1
;
// start the abstraction
if
(
pGia
->
vObjClasses
==
NULL
)
p
->
vFrames
=
Gia_ManUnrollAbs
(
pGia
,
pPars
->
nFramesStart
);
else
{
p
->
vFrames
=
Gia_VtaAbsToFrames
(
pGia
->
vObjClasses
);
// update parameters
if
(
pPars
->
nFramesStart
!=
Vec_PtrSize
(
p
->
vFrames
)
)
{
Abc_Print
(
1
,
"Starting frame count is changed to match the abstraction (from %d to %d).
\n
"
,
pPars
->
nFramesStart
,
Vec_PtrSize
(
p
->
vFrames
)
);
pPars
->
nFramesStart
=
Vec_PtrSize
(
p
->
vFrames
);
}
if
(
pPars
->
nFramesMax
&&
pPars
->
nFramesMax
<
pPars
->
nFramesStart
)
{
Abc_Print
(
1
,
"Maximum frame count is changed to match the starting frames (from %d to %d).
\n
"
,
pPars
->
nFramesMax
,
pPars
->
nFramesStart
);
pPars
->
nFramesMax
=
Abc_MaxInt
(
pPars
->
nFramesMax
,
pPars
->
nFramesStart
);
}
}
// other data
// other data
p
->
vCla2Var
=
Vec_IntAlloc
(
1000
);
Vec_IntPush
(
p
->
vCla2Var
,
-
1
);
p
->
vCla2Var
=
Vec_IntAlloc
(
1000
);
Vec_IntPush
(
p
->
vCla2Var
,
-
1
);
p
->
vCores
=
Vec_PtrAlloc
(
100
);
p
->
vCores
=
Vec_PtrAlloc
(
100
);
p
->
pSat
=
sat_solver2_new
();
p
->
pSat
=
sat_solver2_new
();
// p->pSat->fVerbose = p->pPars->fVerbose;
sat_solver2_set_learntmax
(
p
->
pSat
,
pPars
->
nLearntMax
);
// start the abstraction
assert
(
pGia
->
vObjClasses
!=
NULL
);
p
->
vFrames
=
Gia_VtaAbsToFrames
(
pGia
->
vObjClasses
);
p
->
vAddedNew
=
Vec_IntAlloc
(
1000
);
p
->
vAddedNew
=
Vec_IntAlloc
(
1000
);
return
p
;
return
p
;
}
}
...
@@ -1131,9 +1128,8 @@ Vta_Man_t * Vga_ManStart( Gia_Man_t * pGia, Gia_ParVta_t * pPars )
...
@@ -1131,9 +1128,8 @@ Vta_Man_t * Vga_ManStart( Gia_Man_t * pGia, Gia_ParVta_t * pPars )
void
Vga_ManStop
(
Vta_Man_t
*
p
)
void
Vga_ManStop
(
Vta_Man_t
*
p
)
{
{
// if ( p->pPars->fVerbose )
// if ( p->pPars->fVerbose )
Abc_Print
(
1
,
"SAT solver: Variables = %d. Clauses = %d. Conflicts = %d. Cexes = %d.
\n
"
,
Abc_Print
(
1
,
"SAT solver: Vars = %d Clauses = %d Confs = %d Cexes = %d ObjsAdded = %d
\n
"
,
sat_solver2_nvars
(
p
->
pSat
),
sat_solver2_nclauses
(
p
->
pSat
),
sat_solver2_nconflicts
(
p
->
pSat
),
p
->
nCexes
);
sat_solver2_nvars
(
p
->
pSat
),
sat_solver2_nclauses
(
p
->
pSat
),
sat_solver2_nconflicts
(
p
->
pSat
),
p
->
nCexes
,
p
->
nObjAdded
);
Vec_VecFreeP
(
(
Vec_Vec_t
**
)
&
p
->
vCores
);
Vec_VecFreeP
(
(
Vec_Vec_t
**
)
&
p
->
vCores
);
Vec_VecFreeP
(
(
Vec_Vec_t
**
)
&
p
->
vFrames
);
Vec_VecFreeP
(
(
Vec_Vec_t
**
)
&
p
->
vFrames
);
Vec_BitFreeP
(
&
p
->
vSeenGla
);
Vec_BitFreeP
(
&
p
->
vSeenGla
);
...
@@ -1624,8 +1620,6 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1624,8 +1620,6 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
// preconditions
// preconditions
assert
(
Gia_ManPoNum
(
pAig
)
==
1
);
assert
(
Gia_ManPoNum
(
pAig
)
==
1
);
assert
(
pPars
->
nFramesMax
==
0
||
pPars
->
nFramesStart
<=
pPars
->
nFramesMax
);
assert
(
pPars
->
nFramesMax
==
0
||
pPars
->
nFramesStart
<=
pPars
->
nFramesMax
);
/*
// compute intial abstraction
// compute intial abstraction
if
(
pAig
->
vObjClasses
==
NULL
)
if
(
pAig
->
vObjClasses
==
NULL
)
{
{
...
@@ -1635,11 +1629,8 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1635,11 +1629,8 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
Vec_IntPush
(
pAig
->
vObjClasses
,
4
);
Vec_IntPush
(
pAig
->
vObjClasses
,
4
);
Vec_IntPush
(
pAig
->
vObjClasses
,
Gia_ObjFaninId0p
(
pAig
,
Gia_ManPo
(
pAig
,
0
))
);
Vec_IntPush
(
pAig
->
vObjClasses
,
Gia_ObjFaninId0p
(
pAig
,
Gia_ManPo
(
pAig
,
0
))
);
}
}
*/
// start the manager
// start the manager
p
=
Vga_ManStart
(
pAig
,
pPars
);
p
=
Vga_ManStart
(
pAig
,
pPars
);
p
->
pSat
->
fVerbose
=
p
->
pPars
->
fVerbose
;
sat_solver2_set_learntmax
(
p
->
pSat
,
pPars
->
nLearntMax
);
// set runtime limit
// set runtime limit
if
(
p
->
pPars
->
nTimeOut
)
if
(
p
->
pPars
->
nTimeOut
)
sat_solver2_set_runtime_limit
(
p
->
pSat
,
time
(
NULL
)
+
p
->
pPars
->
nTimeOut
-
1
);
sat_solver2_set_runtime_limit
(
p
->
pSat
,
time
(
NULL
)
+
p
->
pPars
->
nTimeOut
-
1
);
...
@@ -1647,11 +1638,11 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1647,11 +1638,11 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
if
(
p
->
pPars
->
fVerbose
)
if
(
p
->
pPars
->
fVerbose
)
{
{
Abc_Print
(
1
,
"Running variable-timeframe abstraction (VTA) with the following parameters:
\n
"
);
Abc_Print
(
1
,
"Running variable-timeframe abstraction (VTA) with the following parameters:
\n
"
);
Abc_Print
(
1
,
"FrameStart = %d FramePast = %d FrameMax = %d Conf = %d Timeout = %d. RatioMin = %d %%.
\n
"
,
Abc_Print
(
1
,
"FramePast = %d FrameMax = %d ConfMax = %d LearnMax = %d Timeout = %d RatioMin = %d %%
\n
"
,
p
->
pPars
->
nFramesStart
,
p
->
pPars
->
nFramesPast
,
p
->
pPars
->
nFramesMax
,
pPars
->
nFramesPast
,
pPars
->
nFramesMax
,
pPars
->
nConfLimit
,
pPars
->
nLearntMax
,
pPars
->
nTimeOut
,
pPars
->
nRatioMin
);
p
->
pPars
->
nConfLimit
,
p
->
pPars
->
nTimeOut
,
pPars
->
nRatioMin
);
Abc_Print
(
1
,
"Frame %% Abs %% Confl Cex SatVar Core F0 F1 F2 ...
\n
"
);
Abc_Print
(
1
,
"Frame %% Abs %% Confl Cex SatVar Core F0 F1 F2 ...
\n
"
);
}
}
assert
(
Vec_PtrSize
(
p
->
vFrames
)
>
0
);
for
(
f
=
i
=
0
;
!
p
->
pPars
->
nFramesMax
||
f
<
p
->
pPars
->
nFramesMax
;
f
++
)
for
(
f
=
i
=
0
;
!
p
->
pPars
->
nFramesMax
||
f
<
p
->
pPars
->
nFramesMax
;
f
++
)
{
{
int
nConflsBeg
=
sat_solver2_nconflicts
(
p
->
pSat
);
int
nConflsBeg
=
sat_solver2_nconflicts
(
p
->
pSat
);
...
@@ -1659,72 +1650,72 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1659,72 +1650,72 @@ int Gia_VtaPerformInt( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
// realloc storage for abstraction marks
// realloc storage for abstraction marks
if
(
f
==
p
->
nWords
*
32
)
if
(
f
==
p
->
nWords
*
32
)
p
->
nWords
=
Vec_IntDoubleWidth
(
p
->
vSeens
,
p
->
nWords
);
p
->
nWords
=
Vec_IntDoubleWidth
(
p
->
vSeens
,
p
->
nWords
);
// check this timeframe
if
(
f
<
p
->
pPars
->
nFramesStart
)
// create bookmark to be used for rollback
{
nObjOld
=
p
->
nObjs
;
Vga_ManAddClausesOne
(
p
,
0
,
f
);
sat_solver2_bookmark
(
p
->
pSat
);
Vec_IntClear
(
p
->
vAddedNew
);
// load new timeframe
Vga_ManAddClausesOne
(
p
,
0
,
f
);
if
(
f
<
Vec_PtrSize
(
p
->
vFrames
)
)
Vga_ManLoadSlice
(
p
,
(
Vec_Int_t
*
)
Vec_PtrEntry
(
p
->
vFrames
,
f
),
0
);
Vga_ManLoadSlice
(
p
,
(
Vec_Int_t
*
)
Vec_PtrEntry
(
p
->
vFrames
,
f
),
0
);
}
else
else
{
{
// create bookmark to be used for rollback
for
(
i
=
1
;
i
<=
Abc_MinInt
(
p
->
pPars
->
nFramesPast
,
f
);
i
++
)
nObjOld
=
p
->
nObjs
;
// sat_solver2_reducedb( p->pSat );
sat_solver2_bookmark
(
p
->
pSat
);
Vec_IntClear
(
p
->
vAddedNew
);
// load the time frame
for
(
i
=
1
;
i
<=
Abc_MinInt
(
p
->
pPars
->
nFramesPast
,
p
->
pPars
->
nFramesStart
);
i
++
)
Vga_ManLoadSlice
(
p
,
(
Vec_Int_t
*
)
Vec_PtrEntry
(
p
->
vCores
,
f
-
i
),
i
);
Vga_ManLoadSlice
(
p
,
(
Vec_Int_t
*
)
Vec_PtrEntry
(
p
->
vCores
,
f
-
i
),
i
);
// iterate as long as there are counter-examples
}
for
(
i
=
0
;
;
i
++
)
{
// iterate as long as there are counter-examples
clk2
=
clock
();
for
(
i
=
0
;
;
i
++
)
vCore
=
Vta_ManUnsatCore
(
Vga_ManGetOutLit
(
p
,
f
),
p
->
vCla2Var
,
p
->
pSat
,
pPars
->
nConfLimit
,
pPars
->
fVerbose
,
&
Status
,
&
nConfls
);
{
assert
(
(
vCore
!=
NULL
)
==
(
Status
==
1
)
);
clk2
=
clock
();
if
(
Status
==
-
1
)
// resource limit is reached
vCore
=
Vta_ManUnsatCore
(
Vga_ManGetOutLit
(
p
,
f
),
p
->
vCla2Var
,
p
->
pSat
,
pPars
->
nConfLimit
,
pPars
->
fVerbose
,
&
Status
,
&
nConfls
);
{
assert
(
(
vCore
!=
NULL
)
==
(
Status
==
1
)
);
Vga_ManRollBack
(
p
,
nObjOld
);
if
(
Status
==
-
1
)
// resource limit is reached
goto
finish
;
{
}
Vga_ManRollBack
(
p
,
nObjOld
);
// check timeout
goto
finish
;
if
(
p
->
pSat
->
nRuntimeLimit
&&
time
(
NULL
)
>
p
->
pSat
->
nRuntimeLimit
)
}
{
// check timeout
Vga_ManRollBack
(
p
,
nObjOld
);
if
(
p
->
pSat
->
nRuntimeLimit
&&
time
(
NULL
)
>
p
->
pSat
->
nRuntimeLimit
)
goto
finish
;
{
}
Vga_ManRollBack
(
p
,
nObjOld
);
if
(
vCore
!=
NULL
)
goto
finish
;
{
}
p
->
timeUnsat
+=
clock
()
-
clk2
;
if
(
vCore
!=
NULL
)
break
;
{
}
p
->
timeUnsat
+=
clock
()
-
clk2
;
p
->
timeSat
+=
clock
()
-
clk2
;
break
;
assert
(
Status
==
0
);
}
p
->
nCexes
++
;
p
->
timeSat
+=
clock
()
-
clk2
;
// perform the refinement
assert
(
Status
==
0
);
clk2
=
clock
();
p
->
nCexes
++
;
pCex
=
Vta_ManRefineAbstraction
(
p
,
f
);
// perform the refinement
p
->
timeCex
+=
clock
()
-
clk2
;
clk2
=
clock
();
if
(
pCex
!=
NULL
)
pCex
=
Vta_ManRefineAbstraction
(
p
,
f
);
{
p
->
timeCex
+=
clock
()
-
clk2
;
RetValue
=
0
;
if
(
pCex
!=
NULL
)
goto
finish
;
{
}
RetValue
=
0
;
// print the result (do not count it towards change)
goto
finish
;
Vta_ManAbsPrintFrame
(
p
,
NULL
,
f
+
1
,
sat_solver2_nconflicts
(
p
->
pSat
)
-
nConflsBeg
,
i
,
clock
()
-
clk
,
p
->
pPars
->
fVerbose
);
}
}
assert
(
Status
==
1
);
// print the result (do not count it towards change)
// valid core is obtained
Vta_ManAbsPrintFrame
(
p
,
NULL
,
f
+
1
,
sat_solver2_nconflicts
(
p
->
pSat
)
-
nConflsBeg
,
i
,
clock
()
-
clk
,
p
->
pPars
->
fVerbose
);
Vta_ManUnsatCoreRemap
(
p
,
vCore
);
}
Vec_IntSort
(
vCore
,
1
);
assert
(
Status
==
1
);
// update the SAT solver
// valid core is obtained
sat_solver2_rollback
(
p
->
pSat
);
Vta_ManUnsatCoreRemap
(
p
,
vCore
);
// update storage
Vec_IntSort
(
vCore
,
1
);
Vga_ManRollBack
(
p
,
nObjOld
);
// update the SAT solver
Vec_IntShrink
(
p
->
vCla2Var
,
(
int
)
p
->
pSat
->
stats
.
clauses
+
1
);
sat_solver2_rollback
(
p
->
pSat
);
// load this timeframe
// update storage
Vga_ManLoadSlice
(
p
,
vCore
,
0
);
Vga_ManRollBack
(
p
,
nObjOld
);
Vec_IntFree
(
vCore
);
Vec_IntShrink
(
p
->
vCla2Var
,
(
int
)
p
->
pSat
->
stats
.
clauses
+
1
);
}
// load this timeframe
Vga_ManLoadSlice
(
p
,
vCore
,
0
);
Vec_IntFree
(
vCore
);
// run SAT solver
// run SAT solver
clk2
=
clock
();
clk2
=
clock
();
vCore
=
Vta_ManUnsatCore
(
Vga_ManGetOutLit
(
p
,
f
),
p
->
vCla2Var
,
p
->
pSat
,
pPars
->
nConfLimit
,
p
->
pPars
->
fVerbose
,
&
Status
,
&
nConfls
);
vCore
=
Vta_ManUnsatCore
(
Vga_ManGetOutLit
(
p
,
f
),
p
->
vCla2Var
,
p
->
pSat
,
pPars
->
nConfLimit
,
p
->
pPars
->
fVerbose
,
&
Status
,
&
nConfls
);
...
@@ -1808,7 +1799,10 @@ finish:
...
@@ -1808,7 +1799,10 @@ finish:
Abc_Print
(
1
,
"Abstraction stopped for unknown reason in frame %d. "
,
f
);
Abc_Print
(
1
,
"Abstraction stopped for unknown reason in frame %d. "
,
f
);
}
}
else
else
{
p
->
pPars
->
iFrame
++
;
Abc_Print
(
1
,
"SAT solver completed %d frames and produced an abstraction. "
,
f
);
Abc_Print
(
1
,
"SAT solver completed %d frames and produced an abstraction. "
,
f
);
}
}
}
}
}
else
else
...
...
src/aig/gia/giaMan.c
View file @
3c43fbba
...
@@ -202,6 +202,7 @@ void Gia_ManPrintFlopClasses( Gia_Man_t * p )
...
@@ -202,6 +202,7 @@ void Gia_ManPrintFlopClasses( Gia_Man_t * p )
void
Gia_ManPrintGateClasses
(
Gia_Man_t
*
p
)
void
Gia_ManPrintGateClasses
(
Gia_Man_t
*
p
)
{
{
Vec_Int_t
*
vPis
,
*
vPPis
,
*
vFlops
,
*
vNodes
;
Vec_Int_t
*
vPis
,
*
vPPis
,
*
vFlops
,
*
vNodes
;
int
nTotal
;
if
(
p
->
vGateClasses
==
NULL
)
if
(
p
->
vGateClasses
==
NULL
)
return
;
return
;
if
(
Vec_IntSize
(
p
->
vGateClasses
)
!=
Gia_ManObjNum
(
p
)
)
if
(
Vec_IntSize
(
p
->
vGateClasses
)
!=
Gia_ManObjNum
(
p
)
)
...
@@ -211,10 +212,12 @@ void Gia_ManPrintGateClasses( Gia_Man_t * p )
...
@@ -211,10 +212,12 @@ void Gia_ManPrintGateClasses( Gia_Man_t * p )
}
}
// create additional arrays
// create additional arrays
Gia_ManGlaCollect
(
p
,
p
->
vGateClasses
,
&
vPis
,
&
vPPis
,
&
vFlops
,
&
vNodes
);
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
(
vPis
),
Vec_IntSize
(
vPPis
),
Vec_IntSize
(
vFlops
),
100
.
0
*
Vec_IntSize
(
vFlops
)
/
(
Gia_ManRegNum
(
p
)
+
1
),
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
(
vPis
);
Vec_IntFree
(
vPPis
);
Vec_IntFree
(
vPPis
);
Vec_IntFree
(
vFlops
);
Vec_IntFree
(
vFlops
);
...
...
src/base/abci/abc.c
View file @
3c43fbba
...
@@ -352,6 +352,7 @@ static int Abc_CommandAbc9GlaPba ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -352,6 +352,7 @@ static int Abc_CommandAbc9GlaPba ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9Gla
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Gla
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Vta
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Vta
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Vta2Gla
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Vta2Gla
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Gla2Vta
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Reparam
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Reparam
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9BackReach
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9BackReach
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Posplit
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9Posplit
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
...
@@ -797,6 +798,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -797,6 +798,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla"
,
Abc_CommandAbc9Gla
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla"
,
Abc_CommandAbc9Gla
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&vta"
,
Abc_CommandAbc9Vta
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&vta"
,
Abc_CommandAbc9Vta
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&vta_gla"
,
Abc_CommandAbc9Vta2Gla
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&vta_gla"
,
Abc_CommandAbc9Vta2Gla
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_vta"
,
Abc_CommandAbc9Gla2Vta
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reparam"
,
Abc_CommandAbc9Reparam
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&reparam"
,
Abc_CommandAbc9Reparam
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&back_reach"
,
Abc_CommandAbc9BackReach
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&back_reach"
,
Abc_CommandAbc9BackReach
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&posplit"
,
Abc_CommandAbc9Posplit
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&posplit"
,
Abc_CommandAbc9Posplit
,
0
);
...
@@ -27384,10 +27386,8 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -27384,10 +27386,8 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_ParVta_t
Pars
,
*
pPars
=
&
Pars
;
Gia_ParVta_t
Pars
,
*
pPars
=
&
Pars
;
int
c
,
fStartVta
=
0
;
int
c
,
fStartVta
=
0
;
Gia_VtaSetDefaultParams
(
pPars
);
Gia_VtaSetDefaultParams
(
pPars
);
pPars
->
nFramesStart
=
30
;
pPars
->
nLearntMax
=
100000
;
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FSPCLTRAtrf
da
vh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FSPCLTRAtrf
kad
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -27486,11 +27486,14 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -27486,11 +27486,14 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'f'
:
case
'f'
:
pPars
->
fPropFanout
^=
1
;
pPars
->
fPropFanout
^=
1
;
break
;
break
;
case
'
d
'
:
case
'
k
'
:
pPars
->
fDumpVabs
^=
1
;
fStartVta
^=
1
;
break
;
break
;
case
'a'
:
case
'a'
:
fStartVta
^=
1
;
pPars
->
fAddLayer
^=
1
;
break
;
case
'd'
:
pPars
->
fDumpVabs
^=
1
;
break
;
break
;
case
'v'
:
case
'v'
:
pPars
->
fVerbose
^=
1
;
pPars
->
fVerbose
^=
1
;
...
@@ -27526,32 +27529,25 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -27526,32 +27529,25 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
1
,
"The starting frame is larger than the max number of frames.
\n
"
);
Abc_Print
(
1
,
"The starting frame is larger than the max number of frames.
\n
"
);
return
0
;
return
0
;
}
}
if
(
pPars
->
nFramesStart
<
1
)
{
Abc_Print
(
1
,
"The starting frame should be 1 or larger.
\n
"
);
return
0
;
}
pAbc
->
Status
=
Gia_GlaPerform
(
pAbc
->
pGia
,
pPars
,
fStartVta
);
pAbc
->
Status
=
Gia_GlaPerform
(
pAbc
->
pGia
,
pPars
,
fStartVta
);
pAbc
->
nFrames
=
pPars
->
iFrame
;
pAbc
->
nFrames
=
pPars
->
iFrame
;
Abc_FrameReplaceCex
(
pAbc
,
&
pAbc
->
pGia
->
pCexSeq
);
Abc_FrameReplaceCex
(
pAbc
,
&
pAbc
->
pGia
->
pCexSeq
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &gla [-FSCLTR num] [-A file] [-f
da
vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &gla [-FSCLTR num] [-A file] [-f
kad
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs gate-level abstraction of a sequential miter
\n
"
);
Abc_Print
(
-
2
,
"
\t
fixed-time-frame gate-level proof- and cex-based abstraction
\n
"
);
Abc_Print
(
-
2
,
"
\t
-F num : the max number of timeframes to unroll [default = %d]
\n
"
,
pPars
->
nFramesMax
);
Abc_Print
(
-
2
,
"
\t
-F num : the max number of timeframes to unroll [default = %d]
\n
"
,
pPars
->
nFramesMax
);
Abc_Print
(
-
2
,
"
\t
-S num : the starting time frame (0=unused) [default = %d]
\n
"
,
pPars
->
nFramesStart
);
Abc_Print
(
-
2
,
"
\t
-S num : the starting time frame (0=unused) [default = %d]
\n
"
,
pPars
->
nFramesStart
);
// Abc_Print( -2, "\t-P num : the number of previous frames for UNSAT core [default = %d]\n", pPars->nFramesPast );
Abc_Print
(
-
2
,
"
\t
-C num : the max number of SAT solver conflicts (0=unused) [default = %d]
\n
"
,
pPars
->
nConfLimit
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of SAT solver conflicts (0=unused) [default = %d]
\n
"
,
pPars
->
nConfLimit
);
Abc_Print
(
-
2
,
"
\t
-L num : the max number of learned clauses to keep (0=unused) [default = %d]
\n
"
,
pPars
->
nLearntMax
);
Abc_Print
(
-
2
,
"
\t
-L num : the max number of learned clauses to keep (0=unused) [default = %d]
\n
"
,
pPars
->
nLearntMax
);
Abc_Print
(
-
2
,
"
\t
-T num : an approximate timeout, in seconds [default = %d]
\n
"
,
pPars
->
nTimeOut
);
Abc_Print
(
-
2
,
"
\t
-T num : an approximate timeout, in seconds [default = %d]
\n
"
,
pPars
->
nTimeOut
);
Abc_Print
(
-
2
,
"
\t
-R num : minimum percentage of abstracted objects (0<=num<=100) [default = %d]
\n
"
,
pPars
->
nRatioMin
);
Abc_Print
(
-
2
,
"
\t
-R num : minimum percentage of abstracted objects (0<=num<=100) [default = %d]
\n
"
,
pPars
->
nRatioMin
);
Abc_Print
(
-
2
,
"
\t
-A file : file name for dumping abstrated model [default =
\"
glabs.aig
\"
]
\n
"
);
Abc_Print
(
-
2
,
"
\t
-A file : file name for dumping abstrated model [default =
\"
glabs.aig
\"
]
\n
"
);
// Abc_Print( -2, "\t-t : toggle using terminal variables [default = %s]\n", pPars->fUseTermVars? "yes": "no" );
// Abc_Print( -2, "\t-r : toggle using rollback after the starting frames [default = %s]\n", pPars->fUseRollback? "yes": "no" );
Abc_Print
(
-
2
,
"
\t
-f : toggle propagating fanout implications [default = %s]
\n
"
,
pPars
->
fPropFanout
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-f : toggle propagating fanout implications [default = %s]
\n
"
,
pPars
->
fPropFanout
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-k : toggle using VTA to kick start GLA for starting frames [default = %s]
\n
"
,
fStartVta
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle refinement by adding one layers of gates [default = %s]
\n
"
,
pPars
->
fAddLayer
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle dumping abstracted model into a file [default = %s]
\n
"
,
pPars
->
fDumpVabs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle dumping abstracted model into a file [default = %s]
\n
"
,
pPars
->
fDumpVabs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle using VTA to kick start GLA [default = %s]
\n
"
,
fStartVta
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"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
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
return
1
;
...
@@ -27574,7 +27570,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -27574,7 +27570,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
int
c
;
int
c
;
Gia_VtaSetDefaultParams
(
pPars
);
Gia_VtaSetDefaultParams
(
pPars
);
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FSPCLTRAtrdvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"FSPCLTRAtr
a
dvh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -27670,6 +27666,9 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -27670,6 +27666,9 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'r'
:
case
'r'
:
pPars
->
fUseRollback
^=
1
;
pPars
->
fUseRollback
^=
1
;
break
;
break
;
case
'a'
:
pPars
->
fAddLayer
^=
1
;
break
;
case
'd'
:
case
'd'
:
pPars
->
fDumpVabs
^=
1
;
pPars
->
fDumpVabs
^=
1
;
break
;
break
;
...
@@ -27707,21 +27706,14 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -27707,21 +27706,14 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print
(
1
,
"The starting frame is larger than the max number of frames.
\n
"
);
Abc_Print
(
1
,
"The starting frame is larger than the max number of frames.
\n
"
);
return
0
;
return
0
;
}
}
if
(
pPars
->
nFramesStart
<
1
)
{
Abc_Print
(
1
,
"The starting frame should be 1 or larger.
\n
"
);
return
0
;
}
// if ( argc == globalUtilOptind + 1 )
// pPars->pFileVabs = argv[globalUtilOptind];
pAbc
->
Status
=
Gia_VtaPerform
(
pAbc
->
pGia
,
pPars
);
pAbc
->
Status
=
Gia_VtaPerform
(
pAbc
->
pGia
,
pPars
);
pAbc
->
nFrames
=
pPars
->
iFrame
;
pAbc
->
nFrames
=
pPars
->
iFrame
;
Abc_FrameReplaceCex
(
pAbc
,
&
pAbc
->
pGia
->
pCexSeq
);
Abc_FrameReplaceCex
(
pAbc
,
&
pAbc
->
pGia
->
pCexSeq
);
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &vta [-FSPCLTR num] [-A file] [-trdvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &vta [-FSPCLTR num] [-A file] [-tr
a
dvh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
refines abstracted object map with proof
-based abstraction
\n
"
);
Abc_Print
(
-
2
,
"
\t
variable-time-frame gate-level proof- and cex
-based abstraction
\n
"
);
Abc_Print
(
-
2
,
"
\t
-F num : the max number of timeframes to unroll [default = %d]
\n
"
,
pPars
->
nFramesMax
);
Abc_Print
(
-
2
,
"
\t
-F num : the max number of timeframes to unroll [default = %d]
\n
"
,
pPars
->
nFramesMax
);
Abc_Print
(
-
2
,
"
\t
-S num : the starting time frame (0=unused) [default = %d]
\n
"
,
pPars
->
nFramesStart
);
Abc_Print
(
-
2
,
"
\t
-S num : the starting time frame (0=unused) [default = %d]
\n
"
,
pPars
->
nFramesStart
);
Abc_Print
(
-
2
,
"
\t
-P num : the number of previous frames for UNSAT core [default = %d]
\n
"
,
pPars
->
nFramesPast
);
Abc_Print
(
-
2
,
"
\t
-P num : the number of previous frames for UNSAT core [default = %d]
\n
"
,
pPars
->
nFramesPast
);
...
@@ -27732,6 +27724,7 @@ usage:
...
@@ -27732,6 +27724,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-A file : file name for dumping abstrated model [default =
\"
vabs.aig
\"
]
\n
"
);
Abc_Print
(
-
2
,
"
\t
-A file : file name for dumping abstrated model [default =
\"
vabs.aig
\"
]
\n
"
);
Abc_Print
(
-
2
,
"
\t
-t : toggle using terminal variables [default = %s]
\n
"
,
pPars
->
fUseTermVars
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-t : toggle using terminal variables [default = %s]
\n
"
,
pPars
->
fUseTermVars
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle using rollback after the starting frames [default = %s]
\n
"
,
pPars
->
fUseRollback
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-r : toggle using rollback after the starting frames [default = %s]
\n
"
,
pPars
->
fUseRollback
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-a : toggle refinement by adding one layers of gates [default = %s]
\n
"
,
pPars
->
fAddLayer
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle dumping abstracted model into a file [default = %s]
\n
"
,
pPars
->
fDumpVabs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-d : toggle dumping abstracted model into a file [default = %s]
\n
"
,
pPars
->
fDumpVabs
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"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
"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
...
@@ -27773,7 +27766,7 @@ int Abc_CommandAbc9Vta2Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -27773,7 +27766,7 @@ int Abc_CommandAbc9Vta2Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
}
}
if
(
pAbc
->
pGia
->
vObjClasses
==
NULL
)
if
(
pAbc
->
pGia
->
vObjClasses
==
NULL
)
{
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Vta2Gla(): There is no variable-time-frame abstraction
defines
.
\n
"
);
Abc_Print
(
-
1
,
"Abc_CommandAbc9Vta2Gla(): There is no variable-time-frame abstraction
is defined
.
\n
"
);
return
1
;
return
1
;
}
}
Vec_IntFreeP
(
&
pAbc
->
pGia
->
vGateClasses
);
Vec_IntFreeP
(
&
pAbc
->
pGia
->
vGateClasses
);
...
@@ -27783,7 +27776,7 @@ int Abc_CommandAbc9Vta2Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -27783,7 +27776,7 @@ int Abc_CommandAbc9Vta2Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
usage:
usage:
Abc_Print
(
-
2
,
"usage: &vta_gla [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &vta_gla [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
maps variable- into fixed-time-frame abstraction
\n
"
);
Abc_Print
(
-
2
,
"
\t
maps variable- into fixed-time-frame
gate-level
abstraction
\n
"
);
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
;
...
@@ -27800,6 +27793,75 @@ usage:
...
@@ -27800,6 +27793,75 @@ usage:
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9Gla2Vta
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
int
c
,
fVerbose
=
0
;
int
nFrames
=
pAbc
->
nFrames
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"Fvh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'F'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-F
\"
should be followed by an integer.
\n
"
);
goto
usage
;
}
nFrames
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nFrames
<
0
)
goto
usage
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Gla2Vta(): There is no AIG.
\n
"
);
return
1
;
}
if
(
pAbc
->
pGia
->
vGateClasses
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Gla2Vta(): There is no gate-level abstraction is defined.
\n
"
);
return
1
;
}
if
(
pAbc
->
nFrames
<
1
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Gla2Vta(): The number of timeframes (%d) should be a positive integer.
\n
"
,
nFrames
);
return
1
;
}
Vec_IntFreeP
(
&
pAbc
->
pGia
->
vObjClasses
);
pAbc
->
pGia
->
vObjClasses
=
Gia_VtaConvertFromGla
(
pAbc
->
pGia
,
pAbc
->
pGia
->
vGateClasses
,
nFrames
);
Vec_IntFreeP
(
&
pAbc
->
pGia
->
vGateClasses
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &gla_vta [-F num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
maps fixed- into variable-time-frame gate-level abstraction
\n
"
);
Abc_Print
(
-
2
,
"
\t
-F num : timeframes in the resulting variable-time-frame abstraction [default = %d]
\n
"
,
nFrames
);
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
"
);
return
1
;
}
/**Function*************************************************************
Synopsis []
Description []
SideEffects []
SeeAlso []
***********************************************************************/
int
Abc_CommandAbc9Reparam
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
int
Abc_CommandAbc9Reparam
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
{
Gia_Man_t
*
pTemp
=
NULL
;
Gia_Man_t
*
pTemp
=
NULL
;
...
...
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