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
c1edeccc
Commit
c1edeccc
authored
Sep 17, 2011
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
64-bit portability changes.
parent
8248691d
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
46 additions
and
35 deletions
+46
-35
.hgignore
+5
-0
src/aig/bdc/bdcSpfd.c
+5
-5
src/aig/gia/giaAiger.c
+9
-9
src/aig/llb/llb4Nonlin.c
+1
-1
src/aig/saig/saigAbsPba.c
+2
-2
src/aig/ssw/sswRarity.c
+6
-3
src/base/abc/abcNtk.c
+7
-7
src/base/abci/abcIf.c
+1
-1
src/base/cmd/cmdPlugin.c
+2
-2
src/map/if/ifDec07.c
+2
-0
src/map/if/ifDec08.c
+2
-0
src/map/if/ifDec10.c
+2
-3
src/misc/vec/vecVec.h
+2
-2
No files found.
.hgignore
View file @
c1edeccc
...
...
@@ -32,6 +32,11 @@ src/aig/ddb/
abcspaceext.dsw
abcext.dsp
abcexe.vcproj*
abclib.vcproj*
abcspace.sln
abcspace.suo
*.pyc
src/python/build
...
...
src/aig/bdc/bdcSpfd.c
View file @
c1edeccc
...
...
@@ -19,6 +19,7 @@
***********************************************************************/
#include "bdcInt.h"
#include "aig.h"
ABC_NAMESPACE_IMPL_START
...
...
@@ -93,7 +94,6 @@ int Bdc_SpfdAdjCost( word t )
extern
void
Abc_Show6VarFunc
(
word
F0
,
word
F1
);
extern
word
Aig_ManRandom64
(
int
fReset
);
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
...
...
@@ -254,12 +254,12 @@ Abc_PrintTime( 1, "Time", clock() - clk );
{
clk
=
clock
();
c
=
0
;
pNode1
=
Vec_PtrEntry
(
vLevels
,
n
-
1
);
pNode1
=
(
Bdc_Nod_t
*
)
Vec_PtrEntry
(
vLevels
,
n
-
1
);
Count1
=
Vec_IntEntry
(
vBegs
,
n
-
1
);
// go through previous levels
for
(
k
=
0
;
k
<
n
-
1
;
k
++
)
{
pNode0
=
Vec_PtrEntry
(
vLevels
,
k
);
pNode0
=
(
Bdc_Nod_t
*
)
Vec_PtrEntry
(
vLevels
,
k
);
Count0
=
Vec_IntEntry
(
vBegs
,
k
);
for
(
i
=
0
;
i
<
Count0
;
i
++
)
for
(
j
=
0
;
j
<
Count1
;
j
++
)
...
...
@@ -915,8 +915,8 @@ void Bdc_SpfdDecomposeTest44()
Vec_Int_t
*
vWeights
;
Vec_Wrd_t
*
vDivs
;
word
c0
,
c1
,
s
,
tt
,
t
tt
,
t
best
;
int
i
,
j
,
k
,
n
,
Cost
,
CostBest
=
100000
;
word
c0
,
c1
,
s
,
tt
,
tbest
;
int
i
,
j
,
Cost
,
CostBest
=
100000
;
int
clk
=
clock
();
return
;
...
...
src/aig/gia/giaAiger.c
View file @
c1edeccc
...
...
@@ -490,7 +490,7 @@ Gia_Man_t * Gia_ReadAiger2( char * pFileName, int fCheck )
// check if there are other types of information to read
pCur
=
pSymbols
;
if
(
(
char
*
)
pCur
+
1
<
pContents
+
nFileSize
&&
*
pCur
==
'c'
)
if
(
pCur
+
1
<
(
unsigned
char
*
)
pContents
+
nFileSize
&&
*
pCur
==
'c'
)
{
pCur
++
;
if
(
*
pCur
==
'e'
)
...
...
@@ -695,7 +695,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
// check if there are other types of information to read
pCur
=
pSymbols
;
if
(
(
char
*
)
pCur
+
1
<
pContents
+
nFileSize
&&
*
pCur
==
'c'
)
if
(
pCur
+
1
<
(
unsigned
char
*
)
pContents
+
nFileSize
&&
*
pCur
==
'c'
)
{
pCur
++
;
if
(
*
pCur
==
'e'
)
...
...
@@ -749,11 +749,11 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
if
(
*
pCur
!=
'c'
)
{
int
fBreakUsed
=
0
;
char
*
pCurOld
=
pCur
;
unsigned
char
*
pCurOld
=
pCur
;
pNew
->
vUserPiIds
=
Vec_IntStartFull
(
nInputs
);
pNew
->
vUserPoIds
=
Vec_IntStartFull
(
nOutputs
);
pNew
->
vUserFfIds
=
Vec_IntStartFull
(
nLatches
);
while
(
(
char
*
)
pCur
<
pContents
+
nFileSize
&&
*
pCur
!=
'c'
)
while
(
pCur
<
(
unsigned
char
*
)
pContents
+
nFileSize
&&
*
pCur
!=
'c'
)
{
int
iTerm
;
char
*
pType
=
(
char
*
)
pCur
;
...
...
@@ -796,7 +796,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
// in case of abnormal termination, remove the arrays
if
(
fBreakUsed
)
{
char
*
pName
;
unsigned
char
*
pName
;
int
Entry
,
nInvars
,
nConstr
,
iTerm
;
Vec_Int_t
*
vPoNames
=
Vec_IntStartFull
(
nOutputs
);
...
...
@@ -807,8 +807,8 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
// try to figure out signal names
fBreakUsed
=
0
;
pCur
=
pCurOld
;
while
(
pCur
<
pContents
+
nFileSize
&&
*
pCur
!=
'c'
)
pCur
=
(
unsigned
char
*
)
pCurOld
;
while
(
pCur
<
(
unsigned
char
*
)
pContents
+
nFileSize
&&
*
pCur
!=
'c'
)
{
// get the terminal type
if
(
*
pCur
==
'i'
||
*
pCur
==
'l'
)
...
...
@@ -825,7 +825,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
break
;
}
// get the terminal number
iTerm
=
atoi
(
++
pCur
);
while
(
*
pCur
++
!=
' '
);
iTerm
=
atoi
(
(
char
*
)
++
pCur
);
while
(
*
pCur
++
!=
' '
);
// get the node
if
(
iTerm
<
0
||
iTerm
>=
nOutputs
)
{
...
...
@@ -844,7 +844,7 @@ Gia_Man_t * Gia_ReadAigerFromMemory( char * pContents, int nFileSize, int fCheck
pName
=
pCur
;
while
(
*
pCur
++
!=
'\n'
);
*
(
pCur
-
1
)
=
0
;
// assign the name
Vec_IntWriteEntry
(
vPoNames
,
iTerm
,
pName
-
pContents
);
Vec_IntWriteEntry
(
vPoNames
,
iTerm
,
pName
-
(
unsigned
char
*
)
pContents
);
}
// check that all names are assigned
...
...
src/aig/llb/llb4Nonlin.c
View file @
c1edeccc
...
...
@@ -995,7 +995,7 @@ void Llb_MnxStop( Llb_Mnx_t * p )
Cudd_RecursiveDeref
(
p
->
dd
,
p
->
bCurrent
);
if
(
p
->
bNext
)
Cudd_RecursiveDeref
(
p
->
dd
,
p
->
bNext
);
if
(
p
->
vRings
)
;
if
(
p
->
vRings
)
Vec_PtrForEachEntry
(
DdNode
*
,
p
->
vRings
,
bTemp
,
i
)
Cudd_RecursiveDeref
(
p
->
dd
,
bTemp
);
if
(
p
->
vRoots
)
...
...
src/aig/saig/saigAbsPba.c
View file @
c1edeccc
...
...
@@ -134,7 +134,7 @@ Aig_Man_t * Saig_ManUnrollForPba( Aig_Man_t * pAig, int nStart, int nFrames, Vec
if
(
f
>=
nStart
)
{
Saig_ManForEachPo
(
pAig
,
pObj
,
i
)
pObjNew
=
Aig_Or
(
pFrames
,
pObjNew
,
pObj
->
pData
);
pObjNew
=
Aig_Or
(
pFrames
,
pObjNew
,
(
Aig_Obj_t
*
)
pObj
->
pData
);
}
// transfer
if
(
f
==
nFrames
-
1
)
...
...
@@ -146,7 +146,7 @@ Aig_Man_t * Saig_ManUnrollForPba( Aig_Man_t * pAig, int nStart, int nFrames, Vec
{
int
iFlopNum
=
Aig_ObjPioNum
(
pObj
)
-
Saig_ManPoNum
(
pAig
);
assert
(
iFlopNum
>=
0
&&
iFlopNum
<
Aig_ManRegNum
(
pAig
)
);
Saig_ObjLiToLo
(
pAig
,
pObj
)
->
pData
=
Aig_Mux
(
pFrames
,
Aig_ManPi
(
pFrames
,
iFlopNum
),
Aig_ObjCreatePi
(
pFrames
),
pObj
->
pData
);
Saig_ObjLiToLo
(
pAig
,
pObj
)
->
pData
=
Aig_Mux
(
pFrames
,
Aig_ManPi
(
pFrames
,
iFlopNum
),
Aig_ObjCreatePi
(
pFrames
),
(
Aig_Obj_t
*
)
pObj
->
pData
);
}
}
}
...
...
src/aig/ssw/sswRarity.c
View file @
c1edeccc
...
...
@@ -429,8 +429,9 @@ void Ssw_RarManInitialize( Ssw_RarMan_t * p, Vec_Int_t * vInit )
SeeAlso []
***********************************************************************/
int
Ssw_RarManObjIsConst
(
Ssw_RarMan_t
*
p
,
Aig_Obj_t
*
pObj
)
int
Ssw_RarManObjIsConst
(
void
*
pMan
,
Aig_Obj_t
*
pObj
)
{
Ssw_RarMan_t
*
p
=
(
Ssw_RarMan_t
*
)
pMan
;
word
*
pSim
=
Ssw_RarObjSim
(
p
,
Aig_ObjId
(
pObj
)
);
word
Flip
=
pObj
->
fPhase
?
~
0
:
0
;
int
w
;
...
...
@@ -451,8 +452,9 @@ int Ssw_RarManObjIsConst( Ssw_RarMan_t * p, Aig_Obj_t * pObj )
SeeAlso []
***********************************************************************/
int
Ssw_RarManObjsAreEqual
(
Ssw_RarMan_t
*
p
,
Aig_Obj_t
*
pObj0
,
Aig_Obj_t
*
pObj1
)
int
Ssw_RarManObjsAreEqual
(
void
*
pMan
,
Aig_Obj_t
*
pObj0
,
Aig_Obj_t
*
pObj1
)
{
Ssw_RarMan_t
*
p
=
(
Ssw_RarMan_t
*
)
pMan
;
word
*
pSim0
=
Ssw_RarObjSim
(
p
,
pObj0
->
Id
);
word
*
pSim1
=
Ssw_RarObjSim
(
p
,
pObj1
->
Id
);
word
Flip
=
(
pObj0
->
fPhase
!=
pObj1
->
fPhase
)
?
~
0
:
0
;
...
...
@@ -474,8 +476,9 @@ int Ssw_RarManObjsAreEqual( Ssw_RarMan_t * p, Aig_Obj_t * pObj0, Aig_Obj_t * pOb
SeeAlso []
***********************************************************************/
unsigned
Ssw_RarManObjHashWord
(
Ssw_RarMan_t
*
p
,
Aig_Obj_t
*
pObj
)
unsigned
Ssw_RarManObjHashWord
(
void
*
pMan
,
Aig_Obj_t
*
pObj
)
{
Ssw_RarMan_t
*
p
=
(
Ssw_RarMan_t
*
)
pMan
;
static
int
s_SPrimes
[
128
]
=
{
1009
,
1049
,
1093
,
1151
,
1201
,
1249
,
1297
,
1361
,
1427
,
1459
,
1499
,
1559
,
1607
,
1657
,
1709
,
1759
,
1823
,
1877
,
1933
,
1997
,
...
...
src/base/abc/abcNtk.c
View file @
c1edeccc
...
...
@@ -1643,11 +1643,11 @@ void Abc_NtkPermute( Abc_Ntk_t * pNtk, int fInputs, int fOutputs, int fFlops )
Vec_IntWriteEntry
(
vInputs
,
i
,
Vec_IntEntry
(
vInputs
,
k
)
);
Vec_IntWriteEntry
(
vInputs
,
k
,
Entry
);
// swap PIs
pTemp
=
Vec_PtrEntry
(
pNtk
->
vPis
,
i
);
pTemp
=
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
pNtk
->
vPis
,
i
);
Vec_PtrWriteEntry
(
pNtk
->
vPis
,
i
,
Vec_PtrEntry
(
pNtk
->
vPis
,
k
)
);
Vec_PtrWriteEntry
(
pNtk
->
vPis
,
k
,
pTemp
);
// swap CIs
pTemp
=
Vec_PtrEntry
(
pNtk
->
vCis
,
i
);
pTemp
=
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
pNtk
->
vCis
,
i
);
Vec_PtrWriteEntry
(
pNtk
->
vCis
,
i
,
Vec_PtrEntry
(
pNtk
->
vCis
,
k
)
);
Vec_PtrWriteEntry
(
pNtk
->
vCis
,
k
,
pTemp
);
//printf( "Swapping PIs %d and %d.\n", i, k );
...
...
@@ -1662,11 +1662,11 @@ void Abc_NtkPermute( Abc_Ntk_t * pNtk, int fInputs, int fOutputs, int fFlops )
Vec_IntWriteEntry
(
vOutputs
,
i
,
Vec_IntEntry
(
vOutputs
,
k
)
);
Vec_IntWriteEntry
(
vOutputs
,
k
,
Entry
);
// swap POs
pTemp
=
Vec_PtrEntry
(
pNtk
->
vPos
,
i
);
pTemp
=
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
pNtk
->
vPos
,
i
);
Vec_PtrWriteEntry
(
pNtk
->
vPos
,
i
,
Vec_PtrEntry
(
pNtk
->
vPos
,
k
)
);
Vec_PtrWriteEntry
(
pNtk
->
vPos
,
k
,
pTemp
);
// swap COs
pTemp
=
Vec_PtrEntry
(
pNtk
->
vCos
,
i
);
pTemp
=
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
pNtk
->
vCos
,
i
);
Vec_PtrWriteEntry
(
pNtk
->
vCos
,
i
,
Vec_PtrEntry
(
pNtk
->
vCos
,
k
)
);
Vec_PtrWriteEntry
(
pNtk
->
vCos
,
k
,
pTemp
);
//printf( "Swapping POs %d and %d.\n", i, k );
...
...
@@ -1682,15 +1682,15 @@ void Abc_NtkPermute( Abc_Ntk_t * pNtk, int fInputs, int fOutputs, int fFlops )
Vec_IntWriteEntry
(
vFlops
,
i
,
Vec_IntEntry
(
vFlops
,
k
)
);
Vec_IntWriteEntry
(
vFlops
,
k
,
Entry
);
// swap flops
pTemp
=
Vec_PtrEntry
(
pNtk
->
vBoxes
,
i
);
pTemp
=
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
pNtk
->
vBoxes
,
i
);
Vec_PtrWriteEntry
(
pNtk
->
vBoxes
,
i
,
Vec_PtrEntry
(
pNtk
->
vBoxes
,
k
)
);
Vec_PtrWriteEntry
(
pNtk
->
vBoxes
,
k
,
pTemp
);
// swap CIs
pTemp
=
Vec_PtrEntry
(
pNtk
->
vCis
,
Abc_NtkPiNum
(
pNtk
)
+
i
);
pTemp
=
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
pNtk
->
vCis
,
Abc_NtkPiNum
(
pNtk
)
+
i
);
Vec_PtrWriteEntry
(
pNtk
->
vCis
,
Abc_NtkPiNum
(
pNtk
)
+
i
,
Vec_PtrEntry
(
pNtk
->
vCis
,
Abc_NtkPiNum
(
pNtk
)
+
k
)
);
Vec_PtrWriteEntry
(
pNtk
->
vCis
,
Abc_NtkPiNum
(
pNtk
)
+
k
,
pTemp
);
// swap COs
pTemp
=
Vec_PtrEntry
(
pNtk
->
vCos
,
Abc_NtkPoNum
(
pNtk
)
+
i
);
pTemp
=
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
pNtk
->
vCos
,
Abc_NtkPoNum
(
pNtk
)
+
i
);
Vec_PtrWriteEntry
(
pNtk
->
vCos
,
Abc_NtkPoNum
(
pNtk
)
+
i
,
Vec_PtrEntry
(
pNtk
->
vCos
,
Abc_NtkPoNum
(
pNtk
)
+
k
)
);
Vec_PtrWriteEntry
(
pNtk
->
vCos
,
Abc_NtkPoNum
(
pNtk
)
+
k
,
pTemp
);
...
...
src/base/abci/abcIf.c
View file @
c1edeccc
...
...
@@ -1217,7 +1217,7 @@ void Abc_NtkRecreatePoDrivers( If_Man_t * p, Abc_Ntk_t * pNtkNew )
if
(
numPo
==
~
0
)
continue
;
// get the node and the complemented bit
pFaninNew
=
Vec_PtrEntry
(
vDriversNew
,
numPo
);
pFaninNew
=
(
Abc_Obj_t
*
)
Vec_PtrEntry
(
vDriversNew
,
numPo
);
fCompl
=
Vec_IntEntry
(
vDriverInvs
,
numPo
);
if
(
fCompl
)
pFaninNew
=
Abc_NtkCreateNodeInv
(
pNtkNew
,
pFaninNew
);
...
...
src/base/cmd/cmdPlugin.c
View file @
c1edeccc
...
...
@@ -706,8 +706,8 @@ int Cmd_CommandAbcLoadPlugIn( Abc_Frame_t * pAbc, int argc, char ** argv )
pBuffer
[
strlen
(
pBuffer
)
-
1
]
=
0
;
Cmd_CommandAdd
(
pAbc
,
pStrSection
,
pBuffer
,
Cmd_CommandAbcPlugIn
,
1
);
// plugin_commands.push(Pair(cmd_name, binary_name));
Vec_PtrPush
(
pAbc
->
vPlugInComBinPairs
,
strdup
(
pBuffer
)
);
Vec_PtrPush
(
pAbc
->
vPlugInComBinPairs
,
strdup
(
pStrDirBin
)
);
Vec_PtrPush
(
pAbc
->
vPlugInComBinPairs
,
Extra_UtilStrsav
(
pBuffer
)
);
Vec_PtrPush
(
pAbc
->
vPlugInComBinPairs
,
Extra_UtilStrsav
(
pStrDirBin
)
);
printf
(
"Creating command %s with binary %s
\n
"
,
pBuffer
,
pStrDirBin
);
}
fclose
(
pFile
);
...
...
src/map/if/ifDec07.c
View file @
c1edeccc
...
...
@@ -19,6 +19,8 @@
***********************************************************************/
#include "if.h"
#include "extra.h"
#include "kit.h"
ABC_NAMESPACE_IMPL_START
...
...
src/map/if/ifDec08.c
View file @
c1edeccc
...
...
@@ -19,6 +19,8 @@
***********************************************************************/
#include "if.h"
#include "extra.h"
#include "kit.h"
ABC_NAMESPACE_IMPL_START
...
...
src/map/if/ifDec10.c
View file @
c1edeccc
...
...
@@ -19,6 +19,8 @@
***********************************************************************/
#include "if.h"
#include "extra.h"
#include "kit.h"
ABC_NAMESPACE_IMPL_START
...
...
@@ -68,9 +70,6 @@ static word Truth10[10][16] = {
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0x0000000000000000
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
,
0xFFFFFFFFFFFFFFFF
};
extern
void
Kit_DsdPrintFromTruth
(
unsigned
*
pTruth
,
int
nVars
);
extern
void
Extra_PrintBinary
(
FILE
*
pFile
,
unsigned
Sign
[],
int
nBits
);
////////////////////////////////////////////////////////////////////////
/// FUNCTION DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
...
...
src/misc/vec/vecVec.h
View file @
c1edeccc
...
...
@@ -266,7 +266,7 @@ static inline int Vec_VecLevelSize( Vec_Vec_t * p, int i )
static
inline
Vec_Ptr_t
*
Vec_VecEntry
(
Vec_Vec_t
*
p
,
int
i
)
{
assert
(
i
>=
0
&&
i
<
p
->
nSize
);
return
p
->
pArray
[
i
];
return
(
Vec_Ptr_t
*
)
p
->
pArray
[
i
];
}
/**Function*************************************************************
...
...
@@ -283,7 +283,7 @@ static inline Vec_Ptr_t * Vec_VecEntry( Vec_Vec_t * p, int i )
static
inline
Vec_Int_t
*
Vec_VecEntryInt
(
Vec_Vec_t
*
p
,
int
i
)
{
assert
(
i
>=
0
&&
i
<
p
->
nSize
);
return
p
->
pArray
[
i
];
return
(
Vec_Int_t
*
)
p
->
pArray
[
i
];
}
/**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