summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2014-04-11 09:17:34 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2014-04-11 09:17:34 -0700
commitb50894ab6469081cfc4684d19c02be74c248d2ca (patch)
tree627600ab9b82fc61f23a0ac96bac94a81e9b093e
parentb9274a07deec99f6b9e23d3bf481b2e5213c5e8f (diff)
downloadabc-b50894ab6469081cfc4684d19c02be74c248d2ca.tar.gz
abc-b50894ab6469081cfc4684d19c02be74c248d2ca.tar.bz2
abc-b50894ab6469081cfc4684d19c02be74c248d2ca.zip
Removed obsolete code for sequential mapping.
-rw-r--r--src/aig/gia/giaIf.c1
-rw-r--r--src/base/abci/abc.c28
-rw-r--r--src/base/abci/abcRenode.c1
-rw-r--r--src/map/if/if.h8
-rw-r--r--src/map/if/ifCore.c9
-rw-r--r--src/map/if/ifCut.c16
-rw-r--r--src/map/if/ifMap.c17
-rw-r--r--src/map/if/ifSeq.c10
-rw-r--r--src/map/if/ifTime.c1
-rw-r--r--src/opt/lpk/lpkCore.c1
-rw-r--r--src/opt/nwk/nwkMap.c1
11 files changed, 16 insertions, 77 deletions
diff --git a/src/aig/gia/giaIf.c b/src/aig/gia/giaIf.c
index 77b37987..7e3462f8 100644
--- a/src/aig/gia/giaIf.c
+++ b/src/aig/gia/giaIf.c
@@ -73,7 +73,6 @@ void Gia_ManSetIfParsDefault( void * pp )
p->fEdge = 1;
p->fPower = 0;
p->fCutMin = 0;
- p->fSeqMap = 0;
p->fVerbose = 0;
p->pLutStruct = NULL;
// internal parameters
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c
index 10885cf3..5031a185 100644
--- a/src/base/abci/abc.c
+++ b/src/base/abci/abc.c
@@ -14791,7 +14791,6 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars->fEdge = 1;
pPars->fPower = 0;
pPars->fCutMin = 0;
- pPars->fSeqMap = 0;
pPars->fBidec = 0;
pPars->fVerbose = 0;
pPars->pLutStruct = NULL;
@@ -14962,7 +14961,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars->fCutMin ^= 1;
break;
case 's':
- pPars->fSeqMap ^= 1;
+ pPars->fDelayOptLut ^= 1;
break;
case 'd':
pPars->fBidec ^= 1;
@@ -15008,26 +15007,11 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
goto usage;
}
}
-
if ( pNtk == NULL )
{
Abc_Print( -1, "Empty network.\n" );
return 1;
}
-/*
- if ( pPars->fSeqMap )
- {
- Abc_Print( -1, "Sequential mapping is currently disabled.\n" );
- return 1;
- }
-*/
-
- if ( pPars->fSeqMap && (pPars->nLatchesCi == 0 || pPars->nLatchesCo == 0) )
- {
- Abc_Print( -1, "The network has no latches. Use combinational mapping instead of sequential.\n" );
- return 1;
- }
-
if ( pPars->nLutSize == -1 )
{
if ( pPars->pLutLib == NULL )
@@ -15035,11 +15019,7 @@ int Abc_CommandIf( Abc_Frame_t * pAbc, int argc, char ** argv )
Abc_Print( -1, "The LUT library is not given.\n" );
return 1;
}
- // get LUT size from the library
pPars->nLutSize = pPars->pLutLib->LutMax;
- // if variable pin delay, force truth table computation
-// if ( pPars->pLutLib->fVarPinDelays )
-// pPars->fTruth = 1;
}
if ( pPars->nLutSize < 2 || pPars->nLutSize > IF_MAX_LUTSIZE )
@@ -15286,7 +15266,7 @@ usage:
Abc_Print( -2, "\t-e : uses edge-based cut selection heuristics [default = %s]\n", pPars->fEdge? "yes": "no" );
Abc_Print( -2, "\t-p : uses power-aware cut selection heuristics [default = %s]\n", pPars->fPower? "yes": "no" );
Abc_Print( -2, "\t-m : enables cut minimization by removing vacuous variables [default = %s]\n", pPars->fCutMin? "yes": "no" );
- Abc_Print( -2, "\t-s : toggles sequential mapping [default = %s]\n", pPars->fSeqMap? "yes": "no" );
+ Abc_Print( -2, "\t-s : toggles sequential mapping [default = %s]\n", pPars->fDelayOptLut? "yes": "no" );
Abc_Print( -2, "\t-d : toggles deriving local AIGs using bi-decomposition [default = %s]\n", pPars->fBidec? "yes": "no" );
Abc_Print( -2, "\t-b : toggles the use of one special feature [default = %s]\n", pPars->fUseBat? "yes": "no" );
Abc_Print( -2, "\t-u : toggles the use of MUXes along with LUTs [default = %s]\n", fLutMux? "yes": "no" );
@@ -29705,7 +29685,7 @@ int Abc_CommandAbc9If( Abc_Frame_t * pAbc, int argc, char ** argv )
pPars->fCutMin ^= 1;
break;
case 's':
- pPars->fSeqMap ^= 1;
+ pPars->fDelayOptLut ^= 1;
break;
case 'd':
pPars->fBidec ^= 1;
@@ -29998,7 +29978,7 @@ usage:
Abc_Print( -2, "\t-e : uses edge-based cut selection heuristics [default = %s]\n", pPars->fEdge? "yes": "no" );
Abc_Print( -2, "\t-p : uses power-aware cut selection heuristics [default = %s]\n", pPars->fPower? "yes": "no" );
Abc_Print( -2, "\t-m : enables cut minimization by removing vacuous variables [default = %s]\n", pPars->fCutMin? "yes": "no" );
- Abc_Print( -2, "\t-s : toggles sequential mapping [default = %s]\n", pPars->fSeqMap? "yes": "no" );
+ Abc_Print( -2, "\t-s : toggles sequential mapping [default = %s]\n", pPars->fDelayOptLut? "yes": "no" );
Abc_Print( -2, "\t-d : toggles deriving local AIGs using bi-decomposition [default = %s]\n", pPars->fBidec? "yes": "no" );
Abc_Print( -2, "\t-b : toggles the use of one special feature [default = %s]\n", pPars->fUseBat? "yes": "no" );
Abc_Print( -2, "\t-g : toggles delay optimization by SOP balancing [default = %s]\n", pPars->fDelayOpt? "yes": "no" );
diff --git a/src/base/abci/abcRenode.c b/src/base/abci/abcRenode.c
index 3d5ebc66..c00413f4 100644
--- a/src/base/abci/abcRenode.c
+++ b/src/base/abci/abcRenode.c
@@ -84,7 +84,6 @@ Abc_Ntk_t * Abc_NtkRenode( Abc_Ntk_t * pNtk, int nFaninMax, int nCubeMax, int nF
pPars->fFancy = 0;
pPars->fExpRed = 0; //
pPars->fLatchPaths = 0;
- pPars->fSeqMap = 0;
pPars->fVerbose = fVerbose;
// internal parameters
pPars->fTruth = 1;
diff --git a/src/map/if/if.h b/src/map/if/if.h
index d5a86dd3..4b955478 100644
--- a/src/map/if/if.h
+++ b/src/map/if/if.h
@@ -117,7 +117,10 @@ struct If_Par_t_
int fEdge; // uses edge-based cut selection heuristics
int fPower; // uses power-aware cut selection heuristics
int fCutMin; // performs cut minimization by removing functionally reducdant variables
- int fSeqMap; // sequential mapping
+ int fDelayOpt; // special delay optimization
+ int fDelayOptLut; // delay optimization for LUTs
+ int fDsdBalance; // special delay optimization
+ int fUserRecLib; // use recorded library
int fBidec; // use bi-decomposition
int fUseBat; // use one specialized feature
int fUseBuffs; // use buffers to decouple outputs
@@ -134,9 +137,6 @@ struct If_Par_t_
char * pLutStruct; // LUT structure
float WireDelay; // wire delay
// internal parameters
- int fDelayOpt; // special delay optimization
- int fDsdBalance; // special delay optimization
- int fUserRecLib; // use recorded library
int fSkipCutFilter;// skip cut filter
int fAreaOnly; // area only mode
int fTruth; // truth table computation enabled
diff --git a/src/map/if/ifCore.c b/src/map/if/ifCore.c
index be5b49ac..1f2d2ae3 100644
--- a/src/map/if/ifCore.c
+++ b/src/map/if/ifCore.c
@@ -47,21 +47,12 @@ extern abctime s_MappingTime;
int If_ManPerformMapping( If_Man_t * p )
{
p->pPars->fAreaOnly = p->pPars->fArea; // temporary
-
// create the CI cutsets
If_ManSetupCiCutSets( p );
// allocate memory for other cutsets
If_ManSetupSetAll( p, If_ManCrossCut(p) );
// derive reverse top order
p->vObjsRev = If_ManReverseOrder( p );
-
- // try sequential mapping
- if ( p->pPars->fSeqMap )
- {
-// if ( p->pPars->fVerbose )
- Abc_Print( 1, "Performing sequential mapping without retiming.\n" );
- return If_ManPerformMappingSeq( p );
- }
return If_ManPerformMappingComb( p );
}
diff --git a/src/map/if/ifCut.c b/src/map/if/ifCut.c
index 7fb4d028..a4c0fd5d 100644
--- a/src/map/if/ifCut.c
+++ b/src/map/if/ifCut.c
@@ -950,14 +950,11 @@ float If_CutAreaFlow( If_Man_t * p, If_Cut_t * pCut )
If_Obj_t * pLeaf;
float Flow;
int i;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
Flow = If_CutLutArea(p, pCut);
If_CutForEachLeaf( p, pCut, pLeaf, i )
{
if ( pLeaf->nRefs == 0 || If_ObjIsConst1(pLeaf) )
Flow += If_ObjCutBest(pLeaf)->Area;
- else if ( p->pPars->fSeqMap ) // seq
- Flow += If_ObjCutBest(pLeaf)->Area / pLeaf->nRefs;
else
{
assert( pLeaf->EstRefs > p->fEpsilon );
@@ -983,14 +980,11 @@ float If_CutEdgeFlow( If_Man_t * p, If_Cut_t * pCut )
If_Obj_t * pLeaf;
float Flow;
int i;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
Flow = pCut->nLeaves;
If_CutForEachLeaf( p, pCut, pLeaf, i )
{
if ( pLeaf->nRefs == 0 || If_ObjIsConst1(pLeaf) )
Flow += If_ObjCutBest(pLeaf)->Edge;
- else if ( p->pPars->fSeqMap ) // seq
- Flow += If_ObjCutBest(pLeaf)->Edge / pLeaf->nRefs;
else
{
assert( pLeaf->EstRefs > p->fEpsilon );
@@ -1017,14 +1011,11 @@ float If_CutPowerFlow( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot )
float * pSwitching = (float *)p->vSwitching->pArray;
float Power = 0;
int i;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
If_CutForEachLeaf( p, pCut, pLeaf, i )
{
Power += pSwitching[pLeaf->Id];
if ( pLeaf->nRefs == 0 || If_ObjIsConst1(pLeaf) )
Power += If_ObjCutBest(pLeaf)->Power;
- else if ( p->pPars->fSeqMap ) // seq
- Power += If_ObjCutBest(pLeaf)->Power / pLeaf->nRefs;
else
{
assert( pLeaf->EstRefs > p->fEpsilon );
@@ -1049,7 +1040,6 @@ float If_CutAverageRefs( If_Man_t * p, If_Cut_t * pCut )
{
If_Obj_t * pLeaf;
int nRefsTotal, i;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
nRefsTotal = 0;
If_CutForEachLeaf( p, pCut, pLeaf, i )
nRefsTotal += pLeaf->nRefs;
@@ -1125,7 +1115,6 @@ float If_CutAreaRef( If_Man_t * p, If_Cut_t * pCut )
float If_CutAreaDerefed( If_Man_t * p, If_Cut_t * pCut )
{
float aResult, aResult2;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
if ( pCut->nLeaves < 2 )
return 0;
aResult2 = If_CutAreaRef( p, pCut );
@@ -1149,7 +1138,6 @@ float If_CutAreaDerefed( If_Man_t * p, If_Cut_t * pCut )
float If_CutAreaRefed( If_Man_t * p, If_Cut_t * pCut )
{
float aResult, aResult2;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
if ( pCut->nLeaves < 2 )
return 0;
aResult2 = If_CutAreaDeref( p, pCut );
@@ -1228,7 +1216,6 @@ float If_CutEdgeRef( If_Man_t * p, If_Cut_t * pCut )
float If_CutEdgeDerefed( If_Man_t * p, If_Cut_t * pCut )
{
float aResult, aResult2;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
if ( pCut->nLeaves < 2 )
return pCut->nLeaves;
aResult2 = If_CutEdgeRef( p, pCut );
@@ -1252,7 +1239,6 @@ float If_CutEdgeDerefed( If_Man_t * p, If_Cut_t * pCut )
float If_CutEdgeRefed( If_Man_t * p, If_Cut_t * pCut )
{
float aResult, aResult2;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
if ( pCut->nLeaves < 2 )
return pCut->nLeaves;
aResult2 = If_CutEdgeDeref( p, pCut );
@@ -1333,7 +1319,6 @@ float If_CutPowerRef( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot )
float If_CutPowerDerefed( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot )
{
float aResult, aResult2;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
if ( pCut->nLeaves < 2 )
return 0;
aResult2 = If_CutPowerRef( p, pCut, pRoot );
@@ -1357,7 +1342,6 @@ float If_CutPowerDerefed( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot )
float If_CutPowerRefed( If_Man_t * p, If_Cut_t * pCut, If_Obj_t * pRoot )
{
float aResult, aResult2;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
if ( pCut->nLeaves < 2 )
return 0;
aResult2 = If_CutPowerDeref( p, pCut, pRoot );
diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c
index 95e9fccf..9452feb3 100644
--- a/src/map/if/ifMap.c
+++ b/src/map/if/ifMap.c
@@ -100,17 +100,14 @@ void If_ObjPerformMappingAnd( If_Man_t * p, If_Obj_t * pObj, int Mode, int fPrep
int fFunc0R, fFunc1R;
int i, k, v, fChange;
int fSave0 = p->pPars->fDelayOpt || p->pPars->fDsdBalance || p->pPars->fUserRecLib;
- assert( p->pPars->fSeqMap || !If_ObjIsAnd(pObj->pFanin0) || pObj->pFanin0->pCutSet->nCuts > 0 );
- assert( p->pPars->fSeqMap || !If_ObjIsAnd(pObj->pFanin1) || pObj->pFanin1->pCutSet->nCuts > 0 );
+ assert( !If_ObjIsAnd(pObj->pFanin0) || pObj->pFanin0->pCutSet->nCuts > 0 );
+ assert( !If_ObjIsAnd(pObj->pFanin1) || pObj->pFanin1->pCutSet->nCuts > 0 );
// prepare
- if ( !p->pPars->fSeqMap )
- {
- if ( Mode == 0 )
- pObj->EstRefs = (float)pObj->nRefs;
- else if ( Mode == 1 )
- pObj->EstRefs = (float)((2.0 * pObj->EstRefs + pObj->nRefs) / 3.0);
- }
+ if ( Mode == 0 )
+ pObj->EstRefs = (float)pObj->nRefs;
+ else if ( Mode == 1 )
+ pObj->EstRefs = (float)((2.0 * pObj->EstRefs + pObj->nRefs) / 3.0);
// deref the selected cut
if ( Mode && pObj->nRefs > 0 )
If_CutAreaDeref( p, If_ObjCutBest(pObj) );
@@ -376,7 +373,6 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP
// go through the cuts of this node
If_ObjForEachCut( pTemp, pCutTemp, i )
{
- assert( p->pPars->fSeqMap || pCutTemp->nLeaves > 1 );
if ( pCutTemp->fUseless )
continue;
// get the next free cut
@@ -409,7 +405,6 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP
// update the best cut
if ( !fPreprocess || pCutSet->ppCuts[0]->Delay <= pObj->Required + p->fEpsilon )
If_CutCopy( p, If_ObjCutBest(pObj), pCutSet->ppCuts[0] );
- assert( p->pPars->fSeqMap || If_ObjCutBest(pObj)->nLeaves > 1 );
// add the trivial cut to the set
if ( !pObj->fSkipCut && If_ObjCutBest(pObj)->nLeaves > 1 )
{
diff --git a/src/map/if/ifSeq.c b/src/map/if/ifSeq.c
index 32cef52a..903491d6 100644
--- a/src/map/if/ifSeq.c
+++ b/src/map/if/ifSeq.c
@@ -305,15 +305,9 @@ void If_ManPerformMappingSeqPost( If_Man_t * p )
assert( p->pPars->pTimesReq == NULL );
p->pPars->pTimesReq = ABC_ALLOC( float, If_ManCoNum(p) );
If_ManForEachPo( p, pObj, i )
- {
p->pPars->pTimesReq[i] = p->RequiredGlo2;
-// Abc_Print( 1, "Out %3d : %2d \n", i, (int)p->pPars->pTimesReq[i] );
- }
If_ManForEachLatchInput( p, pObjLi, i )
- {
p->pPars->pTimesReq[i] = If_ObjLValue(If_ObjFanin0(pObjLi));
-// Abc_Print( 1, "Out %3d : %2d \n", i, (int)p->pPars->pTimesReq[i] );
- }
// undo previous mapping
If_ManForEachObj( p, pObj, i )
@@ -321,9 +315,9 @@ void If_ManPerformMappingSeqPost( If_Man_t * p )
If_ObjCutBest(pObj)->nLeaves = 0;
// map again combinationally
- p->pPars->fSeqMap = 0;
+// p->pPars->fSeqMap = 0;
If_ManPerformMappingComb( p );
- p->pPars->fSeqMap = 1;
+// p->pPars->fSeqMap = 1;
}
/**Function*************************************************************
diff --git a/src/map/if/ifTime.c b/src/map/if/ifTime.c
index 23e6a69d..82468f75 100644
--- a/src/map/if/ifTime.c
+++ b/src/map/if/ifTime.c
@@ -96,7 +96,6 @@ float If_CutDelay( If_Man_t * p, If_Obj_t * pObj, If_Cut_t * pCut )
float Delay, DelayCur;
float * pLutDelays;
int i, Shift, Pin2PinDelay;//, iLeaf;
-// assert( p->pPars->fSeqMap || pCut->nLeaves > 1 );
Delay = -IF_FLOAT_LARGE;
if ( p->pPars->pLutLib )
{
diff --git a/src/opt/lpk/lpkCore.c b/src/opt/lpk/lpkCore.c
index 91e7c715..a9088d10 100644
--- a/src/opt/lpk/lpkCore.c
+++ b/src/opt/lpk/lpkCore.c
@@ -63,7 +63,6 @@ void Lpk_IfManStart( Lpk_Man_t * p )
pPars->fFancy = 0;
pPars->fExpRed = 0; //
pPars->fLatchPaths = 0;
- pPars->fSeqMap = 0;
pPars->fVerbose = 0;
// internal parameters
pPars->fTruth = 1;
diff --git a/src/opt/nwk/nwkMap.c b/src/opt/nwk/nwkMap.c
index 0b54e74e..d3431c42 100644
--- a/src/opt/nwk/nwkMap.c
+++ b/src/opt/nwk/nwkMap.c
@@ -64,7 +64,6 @@ void Nwk_ManSetIfParsDefault( If_Par_t * pPars )
pPars->fEdge = 1;
pPars->fPower = 0;
pPars->fCutMin = 0;
- pPars->fSeqMap = 0;
pPars->fVerbose = 0;
// internal parameters
pPars->fTruth = 0;