summaryrefslogtreecommitdiffstats
path: root/src/map/mapper
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/mapper')
-rw-r--r--src/map/mapper/mapper.c22
-rw-r--r--src/map/mapper/mapper.h23
-rw-r--r--src/map/mapper/mapperCanon.c8
-rw-r--r--src/map/mapper/mapperCore.c8
-rw-r--r--src/map/mapper/mapperCreate.c12
-rw-r--r--src/map/mapper/mapperCut.c9
-rw-r--r--src/map/mapper/mapperCutUtils.c2
-rw-r--r--src/map/mapper/mapperFanout.c2
-rw-r--r--src/map/mapper/mapperGENERIC.c2
-rw-r--r--src/map/mapper/mapperInt.h16
-rw-r--r--src/map/mapper/mapperLib.c10
-rw-r--r--src/map/mapper/mapperMatch.c2
-rw-r--r--src/map/mapper/mapperRefs.c6
-rw-r--r--src/map/mapper/mapperSuper.c2
-rw-r--r--src/map/mapper/mapperSwitch.c2
-rw-r--r--src/map/mapper/mapperTable.c6
-rw-r--r--src/map/mapper/mapperTime.c2
-rw-r--r--src/map/mapper/mapperTree.c13
-rw-r--r--src/map/mapper/mapperTruth.c13
-rw-r--r--src/map/mapper/mapperUtils.c2
-rw-r--r--src/map/mapper/mapperVec.c2
21 files changed, 70 insertions, 94 deletions
diff --git a/src/map/mapper/mapper.c b/src/map/mapper/mapper.c
index b18b68c0..e59fa4a3 100644
--- a/src/map/mapper/mapper.c
+++ b/src/map/mapper/mapper.c
@@ -28,7 +28,7 @@
static int Map_CommandReadLibrary ( Abc_Frame_t * pAbc, int argc, char **argv );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -61,7 +61,7 @@ void Map_Init( Abc_Frame_t * pAbc )
void Map_End()
{
// Map_SuperLibFree( s_pSuperLib );
- Map_SuperLibFree( Abc_FrameReadLibSuper() );
+ Map_SuperLibFree( Abc_FrameReadLibSuper(Abc_FrameGetGlobalFrame()) );
}
@@ -87,7 +87,7 @@ int Map_CommandReadLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
int fAlgorithm;
int c;
- pNet = Abc_FrameReadNtk(pAbc);
+ pNet = Abc_FrameReadNet(pAbc);
pOut = Abc_FrameReadOut(pAbc);
pErr = Abc_FrameReadErr(pAbc);
@@ -95,16 +95,16 @@ int Map_CommandReadLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
fVerbose = 1;
fAlgorithm = 1;
ExcludeFile = 0;
- Extra_UtilGetoptReset();
- while ( (c = Extra_UtilGetopt(argc, argv, "eovh")) != EOF )
+ util_getopt_reset();
+ while ( (c = util_getopt(argc, argv, "eovh")) != EOF )
{
switch (c)
{
case 'e':
- ExcludeFile = argv[globalUtilOptind];
+ ExcludeFile = argv[util_optind];
if ( ExcludeFile == 0 )
goto usage;
- globalUtilOptind++;
+ util_optind++;
break;
case 'o':
fAlgorithm ^= 1;
@@ -121,15 +121,15 @@ int Map_CommandReadLibrary( Abc_Frame_t * pAbc, int argc, char **argv )
}
- if ( argc != globalUtilOptind + 1 )
+ if ( argc != util_optind + 1 )
{
goto usage;
}
// get the input file name
- FileName = argv[globalUtilOptind];
- if ( (pFile = Io_FileOpen( FileName, "open_path", "r", 0 )) == NULL )
-// if ( (pFile = fopen( FileName, "r" )) == NULL )
+ FileName = argv[util_optind];
+// if ( (pFile = Io_FileOpen( FileName, "open_path", "r" )) == NULL )
+ if ( (pFile = fopen( FileName, "r" )) == NULL )
{
fprintf( pErr, "Cannot open input file \"%s\". ", FileName );
if ( FileName = Extra_FileGetSimilarName( FileName, ".genlib", ".lib", ".gen", ".g", NULL ) )
diff --git a/src/map/mapper/mapper.h b/src/map/mapper/mapper.h
index 8eade761..c3f1ce81 100644
--- a/src/map/mapper/mapper.h
+++ b/src/map/mapper/mapper.h
@@ -19,10 +19,6 @@
#ifndef __MAPPER_H__
#define __MAPPER_H__
-#ifdef __cplusplus
-extern "C" {
-#endif
-
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
@@ -60,16 +56,16 @@ struct Map_TimeStruct_t_
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-/// MACRO DEFINITIONS ///
+/// MACRO DEFITIONS ///
////////////////////////////////////////////////////////////////////////
-#define Map_IsComplement(p) (((int)((unsigned long) (p) & 01)))
-#define Map_Regular(p) ((Map_Node_t *)((unsigned long)(p) & ~01))
-#define Map_Not(p) ((Map_Node_t *)((unsigned long)(p) ^ 01))
-#define Map_NotCond(p,c) ((Map_Node_t *)((unsigned long)(p) ^ (c)))
+#define Map_IsComplement(p) (((int)((long) (p) & 01)))
+#define Map_Regular(p) ((Map_Node_t *)((unsigned)(p) & ~01))
+#define Map_Not(p) ((Map_Node_t *)((long)(p) ^ 01))
+#define Map_NotCond(p,c) ((Map_Node_t *)((long)(p) ^ (c)))
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/*=== mapperCreate.c =============================================================*/
@@ -184,12 +180,7 @@ extern void Map_ManCleanData( Map_Man_t * p );
extern void Map_MappingSetupTruthTables( unsigned uTruths[][2] );
extern void Map_MappingSetupTruthTablesLarge( unsigned uTruths[][32] );
-#ifdef __cplusplus
-}
-#endif
-
-#endif
-
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
+#endif
diff --git a/src/map/mapper/mapperCanon.c b/src/map/mapper/mapperCanon.c
index 203c9142..2b0f261f 100644
--- a/src/map/mapper/mapperCanon.c
+++ b/src/map/mapper/mapperCanon.c
@@ -26,7 +26,7 @@ static unsigned Map_CanonComputePhase( unsigned uTruths[][2], int nVars, unsigne
static void Map_CanonComputePhase6( unsigned uTruths[][2], int nVars, unsigned uTruth[], unsigned uPhase, unsigned uTruthRes[] );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -218,7 +218,7 @@ int Map_CanonComputeFast( Map_Man_t * p, int nVarsMax, int nVarsReal, unsigned u
if ( uCanon0 >= uCanon1 ) // using nCanon1 as the main one
{
assert( p->pCounters[uTruth1] > 0 );
- uCanonBest = 0xFFFFFFFF;
+ uCanonBest = 0xFFFF;
for ( i = 0; i < p->pCounters[uTruth1]; i++ )
{
uCanon0 = Extra_TruthPolarize( uTruth0, p->uPhases[uTruth1][i], 4 );
@@ -226,7 +226,6 @@ int Map_CanonComputeFast( Map_Man_t * p, int nVarsMax, int nVarsReal, unsigned u
{
uCanonBest = uCanon0;
uPhaseBest = p->uPhases[uTruth1][i];
- assert( uPhaseBest < 16 );
}
}
uTruthRes[0] = (uCanon1 << 16) | uCanonBest;
@@ -237,7 +236,7 @@ int Map_CanonComputeFast( Map_Man_t * p, int nVarsMax, int nVarsReal, unsigned u
else if ( uCanon0 < uCanon1 )
{
assert( p->pCounters[uTruth0] > 0 );
- uCanonBest = 0xFFFFFFFF;
+ uCanonBest = 0xFFFF;
for ( i = 0; i < p->pCounters[uTruth0]; i++ )
{
uCanon1 = Extra_TruthPolarize( uTruth1, p->uPhases[uTruth0][i], 4 );
@@ -245,7 +244,6 @@ int Map_CanonComputeFast( Map_Man_t * p, int nVarsMax, int nVarsReal, unsigned u
{
uCanonBest = uCanon1;
uPhaseBest = p->uPhases[uTruth0][i];
- assert( uPhaseBest < 16 );
}
}
uTruthRes[0] = (uCanon0 << 16) | uCanonBest;
diff --git a/src/map/mapper/mapperCore.c b/src/map/mapper/mapperCore.c
index 5d4854e6..629ba59d 100644
--- a/src/map/mapper/mapperCore.c
+++ b/src/map/mapper/mapperCore.c
@@ -24,7 +24,7 @@
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -46,7 +46,7 @@
***********************************************************************/
int Map_Mapping( Map_Man_t * p )
{
- int fShowSwitching = 1;
+ int fShowSwitching = 0;
int fUseAreaFlow = 1;
int fUseExactArea = !p->fSwitching;
int fUseExactAreaWithPhase = !p->fSwitching;
@@ -93,11 +93,7 @@ PRT( "Time", p->timeMatch );
//////////////////////////////////////////////////////////////////////
if ( !p->fAreaRecovery )
- {
- if ( p->fVerbose )
- Map_MappingPrintOutputArrivals( p );
return 1;
- }
//////////////////////////////////////////////////////////////////////
// perform area recovery using area flow
diff --git a/src/map/mapper/mapperCreate.c b/src/map/mapper/mapperCreate.c
index 157d467b..31fbf0ea 100644
--- a/src/map/mapper/mapperCreate.c
+++ b/src/map/mapper/mapperCreate.c
@@ -30,7 +30,7 @@ static Map_Node_t * Map_TableLookup( Map_Man_t * p, Map_Node_t * p1, Map_Node
static inline unsigned Map_HashKey2( Map_Node_t * p0, Map_Node_t * p1, int TableSize ) { return ((unsigned)(p0) + (unsigned)(p1) * 12582917) % TableSize; }
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -183,7 +183,7 @@ Map_Man_t * Map_ManCreate( int nInputs, int nOutputs, int fVerbose )
int i;
// derive the supergate library
- if ( Abc_FrameReadLibSuper() == NULL )
+ if ( Abc_FrameReadLibSuper(Abc_FrameGetGlobalFrame()) == NULL )
{
printf( "The supergate library is not specified. Use \"read_library\" or \"read_super\".\n" );
return NULL;
@@ -192,7 +192,7 @@ Map_Man_t * Map_ManCreate( int nInputs, int nOutputs, int fVerbose )
// start the manager
p = ALLOC( Map_Man_t, 1 );
memset( p, 0, sizeof(Map_Man_t) );
- p->pSuperLib = Abc_FrameReadLibSuper();
+ p->pSuperLib = Abc_FrameReadLibSuper(Abc_FrameGetGlobalFrame());
p->nVarsMax = p->pSuperLib->nVarsMax;
p->fVerbose = fVerbose;
p->fEpsilon = (float)0.001;
@@ -261,8 +261,8 @@ void Map_ManFree( Map_Man_t * p )
if ( p->uCanons ) free( p->uCanons );
if ( p->uPhases ) free( p->uPhases );
if ( p->pCounters ) free( p->pCounters );
- Extra_MmFixedStop( p->mmNodes );
- Extra_MmFixedStop( p->mmCuts );
+ Extra_MmFixedStop( p->mmNodes, 0 );
+ Extra_MmFixedStop( p->mmCuts, 0 );
FREE( p->pInputArrivals );
FREE( p->pInputs );
FREE( p->pOutputs );
@@ -314,7 +314,7 @@ void Map_ManPrintTimeStats( Map_Man_t * p )
void Map_ManPrintStatsToFile( char * pName, float Area, float Delay, int Time )
{
FILE * pTable;
- pTable = fopen( "map_stats.txt", "a+" );
+ pTable = fopen( "stats.txt", "a+" );
fprintf( pTable, "%s ", pName );
fprintf( pTable, "%4.2f ", Area );
fprintf( pTable, "%4.2f ", Delay );
diff --git a/src/map/mapper/mapperCut.c b/src/map/mapper/mapperCut.c
index b05e9d0c..b5ce4018 100644
--- a/src/map/mapper/mapperCut.c
+++ b/src/map/mapper/mapperCut.c
@@ -80,7 +80,7 @@ static unsigned Map_CutComputeTruth( Map_Man_t * p, Map_Cut_t * pCut, Ma
pCut2 = pCut? pCut->pNext: NULL )
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -149,7 +149,7 @@ void Map_MappingCuts( Map_Man_t * p )
if ( p->fVerbose )
{
nCuts = Map_MappingCountAllCuts(p);
- printf( "Nodes = %6d. Total %d-feasible cuts = %10d. Per node = %.1f. ",
+ printf( "Nodes = %6d. Total %d-feasible cuts = %d. Per node = %.1f. ",
p->nNodes, p->nVarsMax, nCuts, ((float)nCuts)/p->nNodes );
PRT( "Time", clock() - clk );
}
@@ -208,7 +208,7 @@ Map_Cut_t * Map_CutCompute( Map_Man_t * p, Map_CutTable_t * pTable, Map_Node_t *
// set at the node
pNode->pCuts = pCut;
// remove the dominated cuts
- Map_CutFilter( p, pNode );
+// Map_CutFilter( p, pNode );
// set the phase correctly
if ( pNode->pRepr && Map_NodeComparePhase(pNode, pNode->pRepr) )
{
@@ -612,8 +612,7 @@ int Map_CutMergeTwo( Map_Cut_t * pCut1, Map_Cut_t * pCut2, Map_Node_t * ppNodes[
{
min = i;
for ( k = i+1; k < nTotal; k++ )
-// if ( ppNodes[k] < ppNodes[min] ) // reported bug fix (non-determinism!)
- if ( ppNodes[k]->Num < ppNodes[min]->Num )
+ if ( ppNodes[k] < ppNodes[min] )
min = k;
pNodeTemp = ppNodes[i];
ppNodes[i] = ppNodes[min];
diff --git a/src/map/mapper/mapperCutUtils.c b/src/map/mapper/mapperCutUtils.c
index 4450cb04..9f572e75 100644
--- a/src/map/mapper/mapperCutUtils.c
+++ b/src/map/mapper/mapperCutUtils.c
@@ -23,7 +23,7 @@
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
diff --git a/src/map/mapper/mapperFanout.c b/src/map/mapper/mapperFanout.c
index 63cdbd2a..aca29918 100644
--- a/src/map/mapper/mapperFanout.c
+++ b/src/map/mapper/mapperFanout.c
@@ -25,7 +25,7 @@
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
diff --git a/src/map/mapper/mapperGENERIC.c b/src/map/mapper/mapperGENERIC.c
index 823eb4f2..4df5ee51 100644
--- a/src/map/mapper/mapperGENERIC.c
+++ b/src/map/mapper/mapperGENERIC.c
@@ -23,7 +23,7 @@
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
diff --git a/src/map/mapper/mapperInt.h b/src/map/mapper/mapperInt.h
index 37cca3d3..0acca56c 100644
--- a/src/map/mapper/mapperInt.h
+++ b/src/map/mapper/mapperInt.h
@@ -41,7 +41,7 @@
//#define MAP_ALLOCATE_FANOUT 1
////////////////////////////////////////////////////////////////////////
-/// MACRO DEFINITIONS ///
+/// MACRO DEFITIONS ///
////////////////////////////////////////////////////////////////////////
// the bit masks
@@ -61,10 +61,10 @@
#define MAP_RANDOM_UNSIGNED ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand()))
// internal macros to work with cuts
-#define Map_CutIsComplement(p) (((int)((unsigned long) (p) & 01)))
-#define Map_CutRegular(p) ((Map_Cut_t *)((unsigned long)(p) & ~01))
-#define Map_CutNot(p) ((Map_Cut_t *)((unsigned long)(p) ^ 01))
-#define Map_CutNotCond(p,c) ((Map_Cut_t *)((unsigned long)(p) ^ (c)))
+#define Map_CutIsComplement(p) (((int)((long) (p) & 01)))
+#define Map_CutRegular(p) ((Map_Cut_t *)((unsigned)(p) & ~01))
+#define Map_CutNot(p) ((Map_Cut_t *)((long)(p) ^ 01))
+#define Map_CutNotCond(p,c) ((Map_Cut_t *)((long)(p) ^ (c)))
// internal macros for referencing of nodes
#define Map_NodeReadRef(p) ((Map_Regular(p))->nRefs)
@@ -347,7 +347,7 @@ struct Map_HashEntryStruct_t_
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/*=== mapperCanon.c =============================================================*/
@@ -470,8 +470,8 @@ extern void Map_NodeVecWriteEntry( Map_NodeVec_t * p, int i, Map_No
extern Map_Node_t * Map_NodeVecReadEntry( Map_NodeVec_t * p, int i );
extern void Map_NodeVecSortByLevel( Map_NodeVec_t * p );
-#endif
-
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
+
+#endif
diff --git a/src/map/mapper/mapperLib.c b/src/map/mapper/mapperLib.c
index d916487e..a9e9e29b 100644
--- a/src/map/mapper/mapperLib.c
+++ b/src/map/mapper/mapperLib.c
@@ -23,7 +23,7 @@
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -147,9 +147,9 @@ void Map_SuperLibFree( Map_SuperLib_t * p )
Map_SuperTableFree( p->tTableC );
if ( p->tTable )
Map_SuperTableFree( p->tTable );
- Extra_MmFixedStop( p->mmSupers );
- Extra_MmFixedStop( p->mmEntries );
- Extra_MmFlexStop( p->mmForms );
+ Extra_MmFixedStop( p->mmSupers, 0 );
+ Extra_MmFixedStop( p->mmEntries, 0 );
+ Extra_MmFlexStop( p->mmForms, 0 );
FREE( p->ppSupers );
FREE( p );
}
@@ -179,7 +179,7 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib )
return 0;
// write the current library into the file
- sprintf( FileNameGenlib, "%s_temp", Mio_LibraryReadName(pLib) );
+ strcpy( FileNameGenlib, Mio_LibraryReadName(pLib) );
pFile = fopen( FileNameGenlib, "w" );
Mio_WriteLibrary( pFile, pLib, 0 );
fclose( pFile );
diff --git a/src/map/mapper/mapperMatch.c b/src/map/mapper/mapperMatch.c
index bfa72601..ddb9ebb7 100644
--- a/src/map/mapper/mapperMatch.c
+++ b/src/map/mapper/mapperMatch.c
@@ -41,7 +41,7 @@ static void Map_NodeTryDroppingOnePhase( Map_Man_t * p, Map_Node_t * pNode );
static void Map_NodeTransferArrivalTimes( Map_Man_t * p, Map_Node_t * pNode );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
diff --git a/src/map/mapper/mapperRefs.c b/src/map/mapper/mapperRefs.c
index a50b134a..baaebfa1 100644
--- a/src/map/mapper/mapperRefs.c
+++ b/src/map/mapper/mapperRefs.c
@@ -28,7 +28,7 @@ static float Map_CutRefDeref( Map_Cut_t * pCut, int fPhase, int fReference );
static void Map_MappingSetRefs_rec( Map_Man_t * pMan, Map_Node_t * pNode, Map_Node_t ** ppStore );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -237,7 +237,7 @@ float Map_CutGetAreaRefed( Map_Cut_t * pCut, int fPhase )
float aResult, aResult2;
aResult2 = Map_CutRefDeref( pCut, fPhase, 0 ); // dereference
aResult = Map_CutRefDeref( pCut, fPhase, 1 ); // reference
-// assert( aResult == aResult2 );
+ assert( aResult == aResult2 );
return aResult;
}
@@ -257,7 +257,7 @@ float Map_CutGetAreaDerefed( Map_Cut_t * pCut, int fPhase )
float aResult, aResult2;
aResult2 = Map_CutRefDeref( pCut, fPhase, 1 ); // reference
aResult = Map_CutRefDeref( pCut, fPhase, 0 ); // dereference
-// assert( aResult == aResult2 );
+ assert( aResult == aResult2 );
return aResult;
}
diff --git a/src/map/mapper/mapperSuper.c b/src/map/mapper/mapperSuper.c
index ce6a780f..34b1d8e6 100644
--- a/src/map/mapper/mapperSuper.c
+++ b/src/map/mapper/mapperSuper.c
@@ -30,7 +30,7 @@ static void Map_LibraryComputeTruth_rec( Map_SuperLib_t * pLib, char *
static void Map_LibraryPrintClasses( Map_SuperLib_t * p );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
diff --git a/src/map/mapper/mapperSwitch.c b/src/map/mapper/mapperSwitch.c
index 9dd6e42b..13168b47 100644
--- a/src/map/mapper/mapperSwitch.c
+++ b/src/map/mapper/mapperSwitch.c
@@ -25,7 +25,7 @@
static float Map_SwitchCutRefDeref( Map_Node_t * pNode, Map_Cut_t * pCut, int fPhase, int fReference );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**function*************************************************************
diff --git a/src/map/mapper/mapperTable.c b/src/map/mapper/mapperTable.c
index d0cb7a01..747fe1c8 100644
--- a/src/map/mapper/mapperTable.c
+++ b/src/map/mapper/mapperTable.c
@@ -28,7 +28,7 @@
static void Map_SuperTableResize( Map_HashTable_t * pLib );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -325,7 +325,7 @@ void Map_SuperTableSortSupergates( Map_HashTable_t * p, int nSupersMax )
ppSupers[nSupers++] = pSuper;
// sort by usage
- qsort( (void *)ppSupers, nSupers, sizeof(Map_Super_t *),
+ qsort( (void *)ppSupers, nSupers, sizeof(int),
(int (*)(const void *, const void *)) Map_SuperTableCompareSupergates );
assert( Map_SuperTableCompareSupergates( ppSupers, ppSupers + nSupers - 1 ) <= 0 );
@@ -380,7 +380,7 @@ void Map_SuperTableSortSupergatesByDelay( Map_HashTable_t * p, int nSupersMax )
if ( nSupers == 0 )
continue;
// sort the gates by delay
- qsort( (void *)ppSupers, nSupers, sizeof(Map_Super_t *),
+ qsort( (void *)ppSupers, nSupers, sizeof(int),
(int (*)(const void *, const void *)) Map_SuperTableCompareGatesInList );
assert( Map_SuperTableCompareGatesInList( ppSupers, ppSupers + nSupers - 1 ) <= 0 );
// link them in the reverse order
diff --git a/src/map/mapper/mapperTime.c b/src/map/mapper/mapperTime.c
index cc4173cf..f1cafae7 100644
--- a/src/map/mapper/mapperTime.c
+++ b/src/map/mapper/mapperTime.c
@@ -27,7 +27,7 @@ static void Map_TimePropagateRequiredPhase( Map_Man_t * p, Map_Node_t * pNode,
static float Map_MatchComputeReqTimes( Map_Cut_t * pCut, int fPhase, Map_Time_t * ptArrRes );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**function*************************************************************
diff --git a/src/map/mapper/mapperTree.c b/src/map/mapper/mapperTree.c
index ef66082d..04576045 100644
--- a/src/map/mapper/mapperTree.c
+++ b/src/map/mapper/mapperTree.c
@@ -37,7 +37,7 @@ static unsigned Map_LibraryGetGateSupp_rec( Map_Super_t * pGate );
extern const int s_MapFanoutLimits[10] = { 1/*0*/, 10/*1*/, 5/*2*/, 2/*3*/, 1/*4*/, 1/*5*/, 1/*6*/ };
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -60,8 +60,8 @@ int Map_LibraryReadTree( Map_SuperLib_t * pLib, char * pFileName, char * pExclud
// read the beginning of the file
assert( pLib->pGenlib == NULL );
- pFile = Io_FileOpen( pFileName, "open_path", "r", 1 );
-// pFile = fopen( pFileName, "r" );
+// pFile = Io_FileOpen( pFileName, "open_path", "r" );
+ pFile = fopen( pFileName, "r" );
if ( pFile == NULL )
{
printf( "Cannot open input file \"%s\".\n", pFileName );
@@ -149,8 +149,8 @@ int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileNam
}
#endif
- pFileGen = Io_FileOpen( pLibFile, "open_path", "r", 1 );
-// pFileGen = fopen( pLibFile, "r" );
+// pFileGen = Io_FileOpen( pLibFile, "open_path", "r" );
+ pFileGen = fopen( pLibFile, "r" );
if ( pFileGen == NULL )
{
printf( "Cannot open the GENLIB file \"%s\".\n", pLibFile );
@@ -439,9 +439,6 @@ int Map_LibraryDeriveGateInfo( Map_SuperLib_t * pLib, st_table * tExcludeGate )
pGate->tDelayMax.Fall = pGate->tDelaysF[k].Rise;
if ( pGate->tDelayMax.Fall < pGate->tDelaysF[k].Fall )
pGate->tDelayMax.Fall = pGate->tDelaysF[k].Fall;
-
- pGate->tDelaysF[k].Worst = MAP_MAX( pGate->tDelaysF[k].Fall, pGate->tDelaysF[k].Rise );
- pGate->tDelaysR[k].Worst = MAP_MAX( pGate->tDelaysR[k].Fall, pGate->tDelaysR[k].Rise );
}
// count gates and area of the supergate
diff --git a/src/map/mapper/mapperTruth.c b/src/map/mapper/mapperTruth.c
index 388b6dd3..7eabf4df 100644
--- a/src/map/mapper/mapperTruth.c
+++ b/src/map/mapper/mapperTruth.c
@@ -27,7 +27,7 @@ extern void Map_TruthsCutOne( Map_Man_t * p, Map_Cut_t * pCut, unsigned uTruth[]
static void Map_CutsCollect_rec( Map_Cut_t * pCut, Map_NodeVec_t * vVisited );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************
@@ -89,15 +89,14 @@ void Map_MappingTruths( Map_Man_t * pMan )
***********************************************************************/
void Map_TruthsCut( Map_Man_t * p, Map_Cut_t * pCut )
-{
+{
// unsigned uCanon1, uCanon2;
unsigned uTruth[2], uCanon[2];
unsigned char uPhases[16];
unsigned * uCanon2;
char * pPhases2;
- int fUseFast = 1;
- int fUseSlow = 0;
- int fUseRec = 0; // this does not work for Solaris
+ int fUseFast = 0;
+ int fUseRec = 1;
extern int Map_CanonCompute( int nVarsMax, int nVarsReal, unsigned * pt, unsigned ** pptRes, char ** ppfRes );
@@ -118,8 +117,6 @@ void Map_TruthsCut( Map_Man_t * p, Map_Cut_t * pCut )
// compute the canonical form for the positive phase
if ( fUseFast )
Map_CanonComputeFast( p, p->nVarsMax, pCut->nLeaves, uTruth, uPhases, uCanon );
- else if ( fUseSlow )
- Map_CanonComputeSlow( p->uTruths, p->nVarsMax, pCut->nLeaves, uTruth, uPhases, uCanon );
else if ( fUseRec )
{
// Map_CanonComputeSlow( p->uTruths, p->nVarsMax, pCut->nLeaves, uTruth, uPhases, uCanon );
@@ -148,8 +145,6 @@ void Map_TruthsCut( Map_Man_t * p, Map_Cut_t * pCut )
uTruth[1] = ~uTruth[1];
if ( fUseFast )
Map_CanonComputeFast( p, p->nVarsMax, pCut->nLeaves, uTruth, uPhases, uCanon );
- else if ( fUseSlow )
- Map_CanonComputeSlow( p->uTruths, p->nVarsMax, pCut->nLeaves, uTruth, uPhases, uCanon );
else if ( fUseRec )
{
// Map_CanonComputeSlow( p->uTruths, p->nVarsMax, pCut->nLeaves, uTruth, uPhases, uCanon );
diff --git a/src/map/mapper/mapperUtils.c b/src/map/mapper/mapperUtils.c
index 11a3a683..00f1b85b 100644
--- a/src/map/mapper/mapperUtils.c
+++ b/src/map/mapper/mapperUtils.c
@@ -40,7 +40,7 @@ static int Map_MappingCountUsedNodes( Map_Man_t * pMan, int fChoices );
static Map_Man_t * s_pMan = NULL;
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
diff --git a/src/map/mapper/mapperVec.c b/src/map/mapper/mapperVec.c
index f75138fb..e3ab4b7f 100644
--- a/src/map/mapper/mapperVec.c
+++ b/src/map/mapper/mapperVec.c
@@ -25,7 +25,7 @@
static int Map_NodeVecCompareLevels( Map_Node_t ** pp1, Map_Node_t ** pp2 );
////////////////////////////////////////////////////////////////////////
-/// FUNCTION DEFINITIONS ///
+/// FUNCTION DEFITIONS ///
////////////////////////////////////////////////////////////////////////
/**Function*************************************************************