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
a68ec38d
Commit
a68ec38d
authored
Jun 26, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes and improvements to different packages.
parent
2edf2a97
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
60 additions
and
18 deletions
+60
-18
abclib.dsp
+4
-0
src/aig/gia/gia.h
+35
-14
src/base/abci/abc.c
+3
-0
src/misc/util/utilNam.h
+3
-0
src/misc/vec/vecInt.h
+15
-4
No files found.
abclib.dsp
View file @
a68ec38d
...
@@ -3895,6 +3895,10 @@ SOURCE=.\src\aig\gia\giaStg.c
...
@@ -3895,6 +3895,10 @@ SOURCE=.\src\aig\gia\giaStg.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaStr.c
# End Source File
# Begin Source File
SOURCE=.\src\aig\gia\giaSupMin.c
SOURCE=.\src\aig\gia\giaSupMin.c
# End Source File
# End Source File
# Begin Source File
# Begin Source File
...
...
src/aig/gia/gia.h
View file @
a68ec38d
...
@@ -609,11 +609,20 @@ static inline int Gia_ManAppendXorReal( Gia_Man_t * p, int iLit0, int iLit1 )
...
@@ -609,11 +609,20 @@ static inline int Gia_ManAppendXorReal( Gia_Man_t * p, int iLit0, int iLit1 )
assert
(
Abc_Lit2Var
(
iLit0
)
!=
Abc_Lit2Var
(
iLit1
)
);
assert
(
Abc_Lit2Var
(
iLit0
)
!=
Abc_Lit2Var
(
iLit1
)
);
assert
(
!
Abc_LitIsCompl
(
iLit0
)
);
assert
(
!
Abc_LitIsCompl
(
iLit0
)
);
assert
(
!
Abc_LitIsCompl
(
iLit1
)
);
assert
(
!
Abc_LitIsCompl
(
iLit1
)
);
assert
(
Abc_Lit2Var
(
iLit0
)
>
Abc_Lit2Var
(
iLit1
)
);
if
(
Abc_Lit2Var
(
iLit0
)
>
Abc_Lit2Var
(
iLit1
)
)
pObj
->
iDiff0
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit0
);
{
pObj
->
fCompl0
=
Abc_LitIsCompl
(
iLit0
);
pObj
->
iDiff0
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit0
);
pObj
->
iDiff1
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit1
);
pObj
->
fCompl0
=
Abc_LitIsCompl
(
iLit0
);
pObj
->
fCompl1
=
Abc_LitIsCompl
(
iLit1
);
pObj
->
iDiff1
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit1
);
pObj
->
fCompl1
=
Abc_LitIsCompl
(
iLit1
);
}
else
{
pObj
->
iDiff1
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit0
);
pObj
->
fCompl1
=
Abc_LitIsCompl
(
iLit0
);
pObj
->
iDiff0
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit1
);
pObj
->
fCompl0
=
Abc_LitIsCompl
(
iLit1
);
}
p
->
nXors
++
;
p
->
nXors
++
;
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
}
}
...
@@ -627,13 +636,23 @@ static inline int Gia_ManAppendMuxReal( Gia_Man_t * p, int iLitC, int iLit1, int
...
@@ -627,13 +636,23 @@ static inline int Gia_ManAppendMuxReal( Gia_Man_t * p, int iLitC, int iLit1, int
assert
(
Abc_Lit2Var
(
iLit0
)
!=
Abc_Lit2Var
(
iLit1
)
);
assert
(
Abc_Lit2Var
(
iLit0
)
!=
Abc_Lit2Var
(
iLit1
)
);
assert
(
Abc_Lit2Var
(
iLitC
)
!=
Abc_Lit2Var
(
iLit0
)
);
assert
(
Abc_Lit2Var
(
iLitC
)
!=
Abc_Lit2Var
(
iLit0
)
);
assert
(
Abc_Lit2Var
(
iLitC
)
!=
Abc_Lit2Var
(
iLit1
)
);
assert
(
Abc_Lit2Var
(
iLitC
)
!=
Abc_Lit2Var
(
iLit1
)
);
assert
(
Abc_Lit2Var
(
iLit0
)
<
Abc_Lit2Var
(
iLit1
)
);
assert
(
!
p
->
pHTable
||
!
Abc_LitIsCompl
(
iLit1
)
);
assert
(
!
Abc_LitIsCompl
(
iLit1
)
);
if
(
Abc_Lit2Var
(
iLit0
)
<
Abc_Lit2Var
(
iLit1
)
)
pObj
->
iDiff0
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit0
);
{
pObj
->
fCompl0
=
Abc_LitIsCompl
(
iLit0
);
pObj
->
iDiff0
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit0
);
pObj
->
iDiff1
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit1
);
pObj
->
fCompl0
=
Abc_LitIsCompl
(
iLit0
);
pObj
->
fCompl1
=
Abc_LitIsCompl
(
iLit1
);
pObj
->
iDiff1
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit1
);
p
->
pMuxes
[
Gia_ObjId
(
p
,
pObj
)]
=
iLitC
;
pObj
->
fCompl1
=
Abc_LitIsCompl
(
iLit1
);
p
->
pMuxes
[
Gia_ObjId
(
p
,
pObj
)]
=
iLitC
;
}
else
{
pObj
->
iDiff1
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit0
);
pObj
->
fCompl1
=
Abc_LitIsCompl
(
iLit0
);
pObj
->
iDiff0
=
Gia_ObjId
(
p
,
pObj
)
-
Abc_Lit2Var
(
iLit1
);
pObj
->
fCompl0
=
Abc_LitIsCompl
(
iLit1
);
p
->
pMuxes
[
Gia_ObjId
(
p
,
pObj
)]
=
Abc_LitNot
(
iLitC
);
}
p
->
nMuxes
++
;
p
->
nMuxes
++
;
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
return
Gia_ObjId
(
p
,
pObj
)
<<
1
;
}
}
...
@@ -916,13 +935,15 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re
...
@@ -916,13 +935,15 @@ static inline int Gia_ObjLutFanin( Gia_Man_t * p, int Id, int i ) { re
for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Gia_ManObj(p, Abc_Lit2Var(Vec_IntEntry(vVec,i)))) && (((fCompl) = Abc_LitIsCompl(Vec_IntEntry(vVec,i))),1); i++ )
for ( i = 0; (i < Vec_IntSize(vVec)) && ((pObj) = Gia_ManObj(p, Abc_Lit2Var(Vec_IntEntry(vVec,i)))) && (((fCompl) = Abc_LitIsCompl(Vec_IntEntry(vVec,i))),1); i++ )
#define Gia_ManForEachObjReverse( p, pObj, i ) \
#define Gia_ManForEachObjReverse( p, pObj, i ) \
for ( i = p->nObjs - 1; (i >= 0) && ((pObj) = Gia_ManObj(p, i)); i-- )
for ( i = p->nObjs - 1; (i >= 0) && ((pObj) = Gia_ManObj(p, i)); i-- )
#define Gia_ManForEachObjReverse1( p, pObj, i )
\
#define Gia_ManForEachObjReverse1( p, pObj, i ) \
for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- )
for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- )
#define Gia_ManForEachAnd( p, pObj, i ) \
#define Gia_ManForEachAnd( p, pObj, i ) \
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsAnd(pObj) ) {} else
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsAnd(pObj) ) {} else
#define Gia_ManForEachAndId( p, i ) \
#define Gia_ManForEachAndId( p, i ) \
for ( i = 0; (i < p->nObjs); i++ ) if ( !Gia_ObjIsAnd(Gia_ManObj(p, i)) ) {} else
for ( i = 0; (i < p->nObjs); i++ ) if ( !Gia_ObjIsAnd(Gia_ManObj(p, i)) ) {} else
#define Gia_ManForEachCand( p, pObj, i ) \
#define Gia_ManForEachMuxId( p, i ) \
for ( i = 0; (i < p->nObjs); i++ ) if ( !Gia_ObjIsMuxId(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
for ( i = 0; (i < p->nObjs) && ((pObj) = Gia_ManObj(p, i)); i++ ) if ( !Gia_ObjIsCand(pObj) ) {} else
#define Gia_ManForEachAndReverse( p, pObj, i ) \
#define Gia_ManForEachAndReverse( p, pObj, i ) \
for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- ) if ( !Gia_ObjIsAnd(pObj) ) {} else
for ( i = p->nObjs - 1; (i > 0) && ((pObj) = Gia_ManObj(p, i)); i-- ) if ( !Gia_ObjIsAnd(pObj) ) {} else
...
...
src/base/abci/abc.c
View file @
a68ec38d
...
@@ -35937,6 +35937,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -35937,6 +35937,7 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// extern void Gia_ParTest( Gia_Man_t * p, int nWords, int nProcs );
// extern void Gia_ParTest( Gia_Man_t * p, int nWords, int nProcs );
// extern void Gia_ManTisTest( Gia_Man_t * pInit );
// extern void Gia_ManTisTest( Gia_Man_t * pInit );
extern
void
Gia_Iso3Test
(
Gia_Man_t
*
p
);
extern
void
Gia_Iso3Test
(
Gia_Man_t
*
p
);
// extern Gia_Man_t * Str_NormalizeTest( Gia_Man_t * p );
Extra_UtilGetoptReset
();
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WPFsvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"WPFsvh"
)
)
!=
EOF
)
...
@@ -36041,6 +36042,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
...
@@ -36041,6 +36042,8 @@ int Abc_CommandAbc9Test( Abc_Frame_t * pAbc, int argc, char ** argv )
// Gia_ManCheckFalseTest( pAbc->pGia, nFrames );
// Gia_ManCheckFalseTest( pAbc->pGia, nFrames );
// Gia_ParTest( pAbc->pGia, nWords, nProcs );
// Gia_ParTest( pAbc->pGia, nWords, nProcs );
Gia_Iso3Test
(
pAbc
->
pGia
);
Gia_Iso3Test
(
pAbc
->
pGia
);
// pTemp = Str_NormalizeTest( pAbc->pGia );
// Abc_FrameUpdateGia( pAbc, pTemp );
// printf( "\nThis command is currently disabled.\n\n" );
// printf( "\nThis command is currently disabled.\n\n" );
return
0
;
return
0
;
src/misc/util/utilNam.h
View file @
a68ec38d
...
@@ -42,6 +42,9 @@ typedef struct Abc_Nam_t_ Abc_Nam_t;
...
@@ -42,6 +42,9 @@ typedef struct Abc_Nam_t_ Abc_Nam_t;
/// MACRO DEFINITIONS ///
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
#define Abc_NamManForEachObj( p, pStr, i ) \
for ( i = 1; (i < Abc_NamObjNumMax(p)) && ((pStr) = Abc_NamStr(p, i)); i++ )
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DECLARATIONS ///
/// FUNCTION DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
...
...
src/misc/vec/vecInt.h
View file @
a68ec38d
...
@@ -1715,16 +1715,27 @@ static inline void Vec_IntSelectSort( int * pArray, int nSize )
...
@@ -1715,16 +1715,27 @@ static inline void Vec_IntSelectSort( int * pArray, int nSize )
***********************************************************************/
***********************************************************************/
static
inline
void
Vec_IntSelectSortCost
(
int
*
pArray
,
int
nSize
,
Vec_Int_t
*
vCosts
)
static
inline
void
Vec_IntSelectSortCost
(
int
*
pArray
,
int
nSize
,
Vec_Int_t
*
vCosts
)
{
{
int
temp
,
i
,
j
,
best_i
;
int
i
,
j
,
best_i
;
for
(
i
=
0
;
i
<
nSize
-
1
;
i
++
)
for
(
i
=
0
;
i
<
nSize
-
1
;
i
++
)
{
{
best_i
=
i
;
best_i
=
i
;
for
(
j
=
i
+
1
;
j
<
nSize
;
j
++
)
for
(
j
=
i
+
1
;
j
<
nSize
;
j
++
)
if
(
Vec_IntEntry
(
vCosts
,
pArray
[
j
])
<
Vec_IntEntry
(
vCosts
,
pArray
[
best_i
])
)
if
(
Vec_IntEntry
(
vCosts
,
pArray
[
j
])
<
Vec_IntEntry
(
vCosts
,
pArray
[
best_i
])
)
best_i
=
j
;
best_i
=
j
;
temp
=
pArray
[
i
];
ABC_SWAP
(
int
,
pArray
[
i
],
pArray
[
best_i
]
);
pArray
[
i
]
=
pArray
[
best_i
];
}
pArray
[
best_i
]
=
temp
;
}
static
inline
void
Vec_IntSelectSortCost2
(
int
*
pArray
,
int
nSize
,
int
*
pCosts
)
{
int
i
,
j
,
best_i
;
for
(
i
=
0
;
i
<
nSize
-
1
;
i
++
)
{
best_i
=
i
;
for
(
j
=
i
+
1
;
j
<
nSize
;
j
++
)
if
(
pCosts
[
j
]
<
pCosts
[
best_i
]
)
best_i
=
j
;
ABC_SWAP
(
int
,
pArray
[
i
],
pArray
[
best_i
]
);
ABC_SWAP
(
int
,
pCosts
[
i
],
pCosts
[
best_i
]
);
}
}
}
}
...
...
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