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
40d8cdab
Commit
40d8cdab
authored
May 25, 2013
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New MFS package.
parent
9268c100
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
22 additions
and
10 deletions
+22
-10
src/opt/mfs/mfsResub.c
+1
-0
src/opt/sfm/sfmCore.c
+7
-2
src/opt/sfm/sfmInt.h
+1
-0
src/opt/sfm/sfmWin.c
+13
-8
No files found.
src/opt/mfs/mfsResub.c
View file @
40d8cdab
...
...
@@ -220,6 +220,7 @@ p->timeInt += clock() - clk;
if
(
fOnlyRemove
)
return
0
;
// return 0;
if
(
fVeryVerbose
)
{
...
...
src/opt/sfm/sfmCore.c
View file @
40d8cdab
...
...
@@ -71,6 +71,7 @@ void Sfm_ParSetDefault( Sfm_Par_t * pPars )
***********************************************************************/
void
Sfm_NtkPrintStats
(
Sfm_Ntk_t
*
p
)
{
p
->
timeOther
=
p
->
timeTotal
-
p
->
timeWin
-
p
->
timeDiv
-
p
->
timeCnf
-
p
->
timeSat
;
printf
(
"Nodes = %d. Try = %d. Resub = %d. Div = %d. SAT calls = %d. Timeouts = %d.
\n
"
,
Sfm_NtkNodeNum
(
p
),
p
->
nNodesTried
,
p
->
nRemoves
+
p
->
nResubs
,
p
->
nTotalDivs
,
p
->
nSatCalls
,
p
->
nTimeOuts
);
...
...
@@ -88,6 +89,7 @@ void Sfm_NtkPrintStats( Sfm_Ntk_t * p )
ABC_PRTP
(
"Div"
,
p
->
timeDiv
,
p
->
timeTotal
);
ABC_PRTP
(
"Cnf"
,
p
->
timeCnf
,
p
->
timeTotal
);
ABC_PRTP
(
"Sat"
,
p
->
timeSat
,
p
->
timeTotal
);
ABC_PRTP
(
"Oth"
,
p
->
timeOther
,
p
->
timeTotal
);
ABC_PRTP
(
"ALL"
,
p
->
timeTotal
,
p
->
timeTotal
);
}
...
...
@@ -145,6 +147,8 @@ p->timeSat += clock() - clk;
goto
finish
;
if
(
fRemoveOnly
||
Vec_IntSize
(
p
->
vDivs
)
==
0
)
return
0
;
// return 0;
if
(
fVeryVerbose
)
{
for
(
i
=
0
;
i
<
9
;
i
++
)
...
...
@@ -209,10 +213,10 @@ finish:
int
Sfm_NodeResub
(
Sfm_Ntk_t
*
p
,
int
iNode
)
{
int
i
,
iFanin
;
p
->
nNodesTried
++
;
// prepare SAT solver
if
(
!
Sfm_NtkCreateWindow
(
p
,
iNode
,
p
->
pPars
->
fVeryVerbose
)
)
return
0
;
p
->
nNodesTried
++
;
Sfm_NtkWindowToSolver
(
p
);
Sfm_NtkPrepareDivisors
(
p
,
iNode
);
// try replacing area critical fanins
...
...
@@ -271,7 +275,8 @@ int Sfm_NtkPerform( Sfm_Ntk_t * p, Sfm_Par_t * pPars )
continue
;
if
(
Sfm_ObjFaninNum
(
p
,
i
)
<
2
||
Sfm_ObjFaninNum
(
p
,
i
)
>
6
)
continue
;
Counter
+=
Sfm_NodeResub
(
p
,
i
);
while
(
Sfm_NodeResub
(
p
,
i
)
)
Counter
++
;
}
p
->
nTotalNodesEnd
=
Vec_WecSizeUsed
(
&
p
->
vFanins
)
-
Sfm_NtkPoNum
(
p
);
p
->
nTotalEdgesEnd
=
Vec_WecSizeSize
(
&
p
->
vFanins
);
...
...
src/opt/sfm/sfmInt.h
View file @
40d8cdab
...
...
@@ -116,6 +116,7 @@ struct Sfm_Ntk_t_
clock_t
timeDiv
;
clock_t
timeCnf
;
clock_t
timeSat
;
clock_t
timeOther
;
clock_t
timeTotal
;
};
...
...
src/opt/sfm/sfmWin.c
View file @
40d8cdab
...
...
@@ -182,11 +182,12 @@ int Sfm_NtkCheckFanouts( Sfm_Ntk_t * p, int iNode )
void
Sfm_NtkAddDivisors
(
Sfm_Ntk_t
*
p
,
int
iNode
,
int
nLevelMax
)
{
int
i
,
iFanout
;
if
(
Sfm_ObjFanoutNum
(
p
,
iNode
)
>
p
->
pPars
->
nFanoutMax
)
return
;
Sfm_ObjForEachFanout
(
p
,
iNode
,
iFanout
,
i
)
{
// skip TFI nodes, PO nodes,
and nodes with high fanout
or nodes with high logic level
// skip TFI nodes, PO nodes, or nodes with high logic level
if
(
Sfm_ObjIsTravIdCurrent
(
p
,
iFanout
)
||
Sfm_ObjIsPo
(
p
,
iFanout
)
||
Sfm_ObjFanoutNum
(
p
,
iFanout
)
>=
p
->
pPars
->
nFanoutMax
||
(
p
->
pPars
->
fFixLevel
&&
Sfm_ObjLevel
(
p
,
iFanout
)
>=
nLevelMax
)
)
continue
;
// handle single-input nodes
...
...
@@ -216,20 +217,22 @@ void Sfm_NtkAddDivisors( Sfm_Ntk_t * p, int iNode, int nLevelMax )
SeeAlso []
***********************************************************************/
void
Sfm_NtkCollectTfi_rec
(
Sfm_Ntk_t
*
p
,
int
iNode
)
int
Sfm_NtkCollectTfi_rec
(
Sfm_Ntk_t
*
p
,
int
iNode
,
int
nWinSizeMax
)
{
int
i
,
iFanin
;
if
(
Sfm_ObjIsTravIdCurrent
(
p
,
iNode
)
)
return
;
return
0
;
Sfm_ObjSetTravIdCurrent
(
p
,
iNode
);
if
(
Sfm_ObjIsPi
(
p
,
iNode
)
)
{
Vec_IntPush
(
p
->
vLeaves
,
iNode
);
return
;
return
0
;
}
Sfm_ObjForEachFanin
(
p
,
iNode
,
iFanin
,
i
)
Sfm_NtkCollectTfi_rec
(
p
,
iFanin
);
if
(
Sfm_NtkCollectTfi_rec
(
p
,
iFanin
,
nWinSizeMax
)
)
return
1
;
Vec_IntPush
(
p
->
vNodes
,
iNode
);
return
nWinSizeMax
&&
(
Vec_IntSize
(
p
->
vNodes
)
>
nWinSizeMax
);
}
int
Sfm_NtkCreateWindow
(
Sfm_Ntk_t
*
p
,
int
iNode
,
int
fVerbose
)
{
...
...
@@ -243,9 +246,11 @@ int Sfm_NtkCreateWindow( Sfm_Ntk_t * p, int iNode, int fVerbose )
Vec_IntClear
(
p
->
vTfo
);
// roots
// collect transitive fanin
Sfm_NtkIncrementTravId
(
p
);
Sfm_NtkCollectTfi_rec
(
p
,
iNode
);
if
(
Vec_IntSize
(
p
->
vLeaves
)
+
Vec_IntSize
(
p
->
vNodes
)
>
p
->
pPars
->
nWinSizeMax
)
if
(
Sfm_NtkCollectTfi_rec
(
p
,
iNode
,
p
->
pPars
->
nWinSizeMax
)
)
{
p
->
timeWin
+=
clock
()
-
clk
;
return
0
;
}
// collect TFO (currently use only one level of TFO)
if
(
Sfm_NtkCheckFanouts
(
p
,
iNode
)
)
{
...
...
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