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
68c70bcb
Commit
68c70bcb
authored
Aug 01, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Scalable gate-level abstraction.
parent
99e8ef14
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
32 deletions
+2
-32
src/aig/gia/giaAbsGla2.c
+2
-32
No files found.
src/aig/gia/giaAbsGla2.c
View file @
68c70bcb
...
@@ -26,8 +26,6 @@
...
@@ -26,8 +26,6 @@
ABC_NAMESPACE_IMPL_START
ABC_NAMESPACE_IMPL_START
//#if 0
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// DECLARATIONS ///
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
@@ -325,7 +323,6 @@ int Ga2_ManMarkup( Gia_Man_t * p, int N )
...
@@ -325,7 +323,6 @@ int Ga2_ManMarkup( Gia_Man_t * p, int N )
Vec_IntPush
(
p
->
vMapping
,
-
1
);
// placeholder for ref counter
Vec_IntPush
(
p
->
vMapping
,
-
1
);
// placeholder for ref counter
CountMarks
++
;
CountMarks
++
;
}
}
// printf( "Internal nodes = %d. ", CountMarks );
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
Abc_PrintTime
(
1
,
"Time"
,
clock
()
-
clk
);
Vec_IntFree
(
vLeaves
);
Vec_IntFree
(
vLeaves
);
return
CountMarks
;
return
CountMarks
;
...
@@ -477,10 +474,6 @@ unsigned Ga2_ObjComputeTruthSpecial( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t
...
@@ -477,10 +474,6 @@ unsigned Ga2_ObjComputeTruthSpecial( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t
int
i
,
k
,
Lit
,
Entry
,
pMap
[
5
];
int
i
,
k
,
Lit
,
Entry
,
pMap
[
5
];
int
Id
=
Gia_ObjId
(
p
,
pRoot
);
int
Id
=
Gia_ObjId
(
p
,
pRoot
);
assert
(
Gia_ObjIsAnd
(
pRoot
)
);
assert
(
Gia_ObjIsAnd
(
pRoot
)
);
if
(
4948
==
Id
)
{
int
s
=
0
;
}
if
(
fVerbose
)
if
(
fVerbose
)
printf
(
"Object %d.
\n
"
,
Gia_ObjId
(
p
,
pRoot
)
);
printf
(
"Object %d.
\n
"
,
Gia_ObjId
(
p
,
pRoot
)
);
...
@@ -519,7 +512,7 @@ unsigned Ga2_ObjComputeTruthSpecial( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t
...
@@ -519,7 +512,7 @@ unsigned Ga2_ObjComputeTruthSpecial( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t
if
(
fVerbose
)
if
(
fVerbose
)
{
{
Res
=
Ga2_ObjTruth
(
p
,
pRoot
);
Res
=
Ga2_ObjTruth
(
p
,
pRoot
);
Kit_DsdPrintFromTruth
(
&
Res
,
Vec_IntSize
(
vLeaves
)
);
//
Kit_DsdPrintFromTruth( &Res, Vec_IntSize(vLeaves) );
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
...
@@ -580,7 +573,7 @@ unsigned Ga2_ObjComputeTruthSpecial( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t
...
@@ -580,7 +573,7 @@ unsigned Ga2_ObjComputeTruthSpecial( Gia_Man_t * p, Gia_Obj_t * pRoot, Vec_Int_t
if
(
fVerbose
)
if
(
fVerbose
)
{
{
Kit_DsdPrintFromTruth
(
&
Res
,
nUsed
);
//
Kit_DsdPrintFromTruth( &Res, nUsed );
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
}
...
@@ -636,11 +629,6 @@ static inline void Ga2_ManCnfAddDynamic( Ga2_Man_t * p, int uTruth, int Lits[],
...
@@ -636,11 +629,6 @@ static inline void Ga2_ManCnfAddDynamic( Ga2_Man_t * p, int uTruth, int Lits[],
{
{
int
i
,
k
,
b
,
Cube
,
nClaLits
,
ClaLits
[
6
];
int
i
,
k
,
b
,
Cube
,
nClaLits
,
ClaLits
[
6
];
// assert( uTruth > 0 && uTruth < 0xffff );
// assert( uTruth > 0 && uTruth < 0xffff );
if
(
uTruth
==
0
)
{
int
s
=
0
;
}
// write positive/negative polarity
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
{
if
(
i
)
if
(
i
)
...
@@ -673,38 +661,29 @@ static inline void Ga2_ManCnfAddStatic( Ga2_Man_t * p, Vec_Int_t * vCnf0, Vec_In
...
@@ -673,38 +661,29 @@ static inline void Ga2_ManCnfAddStatic( Ga2_Man_t * p, Vec_Int_t * vCnf0, Vec_In
{
{
Vec_Int_t
*
vCnf
;
Vec_Int_t
*
vCnf
;
int
i
,
k
,
b
,
Cube
,
Literal
,
nClaLits
,
ClaLits
[
6
];
int
i
,
k
,
b
,
Cube
,
Literal
,
nClaLits
,
ClaLits
[
6
];
// write positive/negative polarity
for
(
i
=
0
;
i
<
2
;
i
++
)
for
(
i
=
0
;
i
<
2
;
i
++
)
{
{
vCnf
=
i
?
vCnf1
:
vCnf0
;
vCnf
=
i
?
vCnf1
:
vCnf0
;
// for ( k = 0; k < p->pSopSizes[uTruth]; k++ )
Vec_IntForEachEntry
(
vCnf
,
Cube
,
k
)
Vec_IntForEachEntry
(
vCnf
,
Cube
,
k
)
{
{
nClaLits
=
0
;
nClaLits
=
0
;
ClaLits
[
nClaLits
++
]
=
i
?
lit_neg
(
iLitOut
)
:
iLitOut
;
ClaLits
[
nClaLits
++
]
=
i
?
lit_neg
(
iLitOut
)
:
iLitOut
;
// Cube = p->pSops[uTruth][k];
// for ( b = 3; b >= 0; b-- )
for
(
b
=
0
;
b
<
5
;
b
++
)
for
(
b
=
0
;
b
<
5
;
b
++
)
{
{
Literal
=
3
&
(
Cube
>>
(
b
<<
1
));
Literal
=
3
&
(
Cube
>>
(
b
<<
1
));
if
(
Literal
==
1
)
// value 0 --> add positive literal
if
(
Literal
==
1
)
// value 0 --> add positive literal
{
{
// pCube[b] = '0';
// assert( Lits[b] > 1 );
// assert( Lits[b] > 1 );
ClaLits
[
nClaLits
++
]
=
Lits
[
b
];
ClaLits
[
nClaLits
++
]
=
Lits
[
b
];
}
}
else
if
(
Literal
==
2
)
// value 1 --> add negative literal
else
if
(
Literal
==
2
)
// value 1 --> add negative literal
{
{
// pCube[b] = '1';
// assert( Lits[b] > 1 );
// assert( Lits[b] > 1 );
ClaLits
[
nClaLits
++
]
=
lit_neg
(
Lits
[
b
]);
ClaLits
[
nClaLits
++
]
=
lit_neg
(
Lits
[
b
]);
}
}
else
if
(
Literal
!=
0
)
else
if
(
Literal
!=
0
)
assert
(
0
);
assert
(
0
);
}
}
// for ( b = 0; b < nClaLits; b++ )
// printf( "%d ", ClaLits[b] );
// printf( "\n" );
sat_solver2_addclause
(
p
->
pSat
,
ClaLits
,
ClaLits
+
nClaLits
,
ProofId
);
sat_solver2_addclause
(
p
->
pSat
,
ClaLits
,
ClaLits
+
nClaLits
,
ProofId
);
}
}
}
}
...
@@ -729,10 +708,6 @@ static inline void Ga2_ManSetupNode( Ga2_Man_t * p, Gia_Obj_t * pObj, int fAbs )
...
@@ -729,10 +708,6 @@ static inline void Ga2_ManSetupNode( Ga2_Man_t * p, Gia_Obj_t * pObj, int fAbs )
int
Id
=
Gia_ObjId
(
p
->
pGia
,
pObj
);
int
Id
=
Gia_ObjId
(
p
->
pGia
,
pObj
);
assert
(
pObj
->
fPhase
);
assert
(
pObj
->
fPhase
);
assert
(
Vec_PtrSize
(
p
->
vCnfs
)
==
2
*
Vec_IntSize
(
p
->
vValues
)
);
assert
(
Vec_PtrSize
(
p
->
vCnfs
)
==
2
*
Vec_IntSize
(
p
->
vValues
)
);
if
(
Gia_ObjId
(
p
->
pGia
,
pObj
)
==
4950
)
{
int
s
=
0
;
}
// assign abstraction ID to the node
// assign abstraction ID to the node
if
(
Ga2_ObjId
(
p
,
pObj
)
==
-
1
)
if
(
Ga2_ObjId
(
p
,
pObj
)
==
-
1
)
{
{
...
@@ -744,7 +719,6 @@ static inline void Ga2_ManSetupNode( Ga2_Man_t * p, Gia_Obj_t * pObj, int fAbs )
...
@@ -744,7 +719,6 @@ static inline void Ga2_ManSetupNode( Ga2_Man_t * p, Gia_Obj_t * pObj, int fAbs )
assert
(
Ga2_ObjCnf0
(
p
,
pObj
)
==
NULL
);
assert
(
Ga2_ObjCnf0
(
p
,
pObj
)
==
NULL
);
if
(
!
fAbs
)
if
(
!
fAbs
)
return
;
return
;
// assert( Vec_IntFind(p->vAbs, Gia_ObjId(p->pGia, pObj)) == -1 );
Vec_IntPush
(
p
->
vAbs
,
Gia_ObjId
(
p
->
pGia
,
pObj
)
);
Vec_IntPush
(
p
->
vAbs
,
Gia_ObjId
(
p
->
pGia
,
pObj
)
);
assert
(
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsRo
(
p
->
pGia
,
pObj
)
);
assert
(
Gia_ObjIsAnd
(
pObj
)
||
Gia_ObjIsRo
(
p
->
pGia
,
pObj
)
);
// compute parameters
// compute parameters
...
@@ -1022,7 +996,6 @@ Vec_Int_t * Ga2_ManAbsDerive( Gia_Man_t * p )
...
@@ -1022,7 +996,6 @@ Vec_Int_t * Ga2_ManAbsDerive( Gia_Man_t * p )
Gia_Obj_t
*
pObj
;
Gia_Obj_t
*
pObj
;
int
i
;
int
i
;
vToAdd
=
Vec_IntAlloc
(
1000
);
vToAdd
=
Vec_IntAlloc
(
1000
);
// Vec_IntPush( vToAdd, 0 ); // const 0
Gia_ManForEachRo
(
p
,
pObj
,
i
)
Gia_ManForEachRo
(
p
,
pObj
,
i
)
if
(
pObj
->
fPhase
&&
Vec_IntEntry
(
p
->
vGateClasses
,
Gia_ObjId
(
p
,
pObj
))
)
if
(
pObj
->
fPhase
&&
Vec_IntEntry
(
p
->
vGateClasses
,
Gia_ObjId
(
p
,
pObj
))
)
Vec_IntPush
(
vToAdd
,
Gia_ObjId
(
p
,
pObj
)
);
Vec_IntPush
(
vToAdd
,
Gia_ObjId
(
p
,
pObj
)
);
...
@@ -1576,9 +1549,6 @@ finish:
...
@@ -1576,9 +1549,6 @@ finish:
return
RetValue
;
return
RetValue
;
}
}
//#endif
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
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