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
e9af6c3c
Commit
e9af6c3c
authored
Aug 02, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scalable gate-level abstraction.
parent
cb66aa42
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
23 additions
and
17 deletions
+23
-17
src/aig/gia/gia.h
+1
-1
src/aig/gia/giaAbsGla.c
+2
-2
src/aig/gia/giaAbsGla2.c
+18
-12
src/base/abci/abc.c
+2
-2
No files found.
src/aig/gia/gia.h
View file @
e9af6c3c
...
...
@@ -226,7 +226,7 @@ struct Gia_ParVta_t_
int
fAddLayer
;
// refinement strategy by adding layers
int
fUseSkip
;
int
fUseSimple
;
int
f
Use
Hash
;
int
f
Skip
Hash
;
int
fDumpVabs
;
// dumps the abstracted model
char
*
pFileVabs
;
// dumps the abstracted model into this file
int
fVerbose
;
// verbose flag
...
...
src/aig/gia/giaAbsGla.c
View file @
e9af6c3c
...
...
@@ -1734,11 +1734,11 @@ void Gla_ManAbsPrintFrame( Gla_Man_t * p, int nCoreSize, int nFrames, int nConfl
Abc_PrintInt
(
sat_solver2_nlearnts
(
p
->
pSat
)
);
// Abc_Print( 1, " %6d", nCoreSize > 0 ? nCoreSize : 0 );
Abc_Print
(
1
,
"%9.2f sec"
,
1
.
0
*
Time
/
CLOCKS_PER_SEC
);
Abc_Print
(
1
,
"%5.
1f GB"
,
(
sat_solver2_memory_proof
(
p
->
pSat
)
+
sat_solver2_memory
(
p
->
pSat
,
0
))
/
(
1
<<
3
0
)
);
Abc_Print
(
1
,
"%5.
0f MB"
,
(
sat_solver2_memory_proof
(
p
->
pSat
)
+
sat_solver2_memory
(
p
->
pSat
,
0
))
/
(
1
<<
2
0
)
);
// Abc_PrintInt( p->nAbsNew );
// Abc_PrintInt( p->nLrnNew );
// Abc_Print( 1, "%4.1f MB", 4.0 * p->nLrnNew * Abc_BitWordNum(p->nAbsNew) / (1<<20) );
Abc_Print
(
1
,
"%s"
,
nCoreSize
>
0
?
"
\n
"
:
"
\r
"
);
Abc_Print
(
1
,
"%s"
,
(
nCoreSize
>
0
&&
nCexes
>
0
)
?
"
\n
"
:
"
\r
"
);
fflush
(
stdout
);
}
void
Gla_ManReportMemory
(
Gla_Man_t
*
p
)
...
...
src/aig/gia/giaAbsGla2.c
View file @
e9af6c3c
...
...
@@ -30,7 +30,7 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
#define GA2_BIG_NUM 0x3FFFFFF
F
#define GA2_BIG_NUM 0x3FFFFFF
0
typedef
struct
Ga2_Man_t_
Ga2_Man_t
;
// manager
struct
Ga2_Man_t_
...
...
@@ -796,6 +796,7 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
Gia_Obj_t
*
pLeaf
;
unsigned
uTruth
;
int
i
,
Lit
;
assert
(
Ga2_ObjIsAbs0
(
p
,
pObj
)
);
assert
(
Gia_ObjIsConst0
(
pObj
)
||
Gia_ObjIsRo
(
p
->
pGia
,
pObj
)
||
Gia_ObjIsAnd
(
pObj
)
);
if
(
Gia_ObjIsConst0
(
pObj
)
||
(
f
==
0
&&
Gia_ObjIsRo
(
p
->
pGia
,
pObj
))
)
...
...
@@ -814,7 +815,6 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
}
else
{
int
pLits
[
5
];
assert
(
Gia_ObjIsAnd
(
pObj
)
);
Vec_IntClear
(
p
->
vLits
);
vLeaves
=
Ga2_ObjLeaves
(
p
->
pGia
,
pObj
);
...
...
@@ -827,16 +827,16 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
}
else
if
(
Ga2_ObjIsLeaf0
(
p
,
pLeaf
)
)
// belongs to original PPIs
{
//
Lit = Ga2_ObjFindLit( p, pLeaf, f );
Lit
=
Ga2_ObjFindOrAddLit
(
p
,
pLeaf
,
f
);
Lit
=
Ga2_ObjFindLit
(
p
,
pLeaf
,
f
);
//
Lit = Ga2_ObjFindOrAddLit( p, pLeaf, f );
if
(
Lit
==
-
1
)
{
Lit
=
GA2_BIG_NUM
+
i
;
assert
(
0
);
Lit
=
GA2_BIG_NUM
+
2
*
i
;
//
assert( 0 );
}
}
else
assert
(
0
);
Vec_IntPush
(
p
->
vLits
,
(
pLits
[
i
]
=
Lit
)
);
Vec_IntPush
(
p
->
vLits
,
Lit
);
}
// minimize truth table
...
...
@@ -851,7 +851,7 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
Lit
=
Vec_IntEntry
(
p
->
vLits
,
0
);
if
(
Lit
>=
GA2_BIG_NUM
)
{
pLeaf
=
Gia_ManObj
(
p
->
pGia
,
Vec_IntEntry
(
vLeaves
,
Lit
-
GA2_BIG_NUM
)
);
pLeaf
=
Gia_ManObj
(
p
->
pGia
,
Vec_IntEntry
(
vLeaves
,
(
Lit
-
GA2_BIG_NUM
)
/
2
)
);
Lit
=
Ga2_ObjFindLit
(
p
,
pLeaf
,
f
);
assert
(
Lit
==
-
1
);
Lit
=
Ga2_ObjFindOrAddLit
(
p
,
pLeaf
,
f
);
...
...
@@ -859,6 +859,7 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
assert
(
Lit
>=
0
);
Lit
=
Abc_LitNotCond
(
Lit
,
uTruth
==
0x55555555
);
Ga2_ObjAddLit
(
p
,
pObj
,
f
,
Lit
);
assert
(
Lit
<
10000000
);
}
else
{
...
...
@@ -868,24 +869,28 @@ static inline void Ga2_ManAddToAbsOneDynamic( Ga2_Man_t * p, Gia_Obj_t * pObj, i
{
if
(
Lit
>=
GA2_BIG_NUM
)
{
pLeaf
=
Gia_ManObj
(
p
->
pGia
,
Vec_IntEntry
(
vLeaves
,
Lit
-
GA2_BIG_NUM
)
);
pLeaf
=
Gia_ManObj
(
p
->
pGia
,
Vec_IntEntry
(
vLeaves
,
(
Lit
-
GA2_BIG_NUM
)
/
2
)
);
Lit
=
Ga2_ObjFindLit
(
p
,
pLeaf
,
f
);
assert
(
Lit
==
-
1
);
Lit
=
Ga2_ObjFindOrAddLit
(
p
,
pLeaf
,
f
);
Vec_IntWriteEntry
(
p
->
vLits
,
i
,
Lit
);
}
assert
(
Lit
<
10000000
);
}
// add new nodes
if
(
Vec_IntSize
(
p
->
vLits
)
==
5
)
{
Vec_IntClear
(
p
->
vLits
);
Gia_ManForEachObjVec
(
vLeaves
,
p
->
pGia
,
pLeaf
,
i
)
Vec_IntPush
(
p
->
vLits
,
Ga2_ObjFindOrAddLit
(
p
,
pLeaf
,
f
)
);
Lit
=
Ga2_ObjFindOrAddLit
(
p
,
pObj
,
f
);
Ga2_ManCnfAddStatic
(
p
,
Ga2_ObjCnf0
(
p
,
pObj
),
Ga2_ObjCnf1
(
p
,
pObj
),
pLits
,
Lit
,
-
1
);
Ga2_ManCnfAddStatic
(
p
,
Ga2_ObjCnf0
(
p
,
pObj
),
Ga2_ObjCnf1
(
p
,
pObj
),
Vec_IntArray
(
p
->
vLits
)
,
Lit
,
-
1
);
}
else
{
// int fUseHash = 1;
if
(
p
->
pPars
->
fUse
Hash
)
if
(
!
p
->
pPars
->
fSkip
Hash
)
{
int
*
pLookup
,
nSize
=
Vec_IntSize
(
p
->
vLits
);
assert
(
Vec_IntSize
(
p
->
vLits
)
<
5
);
...
...
@@ -1374,7 +1379,7 @@ void Ga2_ManAbsPrintFrame( Ga2_Man_t * p, int nFrames, int nConfls, int nCexes,
Abc_PrintInt
(
sat_solver2_nclauses
(
p
->
pSat
)
);
Abc_PrintInt
(
sat_solver2_nlearnts
(
p
->
pSat
)
);
Abc_Print
(
1
,
"%9.2f sec"
,
1
.
0
*
Time
/
CLOCKS_PER_SEC
);
Abc_Print
(
1
,
"%5.
1f GB"
,
(
sat_solver2_memory_proof
(
p
->
pSat
)
+
sat_solver2_memory
(
p
->
pSat
,
0
))
/
(
1
<<
3
0
)
);
Abc_Print
(
1
,
"%5.
0f MB"
,
(
sat_solver2_memory_proof
(
p
->
pSat
)
+
sat_solver2_memory
(
p
->
pSat
,
0
))
/
(
1
<<
2
0
)
);
Abc_Print
(
1
,
"%s"
,
((
fFinal
&&
nCexes
)
||
p
->
pPars
->
fVeryVerbose
)
?
"
\n
"
:
"
\r
"
);
fflush
(
stdout
);
}
...
...
@@ -1654,6 +1659,7 @@ int Ga2_ManPerform( Gia_Man_t * pAig, Gia_ParVta_t * pPars )
}
finish:
Prf_ManStopP
(
&
p
->
pSat
->
pPrf2
);
Abc_Print
(
1
,
"
\n
"
);
// analize the results
if
(
pAig
->
pCexSeq
==
NULL
)
{
...
...
src/base/abci/abc.c
View file @
e9af6c3c
...
...
@@ -28252,7 +28252,7 @@ int Abc_CommandAbc9Gla( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars
->
fUseSimple
^=
1
;
break
;
case
'b'
:
pPars
->
f
Use
Hash
^=
1
;
pPars
->
f
Skip
Hash
^=
1
;
break
;
case
'v'
:
pPars
->
fVerbose
^=
1
;
...
...
@@ -28320,7 +28320,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-n : toggle using new algorithms [default = %s]
\n
"
,
fNewAlgo
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggle skipping previously proved timeframes [default = %s]
\n
"
,
pPars
->
fUseSkip
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-c : toggle using naive (2-input AND node) CNF encoding [default = %s]
\n
"
,
pPars
->
fUseSimple
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggle
using hashing during CNF construction [default = %s]
\n
"
,
pPars
->
fUse
Hash
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-b : toggle
CNF construction without hashing [default = %s]
\n
"
,
pPars
->
fSkip
Hash
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggle printing verbose information [default = %s]
\n
"
,
pPars
->
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing more verbose information [default = %s]
\n
"
,
pPars
->
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
...
...
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