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
7b99370e
Commit
7b99370e
authored
Oct 02, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changing default values.
parent
f2fab579
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
33 additions
and
25 deletions
+33
-25
src/aig/gia/giaBalance.c
+2
-2
src/base/abci/abc.c
+5
-1
src/base/abci/abcFx.c
+10
-6
src/map/scl/sclBuffer.c
+1
-1
src/map/scl/sclSize.h
+2
-2
src/misc/vec/vecQue.h
+13
-13
No files found.
src/aig/gia/giaBalance.c
View file @
7b99370e
...
...
@@ -568,7 +568,7 @@ void Dam_ManCreatePairs( Dam_Man_t * p, int fVerbose )
p
->
vHash
=
Hash_IntManStart
(
3
*
nDivsUsed
/
2
);
p
->
vCounts
=
Vec_FltAlloc
(
2
*
nDivsUsed
);
Vec_FltPush
(
p
->
vCounts
,
ABC_INFINITY
);
p
->
vQue
=
Vec_QueAlloc
(
Vec_FltCap
(
p
->
vCounts
)
);
Vec_QueSet
Costs
(
p
->
vQue
,
Vec_FltArrayP
(
p
->
vCounts
)
);
Vec_QueSet
Priority
(
p
->
vQue
,
Vec_FltArrayP
(
p
->
vCounts
)
);
// mapping div to node
p
->
vDiv2Nod
=
Vec_IntAlloc
(
2
*
nDivsUsed
);
Vec_IntPush
(
p
->
vDiv2Nod
,
ABC_INFINITY
);
p
->
vNodStore
=
Vec_IntAlloc
(
Gia_ManObjNum
(
p
->
pGia
)
);
Vec_IntPush
(
p
->
vNodStore
,
-
1
);
...
...
@@ -907,7 +907,7 @@ Gia_Man_t * Dam_ManMultiExtractInt( Gia_Man_t * pGia, int nNewNodesMax, int fVer
int
i
,
iDiv
;
p
=
Dam_ManAlloc
(
pGia
);
Dam_ManCreatePairs
(
p
,
fVerbose
);
for
(
i
=
0
;
i
<
nNewNodesMax
&&
Vec_QueTop
Cost
(
p
->
vQue
)
>
2
;
i
++
)
for
(
i
=
0
;
i
<
nNewNodesMax
&&
Vec_QueTop
Priority
(
p
->
vQue
)
>=
2
;
i
++
)
{
iDiv
=
Vec_QuePop
(
p
->
vQue
);
if
(
fVeryVerbose
)
...
...
src/base/abci/abc.c
View file @
7b99370e
...
...
@@ -27436,7 +27436,7 @@ int Abc_CommandAbc9Fx( Abc_Frame_t * pAbc, int argc, char ** argv )
int
fVeryVerbose
=
0
;
// set the defaults
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"NMrvh"
))
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"NMrv
w
h"
))
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -27468,6 +27468,9 @@ int Abc_CommandAbc9Fx( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'v'
:
fVerbose
^=
1
;
break
;
case
'w'
:
fVeryVerbose
^=
1
;
break
;
case
'h'
:
goto
usage
;
break
;
...
...
@@ -27499,6 +27502,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-M <num> : upper bound on literal count of divisors to extract [default = %d]
\n
"
,
LitCountMax
);
Abc_Print
(
-
2
,
"
\t
-r : reversing variable order during ISOP computation [default = %s]
\n
"
,
fReverse
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : print verbose information [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-w : toggle printing additional information [default = %s]
\n
"
,
fVeryVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
}
src/base/abci/abcFx.c
View file @
7b99370e
...
...
@@ -395,7 +395,7 @@ static inline int Fx_ManComputeLevelDiv( Fx_Man_t * p, Vec_Int_t * vCubeFree )
int
i
,
Lit
,
Level
=
0
;
Vec_IntForEachEntry
(
vCubeFree
,
Lit
,
i
)
Level
=
Abc_MaxInt
(
Level
,
Vec_IntEntry
(
p
->
vLevels
,
Abc_Lit2Var
(
Abc_Lit2Var
(
Lit
)))
);
return
Abc_MinInt
(
Level
,
2
00
);
return
Abc_MinInt
(
Level
,
8
00
);
}
static
inline
int
Fx_ManComputeLevelCube
(
Fx_Man_t
*
p
,
Vec_Int_t
*
vCube
)
{
...
...
@@ -473,7 +473,7 @@ static inline void Fx_PrintDiv( Fx_Man_t * p, int iDiv )
int
i
;
printf
(
"%4d : "
,
p
->
nDivs
);
printf
(
"Div %7d : "
,
iDiv
);
printf
(
"Weight %
5d "
,
(
int
)
Vec_FltEntry
(
p
->
vWeights
,
iDiv
)
);
printf
(
"Weight %
12.5f "
,
Vec_FltEntry
(
p
->
vWeights
,
iDiv
)
);
// printf( "Compl %4d ", p->nCompls );
Fx_PrintDivOne
(
Hsh_VecReadEntry
(
p
->
pHash
,
iDiv
)
);
for
(
i
=
Vec_IntSize
(
Hsh_VecReadEntry
(
p
->
pHash
,
iDiv
))
+
3
;
i
<
16
;
i
++
)
...
...
@@ -503,6 +503,8 @@ static void Fx_PrintMatrix( Fx_Man_t * p )
Vec_Int_t
*
vCube
;
int
i
,
v
,
Lit
,
nObjs
;
char
*
pLine
;
if
(
Vec_WecSize
(
p
->
vLits
)
/
2
>
26
)
return
;
printf
(
" "
);
nObjs
=
Vec_WecSize
(
p
->
vLits
)
/
2
;
for
(
i
=
0
;
i
<
Abc_MinInt
(
nObjs
,
26
);
i
++
)
...
...
@@ -794,7 +796,7 @@ int Fx_ManCubeSingleCubeDivisors( Fx_Man_t * p, Vec_Int_t * vPivot, int fRemove,
{
if
(
Vec_FltSize
(
p
->
vWeights
)
==
iDiv
)
{
Vec_FltPush
(
p
->
vWeights
,
-
2
-
0
.
001
*
Fx_ManComputeLevelDiv
(
p
,
p
->
vCubeFree
));
Vec_FltPush
(
p
->
vWeights
,
-
2
+
0
.
9
-
0
.
001
*
Fx_ManComputeLevelDiv
(
p
,
p
->
vCubeFree
));
p
->
nDivsS
++
;
}
assert
(
iDiv
<
Vec_FltSize
(
p
->
vWeights
)
);
...
...
@@ -846,7 +848,7 @@ void Fx_ManCubeDoubleCubeDivisors( Fx_Man_t * p, int iFirst, Vec_Int_t * vPivot,
if
(
!
fRemove
)
{
if
(
iDiv
==
Vec_FltSize
(
p
->
vWeights
)
)
Vec_FltPush
(
p
->
vWeights
,
-
Vec_IntSize
(
p
->
vCubeFree
)
-
0
.
001
*
Fx_ManComputeLevelDiv
(
p
,
p
->
vCubeFree
));
Vec_FltPush
(
p
->
vWeights
,
-
Vec_IntSize
(
p
->
vCubeFree
)
+
0
.
9
-
0
.
000
9
*
Fx_ManComputeLevelDiv
(
p
,
p
->
vCubeFree
));
assert
(
iDiv
<
Vec_FltSize
(
p
->
vWeights
)
);
Vec_FltAddToEntry
(
p
->
vWeights
,
iDiv
,
Base
+
Vec_IntSize
(
p
->
vCubeFree
)
-
1
);
p
->
nPairsD
++
;
...
...
@@ -884,7 +886,7 @@ void Fx_ManCreateDivisors( Fx_Man_t * p )
Fx_ManCubeDoubleCubeDivisors
(
p
,
i
+
1
,
vCube
,
0
,
0
);
// add - no update
// create queue with all divisors
p
->
vPrio
=
Vec_QueAlloc
(
Vec_FltSize
(
p
->
vWeights
)
);
Vec_QueSet
Costs
(
p
->
vPrio
,
Vec_FltArrayP
(
p
->
vWeights
)
);
Vec_QueSet
Priority
(
p
->
vPrio
,
Vec_FltArrayP
(
p
->
vWeights
)
);
Vec_FltForEachEntry
(
p
->
vWeights
,
Weight
,
i
)
if
(
Weight
>
0
.
0
)
Vec_QuePush
(
p
->
vPrio
,
i
);
...
...
@@ -985,6 +987,8 @@ void Fx_ManUpdate( Fx_Man_t * p, int iDiv )
Vec_Int_t
*
vDiv
=
p
->
vDiv
;
int
nLitsNew
=
p
->
nLits
-
(
int
)
Vec_FltEntry
(
p
->
vWeights
,
iDiv
);
int
i
,
k
,
Lit0
,
Lit1
,
iVarNew
,
RetValue
,
Level
;
float
Diff
=
Vec_FltEntry
(
p
->
vWeights
,
iDiv
)
-
(
float
)((
int
)
Vec_FltEntry
(
p
->
vWeights
,
iDiv
));
assert
(
Diff
>
0
.
0
&&
Diff
<
1
.
0
);
// get the divisor and select pivot variables
p
->
nDivs
++
;
...
...
@@ -1179,7 +1183,7 @@ int Fx_FastExtract( Vec_Wec_t * vCubes, int ObjIdMax, int nNewNodesMax, int LitC
Fx_PrintStats
(
p
,
Abc_Clock
()
-
clk
);
// perform extraction
p
->
timeStart
=
Abc_Clock
();
for
(
i
=
0
;
i
<
nNewNodesMax
&&
Vec_QueTop
Cost
(
p
->
vPrio
)
>
0
.
0
;
i
++
)
for
(
i
=
0
;
i
<
nNewNodesMax
&&
Vec_QueTop
Priority
(
p
->
vPrio
)
>
0
.
0
;
i
++
)
{
iDiv
=
Vec_QuePop
(
p
->
vPrio
);
if
(
fVeryVerbose
)
...
...
src/map/scl/sclBuffer.c
View file @
7b99370e
...
...
@@ -689,7 +689,7 @@ Buf_Man_t * Buf_ManStart( Abc_Ntk_t * pNtk, int FanMin, int FanMax, int fBufPis
Vec_IntFill
(
p
->
vArr
,
p
->
nObjAlloc
,
0
);
Vec_IntFill
(
p
->
vDep
,
p
->
nObjAlloc
,
0
);
Vec_FltFill
(
p
->
vCounts
,
p
->
nObjAlloc
,
-
ABC_INFINITY
);
Vec_QueSet
Costs
(
p
->
vQue
,
Vec_FltArrayP
(
p
->
vCounts
)
);
Vec_QueSet
Priority
(
p
->
vQue
,
Vec_FltArrayP
(
p
->
vCounts
)
);
// collect edge delays
p
->
DelayInv
=
Mio_GateReadPinDelay
(
Mio_LibraryReadInv
((
Mio_Library_t
*
)
pNtk
->
pManFunc
),
0
);
p
->
vEdges
=
Vec_IntAlloc
(
1000
);
...
...
src/map/scl/sclSize.h
View file @
7b99370e
...
...
@@ -161,7 +161,7 @@ static inline SC_Man * Abc_SclManAlloc( SC_Lib * pLib, Abc_Ntk_t * pNtk )
p
->
vBestFans
=
Vec_IntStart
(
p
->
nObjs
);
p
->
vTimesOut
=
Vec_FltStart
(
Abc_NtkCoNum
(
pNtk
)
);
p
->
vQue
=
Vec_QueAlloc
(
Abc_NtkCoNum
(
pNtk
)
);
Vec_QueSet
Costs
(
p
->
vQue
,
Vec_FltArrayP
(
p
->
vTimesOut
)
);
Vec_QueSet
Priority
(
p
->
vQue
,
Vec_FltArrayP
(
p
->
vTimesOut
)
);
for
(
i
=
0
;
i
<
Abc_NtkCoNum
(
pNtk
);
i
++
)
Vec_QuePush
(
p
->
vQue
,
i
);
p
->
vUpdates
=
Vec_IntAlloc
(
1000
);
...
...
@@ -174,7 +174,7 @@ static inline SC_Man * Abc_SclManAlloc( SC_Lib * pLib, Abc_Ntk_t * pNtk )
p
->
vNode2Gain
=
Vec_FltStart
(
p
->
nObjs
);
p
->
vNode2Gate
=
Vec_IntStart
(
p
->
nObjs
);
p
->
vNodeByGain
=
Vec_QueAlloc
(
p
->
nObjs
);
Vec_QueSet
Costs
(
p
->
vNodeByGain
,
Vec_FltArrayP
(
p
->
vNode2Gain
)
);
Vec_QueSet
Priority
(
p
->
vNodeByGain
,
Vec_FltArrayP
(
p
->
vNode2Gain
)
);
p
->
vNodeIter
=
Vec_IntStartFull
(
p
->
nObjs
);
p
->
vLevels
=
Vec_WecStart
(
2
*
Abc_NtkLevel
(
pNtk
)
);
p
->
vChanged
=
Vec_IntAlloc
(
100
);
...
...
src/misc/vec/vecQue.h
View file @
7b99370e
...
...
@@ -47,7 +47,7 @@ struct Vec_Que_t_
float
**
pCostsFlt
;
// owned by the caller
};
static
inline
float
Vec_Que
Cost
(
Vec_Que_t
*
p
,
int
v
)
{
return
*
p
->
pCostsFlt
?
(
*
p
->
pCostsFlt
)[
v
]
:
v
;
}
static
inline
float
Vec_Que
Prio
(
Vec_Que_t
*
p
,
int
v
)
{
return
*
p
->
pCostsFlt
?
(
*
p
->
pCostsFlt
)[
v
]
:
v
;
}
////////////////////////////////////////////////////////////////////////
/// MACRO DEFINITIONS ///
...
...
@@ -92,7 +92,7 @@ static inline void Vec_QueFreeP( Vec_Que_t ** p )
Vec_QueFree
(
*
p
);
*
p
=
NULL
;
}
static
inline
void
Vec_QueSet
Costs
(
Vec_Que_t
*
p
,
float
**
pCosts
)
static
inline
void
Vec_QueSet
Priority
(
Vec_Que_t
*
p
,
float
**
pCosts
)
{
assert
(
p
->
pCostsFlt
==
NULL
);
p
->
pCostsFlt
=
pCosts
;
...
...
@@ -140,9 +140,9 @@ static inline int Vec_QueTop( Vec_Que_t * p )
{
return
Vec_QueSize
(
p
)
>
0
?
p
->
pHeap
[
1
]
:
-
1
;
}
static
inline
float
Vec_QueTop
Cost
(
Vec_Que_t
*
p
)
static
inline
float
Vec_QueTop
Priority
(
Vec_Que_t
*
p
)
{
return
Vec_QueSize
(
p
)
>
0
?
Vec_Que
Cost
(
p
,
p
->
pHeap
[
1
])
:
-
ABC_INFINITY
;
return
Vec_QueSize
(
p
)
>
0
?
Vec_Que
Prio
(
p
,
p
->
pHeap
[
1
])
:
-
ABC_INFINITY
;
}
/**Function*************************************************************
...
...
@@ -158,13 +158,13 @@ static inline float Vec_QueTopCost( Vec_Que_t * p )
***********************************************************************/
static
inline
int
Vec_QueMoveUp
(
Vec_Que_t
*
p
,
int
v
)
{
float
Cost
=
Vec_Que
Cost
(
p
,
v
);
float
Cost
=
Vec_Que
Prio
(
p
,
v
);
int
i
=
p
->
pOrder
[
v
];
int
parent
=
i
>>
1
;
int
fMoved
=
0
;
assert
(
p
->
pOrder
[
v
]
!=
-
1
);
assert
(
p
->
pHeap
[
i
]
==
v
);
while
(
i
>
1
&&
Cost
>
Vec_Que
Cost
(
p
,
p
->
pHeap
[
parent
])
)
while
(
i
>
1
&&
Cost
>
Vec_Que
Prio
(
p
,
p
->
pHeap
[
parent
])
)
{
p
->
pHeap
[
i
]
=
p
->
pHeap
[
parent
];
p
->
pOrder
[
p
->
pHeap
[
i
]]
=
i
;
...
...
@@ -178,15 +178,15 @@ static inline int Vec_QueMoveUp( Vec_Que_t * p, int v )
}
static
inline
void
Vec_QueMoveDown
(
Vec_Que_t
*
p
,
int
v
)
{
float
Cost
=
Vec_Que
Cost
(
p
,
v
);
float
Cost
=
Vec_Que
Prio
(
p
,
v
);
int
i
=
p
->
pOrder
[
v
];
int
child
=
i
<<
1
;
while
(
child
<
p
->
nSize
)
{
if
(
child
+
1
<
p
->
nSize
&&
Vec_Que
Cost
(
p
,
p
->
pHeap
[
child
])
<
Vec_QueCost
(
p
,
p
->
pHeap
[
child
+
1
])
)
if
(
child
+
1
<
p
->
nSize
&&
Vec_Que
Prio
(
p
,
p
->
pHeap
[
child
])
<
Vec_QuePrio
(
p
,
p
->
pHeap
[
child
+
1
])
)
child
++
;
assert
(
child
<
p
->
nSize
);
if
(
Cost
>=
Vec_Que
Cost
(
p
,
p
->
pHeap
[
child
]))
if
(
Cost
>=
Vec_Que
Prio
(
p
,
p
->
pHeap
[
child
]))
break
;
p
->
pHeap
[
i
]
=
p
->
pHeap
[
child
];
p
->
pOrder
[
p
->
pHeap
[
i
]]
=
i
;
...
...
@@ -269,7 +269,7 @@ static inline void Vec_QuePrint( Vec_Que_t * p )
printf
(
"
\n
"
);
for
(
m
=
0
;
m
<
k
;
m
++
)
if
(
i
+
m
<
p
->
nSize
)
printf
(
"%-5.0f"
,
Vec_Que
Cost
(
p
,
p
->
pHeap
[
i
+
m
])
);
printf
(
"%-5.0f"
,
Vec_Que
Prio
(
p
,
p
->
pHeap
[
i
+
m
])
);
printf
(
"
\n
"
);
printf
(
"
\n
"
);
}
...
...
@@ -307,10 +307,10 @@ static inline void Vec_QueCheck( Vec_Que_t * p )
{
child
=
i
<<
1
;
if
(
child
<
p
->
nSize
)
assert
(
Vec_Que
Cost
(
p
,
p
->
pHeap
[
i
])
>=
Vec_QueCost
(
p
,
p
->
pHeap
[
child
])
);
assert
(
Vec_Que
Prio
(
p
,
p
->
pHeap
[
i
])
>=
Vec_QuePrio
(
p
,
p
->
pHeap
[
child
])
);
child
++
;
if
(
child
<
p
->
nSize
)
assert
(
Vec_Que
Cost
(
p
,
p
->
pHeap
[
i
])
>=
Vec_QueCost
(
p
,
p
->
pHeap
[
child
])
);
assert
(
Vec_Que
Prio
(
p
,
p
->
pHeap
[
i
])
>=
Vec_QuePrio
(
p
,
p
->
pHeap
[
child
])
);
}
}
...
...
@@ -333,7 +333,7 @@ static inline void Vec_QueTest( Vec_Flt_t * vCosts )
// start the queue
p
=
Vec_QueAlloc
(
Vec_FltSize
(
vCosts
)
);
Vec_QueSet
Costs
(
p
,
Vec_FltArrayP
(
vCosts
)
);
Vec_QueSet
Priority
(
p
,
Vec_FltArrayP
(
vCosts
)
);
for
(
i
=
0
;
i
<
Vec_FltSize
(
vCosts
);
i
++
)
Vec_QuePush
(
p
,
i
);
// Vec_QuePrint( 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