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
7d454512
Commit
7d454512
authored
Jan 20, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Variable timeframe abstraction.
parent
719b06f9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
109 additions
and
28 deletions
+109
-28
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaAbsVta.c
+48
-25
src/aig/gia/giaMan.c
+1
-1
src/base/abci/abc.c
+59
-2
No files found.
src/aig/gia/gia.h
View file @
7d454512
...
@@ -205,6 +205,7 @@ struct Gia_ParVta_t_
...
@@ -205,6 +205,7 @@ struct Gia_ParVta_t_
int
nFramesMax
;
// maximum frames
int
nFramesMax
;
// maximum frames
int
nConfLimit
;
// conflict limit
int
nConfLimit
;
// conflict limit
int
nTimeOut
;
// timeout in seconds
int
nTimeOut
;
// timeout in seconds
int
fUseTermVars
;
// use terminal variables
int
fVerbose
;
// verbose flag
int
fVerbose
;
// verbose flag
int
iFrame
;
// the number of frames covered
int
iFrame
;
// the number of frames covered
};
};
...
...
src/aig/gia/giaAbsVta.c
View file @
7d454512
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
ABC_NAMESPACE_IMPL_START
ABC_NAMESPACE_IMPL_START
#define VTA_LARGE 0xFFFFFF
#define VTA_LARGE 0xFFFFFF
F
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
/// DECLARATIONS ///
...
@@ -35,7 +35,7 @@ struct Vta_Obj_t_
...
@@ -35,7 +35,7 @@ struct Vta_Obj_t_
int
iObj
;
int
iObj
;
int
iFrame
;
int
iFrame
;
int
iNext
;
int
iNext
;
unsigned
Prio
:
2
4
;
// related to VTA_LARGE
unsigned
Prio
:
2
8
;
// related to VTA_LARGE
unsigned
Value
:
2
;
unsigned
Value
:
2
;
unsigned
fAdded
:
1
;
unsigned
fAdded
:
1
;
unsigned
fNew
:
1
;
unsigned
fNew
:
1
;
...
@@ -60,6 +60,8 @@ struct Vta_Man_t_
...
@@ -60,6 +60,8 @@ 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
Vec_Int_t
*
vSeens
;
// seen objects
Vec_Int_t
*
vSeens
;
// seen objects
Vec_Bit_t
*
vSeenGla
;
// seen objects in all frames
int
nSeenGla
;
// seen objects in all frames
// other data
// other data
Vec_Int_t
*
vCla2Var
;
// map clauses into variables
Vec_Int_t
*
vCla2Var
;
// map clauses into variables
Vec_Ptr_t
*
vCores
;
// unsat core for each frame
Vec_Ptr_t
*
vCores
;
// unsat core for each frame
...
@@ -202,6 +204,7 @@ Vec_Int_t * Gia_VtaFramesToAbs( Vec_Vec_t * vFrames )
...
@@ -202,6 +204,7 @@ Vec_Int_t * Gia_VtaFramesToAbs( Vec_Vec_t * vFrames )
***********************************************************************/
***********************************************************************/
Vec_Int_t
*
Gia_VtaConvertToGla
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vAbs
)
Vec_Int_t
*
Gia_VtaConvertToGla
(
Gia_Man_t
*
p
,
Vec_Int_t
*
vAbs
)
{
{
Gia_Obj_t
*
pObj
;
Vec_Int_t
*
vPresent
;
Vec_Int_t
*
vPresent
;
int
nObjMask
,
nObjs
=
Gia_ManObjNum
(
p
);
int
nObjMask
,
nObjs
=
Gia_ManObjNum
(
p
);
int
i
,
Entry
,
nFrames
=
Vec_IntEntry
(
vAbs
,
0
);
int
i
,
Entry
,
nFrames
=
Vec_IntEntry
(
vAbs
,
0
);
...
@@ -210,9 +213,14 @@ Vec_Int_t * Gia_VtaConvertToGla( Gia_Man_t * p, Vec_Int_t * vAbs )
...
@@ -210,9 +213,14 @@ Vec_Int_t * Gia_VtaConvertToGla( Gia_Man_t * p, Vec_Int_t * vAbs )
nObjMask
=
(
1
<<
Gia_Base2Log
(
nObjs
))
-
1
;
nObjMask
=
(
1
<<
Gia_Base2Log
(
nObjs
))
-
1
;
assert
(
nObjs
<=
nObjMask
);
assert
(
nObjs
<=
nObjMask
);
// go through objects
// go through objects
vPresent
=
Vec_IntAlloc
(
nObjs
);
vPresent
=
Vec_IntStart
(
nObjs
);
Vec_IntWriteEntry
(
vPresent
,
0
,
1
);
Vec_IntForEachEntryStart
(
vAbs
,
Entry
,
i
,
nFrames
+
2
)
Vec_IntForEachEntryStart
(
vAbs
,
Entry
,
i
,
nFrames
+
2
)
{
pObj
=
Gia_ManObj
(
p
,
(
Entry
&
nObjMask
)
);
assert
(
Gia_ObjIsRo
(
p
,
pObj
)
||
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsConst0
(
pObj
)
);
Vec_IntWriteEntry
(
vPresent
,
(
Entry
&
nObjMask
),
1
);
Vec_IntWriteEntry
(
vPresent
,
(
Entry
&
nObjMask
),
1
);
}
return
vPresent
;
return
vPresent
;
}
}
...
@@ -773,6 +781,8 @@ Vta_Man_t * Vga_ManStart( Gia_Man_t * pGia, Gia_ParVta_t * pPars )
...
@@ -773,6 +781,8 @@ Vta_Man_t * Vga_ManStart( Gia_Man_t * pGia, Gia_ParVta_t * pPars )
assert
(
Gia_ManObjNum
(
pGia
)
<=
(
int
)
p
->
nObjMask
);
assert
(
Gia_ManObjNum
(
pGia
)
<=
(
int
)
p
->
nObjMask
);
p
->
nWords
=
1
;
p
->
nWords
=
1
;
p
->
vSeens
=
Vec_IntStart
(
Gia_ManObjNum
(
pGia
)
*
p
->
nWords
);
p
->
vSeens
=
Vec_IntStart
(
Gia_ManObjNum
(
pGia
)
*
p
->
nWords
);
p
->
vSeenGla
=
Vec_BitStart
(
Gia_ManObjNum
(
pGia
)
);
p
->
nSeenGla
=
1
;
// start the abstraction
// start the abstraction
if
(
pGia
->
vObjClasses
==
NULL
)
if
(
pGia
->
vObjClasses
==
NULL
)
p
->
vFrames
=
Gia_ManUnrollAbs
(
pGia
,
pPars
->
nFramesStart
);
p
->
vFrames
=
Gia_ManUnrollAbs
(
pGia
,
pPars
->
nFramesStart
);
...
@@ -811,8 +821,13 @@ Vta_Man_t * Vga_ManStart( Gia_Man_t * pGia, Gia_ParVta_t * pPars )
...
@@ -811,8 +821,13 @@ 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
)
printf
(
"SAT solver: Variables = %d. Clauses = %d. Conflicts = %d.
\n
"
,
sat_solver2_nvars
(
p
->
pSat
),
sat_solver2_nclauses
(
p
->
pSat
),
sat_solver2_nconflicts
(
p
->
pSat
)
);
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_IntFreeP
(
&
p
->
vSeens
);
Vec_IntFreeP
(
&
p
->
vSeens
);
Vec_IntFreeP
(
&
p
->
vOrder
);
Vec_IntFreeP
(
&
p
->
vOrder
);
Vec_IntFreeP
(
&
p
->
vCla2Var
);
Vec_IntFreeP
(
&
p
->
vCla2Var
);
...
@@ -845,16 +860,12 @@ Vec_Int_t * Vta_ManUnsatCore( int iLit, Vec_Int_t * vCla2Var, sat_solver2 * pSat
...
@@ -845,16 +860,12 @@ Vec_Int_t * Vta_ManUnsatCore( int iLit, Vec_Int_t * vCla2Var, sat_solver2 * pSat
RetValue
=
sat_solver2_solve
(
pSat
,
&
iLit
,
&
iLit
+
1
,
(
ABC_INT64_T
)
nConfMax
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
);
RetValue
=
sat_solver2_solve
(
pSat
,
&
iLit
,
&
iLit
+
1
,
(
ABC_INT64_T
)
nConfMax
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
,
(
ABC_INT64_T
)
0
);
if
(
RetValue
==
l_Undef
)
if
(
RetValue
==
l_Undef
)
{
{
// if ( fVerbose )
printf
(
"Conflict limit is reached.
\n
"
);
if
(
piRetValue
)
if
(
piRetValue
)
*
piRetValue
=
-
1
;
*
piRetValue
=
-
1
;
return
NULL
;
return
NULL
;
}
}
if
(
RetValue
==
l_True
)
if
(
RetValue
==
l_True
)
{
{
// if ( fVerbose )
printf
(
"The BMC problem is SAT.
\n
"
);
if
(
piRetValue
)
if
(
piRetValue
)
*
piRetValue
=
0
;
*
piRetValue
=
0
;
return
NULL
;
return
NULL
;
...
@@ -930,13 +941,20 @@ void Vta_ManAbsPrintFrame( Vta_Man_t * p, Vec_Int_t * vCore, int nFrames )
...
@@ -930,13 +941,20 @@ void Vta_ManAbsPrintFrame( Vta_Man_t * p, Vec_Int_t * vCore, int nFrames )
}
}
pCountAll
[
iFrame
+
1
]
++
;
pCountAll
[
iFrame
+
1
]
++
;
pCountAll
[
0
]
++
;
pCountAll
[
0
]
++
;
if
(
!
Vec_BitEntry
(
p
->
vSeenGla
,
iObj
)
)
{
Vec_BitWriteEntry
(
p
->
vSeenGla
,
iObj
,
1
);
p
->
nSeenGla
++
;
}
}
}
// printf( "%5d%5d", pCountAll[0], pCountUni[0] );
// printf( "%5d%5d", pCountAll[0], pCountUni[0] );
printf
(
"%7d"
,
pCountAll
[
0
]
);
printf
(
"%6d"
,
p
->
nSeenGla
);
printf
(
"%6d"
,
pCountAll
[
0
]
);
for
(
k
=
0
;
k
<
nFrames
;
k
++
)
for
(
k
=
0
;
k
<
nFrames
;
k
++
)
// printf( "%5d%5d ", pCountAll[k+1], pCountUni[k+1] );
// printf( "%5d%5d ", pCountAll[k+1], pCountUni[k+1] );
printf
(
"%4d"
,
pCountAll
[
k
+
1
]
);
printf
(
"%4d"
,
pCountAll
[
k
+
1
]
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
fflush
(
stdout
);
ABC_FREE
(
pCountAll
);
ABC_FREE
(
pCountAll
);
ABC_FREE
(
pCountUni
);
ABC_FREE
(
pCountUni
);
}
}
...
@@ -953,13 +971,14 @@ void Vta_ManAbsPrintFrame( Vta_Man_t * p, Vec_Int_t * vCore, int nFrames )
...
@@ -953,13 +971,14 @@ void Vta_ManAbsPrintFrame( Vta_Man_t * p, Vec_Int_t * vCore, int nFrames )
***********************************************************************/
***********************************************************************/
void
Vga_ManAddClausesOne
(
Vta_Man_t
*
p
,
int
iObj
,
int
iFrame
)
void
Vga_ManAddClausesOne
(
Vta_Man_t
*
p
,
int
iObj
,
int
iFrame
)
{
{
Vta_Obj_t
*
pThis0
,
*
pThis1
;
Vta_Obj_t
*
pThis0
,
*
pThis1
;
Gia_Obj_t
*
pObj
=
Gia_ManObj
(
p
->
pGia
,
iObj
);
Gia_Obj_t
*
pObj
=
Gia_ManObj
(
p
->
pGia
,
iObj
);
Vta_Obj_t
*
pThis
=
Vga_ManFindOrAdd
(
p
,
iObj
,
iFrame
);
Vta_Obj_t
*
pThis
=
Vga_ManFindOrAdd
(
p
,
iObj
,
iFrame
);
int
iMainVar
=
Vta_ObjId
(
p
,
pThis
);
int
iMainVar
=
Vta_ObjId
(
p
,
pThis
);
assert
(
pThis
->
iObj
==
iObj
&&
pThis
->
iFrame
==
iFrame
);
assert
(
pThis
->
iObj
==
iObj
&&
pThis
->
iFrame
==
iFrame
);
assert
(
pThis
->
fAdded
==
0
);
if
(
pThis
->
fAdded
)
return
;
pThis
->
fAdded
=
1
;
pThis
->
fAdded
=
1
;
if
(
Gia_ObjIsAnd
(
pObj
)
)
if
(
Gia_ObjIsAnd
(
pObj
)
)
{
{
...
@@ -977,14 +996,18 @@ void Vga_ManAddClausesOne( Vta_Man_t * p, int iObj, int iFrame )
...
@@ -977,14 +996,18 @@ void Vga_ManAddClausesOne( Vta_Man_t * p, int iObj, int iFrame )
//printf( "Adding flop %d (var %d)\n", iObj, iMainVar );
//printf( "Adding flop %d (var %d)\n", iObj, iMainVar );
if
(
iFrame
==
0
)
if
(
iFrame
==
0
)
{
{
/*
if
(
p
->
pPars
->
fUseTermVars
)
pThis0 = Vga_ManFindOrAdd( p, iObj, -1 );
{
sat_solver2_add_constraint( p->pSat, iMainVar, Vta_ObjId(p, pThis0), 1, 0 );
pThis0
=
Vga_ManFindOrAdd
(
p
,
iObj
,
-
1
);
Vec_IntPush( p->vCla2Var, iMainVar );
sat_solver2_add_constraint
(
p
->
pSat
,
iMainVar
,
Vta_ObjId
(
p
,
pThis0
),
1
,
0
);
Vec_IntPush( p->vCla2Var, iMainVar );
Vec_IntPush
(
p
->
vCla2Var
,
iMainVar
);
*/
Vec_IntPush
(
p
->
vCla2Var
,
iMainVar
);
sat_solver2_add_const
(
p
->
pSat
,
iMainVar
,
1
,
0
);
}
Vec_IntPush
(
p
->
vCla2Var
,
iMainVar
);
else
{
sat_solver2_add_const
(
p
->
pSat
,
iMainVar
,
1
,
0
);
Vec_IntPush
(
p
->
vCla2Var
,
iMainVar
);
}
}
}
else
else
{
{
...
@@ -1061,6 +1084,7 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1061,6 +1084,7 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
Abc_Cex_t
*
pCex
=
NULL
;
Abc_Cex_t
*
pCex
=
NULL
;
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
int
i
,
f
,
Status
,
RetValue
=
-
1
;
int
i
,
f
,
Status
,
RetValue
=
-
1
;
int
clk
=
clock
();
// 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
);
...
@@ -1068,12 +1092,11 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1068,12 +1092,11 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
p
=
Vga_ManStart
(
pAig
,
pPars
);
p
=
Vga_ManStart
(
pAig
,
pPars
);
// perform initial abstraction
// perform initial abstraction
if
(
p
->
pPars
->
fVerbose
)
if
(
p
->
pPars
->
fVerbose
)
printf
(
"Frame Confl
All F0 F1 F2 F3
...
\n
"
);
printf
(
"Frame Confl
One All F0 F1 F2 F3
...
\n
"
);
for
(
f
=
0
;
!
p
->
pPars
->
nFramesMax
||
f
<
p
->
pPars
->
nFramesMax
;
f
++
)
for
(
f
=
0
;
!
p
->
pPars
->
nFramesMax
||
f
<
p
->
pPars
->
nFramesMax
;
f
++
)
{
{
if
(
p
->
pPars
->
fVerbose
)
if
(
p
->
pPars
->
fVerbose
)
printf
(
"%3d :"
,
f
);
printf
(
"%3d :"
,
f
);
//printf( "\n" );
p
->
pPars
->
iFrame
=
f
;
p
->
pPars
->
iFrame
=
f
;
// realloc storage for abstraction marks
// realloc storage for abstraction marks
if
(
f
==
p
->
nWords
*
32
)
if
(
f
==
p
->
nWords
*
32
)
...
@@ -1083,7 +1106,6 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1083,7 +1106,6 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
{
{
// load this timeframe
// load this timeframe
Vga_ManLoadSlice
(
p
,
Vec_PtrEntry
(
p
->
vFrames
,
f
),
0
);
Vga_ManLoadSlice
(
p
,
Vec_PtrEntry
(
p
->
vFrames
,
f
),
0
);
// Vga_ManAddClausesOne( p, 0, f );
// run SAT solver
// run SAT solver
vCore
=
Vta_ManUnsatCore
(
Vga_ManGetOutLit
(
p
,
f
),
p
->
vCla2Var
,
p
->
pSat
,
pPars
->
nConfLimit
,
p
->
pPars
->
fVerbose
,
&
Status
);
vCore
=
Vta_ManUnsatCore
(
Vga_ManGetOutLit
(
p
,
f
),
p
->
vCla2Var
,
p
->
pSat
,
pPars
->
nConfLimit
,
p
->
pPars
->
fVerbose
,
&
Status
);
assert
(
(
vCore
!=
NULL
)
==
(
Status
==
1
)
);
assert
(
(
vCore
!=
NULL
)
==
(
Status
==
1
)
);
...
@@ -1109,10 +1131,9 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1109,10 +1131,9 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
{
{
/*
/*
// load the time frame
// load the time frame
int Limit = Abc_MinInt(
3
, p->pPars->nFramesStart);
int Limit = Abc_MinInt(
5
, p->pPars->nFramesStart);
for ( i = 1; i <= Limit; i++ )
for ( i = 1; i <= Limit; i++ )
Vga_ManLoadSlice( p, Vec_PtrEntry(p->vCores, f-i), i );
Vga_ManLoadSlice( p, Vec_PtrEntry(p->vCores, f-i), i );
// Vga_ManAddClausesOne( p, 0, f );
// iterate as long as there are counter-examples
// iterate as long as there are counter-examples
do {
do {
vCore = Vta_ManUnsatCore( Vga_ManGetOutLit(p, f), p->vCla2Var, p->pSat, pPars->nConfLimit, pPars->fVerbose, &Status );
vCore = Vta_ManUnsatCore( Vga_ManGetOutLit(p, f), p->vCla2Var, p->pSat, pPars->nConfLimit, pPars->fVerbose, &Status );
...
@@ -1163,9 +1184,9 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1163,9 +1184,9 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
Vec_IntFreeP
(
&
pAig
->
vObjClasses
);
Vec_IntFreeP
(
&
pAig
->
vObjClasses
);
pAig
->
vObjClasses
=
Gia_VtaFramesToAbs
(
(
Vec_Vec_t
*
)
p
->
vCores
);
pAig
->
vObjClasses
=
Gia_VtaFramesToAbs
(
(
Vec_Vec_t
*
)
p
->
vCores
);
if
(
Status
==
-
1
)
if
(
Status
==
-
1
)
printf
(
"SAT solver ran out of resources at %d conflicts in frame %d.
\n
"
,
pPars
->
nConfLimit
,
f
);
printf
(
"SAT solver ran out of resources at %d conflicts in frame %d.
"
,
pPars
->
nConfLimit
,
f
);
else
else
printf
(
"SAT solver completed %d frames and produced an abstraction.
\n
"
,
f
+
1
);
printf
(
"SAT solver completed %d frames and produced an abstraction.
"
,
f
+
1
);
}
}
else
else
{
{
...
@@ -1173,7 +1194,9 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
...
@@ -1173,7 +1194,9 @@ int Gia_VtaPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
p
->
pGia
->
pCexSeq
=
pCex
;
p
->
pGia
->
pCexSeq
=
pCex
;
if
(
!
Gia_ManVerifyCex
(
p
->
pGia
,
pCex
,
0
)
)
if
(
!
Gia_ManVerifyCex
(
p
->
pGia
,
pCex
,
0
)
)
printf
(
"Gia_VtaPerform(): CEX verification has failed!
\n
"
);
printf
(
"Gia_VtaPerform(): CEX verification has failed!
\n
"
);
printf
(
"Counter-example detected in frame %d. "
,
f
);
}
}
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
Vga_ManStop
(
p
);
Vga_ManStop
(
p
);
return
RetValue
;
return
RetValue
;
}
}
...
...
src/aig/gia/giaMan.c
View file @
7d454512
...
@@ -277,7 +277,7 @@ void Gia_ManPrintObjClasses( Gia_Man_t * p )
...
@@ -277,7 +277,7 @@ void Gia_ManPrintObjClasses( Gia_Man_t * p )
nObjMask
=
(
1
<<
nObjBits
)
-
1
;
nObjMask
=
(
1
<<
nObjBits
)
-
1
;
assert
(
Gia_ManObjNum
(
p
)
<=
nObjMask
);
assert
(
Gia_ManObjNum
(
p
)
<=
nObjMask
);
// print info about frames
// print info about frames
printf
(
"Frame All F0 F1 F2 F3
...
\n
"
);
printf
(
"Frame All F0 F1 F2 F3 ...
\n
"
);
for
(
i
=
0
;
i
<
nFrames
;
i
++
)
for
(
i
=
0
;
i
<
nFrames
;
i
++
)
{
{
iStart
=
Vec_IntEntry
(
vAbs
,
i
+
1
);
iStart
=
Vec_IntEntry
(
vAbs
,
i
+
1
);
...
...
src/base/abci/abc.c
View file @
7d454512
...
@@ -385,6 +385,7 @@ static int Abc_CommandAbc9GlaDerive ( Abc_Frame_t * pAbc, int argc, cha
...
@@ -385,6 +385,7 @@ static int Abc_CommandAbc9GlaDerive ( Abc_Frame_t * pAbc, int argc, cha
static
int
Abc_CommandAbc9GlaCba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaCba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaPba
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
);
static
int
Abc_CommandAbc9GlaPba
(
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_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
);
...
@@ -845,6 +846,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
...
@@ -845,6 +846,7 @@ void Abc_Init( Abc_Frame_t * pAbc )
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_cba"
,
Abc_CommandAbc9GlaCba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_cba"
,
Abc_CommandAbc9GlaCba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_pba"
,
Abc_CommandAbc9GlaPba
,
0
);
Cmd_CommandAdd
(
pAbc
,
"ABC9"
,
"&gla_pba"
,
Abc_CommandAbc9GlaPba
,
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"
,
"&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
);
...
@@ -29573,7 +29575,7 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -29573,7 +29575,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
,
"SFCTvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"SFCT
t
vh"
)
)
!=
EOF
)
{
{
switch
(
c
)
switch
(
c
)
{
{
...
@@ -29621,6 +29623,9 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -29621,6 +29623,9 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
pPars
->
nTimeOut
<
0
)
if
(
pPars
->
nTimeOut
<
0
)
goto
usage
;
goto
usage
;
break
;
break
;
case
't'
:
pPars
->
fUseTermVars
^=
1
;
break
;
case
'v'
:
case
'v'
:
pPars
->
fVerbose
^=
1
;
pPars
->
fVerbose
^=
1
;
break
;
break
;
...
@@ -29661,12 +29666,13 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -29661,12 +29666,13 @@ int Abc_CommandAbc9Vta( Abc_Frame_t * pAbc, int argc, char ** argv )
return
0
;
return
0
;
usage:
usage:
Abc_Print
(
-
2
,
"usage: &vta [-SFCT num] [-vh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &vta [-SFCT num] [-
t
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
refines abstracted object map with proof-based abstraction
\n
"
);
Abc_Print
(
-
2
,
"
\t
refines abstracted object map with proof-based abstraction
\n
"
);
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
-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
-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
-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
-t : toggle using terminal variables [default = %s]
\n
"
,
pPars
->
fUseTermVars
?
"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
;
...
@@ -29683,6 +29689,57 @@ usage:
...
@@ -29683,6 +29689,57 @@ usage:
SeeAlso []
SeeAlso []
***********************************************************************/
***********************************************************************/
int
Abc_CommandAbc9Vta2Gla
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
int
c
,
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
case
'v'
:
fVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
default:
goto
usage
;
}
}
if
(
pAbc
->
pGia
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Vta2Gla(): There is no AIG.
\n
"
);
return
1
;
}
if
(
pAbc
->
pGia
->
vObjClasses
==
NULL
)
{
Abc_Print
(
-
1
,
"Abc_CommandAbc9Vta2Gla(): There is no variable-time-frame abstraction defines.
\n
"
);
return
1
;
}
Vec_IntFreeP
(
&
pAbc
->
pGia
->
vGateClasses
);
pAbc
->
pGia
->
vGateClasses
=
Gia_VtaConvertToGla
(
pAbc
->
pGia
,
pAbc
->
pGia
->
vObjClasses
);
Vec_IntFreeP
(
&
pAbc
->
pGia
->
vObjClasses
);
return
0
;
usage:
Abc_Print
(
-
2
,
"usage: &vta_gla [-vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
maps variable- into fixed-time-frame abstraction
\n
"
);
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