summaryrefslogtreecommitdiffstats
path: root/src/map/mapper
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2015-04-24 14:51:34 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2015-04-24 14:51:34 -0700
commit9e20b3016ddb16993687cffc050c3cee127f677d (patch)
treef92058fe08605320b4a3ed42318821c5fafed29e /src/map/mapper
parent3708acbf469432e540fe5075f746028fcdaa27cb (diff)
downloadabc-9e20b3016ddb16993687cffc050c3cee127f677d.tar.gz
abc-9e20b3016ddb16993687cffc050c3cee127f677d.tar.bz2
abc-9e20b3016ddb16993687cffc050c3cee127f677d.zip
Adding switch 'map -f' to not use large gates for high-fanout nodes (disabled by default).
Diffstat (limited to 'src/map/mapper')
-rw-r--r--src/map/mapper/mapper.h1
-rw-r--r--src/map/mapper/mapperCreate.c1
-rw-r--r--src/map/mapper/mapperInt.h3
-rw-r--r--src/map/mapper/mapperMatch.c2
4 files changed, 5 insertions, 2 deletions
diff --git a/src/map/mapper/mapper.h b/src/map/mapper/mapper.h
index 2a52ee08..169223d8 100644
--- a/src/map/mapper/mapper.h
+++ b/src/map/mapper/mapper.h
@@ -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 );
diff --git a/src/map/mapper/mapperCreate.c b/src/map/mapper/mapperCreate.c
index 6914724c..e7ad4819 100644
--- a/src/map/mapper/mapperCreate.c
+++ b/src/map/mapper/mapperCreate.c
@@ -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*************************************************************
diff --git a/src/map/mapper/mapperInt.h b/src/map/mapper/mapperInt.h
index cd6ac81c..fdfece30 100644
--- a/src/map/mapper/mapperInt.h
+++ b/src/map/mapper/mapperInt.h
@@ -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
diff --git a/src/map/mapper/mapperMatch.c b/src/map/mapper/mapperMatch.c
index 97b3737a..6e1287b2 100644
--- a/src/map/mapper/mapperMatch.c
+++ b/src/map/mapper/mapperMatch.c
@@ -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 )