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
93d89eaa
Commit
93d89eaa
authored
Jun 10, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Various modifications.
parent
9c8db283
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
246 additions
and
8 deletions
+246
-8
abclib.dsp
+4
-0
src/aig/gia/gia.h
+9
-0
src/aig/gia/giaMan.c
+18
-3
src/aig/gia/giaUtil.c
+28
-0
src/aig/gia/module.make
+1
-0
src/base/abci/abc.c
+174
-2
src/misc/vec/vecInt.h
+5
-0
src/misc/vec/vecPtr.h
+7
-3
No files found.
abclib.dsp
View file @
93d89eaa
...
...
@@ -3811,6 +3811,10 @@ SOURCE=.\src\aig\gia\giaKf.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaLf.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaMan.c
# End Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
93d89eaa
...
...
@@ -197,6 +197,7 @@ struct Gps_Par_t_
int
fCut
;
int
fNpn
;
int
fLutProf
;
int
fMuxXor
;
char
*
pDumpFile
;
};
...
...
@@ -912,10 +913,14 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re
for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- )
#define Gia_ManForEachAnd( p, pObj, i ) \
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsAnd(pObj) ) {} else
#define Gia_ManForEachAndId( p, i ) \
for ( i = 0; (i < p->nObjs); i++ ) if ( !Gia_ObjIsAnd(Gia_ManObj(p, i)) ) {} else
#define Gia_ManForEachCand( p, pObj, i ) \
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsCand(pObj) ) {} else
#define Gia_ManForEachAndReverse( p, pObj, i ) \
for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- ) if ( !Gia_ObjIsAnd(pObj) ) {} else
#define Gia_ManForEachAndReverseId( p, i ) \
for ( i = p->nObjs - 1; (i > 0); i-- ) if ( !Gia_ObjIsAnd(Gia_ManObj(p, i)) ) {} else
#define Gia_ManForEachMux( p, pObj, i ) \
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsMuxId(p, i) ) {} else
#define Gia_ManForEachCi( p, pObj, i ) \
...
...
@@ -928,6 +933,8 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re
for ( i = Vec_IntSize(p->vCos) - 1; (i >= 0) && ((pObj) = Gia_ManCo(p, i)); i-- )
#define Gia_ManForEachCoDriver( p, pObj, i ) \
for ( i = 0; (i < Vec_IntSize(p->vCos)) && ((pObj) = Gia_ObjFanin0(Gia_ManCo(p, i))); i++ )
#define Gia_ManForEachCoDriverId( p, DriverId, i ) \
for ( i = 0; (i < Vec_IntSize(p->vCos)) && (((DriverId) = Gia_ObjFaninId0p(p, Gia_ManCo(p, i))), 1); i++ )
#define Gia_ManForEachPi( p, pObj, i ) \
for ( i = 0; (i < Gia_ManPiNum(p)) && ((pObj) = Gia_ManCi(p, i)); i++ )
#define Gia_ManForEachPo( p, pObj, i ) \
...
...
@@ -1114,6 +1121,7 @@ extern int Gia_ManLutNum( Gia_Man_t * p );
extern
int
Gia_ManLutLevel
(
Gia_Man_t
*
p
);
extern
void
Gia_ManSetRefsMapped
(
Gia_Man_t
*
p
);
extern
void
Gia_ManSetIfParsDefault
(
void
*
pIfPars
);
extern
void
Gia_ManMappingVerify
(
Gia_Man_t
*
p
);
extern
Gia_Man_t
*
Gia_ManPerformMapping
(
Gia_Man_t
*
p
,
void
*
pIfPars
,
int
fNormalized
);
/*=== giaJf.c ===========================================================*/
extern
void
Jf_ManSetDefaultPars
(
Jf_Par_t
*
pPars
);
...
...
@@ -1269,6 +1277,7 @@ extern Vec_Int_t * Gia_ManRequiredLevel( Gia_Man_t * p );
extern
void
Gia_ManCreateValueRefs
(
Gia_Man_t
*
p
);
extern
void
Gia_ManCreateRefs
(
Gia_Man_t
*
p
);
extern
int
*
Gia_ManCreateMuxRefs
(
Gia_Man_t
*
p
);
extern
void
Gia_ManCountMuxXor
(
Gia_Man_t
*
p
,
int
*
pnMuxes
,
int
*
pnXors
);
extern
int
Gia_ManCrossCut
(
Gia_Man_t
*
p
,
int
fReverse
);
extern
int
Gia_ManIsNormalized
(
Gia_Man_t
*
p
);
extern
Vec_Int_t
*
Gia_ManCollectPoIds
(
Gia_Man_t
*
p
);
...
...
src/aig/gia/giaMan.c
View file @
93d89eaa
...
...
@@ -423,9 +423,24 @@ void Gia_ManPrintStats( Gia_Man_t * p, Gps_Par_t * pPars )
Abc_Print
(
1
,
" ch =%5d"
,
Gia_ManEquivCountClasses
(
p
)
);
if
(
p
->
pMuxes
)
{
Abc_Print
(
1
,
" and =%5d"
,
Gia_ManAndNum
(
p
)
-
Gia_ManXorNum
(
p
)
-
Gia_ManMuxNum
(
p
)
);
Abc_Print
(
1
,
" xor =%5d"
,
Gia_ManXorNum
(
p
)
);
Abc_Print
(
1
,
" mux =%5d"
,
Gia_ManMuxNum
(
p
)
);
int
nAnds
=
Gia_ManAndNum
(
p
)
-
Gia_ManXorNum
(
p
)
-
Gia_ManMuxNum
(
p
);
int
nXors
=
Gia_ManXorNum
(
p
);
int
nMuxes
=
Gia_ManMuxNum
(
p
);
int
nTotal
=
nAnds
+
3
*
nXors
+
3
*
nMuxes
;
Abc_Print
(
1
,
"
\n
XOR/MUX stats:"
);
Abc_Print
(
1
,
" xor =%8d (%6.2f %%) "
,
nXors
,
300
.
0
*
nXors
/
nTotal
);
Abc_Print
(
1
,
" mux =%8d (%6.2f %%) "
,
nMuxes
,
300
.
0
*
nMuxes
/
nTotal
);
Abc_Print
(
1
,
" and =%8d (%6.2f %%) "
,
nAnds
,
100
.
0
*
nAnds
/
nTotal
);
}
else
if
(
pPars
->
fMuxXor
)
{
int
nAnds
,
nMuxes
,
nXors
,
nTotal
=
Gia_ManAndNum
(
p
);
Gia_ManCountMuxXor
(
p
,
&
nMuxes
,
&
nXors
);
nAnds
=
Gia_ManAndNum
(
p
)
-
3
*
nMuxes
-
3
*
nXors
;
Abc_Print
(
1
,
"
\n
XOR/MUX stats:"
);
Abc_Print
(
1
,
" xor =%8d (%6.2f %%) "
,
nXors
,
300
.
0
*
nXors
/
nTotal
);
Abc_Print
(
1
,
" mux =%8d (%6.2f %%) "
,
nMuxes
,
300
.
0
*
nMuxes
/
nTotal
);
Abc_Print
(
1
,
" and =%8d (%6.2f %%) "
,
nAnds
,
100
.
0
*
nAnds
/
nTotal
);
}
if
(
pPars
&&
pPars
->
fSwitch
)
{
...
...
src/aig/gia/giaUtil.c
View file @
93d89eaa
...
...
@@ -746,6 +746,34 @@ int * Gia_ManCreateMuxRefs( Gia_Man_t * p )
/**Function*************************************************************
Synopsis [Assigns references.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
void
Gia_ManCountMuxXor
(
Gia_Man_t
*
p
,
int
*
pnMuxes
,
int
*
pnXors
)
{
Gia_Obj_t
*
pObj
,
*
pFan0
,
*
pFan1
;
int
i
;
*
pnMuxes
=
0
;
*
pnXors
=
0
;
Gia_ManForEachAnd
(
p
,
pObj
,
i
)
{
if
(
!
Gia_ObjIsMuxType
(
pObj
)
)
continue
;
if
(
Gia_ObjRecognizeExor
(
pObj
,
&
pFan0
,
&
pFan1
)
)
(
*
pnXors
)
++
;
else
(
*
pnMuxes
)
++
;
}
}
/**Function*************************************************************
Synopsis [Computes the maximum frontier size.]
Description []
...
...
src/aig/gia/module.make
View file @
93d89eaa
...
...
@@ -33,6 +33,7 @@ SRC += src/aig/gia/giaAig.c \
src/aig/gia/giaIso3.c
\
src/aig/gia/giaJf.c
\
src/aig/gia/giaKf.c
\
src/aig/gia/giaLf.c
\
src/aig/gia/giaMan.c
\
src/aig/gia/giaMem.c
\
src/aig/gia/giaMfs.c
\
...
...
src/base/abci/abc.c
View file @
93d89eaa
This diff is collapsed.
Click to expand it.
src/misc/vec/vecInt.h
View file @
93d89eaa
...
...
@@ -480,6 +480,11 @@ static inline void Vec_IntUpdateEntry( Vec_Int_t * p, int i, int Value )
if
(
Vec_IntEntry
(
p
,
i
)
<
Value
)
Vec_IntWriteEntry
(
p
,
i
,
Value
);
}
static
inline
void
Vec_IntDowndateEntry
(
Vec_Int_t
*
p
,
int
i
,
int
Value
)
{
if
(
Vec_IntEntry
(
p
,
i
)
>
Value
)
Vec_IntWriteEntry
(
p
,
i
,
Value
);
}
/**Function*************************************************************
...
...
src/misc/vec/vecPtr.h
View file @
93d89eaa
...
...
@@ -558,14 +558,18 @@ static inline void Vec_PtrClear( Vec_Ptr_t * p )
SeeAlso []
***********************************************************************/
static
inline
void
Vec_PtrFree
Free
(
Vec_Ptr_t
*
p
)
static
inline
void
Vec_PtrFree
Data
(
Vec_Ptr_t
*
p
)
{
void
*
pTemp
;
int
i
;
void
*
pTemp
;
int
i
;
if
(
p
==
NULL
)
return
;
Vec_PtrForEachEntry
(
void
*
,
p
,
pTemp
,
i
)
if
(
pTemp
!=
(
void
*
)(
ABC_PTRINT_T
)
1
&&
pTemp
!=
(
void
*
)(
ABC_PTRINT_T
)
2
)
ABC_FREE
(
pTemp
);
}
static
inline
void
Vec_PtrFreeFree
(
Vec_Ptr_t
*
p
)
{
if
(
p
==
NULL
)
return
;
Vec_PtrFreeData
(
p
);
Vec_PtrFree
(
p
);
}
...
...
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