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
8e753fc3
Commit
8e753fc3
authored
Oct 09, 2012
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improvements to gate sizing.
parent
9cbe102b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
6 deletions
+35
-6
src/map/scl/sclMan.h
+26
-0
src/map/scl/sclTime.c
+3
-0
src/map/scl/sclUpsize.c
+6
-6
No files found.
src/map/scl/sclMan.h
View file @
8e753fc3
...
...
@@ -321,6 +321,32 @@ static inline SC_Cell * Abc_SclObjResiable( SC_Man * p, Abc_Obj_t * pObj, int fU
return
pOld
->
pPrev
->
Order
<
pOld
->
Order
?
pOld
->
pPrev
:
NULL
;
}
/**Function*************************************************************
Synopsis [Dumps timing results into a file.]
Description []
SideEffects []
SeeAlso []
***********************************************************************/
static
inline
void
Abc_SclDumpStats
(
SC_Man
*
p
,
char
*
pFileName
,
clock_t
Time
)
{
FILE
*
pTable
;
pTable
=
fopen
(
pFileName
,
"a+"
);
fprintf
(
pTable
,
"%s "
,
p
->
pNtk
->
pName
);
fprintf
(
pTable
,
"%d "
,
Abc_NtkPiNum
(
p
->
pNtk
)
);
fprintf
(
pTable
,
"%d "
,
Abc_NtkPoNum
(
p
->
pNtk
)
);
fprintf
(
pTable
,
"%d "
,
Abc_NtkNodeNum
(
p
->
pNtk
)
);
fprintf
(
pTable
,
"%d "
,
(
int
)
p
->
SumArea0
);
fprintf
(
pTable
,
"%d "
,
(
int
)
p
->
MaxDelay0
);
fprintf
(
pTable
,
"%.2f "
,
1
.
0
*
Time
/
CLOCKS_PER_SEC
);
fprintf
(
pTable
,
"
\n
"
);
fclose
(
pTable
);
}
/*=== sclTime.c =============================================================*/
extern
Abc_Obj_t
*
Abc_SclFindCriticalCo
(
SC_Man
*
p
,
int
*
pfRise
);
...
...
src/map/scl/sclTime.c
View file @
8e753fc3
...
...
@@ -336,9 +336,12 @@ SC_Man * Abc_SclManStart( SC_Lib * pLib, Abc_Ntk_t * pNtk, int fUseWireLoads )
***********************************************************************/
void
Abc_SclTimePerform
(
SC_Lib
*
pLib
,
Abc_Ntk_t
*
pNtk
,
int
fUseWireLoads
,
int
fShowAll
,
int
fShort
)
{
int
fDumpStats
=
0
;
SC_Man
*
p
;
p
=
Abc_SclManStart
(
pLib
,
pNtk
,
fUseWireLoads
);
Abc_SclTimeNtkPrint
(
p
,
fShowAll
,
fShort
);
if
(
fDumpStats
)
Abc_SclDumpStats
(
p
,
"stats.txt"
,
0
);
Abc_SclManFree
(
p
);
}
...
...
src/map/scl/sclUpsize.c
View file @
8e753fc3
...
...
@@ -436,10 +436,9 @@ void Abc_SclUpsizePrint( SC_Man * p, int Iter, int win, int nPathPos, int nPathN
printf
(
"A: "
);
printf
(
"%.2f "
,
p
->
SumArea
);
printf
(
"(%+5.1f %%) "
,
100
.
0
*
(
p
->
SumArea
-
p
->
SumArea0
)
/
p
->
SumArea0
);
if
(
fVerbose
)
ABC_PRT
(
"T"
,
clock
()
-
p
->
timeTotal
);
else
ABC_PRTr
(
"T"
,
clock
()
-
p
->
timeTotal
);
ABC_PRTn
(
"T"
,
clock
()
-
p
->
timeTotal
);
printf
(
" "
);
printf
(
"%c"
,
fVerbose
?
'\n'
:
'\r'
);
}
/**Function*************************************************************
...
...
@@ -538,12 +537,12 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int nIters, int Wind
}
// update for best gates and recompute timing
ABC_SWAP
(
Vec_Int_t
*
,
p
->
vGatesBest
,
p
->
vGates
);
Abc_SclTimeNtkRecompute
(
p
,
&
p
->
SumArea
,
&
p
->
MaxDelay
,
0
);
p
->
timeTotal
=
clock
()
-
p
->
timeTotal
;
if
(
fVerbose
)
{
Abc_SclTimeNtkRecompute
(
p
,
&
p
->
SumArea
,
&
p
->
MaxDelay
,
0
);
Abc_SclUpsizePrint
(
p
,
i
,
Window
,
nAllPos
/
i
,
nAllNodes
/
i
,
nAllUpsizes
/
i
,
nAllTfos
/
i
,
1
);
// report runtime
p
->
timeTotal
=
clock
()
-
p
->
timeTotal
;
p
->
timeOther
=
p
->
timeTotal
-
p
->
timeCone
-
p
->
timeSize
-
p
->
timeTime
;
ABC_PRTP
(
"Runtime: Critical path"
,
p
->
timeCone
,
p
->
timeTotal
);
ABC_PRTP
(
"Runtime: Sizing eval "
,
p
->
timeSize
,
p
->
timeTotal
);
...
...
@@ -551,6 +550,7 @@ void Abc_SclUpsizePerform( SC_Lib * pLib, Abc_Ntk_t * pNtk, int nIters, int Wind
ABC_PRTP
(
"Runtime: Other "
,
p
->
timeOther
,
p
->
timeTotal
);
ABC_PRTP
(
"Runtime: TOTAL "
,
p
->
timeTotal
,
p
->
timeTotal
);
}
// Abc_SclDumpStats( p, "stats2.txt", p->timeTotal );
// save the result and quit
Abc_SclManSetGates
(
pLib
,
pNtk
,
p
->
vGates
);
// updates gate pointers
...
...
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