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
c26f7cf3
Commit
c26f7cf3
authored
Mar 23, 2014
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Experiments with mapping.
parent
b13e6588
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
32 additions
and
30 deletions
+32
-30
src/aig/gia/gia.h
+1
-0
src/aig/gia/giaKf.c
+17
-16
src/base/abci/abc.c
+14
-14
No files found.
src/aig/gia/gia.h
View file @
c26f7cf3
...
...
@@ -246,6 +246,7 @@ struct Jf_Par_t_
{
int
nLutSize
;
int
nCutNum
;
int
nProcNum
;
int
nRounds
;
int
nVerbLimit
;
int
DelayTarget
;
...
...
src/aig/gia/giaKf.c
View file @
c26f7cf3
...
...
@@ -38,11 +38,11 @@ ABC_NAMESPACE_IMPL_START
/// DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
#define KF_PROC_MAX 8
#define KF_LEAF_MAX 8
#define KF_LEAF_MAX 16
#define KF_CUT_MAX 32
#define KF_PROC_MAX 32
#define KF_WORD_MAX ((KF_LEAF_MAX > 6) ? 1 << (KF_LEAF_MAX-6) : 1)
#define KF_LOG_TABLE 8
#define KF_NUM_MAX 16
#define KF_ADD_ON1 2 // offset in cut storage for each node (cut count; best cut)
#define KF_ADD_ON2 4 // offset in cut storage for each cut (leaf count; function, cut delay; cut area)
...
...
@@ -76,10 +76,10 @@ struct Kf_Set_t_
int
pValue
[
1
<<
KF_LOG_TABLE
];
int
pPlace
[
KF_LEAF_MAX
];
int
pList
[
KF_LEAF_MAX
+
1
];
Kf_Cut_t
pCuts0
[
KF_
NUM
_MAX
];
Kf_Cut_t
pCuts1
[
KF_
NUM
_MAX
];
Kf_Cut_t
pCutsR
[
KF_
NUM_MAX
*
KF_NUM
_MAX
];
Kf_Cut_t
*
ppCuts
[
KF_
NUM
_MAX
];
Kf_Cut_t
pCuts0
[
KF_
CUT
_MAX
];
Kf_Cut_t
pCuts1
[
KF_
CUT
_MAX
];
Kf_Cut_t
pCutsR
[
KF_
CUT_MAX
*
KF_CUT
_MAX
];
Kf_Cut_t
*
ppCuts
[
KF_
CUT
_MAX
];
Kf_Cut_t
*
pCutBest
;
word
CutCount
[
4
];
// statistics
};
...
...
@@ -196,7 +196,7 @@ static inline void Kf_ManStoreAddUnit( Vec_Int_t * vTemp, int iObj, int Time, fl
static
inline
void
Kf_ManSaveResults
(
Kf_Cut_t
**
ppCuts
,
int
nCuts
,
Kf_Cut_t
*
pCutBest
,
Vec_Int_t
*
vTemp
)
{
int
i
,
k
;
assert
(
nCuts
>
0
&&
nCuts
<
KF_
NUM
_MAX
);
assert
(
nCuts
>
0
&&
nCuts
<
KF_
CUT
_MAX
);
Kf_ManStoreStart
(
vTemp
,
nCuts
);
for
(
i
=
0
;
i
<
nCuts
;
i
++
)
{
...
...
@@ -823,7 +823,7 @@ void Kf_ManComputeCuts( Kf_Man_t * p )
Kf_ThData_t
ThData
[
PAR_THR_MAX
];
Vec_Int_t
*
vStack
,
*
vFanins
;
Gia_Obj_t
*
pObj
;
int
nProcs
=
p
->
pPars
->
nProcNum
Max
;
int
nProcs
=
p
->
pPars
->
nProcNum
;
int
i
,
k
,
iFan
,
status
,
nCountFanins
,
fRunning
;
abctime
clk
,
clkUsed
=
0
;
assert
(
nProcs
<=
PAR_THR_MAX
);
...
...
@@ -964,7 +964,7 @@ void Kf_ManComputeMapping( Kf_Man_t * p )
assert
(
Vec_IntSize
(
p
->
vTemp
)
==
1
+
KF_ADD_ON1
+
KF_ADD_ON2
);
Kf_ObjSetCuts
(
p
,
i
,
p
->
vTemp
);
}
if
(
p
->
pPars
->
nProcNum
Max
>
0
)
if
(
p
->
pPars
->
nProcNum
>
0
)
Kf_ManComputeCuts
(
p
);
else
{
...
...
@@ -1037,9 +1037,9 @@ void Kf_ManSetInitRefs( Gia_Man_t * p, Vec_Flt_t * vRefs )
Kf_Man_t
*
Kf_ManAlloc
(
Gia_Man_t
*
pGia
,
Jf_Par_t
*
pPars
)
{
Kf_Man_t
*
p
;
int
i
;
assert
(
pPars
->
nLutSize
Max
<=
KF_LEAF_MAX
);
assert
(
pPars
->
nCutNum
Max
<=
KF_NUM
_MAX
);
assert
(
pPars
->
nProcNum
Max
<=
KF_PROC_MAX
);
assert
(
pPars
->
nLutSize
<=
KF_LEAF_MAX
);
assert
(
pPars
->
nCutNum
<=
KF_CUT
_MAX
);
assert
(
pPars
->
nProcNum
<=
KF_PROC_MAX
);
Vec_IntFreeP
(
&
pGia
->
vMapping
);
p
=
ABC_CALLOC
(
Kf_Man_t
,
1
);
p
->
clkStart
=
Abc_Clock
();
...
...
@@ -1053,7 +1053,7 @@ Kf_Man_t * Kf_ManAlloc( Gia_Man_t * pGia, Jf_Par_t * pPars )
p
->
vTemp
=
Vec_IntAlloc
(
1000
);
pGia
->
pRefs
=
ABC_CALLOC
(
int
,
Gia_ManObjNum
(
pGia
)
);
// prepare cut sets
for
(
i
=
0
;
i
<
Abc_MaxInt
(
1
,
pPars
->
nProcNum
Max
);
i
++
)
for
(
i
=
0
;
i
<
Abc_MaxInt
(
1
,
pPars
->
nProcNum
);
i
++
)
{
(
p
->
pSett
+
i
)
->
pMan
=
p
;
(
p
->
pSett
+
i
)
->
nLutSize
=
(
unsigned
short
)
pPars
->
nLutSize
;
...
...
@@ -1114,6 +1114,7 @@ void Kf_ManSetDefaultPars( Jf_Par_t * pPars )
memset
(
pPars
,
0
,
sizeof
(
Jf_Par_t
)
);
pPars
->
nLutSize
=
6
;
pPars
->
nCutNum
=
8
;
pPars
->
nProcNum
=
0
;
pPars
->
nRounds
=
1
;
pPars
->
nVerbLimit
=
5
;
pPars
->
DelayTarget
=
-
1
;
...
...
@@ -1128,8 +1129,8 @@ void Kf_ManSetDefaultPars( Jf_Par_t * pPars )
pPars
->
fVerbose
=
0
;
pPars
->
fVeryVerbose
=
0
;
pPars
->
nLutSizeMax
=
KF_LEAF_MAX
;
pPars
->
nCutNumMax
=
KF_
NUM
_MAX
;
pPars
->
nProcNumMax
=
0
;
pPars
->
nCutNumMax
=
KF_
CUT
_MAX
;
pPars
->
nProcNumMax
=
KF_PROC_MAX
;
}
Gia_Man_t
*
Kf_ManPerformMapping
(
Gia_Man_t
*
pGia
,
Jf_Par_t
*
pPars
)
{
...
...
src/base/abci/abc.c
View file @
c26f7cf3
...
...
@@ -30369,7 +30369,7 @@ int Abc_CommandAbc9Kf( Abc_Frame_t * pAbc, int argc, char ** argv )
Gia_Man_t
*
pNew
;
int
c
;
Kf_ManSetDefaultPars
(
pPars
);
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KC
RDWP
aekmdcgtvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"KC
PRDW
aekmdcgtvwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -30401,6 +30401,17 @@ int Abc_CommandAbc9Kf( Abc_Frame_t * pAbc, int argc, char ** argv )
goto
usage
;
}
break
;
case
'P'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-P
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
pPars
->
nProcNumMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nProcNumMax
<
0
)
goto
usage
;
break
;
case
'R'
:
if
(
globalUtilOptind
>=
argc
)
{
...
...
@@ -30434,17 +30445,6 @@ int Abc_CommandAbc9Kf( Abc_Frame_t * pAbc, int argc, char ** argv )
if
(
pPars
->
nVerbLimit
<
0
)
goto
usage
;
break
;
case
'P'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-P
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
pPars
->
nProcNumMax
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
pPars
->
nProcNumMax
<
0
)
goto
usage
;
break
;
case
'a'
:
pPars
->
fAreaOnly
^=
1
;
break
;
...
...
@@ -30501,14 +30501,14 @@ usage:
sprintf
(
Buffer
,
"best possible"
);
else
sprintf
(
Buffer
,
"%d"
,
pPars
->
DelayTarget
);
Abc_Print
(
-
2
,
"usage: &kf [-KC
RDWP
num] [-akmdcgtvwh]
\n
"
);
Abc_Print
(
-
2
,
"usage: &kf [-KC
PRDW
num] [-akmdcgtvwh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs technology mapping of the network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-K num : LUT size for the mapping (2 <= K <= %d) [default = %d]
\n
"
,
pPars
->
nLutSizeMax
,
pPars
->
nLutSize
);
Abc_Print
(
-
2
,
"
\t
-C num : the max number of priority cuts (1 <= C <= %d) [default = %d]
\n
"
,
pPars
->
nCutNumMax
,
pPars
->
nCutNum
);
Abc_Print
(
-
2
,
"
\t
-P num : the number of cut computation processes (0 <= P <= %d) [default = %d]
\n
"
,
pPars
->
nProcNumMax
,
pPars
->
nProcNum
);
Abc_Print
(
-
2
,
"
\t
-R num : the number of mapping rounds [default = %d]
\n
"
,
pPars
->
nRounds
);
Abc_Print
(
-
2
,
"
\t
-D num : sets the delay constraint for the mapping [default = %s]
\n
"
,
Buffer
);
Abc_Print
(
-
2
,
"
\t
-W num : min frequency when printing functions with
\"
-w
\"
[default = %d]
\n
"
,
pPars
->
nVerbLimit
);
Abc_Print
(
-
2
,
"
\t
-P num : the number of cut computation processes [default = %d]
\n
"
,
pPars
->
nProcNumMax
);
Abc_Print
(
-
2
,
"
\t
-a : toggles area-oriented mapping [default = %s]
\n
"
,
pPars
->
fAreaOnly
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-e : toggles edge vs node minimization [default = %s]
\n
"
,
pPars
->
fOptEdge
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-k : toggles coarsening the subject graph [default = %s]
\n
"
,
pPars
->
fCoarsen
?
"yes"
:
"no"
);
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