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
513dc14a
Commit
513dc14a
authored
Oct 09, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to gate-sizing.
parent
d3595d23
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
9 deletions
+27
-9
src/map/scl/scl.c
+17
-4
src/map/scl/sclInt.h
+1
-1
src/map/scl/sclUpsize.c
+9
-4
No files found.
src/map/scl/scl.c
View file @
513dc14a
...
...
@@ -649,7 +649,8 @@ usage:
int
Scl_CommandUpsize
(
Abc_Frame_t
*
pAbc
,
int
argc
,
char
**
argv
)
{
Abc_Ntk_t
*
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
int
nIters
=
300
;
int
nIters
=
1000
;
int
nIterNoChange
=
50
;
int
Window
=
2
;
int
Ratio
=
10
;
int
Notches
=
10
;
...
...
@@ -658,7 +659,7 @@ int Scl_CommandUpsize( Abc_Frame_t * pAbc, int argc, char **argv )
int
c
,
fVerbose
=
0
;
int
fVeryVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"IWRNTdvwh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"I
J
WRNTdvwh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -668,6 +669,17 @@ int Scl_CommandUpsize( Abc_Frame_t * pAbc, int argc, char **argv )
Abc_Print
(
-
1
,
"Command line switch
\"
-I
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
nIterNoChange
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nIterNoChange
<
0
)
goto
usage
;
break
;
case
'J'
:
if
(
globalUtilOptind
>=
argc
)
{
Abc_Print
(
-
1
,
"Command line switch
\"
-J
\"
should be followed by a positive integer.
\n
"
);
goto
usage
;
}
nIters
=
atoi
(
argv
[
globalUtilOptind
]);
globalUtilOptind
++
;
if
(
nIters
<
0
)
...
...
@@ -754,13 +766,14 @@ int Scl_CommandUpsize( Abc_Frame_t * pAbc, int argc, char **argv )
return
1
;
}
Abc_SclUpsizePerform
(
(
SC_Lib
*
)
pAbc
->
pLibScl
,
pNtk
,
nIters
,
Window
,
Ratio
,
Notches
,
TimeOut
,
fDumpStats
,
fVerbose
,
fVeryVerbose
);
Abc_SclUpsizePerform
(
(
SC_Lib
*
)
pAbc
->
pLibScl
,
pNtk
,
nIters
,
nIterNoChange
,
Window
,
Ratio
,
Notches
,
TimeOut
,
fDumpStats
,
fVerbose
,
fVeryVerbose
);
return
0
;
usage:
fprintf
(
pAbc
->
Err
,
"usage: upsize [-IWRNT num] [-dvwh]
\n
"
);
fprintf
(
pAbc
->
Err
,
"usage: upsize [-I
J
WRNT num] [-dvwh]
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
selectively increases gate sizes in timing-critical regions
\n
"
);
fprintf
(
pAbc
->
Err
,
"
\t
-I <num> : the number of upsizing iterations to perform [default = %d]
\n
"
,
nIters
);
fprintf
(
pAbc
->
Err
,
"
\t
-J <num> : the number of iterations without improvement [default = %d]
\n
"
,
nIterNoChange
);
fprintf
(
pAbc
->
Err
,
"
\t
-W <num> : delay window (in percents) of near-critical COs [default = %d]
\n
"
,
Window
);
fprintf
(
pAbc
->
Err
,
"
\t
-R <num> : ratio of critical nodes (in percents) to update [default = %d]
\n
"
,
Ratio
);
fprintf
(
pAbc
->
Err
,
"
\t
-N <num> : limit on discrete upsizing steps at a node [default = %d]
\n
"
,
Notches
);
...
...
src/map/scl/sclInt.h
View file @
513dc14a
...
...
@@ -439,7 +439,7 @@ extern void Abc_SclTimePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fU
/*=== sclSize.c ===============================================================*/
extern
void
Abc_SclSizingPerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
SC_SizePars
*
p
);
/*=== sclUpsize.c ===============================================================*/
extern
void
Abc_SclUpsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
int
nIters
,
int
Window
,
int
Ratio
,
int
Notches
,
int
TimeOut
,
int
fDumpStats
,
int
fVerbose
,
int
fVeryVerbose
);
extern
void
Abc_SclUpsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
int
nIters
,
int
nIterNoChange
,
int
Window
,
int
Ratio
,
int
Notches
,
int
TimeOut
,
int
fDumpStats
,
int
fVerbose
,
int
fVeryVerbose
);
/*=== sclUtil.c ===============================================================*/
extern
void
Abc_SclHashCells
(
SC_Lib
*
p
);
extern
int
Abc_SclCellFind
(
SC_Lib
*
p
,
char
*
pName
);
...
...
src/map/scl/sclUpsize.c
View file @
513dc14a
...
...
@@ -437,8 +437,8 @@ void Abc_SclUpsizePrint( SC_Man * p, int Iter, int win, int nPathPos, int nPathN
printf
(
"(%+5.1f %%) "
,
100
.
0
*
(
p
->
MaxDelay
-
p
->
MaxDelay0
)
/
p
->
MaxDelay0
);
printf
(
"A: "
);
printf
(
"%.2f "
,
p
->
SumArea
);
printf
(
"(%+5.1f %%)
"
,
100
.
0
*
(
p
->
SumArea
-
p
->
SumArea0
)
/
p
->
SumArea0
);
ABC_PRTn
(
"T"
,
clock
()
-
p
->
timeTotal
);
printf
(
"(%+5.1f %%)
"
,
100
.
0
*
(
p
->
SumArea
-
p
->
SumArea0
)
/
p
->
SumArea0
);
printf
(
"%8.2f"
,
1
.
0
*
(
clock
()
-
p
->
timeTotal
)
/
(
CLOCKS_PER_SEC
)
);
printf
(
" "
);
printf
(
"%c"
,
fVerbose
?
'\n'
:
'\r'
);
}
...
...
@@ -454,13 +454,13 @@ void Abc_SclUpsizePrint( SC_Man * p, int Iter, int win, int nPathPos, int nPathN
SeeAlso []
***********************************************************************/
void
Abc_SclUpsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
int
nIters
,
int
Window
,
int
Ratio
,
int
Notches
,
int
TimeOut
,
int
fDumpStats
,
int
fVerbose
,
int
fVeryVerbose
)
void
Abc_SclUpsizePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
int
nIters
,
int
nIterNoChange
,
int
Window
,
int
Ratio
,
int
Notches
,
int
TimeOut
,
int
fDumpStats
,
int
fVerbose
,
int
fVeryVerbose
)
{
SC_Man
*
p
;
Vec_Int_t
*
vPathPos
=
NULL
;
// critical POs
Vec_Int_t
*
vPathNodes
=
NULL
;
// critical nodes and PIs
Vec_Int_t
*
vTFO
;
int
i
,
win
,
nUpsizes
=
-
1
;
int
i
,
win
,
nUpsizes
=
-
1
,
nFramesNoChange
=
0
;
int
nAllPos
,
nAllNodes
,
nAllTfos
,
nAllUpsizes
;
clock_t
clk
;
...
...
@@ -525,7 +525,12 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int nIters, int Wind
{
p
->
BestDelay
=
p
->
MaxDelay
;
Abc_SclApplyUpdateToBest
(
p
->
vGates
,
p
->
vGatesBest
,
p
->
vUpdates
);
nFramesNoChange
=
0
;
}
else
nFramesNoChange
++
;
if
(
nFramesNoChange
>
nIterNoChange
)
break
;
// report and cleanup
Abc_SclUpsizePrint
(
p
,
i
,
win
,
Vec_IntSize
(
vPathPos
),
Vec_IntSize
(
vPathNodes
),
nUpsizes
,
Vec_IntSize
(
vTFO
),
fVeryVerbose
);
//|| (i == nIters-1) );
...
...
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