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
a3a6002b
Commit
a3a6002b
authored
Aug 04, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compiler warnings.
parent
1d9d6814
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
67 additions
and
11 deletions
+67
-11
src/aig/gia/giaBalance2.c
+6
-5
src/aig/gia/giaMf.c
+6
-5
src/map/if/ifDelay.c
+1
-0
src/map/if/ifMan.c
+1
-1
src/misc/util/utilTruth.h
+53
-0
No files found.
src/aig/gia/giaBalance2.c
View file @
a3a6002b
...
...
@@ -34,13 +34,14 @@ ABC_NAMESPACE_IMPL_START
#define BAL_CUT_MAX 8
#define BAL_SUPER 50
#define BAL_NO_LEAF 31
#define BAL_NO_FUNC 134217727 // (1<<27)-1
typedef
struct
Bal_Cut_t_
Bal_Cut_t
;
struct
Bal_Cut_t_
{
word
Sign
;
// signature
int
Delay
;
// delay
unsigned
iFunc
:
27
;
// function
unsigned
iFunc
:
27
;
// function
(BAL_NO_FUNC)
unsigned
nLeaves
:
5
;
// leaf number (Bal_NO_LEAF)
int
pLeaves
[
BAL_LEAF_MAX
];
// leaves
};
...
...
@@ -235,7 +236,7 @@ static inline int Bal_CutMergeOrder( Bal_Cut_t * pCut0, Bal_Cut_t * pCut1, Bal_C
pC
[
i
]
=
pC0
[
i
];
}
pCut
->
nLeaves
=
nLutSize
;
pCut
->
iFunc
=
-
1
;
pCut
->
iFunc
=
BAL_NO_FUNC
;
pCut
->
Sign
=
pCut0
->
Sign
|
pCut1
->
Sign
;
pCut
->
Delay
=
Abc_MaxInt
(
pCut0
->
Delay
,
pCut1
->
Delay
);
return
1
;
...
...
@@ -268,7 +269,7 @@ FlushCut0:
while
(
i
<
nSize0
)
pC
[
c
++
]
=
pC0
[
i
++
];
pCut
->
nLeaves
=
c
;
pCut
->
iFunc
=
-
1
;
pCut
->
iFunc
=
BAL_NO_FUNC
;
pCut
->
Sign
=
pCut0
->
Sign
|
pCut1
->
Sign
;
pCut
->
Delay
=
Abc_MaxInt
(
pCut0
->
Delay
,
pCut1
->
Delay
);
return
1
;
...
...
@@ -278,7 +279,7 @@ FlushCut1:
while
(
k
<
nSize1
)
pC
[
c
++
]
=
pC1
[
k
++
];
pCut
->
nLeaves
=
c
;
pCut
->
iFunc
=
-
1
;
pCut
->
iFunc
=
BAL_NO_FUNC
;
pCut
->
Sign
=
pCut0
->
Sign
|
pCut1
->
Sign
;
pCut
->
Delay
=
Abc_MaxInt
(
pCut0
->
Delay
,
pCut1
->
Delay
);
return
1
;
...
...
@@ -303,7 +304,7 @@ static inline int Bal_CutMergeOrderMux( Bal_Cut_t * pCut0, Bal_Cut_t * pCut1, Ba
if
(
x2
==
xMin
)
i2
++
;
}
pCut
->
nLeaves
=
c
;
pCut
->
iFunc
=
-
1
;
pCut
->
iFunc
=
BAL_NO_FUNC
;
pCut
->
Sign
=
pCut0
->
Sign
|
pCut1
->
Sign
|
pCut2
->
Sign
;
pCut
->
Delay
=
Abc_MaxInt
(
pCut0
->
Delay
,
Abc_MaxInt
(
pCut1
->
Delay
,
pCut2
->
Delay
)
);
return
1
;
...
...
src/aig/gia/giaMf.c
View file @
a3a6002b
...
...
@@ -35,6 +35,7 @@ ABC_NAMESPACE_IMPL_START
#define MF_LOG_PAGE 12
#define MF_NO_LEAF 31
#define MF_TT_WORDS ((MF_LEAF_MAX > 6) ? 1 << (MF_LEAF_MAX-6) : 1)
#define MF_NO_FUNC 134217727 // (1<<27)-1
typedef
struct
Mf_Cut_t_
Mf_Cut_t
;
struct
Mf_Cut_t_
...
...
@@ -42,7 +43,7 @@ struct Mf_Cut_t_
word
Sign
;
// signature
int
Delay
;
// delay
float
Flow
;
// flow
unsigned
iFunc
:
27
;
// function
unsigned
iFunc
:
27
;
// function
(MF_NO_FUNC)
unsigned
nLeaves
:
5
;
// leaf number (MF_NO_LEAF)
int
pLeaves
[
MF_LEAF_MAX
+
1
];
// leaves
};
...
...
@@ -785,7 +786,7 @@ static inline int Mf_CutMergeOrder( Mf_Cut_t * pCut0, Mf_Cut_t * pCut1, Mf_Cut_t
pC
[
i
]
=
pC0
[
i
];
}
pCut
->
nLeaves
=
nLutSize
;
pCut
->
iFunc
=
-
1
;
pCut
->
iFunc
=
MF_NO_FUNC
;
pCut
->
Sign
=
pCut0
->
Sign
|
pCut1
->
Sign
;
return
1
;
}
...
...
@@ -819,7 +820,7 @@ FlushCut0:
while
(
i
<
nSize0
)
pC
[
c
++
]
=
pC0
[
i
++
];
pCut
->
nLeaves
=
c
;
pCut
->
iFunc
=
-
1
;
pCut
->
iFunc
=
MF_NO_FUNC
;
pCut
->
Sign
=
pCut0
->
Sign
|
pCut1
->
Sign
;
return
1
;
...
...
@@ -828,7 +829,7 @@ FlushCut1:
while
(
k
<
nSize1
)
pC
[
c
++
]
=
pC1
[
k
++
];
pCut
->
nLeaves
=
c
;
pCut
->
iFunc
=
-
1
;
pCut
->
iFunc
=
MF_NO_FUNC
;
pCut
->
Sign
=
pCut0
->
Sign
|
pCut1
->
Sign
;
return
1
;
}
...
...
@@ -852,7 +853,7 @@ static inline int Mf_CutMergeOrderMux( Mf_Cut_t * pCut0, Mf_Cut_t * pCut1, Mf_Cu
if
(
x2
==
xMin
)
i2
++
;
}
pCut
->
nLeaves
=
c
;
pCut
->
iFunc
=
-
1
;
pCut
->
iFunc
=
MF_NO_FUNC
;
pCut
->
Sign
=
pCut0
->
Sign
|
pCut1
->
Sign
|
pCut2
->
Sign
;
return
1
;
}
...
...
src/map/if/ifDelay.c
View file @
a3a6002b
...
...
@@ -20,6 +20,7 @@
#include "if.h"
#include "ifCount.h"
#include "bool/kit/kit.h"
ABC_NAMESPACE_IMPL_START
...
...
src/map/if/ifMan.c
View file @
a3a6002b
...
...
@@ -79,7 +79,7 @@ If_Man_t * If_ManStart( If_Par_t * pPars )
for
(
v
=
0
;
v
<
6
;
v
++
)
p
->
vTtIsops
[
v
]
=
p
->
vTtIsops
[
6
];
}
if
(
p
->
pPars
->
fDelayOpt
||
pPars
->
nGateSize
>
0
||
p
->
pPars
->
fDsdBalance
);
if
(
p
Pars
->
fDelayOpt
||
pPars
->
nGateSize
>
0
||
pPars
->
fDsdBalance
)
{
p
->
vCover
=
Vec_IntAlloc
(
0
);
p
->
vArray
=
Vec_IntAlloc
(
1000
);
...
...
src/misc/util/utilTruth.h
View file @
a3a6002b
...
...
@@ -53,6 +53,15 @@ static word s_Truths6Neg[6] = {
ABC_CONST
(
0x00000000FFFFFFFF
)
};
static
word
s_TruthXors
[
6
]
=
{
ABC_CONST
(
0x0000000000000000
),
ABC_CONST
(
0x6666666666666666
),
ABC_CONST
(
0x6969696969696969
),
ABC_CONST
(
0x6996699669966996
),
ABC_CONST
(
0x6996966969969669
),
ABC_CONST
(
0x6996966996696996
)
};
static
word
s_PMasks
[
5
][
3
]
=
{
{
ABC_CONST
(
0x9999999999999999
),
ABC_CONST
(
0x2222222222222222
),
ABC_CONST
(
0x4444444444444444
)
},
{
ABC_CONST
(
0xC3C3C3C3C3C3C3C3
),
ABC_CONST
(
0x0C0C0C0C0C0C0C0C
),
ABC_CONST
(
0x3030303030303030
)
},
...
...
@@ -163,6 +172,19 @@ static inline int Abc_TtHexDigitNum( int nVars ) { return nVars <= 2 ? 1 : 1 <<
/**Function*************************************************************
Synopsis [Bit mask.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
word
Abc_Tt6Mask
(
int
nBits
)
{
assert
(
nBits
>=
0
&&
nBits
<=
64
);
return
(
~
(
word
)
0
)
>>
(
64
-
nBits
);
}
/**Function*************************************************************
Synopsis []
Description []
...
...
@@ -949,6 +971,37 @@ static inline int Abc_Tt6SupportAndSize( word t, int nVars, int * pSuppSize )
/**Function*************************************************************
Synopsis [Detecting elementary functions.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
int
Abc_TtOnlyOneOne
(
word
t
)
{
if
(
t
==
0
)
return
0
;
return
(
t
&
(
t
-
1
))
==
0
;
}
static
inline
int
Gia_ManTtIsAndType
(
word
t
,
int
nVars
)
{
return
Abc_TtOnlyOneOne
(
t
&
Abc_Tt6Mask
(
1
<<
nVars
)
);
}
static
inline
int
Gia_ManTtIsOrType
(
word
t
,
int
nVars
)
{
return
Abc_TtOnlyOneOne
(
~
t
&
Abc_Tt6Mask
(
1
<<
nVars
)
);
}
static
inline
int
Gia_ManTtIsXorType
(
word
t
,
int
nVars
)
{
return
((((
t
&
1
)
?
~
t
:
t
)
^
s_TruthXors
[
nVars
])
&
Abc_Tt6Mask
(
1
<<
nVars
))
==
0
;
}
/**Function*************************************************************
Synopsis []
Description []
...
...
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