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
9e20b301
Commit
9e20b301
authored
Apr 24, 2015
by
Alan Mishchenko
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adding switch 'map -f' to not use large gates for high-fanout nodes (disabled by default).
parent
3708acbf
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
18 additions
and
8 deletions
+18
-8
src/base/abci/abc.c
+11
-5
src/base/abci/abcMap.c
+2
-1
src/map/mapper/mapper.h
+1
-0
src/map/mapper/mapperCreate.c
+1
-0
src/map/mapper/mapperInt.h
+2
-1
src/map/mapper/mapperMatch.c
+1
-1
No files found.
src/base/abci/abc.c
View file @
9e20b301
...
...
@@ -14369,9 +14369,10 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
int
fRecovery
;
int
fSweep
;
int
fSwitching
;
int
fSkipFanout
;
int
fVerbose
;
int
c
;
extern
Abc_Ntk_t
*
Abc_NtkMap
(
Abc_Ntk_t
*
pNtk
,
double
DelayTarget
,
double
AreaMulti
,
double
DelayMulti
,
float
LogFan
,
float
Slew
,
float
Gain
,
int
nGatesMin
,
int
fRecovery
,
int
fSwitching
,
int
fVerbose
);
extern
Abc_Ntk_t
*
Abc_NtkMap
(
Abc_Ntk_t
*
pNtk
,
double
DelayTarget
,
double
AreaMulti
,
double
DelayMulti
,
float
LogFan
,
float
Slew
,
float
Gain
,
int
nGatesMin
,
int
fRecovery
,
int
fSwitching
,
int
f
SkipFanout
,
int
f
Verbose
);
extern
int
Abc_NtkFraigSweep
(
Abc_Ntk_t
*
pNtk
,
int
fUseInv
,
int
fExdc
,
int
fVerbose
,
int
fVeryVerbose
);
pNtk
=
Abc_FrameReadNtk
(
pAbc
);
...
...
@@ -14383,9 +14384,10 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
fRecovery
=
1
;
fSweep
=
0
;
fSwitching
=
0
;
fSkipFanout
=
0
;
fVerbose
=
0
;
Extra_UtilGetoptReset
();
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"DABFSGMarspvh"
)
)
!=
EOF
)
while
(
(
c
=
Extra_UtilGetopt
(
argc
,
argv
,
"DABFSGMarsp
f
vh"
)
)
!=
EOF
)
{
switch
(
c
)
{
...
...
@@ -14474,6 +14476,9 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
case
'p'
:
fSwitching
^=
1
;
break
;
case
'f'
:
fSkipFanout
^=
1
;
break
;
case
'v'
:
fVerbose
^=
1
;
break
;
...
...
@@ -14510,7 +14515,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
}
Abc_Print
(
0
,
"The network was strashed and balanced before mapping.
\n
"
);
// get the new network
pNtkRes
=
Abc_NtkMap
(
pNtk
,
DelayTarget
,
AreaMulti
,
DelayMulti
,
LogFan
,
Slew
,
Gain
,
nGatesMin
,
fRecovery
,
fSwitching
,
fVerbose
);
pNtkRes
=
Abc_NtkMap
(
pNtk
,
DelayTarget
,
AreaMulti
,
DelayMulti
,
LogFan
,
Slew
,
Gain
,
nGatesMin
,
fRecovery
,
fSwitching
,
f
SkipFanout
,
f
Verbose
);
if
(
pNtkRes
==
NULL
)
{
Abc_NtkDelete
(
pNtk
);
...
...
@@ -14522,7 +14527,7 @@ int Abc_CommandMap( Abc_Frame_t * pAbc, int argc, char ** argv )
else
{
// get the new network
pNtkRes
=
Abc_NtkMap
(
pNtk
,
DelayTarget
,
AreaMulti
,
DelayMulti
,
LogFan
,
Slew
,
Gain
,
nGatesMin
,
fRecovery
,
fSwitching
,
fVerbose
);
pNtkRes
=
Abc_NtkMap
(
pNtk
,
DelayTarget
,
AreaMulti
,
DelayMulti
,
LogFan
,
Slew
,
Gain
,
nGatesMin
,
fRecovery
,
fSwitching
,
f
SkipFanout
,
f
Verbose
);
if
(
pNtkRes
==
NULL
)
{
Abc_Print
(
-
1
,
"Mapping has failed.
\n
"
);
...
...
@@ -14549,7 +14554,7 @@ usage:
sprintf
(
Buffer
,
"not used"
);
else
sprintf
(
Buffer
,
"%.3f"
,
DelayTarget
);
Abc_Print
(
-
2
,
"usage: map [-DABFSG float] [-M num] [-arspvh]
\n
"
);
Abc_Print
(
-
2
,
"usage: map [-DABFSG float] [-M num] [-arsp
f
vh]
\n
"
);
Abc_Print
(
-
2
,
"
\t
performs standard cell mapping of the current network
\n
"
);
Abc_Print
(
-
2
,
"
\t
-D float : sets the global required times [default = %s]
\n
"
,
Buffer
);
Abc_Print
(
-
2
,
"
\t
-A float :
\"
area multiplier
\"
to bias gate selection [default = %.2f]
\n
"
,
AreaMulti
);
...
...
@@ -14562,6 +14567,7 @@ usage:
Abc_Print
(
-
2
,
"
\t
-r : toggles area recovery [default = %s]
\n
"
,
fRecovery
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-s : toggles sweep after mapping [default = %s]
\n
"
,
fSweep
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-p : optimizes power by minimizing switching [default = %s]
\n
"
,
fSwitching
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-f : do not use large gates to map high-fanout nodes [default = %s]
\n
"
,
fSkipFanout
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-v : toggles verbose output [default = %s]
\n
"
,
fVerbose
?
"yes"
:
"no"
);
Abc_Print
(
-
2
,
"
\t
-h : print the command usage
\n
"
);
return
1
;
src/base/abci/abcMap.c
View file @
9e20b301
...
...
@@ -56,7 +56,7 @@ static Abc_Obj_t * Abc_NodeFromMapSuperChoice_rec( Abc_Ntk_t * pNtkNew, Map_Sup
SeeAlso []
***********************************************************************/
Abc_Ntk_t
*
Abc_NtkMap
(
Abc_Ntk_t
*
pNtk
,
double
DelayTarget
,
double
AreaMulti
,
double
DelayMulti
,
float
LogFan
,
float
Slew
,
float
Gain
,
int
nGatesMin
,
int
fRecovery
,
int
fSwitching
,
int
fVerbose
)
Abc_Ntk_t
*
Abc_NtkMap
(
Abc_Ntk_t
*
pNtk
,
double
DelayTarget
,
double
AreaMulti
,
double
DelayMulti
,
float
LogFan
,
float
Slew
,
float
Gain
,
int
nGatesMin
,
int
fRecovery
,
int
fSwitching
,
int
f
SkipFanout
,
int
f
Verbose
)
{
static
int
fUseMulti
=
0
;
int
fShowSwitching
=
1
;
...
...
@@ -132,6 +132,7 @@ Abc_Ntk_t * Abc_NtkMap( Abc_Ntk_t * pNtk, double DelayTarget, double AreaMulti,
return
NULL
;
clk
=
Abc_Clock
();
Map_ManSetSwitching
(
pMan
,
fSwitching
);
Map_ManSetSkipFanout
(
pMan
,
fSkipFanout
);
if
(
LogFan
!=
0
)
Map_ManCreateNodeDelays
(
pMan
,
LogFan
);
if
(
!
Map_Mapping
(
pMan
)
)
...
...
src/map/mapper/mapper.h
View file @
9e20b301
...
...
@@ -108,6 +108,7 @@ extern void Map_ManSetChoiceNodeNum( Map_Man_t * p, int nChoiceNodes
extern
void
Map_ManSetChoiceNum
(
Map_Man_t
*
p
,
int
nChoices
);
extern
void
Map_ManSetVerbose
(
Map_Man_t
*
p
,
int
fVerbose
);
extern
void
Map_ManSetSwitching
(
Map_Man_t
*
p
,
int
fSwitching
);
extern
void
Map_ManSetSkipFanout
(
Map_Man_t
*
p
,
int
fSkipFanout
);
extern
Map_Man_t
*
Map_NodeReadMan
(
Map_Node_t
*
p
);
extern
char
*
Map_NodeReadData
(
Map_Node_t
*
p
,
int
fPhase
);
...
...
src/map/mapper/mapperCreate.c
View file @
9e20b301
...
...
@@ -73,6 +73,7 @@ void Map_ManSetChoiceNodeNum( Map_Man_t * p, int nChoiceNodes ) { p->
void
Map_ManSetChoiceNum
(
Map_Man_t
*
p
,
int
nChoices
)
{
p
->
nChoices
=
nChoices
;
}
void
Map_ManSetVerbose
(
Map_Man_t
*
p
,
int
fVerbose
)
{
p
->
fVerbose
=
fVerbose
;
}
void
Map_ManSetSwitching
(
Map_Man_t
*
p
,
int
fSwitching
)
{
p
->
fSwitching
=
fSwitching
;
}
void
Map_ManSetSkipFanout
(
Map_Man_t
*
p
,
int
fSkipFanout
)
{
p
->
fSkipFanout
=
fSkipFanout
;
}
/**Function*************************************************************
...
...
src/map/mapper/mapperInt.h
View file @
9e20b301
...
...
@@ -120,7 +120,8 @@ struct Map_ManStruct_t_
int
fObeyFanoutLimits
;
// Should mapper try to obey fanout limits or not
float
DelayTarget
;
// the required times set by the user
int
nTravIds
;
// the traversal counter
int
fSwitching
;
// Should mapper try to obey fanout limits or not
int
fSwitching
;
// use switching activity
int
fSkipFanout
;
// skip large gates when mapping high-fanout nodes
// the supergate library
Map_SuperLib_t
*
pSuperLib
;
// the current supergate library
...
...
src/map/mapper/mapperMatch.c
View file @
9e20b301
...
...
@@ -288,7 +288,7 @@ int Map_MatchNodePhase( Map_Man_t * p, Map_Node_t * pNode, int fPhase )
for
(
pCut
=
pNode
->
pCuts
->
pNext
;
pCut
;
pCut
=
pCut
->
pNext
)
{
// limit gate sizes based on fanout count
if
(
(
pNode
->
nRefs
>
3
&&
pCut
->
nLeaves
>
2
)
||
(
pNode
->
nRefs
>
1
&&
pCut
->
nLeaves
>
3
)
)
if
(
p
->
fSkipFanout
&&
(
pNode
->
nRefs
>
3
&&
pCut
->
nLeaves
>
2
)
||
(
pNode
->
nRefs
>
1
&&
pCut
->
nLeaves
>
3
)
)
continue
;
pMatch
=
pCut
->
M
+
fPhase
;
if
(
pMatch
->
pSupers
==
NULL
)
...
...
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