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
1faab72a
Commit
1faab72a
authored
Apr 27, 2017
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with support minimization.
parent
0de189f4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
31 additions
and
20 deletions
+31
-20
abclib.dsp
+4
-0
src/aig/gia/gia.h
+6
-0
src/aig/gia/giaSupp.c
+0
-0
src/aig/gia/module.make
+1
-0
src/bdd/extrab/extraBddMisc.c
+16
-16
src/misc/extra/extraUtilCube.c
+2
-2
src/misc/extra/extraUtilEnum.c
+2
-2
No files found.
abclib.dsp
View file @
1faab72a
...
...
@@ -4807,6 +4807,10 @@ SOURCE=.\src\aig\gia\giaSupMin.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaSupp.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaSweep.c
# End Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
1faab72a
...
...
@@ -577,6 +577,7 @@ static inline int Gia_ObjIsTravIdCurrent( Gia_Man_t * p, Gia_Obj_t * pO
static
inline
int
Gia_ObjIsTravIdPrevious
(
Gia_Man_t
*
p
,
Gia_Obj_t
*
pObj
)
{
assert
(
Gia_ObjId
(
p
,
pObj
)
<
p
->
nTravIdsAlloc
);
return
(
p
->
pTravIds
[
Gia_ObjId
(
p
,
pObj
)]
==
p
->
nTravIds
-
1
);
}
static
inline
void
Gia_ObjSetTravIdCurrentId
(
Gia_Man_t
*
p
,
int
Id
)
{
assert
(
Id
<
p
->
nTravIdsAlloc
);
p
->
pTravIds
[
Id
]
=
p
->
nTravIds
;
}
static
inline
int
Gia_ObjIsTravIdCurrentId
(
Gia_Man_t
*
p
,
int
Id
)
{
assert
(
Id
<
p
->
nTravIdsAlloc
);
return
(
p
->
pTravIds
[
Id
]
==
p
->
nTravIds
);
}
static
inline
int
Gia_ObjIsTravIdPreviousId
(
Gia_Man_t
*
p
,
int
Id
)
{
assert
(
Id
<
p
->
nTravIdsAlloc
);
return
(
p
->
pTravIds
[
Id
]
==
p
->
nTravIds
-
1
);
}
static
inline
void
Gia_ManTimeClean
(
Gia_Man_t
*
p
)
{
int
i
;
assert
(
p
->
vTiming
!=
NULL
);
Vec_FltFill
(
p
->
vTiming
,
3
*
Gia_ManObjNum
(
p
),
0
);
for
(
i
=
0
;
i
<
Gia_ManObjNum
(
p
);
i
++
)
Vec_FltWriteEntry
(
p
->
vTiming
,
3
*
i
+
1
,
(
float
)(
ABC_INFINITY
)
);
}
static
inline
void
Gia_ManTimeStart
(
Gia_Man_t
*
p
)
{
assert
(
p
->
vTiming
==
NULL
);
p
->
vTiming
=
Vec_FltAlloc
(
0
);
Gia_ManTimeClean
(
p
);
}
...
...
@@ -1464,6 +1465,11 @@ extern int Gia_ManComputeOneWin( Gia_Man_t * p, int iPivot, Vec_
/*=== giaStg.c ============================================================*/
extern
void
Gia_ManStgPrint
(
FILE
*
pFile
,
Vec_Int_t
*
vLines
,
int
nIns
,
int
nOuts
,
int
nStates
);
extern
Gia_Man_t
*
Gia_ManStgRead
(
char
*
pFileName
,
int
kHot
,
int
fVerbose
);
/*=== giaSupp.c ============================================================*/
typedef
struct
Gia_ManMin_t_
Gia_ManMin_t
;
extern
Gia_ManMin_t
*
Gia_ManSuppStart
(
Gia_Man_t
*
pGia
);
extern
void
Gia_ManSuppStop
(
Gia_ManMin_t
*
p
);
extern
int
Gia_ManSupportAnd
(
Gia_ManMin_t
*
p
,
int
iLit0
,
int
iLit1
);
/*=== giaSweep.c ============================================================*/
extern
Gia_Man_t
*
Gia_ManFraigSweepSimple
(
Gia_Man_t
*
p
,
void
*
pPars
);
extern
Gia_Man_t
*
Gia_ManSweepWithBoxes
(
Gia_Man_t
*
p
,
void
*
pParsC
,
void
*
pParsS
,
int
fConst
,
int
fEquiv
,
int
fVerbose
,
int
fVerbEquivs
);
...
...
src/aig/gia/giaSupp.c
0 → 100644
View file @
1faab72a
This diff is collapsed.
Click to expand it.
src/aig/gia/module.make
View file @
1faab72a
...
...
@@ -76,6 +76,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaStg.c
\
src/aig/gia/giaStr.c
\
src/aig/gia/giaSupMin.c
\
src/aig/gia/giaSupp.c
\
src/aig/gia/giaSweep.c
\
src/aig/gia/giaSweeper.c
\
src/aig/gia/giaSwitch.c
\
...
...
src/bdd/extrab/extraBddMisc.c
View file @
1faab72a
...
...
@@ -58,8 +58,8 @@ static DdNode * cuddBddPermuteRecur ARGS( ( DdManager * manager, DdHashTable * t
static
DdNode
*
extraBddAndPermute
(
DdHashTable
*
table
,
DdManager
*
ddF
,
DdNode
*
bF
,
DdManager
*
ddG
,
DdNode
*
bG
,
int
*
pPermute
);
// file "cuddUtils.c"
static
void
ddSupportStep
(
DdNode
*
f
,
int
*
support
);
static
void
ddClearFlag
(
DdNode
*
f
);
void
ddSupportStep2
(
DdNode
*
f
,
int
*
support
);
void
ddClearFlag2
(
DdNode
*
f
);
static
DdNode
*
extraZddPrimes
(
DdManager
*
dd
,
DdNode
*
F
);
...
...
@@ -547,8 +547,8 @@ Extra_SupportArray(
support
[
i
]
=
0
;
/* Compute support and clean up markers. */
ddSupportStep
(
Cudd_Regular
(
f
),
support
);
ddClearFlag
(
Cudd_Regular
(
f
));
ddSupportStep
2
(
Cudd_Regular
(
f
),
support
);
ddClearFlag
2
(
Cudd_Regular
(
f
));
return
(
support
);
...
...
@@ -584,9 +584,9 @@ Extra_VectorSupportArray(
/* Compute support and clean up markers. */
for
(
i
=
0
;
i
<
n
;
i
++
)
ddSupportStep
(
Cudd_Regular
(
F
[
i
]),
support
);
ddSupportStep
2
(
Cudd_Regular
(
F
[
i
]),
support
);
for
(
i
=
0
;
i
<
n
;
i
++
)
ddClearFlag
(
Cudd_Regular
(
F
[
i
])
);
ddClearFlag
2
(
Cudd_Regular
(
F
[
i
])
);
return
support
;
}
...
...
@@ -782,8 +782,8 @@ DdNode * Extra_bddSupportNegativeCube( DdManager * dd, DdNode * f )
}
/* Compute support and clean up markers. */
ddSupportStep
(
Cudd_Regular
(
f
),
support
);
ddClearFlag
(
Cudd_Regular
(
f
)
);
ddSupportStep
2
(
Cudd_Regular
(
f
),
support
);
ddClearFlag
2
(
Cudd_Regular
(
f
)
);
/* Transform support from array to cube. */
do
...
...
@@ -1689,8 +1689,8 @@ extraTransferPermuteRecur(
SeeAlso [ddClearFlag]
******************************************************************************/
static
void
ddSupportStep
(
void
ddSupportStep
2
(
DdNode
*
f
,
int
*
support
)
{
...
...
@@ -1699,8 +1699,8 @@ ddSupportStep(
}
support
[
f
->
index
]
=
1
;
ddSupportStep
(
cuddT
(
f
),
support
);
ddSupportStep
(
Cudd_Regular
(
cuddE
(
f
)),
support
);
ddSupportStep
2
(
cuddT
(
f
),
support
);
ddSupportStep
2
(
Cudd_Regular
(
cuddE
(
f
)),
support
);
/* Mark as visited. */
f
->
next
=
Cudd_Not
(
f
->
next
);
return
;
...
...
@@ -1720,8 +1720,8 @@ ddSupportStep(
SeeAlso [ddSupportStep ddDagInt]
******************************************************************************/
static
void
ddClearFlag
(
void
ddClearFlag
2
(
DdNode
*
f
)
{
if
(
!
Cudd_IsComplement
(
f
->
next
))
{
...
...
@@ -1732,8 +1732,8 @@ ddClearFlag(
if
(
cuddIsConstant
(
f
))
{
return
;
}
ddClearFlag
(
cuddT
(
f
));
ddClearFlag
(
Cudd_Regular
(
cuddE
(
f
)));
ddClearFlag
2
(
cuddT
(
f
));
ddClearFlag
2
(
Cudd_Regular
(
cuddE
(
f
)));
return
;
}
/* end of ddClearFlag */
...
...
src/misc/extra/extraUtilCube.c
View file @
1faab72a
...
...
@@ -159,8 +159,8 @@ Iter 12 -> 3674160 Time = 70.48 sec
SeeAlso []
***********************************************************************/
static
inline
int
Abc_DataHasBit
(
word
*
p
,
word
i
)
{
return
(
p
[(
i
)
>>
6
]
&
(
1
<<
((
i
)
&
63
)))
>
0
;
}
static
inline
void
Abc_DataXorBit
(
word
*
p
,
word
i
)
{
p
[(
i
)
>>
6
]
^=
(
1
<<
((
i
)
&
63
));
}
static
inline
int
Abc_DataHasBit
(
word
*
p
,
word
i
)
{
return
(
p
[(
i
)
>>
6
]
&
(
((
word
)
1
)
<<
((
i
)
&
63
)))
>
0
;
}
static
inline
void
Abc_DataXorBit
(
word
*
p
,
word
i
)
{
p
[(
i
)
>>
6
]
^=
(
((
word
)
1
)
<<
((
i
)
&
63
));
}
static
inline
int
Abc_DataGetCube
(
word
w
,
int
i
)
{
return
(
w
>>
(
5
*
i
))
&
31
;
}
static
inline
word
Abc_DataXorCube
(
word
w
,
int
i
,
int
c
)
{
return
w
^
(((
word
)
c
)
<<
(
5
*
i
));
}
static
inline
word
Abc_CubeGenerateSign
(
char
*
pState
)
...
...
src/misc/extra/extraUtilEnum.c
View file @
1faab72a
...
...
@@ -298,8 +298,8 @@ void Abc_EnumPrint( Vec_Int_t * vGates, int i, int nVars )
SeeAlso []
***********************************************************************/
static
inline
int
Abc_DataHasBit
(
word
*
p
,
word
i
)
{
return
(
p
[(
i
)
>>
6
]
&
(
1
<<
((
i
)
&
63
)))
>
0
;
}
static
inline
void
Abc_DataXorBit
(
word
*
p
,
word
i
)
{
p
[(
i
)
>>
6
]
^=
(
1
<<
((
i
)
&
63
));
}
static
inline
int
Abc_DataHasBit
(
word
*
p
,
word
i
)
{
return
(
p
[(
i
)
>>
6
]
&
(
((
word
)
1
)
<<
((
i
)
&
63
)))
>
0
;
}
static
inline
void
Abc_DataXorBit
(
word
*
p
,
word
i
)
{
p
[(
i
)
>>
6
]
^=
(
((
word
)
1
)
<<
((
i
)
&
63
));
}
/**Function*************************************************************
...
...
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