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
b46ac51a
Commit
b46ac51a
authored
Mar 22, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with mapping.
parent
b5df218d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
14 deletions
+14
-14
src/aig/gia/giaKf.c
+14
-14
No files found.
src/aig/gia/giaKf.c
View file @
b46ac51a
/**CFile****************************************************************
FileName [gia
Cutt
.c]
FileName [gia
Kf
.c]
SystemName [ABC: Logic synthesis and verification system.]
...
...
@@ -14,7 +14,7 @@
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: gia
Cutt
.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
Revision [$Id: gia
Kf
.c,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
...
...
@@ -64,7 +64,7 @@ struct Kf_Set_t_
int
pTable
[
1
<<
KF_LOG_TABLE
];
int
pValue
[
1
<<
KF_LOG_TABLE
];
int
pPlace
[
KF_LEAF_MAX
];
int
pList
[
KF_LEAF_MAX
];
int
pList
[
KF_LEAF_MAX
+
1
];
Kf_Cut_t
pCuts0
[
KF_NUM_MAX
];
Kf_Cut_t
pCuts1
[
KF_NUM_MAX
];
Kf_Cut_t
pCutsR
[
KF_NUM_MAX
*
KF_NUM_MAX
];
...
...
@@ -99,8 +99,8 @@ static inline int * Kf_ObjCuts1( Kf_Man_t * p, int i ) { ret
static
inline
int
*
Kf_ObjCutBest
(
Kf_Man_t
*
p
,
int
i
)
{
int
*
pCuts
=
Kf_ObjCuts
(
p
,
i
);
return
pCuts
+
pCuts
[
1
];
}
#define Kf_ObjForEachCutInt( pList, pCut, i ) for ( i = 0, pCut = pList + KF_ADD_ON1; i < pList[0]; i++, pCut += pCut[0] + KF_ADD_ON2 )
#define Kf_ListForEachCut
t
( p, iList, pCut ) for ( pCut = Kf_SetCut(p, p->pList[iList]); pCut; pCut = Kf_SetCut(p, pCut->iNext) )
#define Kf_ListForEachCut
t
P( p, iList, pCut, pPlace ) for ( pPlace = p->pList+iList, pCut = Kf_SetCut(p, *pPlace); pCut; pCut = Kf_SetCut(p, *pPlace) )
#define Kf_ListForEachCut( p, iList, pCut ) for ( pCut = Kf_SetCut(p, p->pList[iList]); pCut; pCut = Kf_SetCut(p, pCut->iNext) )
#define Kf_ListForEachCutP( p, iList, pCut, pPlace ) for ( pPlace = p->pList+iList, pCut = Kf_SetCut(p, *pPlace); pCut; pCut = Kf_SetCut(p, *pPlace) )
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
...
...
@@ -217,7 +217,7 @@ static inline void Kf_SetAddToList( Kf_Set_t * p, Kf_Cut_t * pCut, int fSort )
int
Value
,
*
pPlace
;
Kf_Cut_t
*
pTemp
;
Vec_IntSelectSort
(
pCut
->
pLeaves
,
pCut
->
nLeaves
);
Kf_ListForEachCut
t
P
(
p
,
pCut
->
nLeaves
,
pTemp
,
pPlace
)
Kf_ListForEachCutP
(
p
,
pCut
->
nLeaves
,
pTemp
,
pPlace
)
{
if
(
(
Value
=
Kf_SetCompareCuts
(
pTemp
,
pCut
))
>
0
)
break
;
...
...
@@ -268,7 +268,7 @@ static inline Kf_Cut_t * Kf_SetSelectBest( Kf_Set_t * p, int fArea, int fSort )
Kf_Cut_t
*
pCut
,
*
pCutBest
;
int
i
,
nCuts
=
0
;
for
(
i
=
0
;
i
<=
p
->
nLutSize
;
i
++
)
Kf_ListForEachCut
t
(
p
,
i
,
pCut
)
Kf_ListForEachCut
(
p
,
i
,
pCut
)
nCuts
=
Kf_SetStoreAddOne
(
p
,
nCuts
,
p
->
nCutNum
-
1
,
pCut
,
fArea
);
assert
(
nCuts
>
0
&&
nCuts
<
p
->
nCutNum
);
p
->
nCuts
=
nCuts
;
...
...
@@ -282,7 +282,7 @@ static inline Kf_Cut_t * Kf_SetSelectBest( Kf_Set_t * p, int fArea, int fSort )
Kf_SetAddToList
(
p
,
p
->
ppCuts
[
i
],
0
);
p
->
nCuts
=
0
;
for
(
i
=
p
->
nLutSize
;
i
>=
0
;
i
--
)
Kf_ListForEachCut
t
(
p
,
i
,
pCut
)
Kf_ListForEachCut
(
p
,
i
,
pCut
)
p
->
ppCuts
[
p
->
nCuts
++
]
=
pCut
;
assert
(
p
->
nCuts
==
nCuts
);
return
pCutBest
;
...
...
@@ -360,7 +360,7 @@ static inline int Kf_SetCutDominatedByThis( Kf_Set_t * p, Kf_Cut_t * pCut )
static
inline
int
Kf_SetRemoveDuplicates
(
Kf_Set_t
*
p
,
int
nLeaves
,
word
Sign
)
{
Kf_Cut_t
*
pCut
;
Kf_ListForEachCut
t
(
p
,
nLeaves
,
pCut
)
Kf_ListForEachCut
(
p
,
nLeaves
,
pCut
)
if
(
pCut
->
Sign
==
Sign
&&
Kf_SetCutDominatedByThis
(
p
,
pCut
)
)
return
1
;
return
0
;
...
...
@@ -371,11 +371,11 @@ static inline void Kf_SetFilter( Kf_Set_t * p )
int
i
,
k
,
*
pPlace
;
assert
(
p
->
nCuts
>
0
);
for
(
i
=
0
;
i
<=
p
->
nLutSize
;
i
++
)
Kf_ListForEachCut
t
P
(
p
,
i
,
pCut0
,
pPlace
)
Kf_ListForEachCutP
(
p
,
i
,
pCut0
,
pPlace
)
{
Kf_HashPopulate
(
p
,
pCut0
);
for
(
k
=
0
;
k
<
pCut0
->
nLeaves
;
k
++
)
Kf_ListForEachCut
t
(
p
,
k
,
pCut1
)
Kf_ListForEachCut
(
p
,
k
,
pCut1
)
if
(
(
pCut0
->
Sign
&
pCut1
->
Sign
)
==
pCut1
->
Sign
&&
Kf_SetCutDominatedByThis
(
p
,
pCut1
)
)
{
k
=
pCut0
->
nLeaves
+
1
;
p
->
nCuts
--
;
break
;
}
if
(
k
==
pCut0
->
nLeaves
+
1
)
// remove pCut0
...
...
@@ -541,7 +541,7 @@ FlushCut1:
static
inline
int
Kf_SetRemoveDuplicates2
(
Kf_Set_t
*
p
,
Kf_Cut_t
*
pCutNew
)
{
Kf_Cut_t
*
pCut
;
Kf_ListForEachCut
t
(
p
,
pCutNew
->
nLeaves
,
pCut
)
Kf_ListForEachCut
(
p
,
pCutNew
->
nLeaves
,
pCut
)
if
(
pCut
->
Sign
==
pCutNew
->
Sign
&&
Kf_SetCutIsContainedOrder
(
pCut
,
pCutNew
)
)
return
1
;
return
0
;
...
...
@@ -552,10 +552,10 @@ static inline void Kf_SetFilter2( Kf_Set_t * p )
int
i
,
k
,
*
pPlace
;
assert
(
p
->
nCuts
>
0
);
for
(
i
=
0
;
i
<=
p
->
nLutSize
;
i
++
)
Kf_ListForEachCut
t
P
(
p
,
i
,
pCut0
,
pPlace
)
Kf_ListForEachCutP
(
p
,
i
,
pCut0
,
pPlace
)
{
for
(
k
=
0
;
k
<
pCut0
->
nLeaves
;
k
++
)
Kf_ListForEachCut
t
(
p
,
k
,
pCut1
)
Kf_ListForEachCut
(
p
,
k
,
pCut1
)
if
(
(
pCut0
->
Sign
&
pCut1
->
Sign
)
==
pCut1
->
Sign
&&
Kf_SetCutIsContainedOrder
(
pCut0
,
pCut1
)
)
{
k
=
pCut0
->
nLeaves
+
1
;
p
->
nCuts
--
;
break
;
}
if
(
k
==
pCut0
->
nLeaves
+
1
)
// remove pCut0
...
...
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