diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2009-02-15 08:01:00 -0800 |
commit | 0871bffae307e0553e0c5186336189e8b55cf6a6 (patch) | |
tree | 4571d1563fe33a53a57fea1c35fb668b9d33265f /src/map/mapper | |
parent | f936cc0680c98ffe51b3a1716c996072d5dbf76c (diff) | |
download | abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.gz abc-0871bffae307e0553e0c5186336189e8b55cf6a6.tar.bz2 abc-0871bffae307e0553e0c5186336189e8b55cf6a6.zip |
Version abc90215
Diffstat (limited to 'src/map/mapper')
-rw-r--r-- | src/map/mapper/mapper.h | 17 | ||||
-rw-r--r-- | src/map/mapper/mapperCore.c | 14 | ||||
-rw-r--r-- | src/map/mapper/mapperCreate.c | 56 | ||||
-rw-r--r-- | src/map/mapper/mapperCut.c | 28 | ||||
-rw-r--r-- | src/map/mapper/mapperInt.h | 8 | ||||
-rw-r--r-- | src/map/mapper/mapperLib.c | 10 | ||||
-rw-r--r-- | src/map/mapper/mapperRefs.c | 4 | ||||
-rw-r--r-- | src/map/mapper/mapperTable.c | 20 | ||||
-rw-r--r-- | src/map/mapper/mapperTree.c | 2 | ||||
-rw-r--r-- | src/map/mapper/mapperVec.c | 10 |
10 files changed, 84 insertions, 85 deletions
diff --git a/src/map/mapper/mapper.h b/src/map/mapper/mapper.h index 673f7538..ac31feac 100644 --- a/src/map/mapper/mapper.h +++ b/src/map/mapper/mapper.h @@ -19,19 +19,18 @@ #ifndef __MAPPER_H__ #define __MAPPER_H__ -#ifdef __cplusplus -extern "C" { -#endif - //////////////////////////////////////////////////////////////////////// /// INCLUDES /// //////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////// /// PARAMETERS /// //////////////////////////////////////////////////////////////////////// +#ifdef __cplusplus +extern "C" { +#endif + //////////////////////////////////////////////////////////////////////// /// STRUCTURE DEFINITIONS /// //////////////////////////////////////////////////////////////////////// @@ -63,10 +62,10 @@ struct Map_TimeStruct_t_ /// MACRO DEFINITIONS /// //////////////////////////////////////////////////////////////////////// -#define Map_IsComplement(p) (((int)((PORT_PTRUINT_T) (p) & 01))) -#define Map_Regular(p) ((Map_Node_t *)((PORT_PTRUINT_T)(p) & ~01)) -#define Map_Not(p) ((Map_Node_t *)((PORT_PTRUINT_T)(p) ^ 01)) -#define Map_NotCond(p,c) ((Map_Node_t *)((PORT_PTRUINT_T)(p) ^ (c))) +#define Map_IsComplement(p) (((int)((ABC_PTRUINT_T) (p) & 01))) +#define Map_Regular(p) ((Map_Node_t *)((ABC_PTRUINT_T)(p) & ~01)) +#define Map_Not(p) ((Map_Node_t *)((ABC_PTRUINT_T)(p) ^ 01)) +#define Map_NotCond(p,c) ((Map_Node_t *)((ABC_PTRUINT_T)(p) ^ (c))) //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// diff --git a/src/map/mapper/mapperCore.c b/src/map/mapper/mapperCore.c index 5d4854e6..fc0d9609 100644 --- a/src/map/mapper/mapperCore.c +++ b/src/map/mapper/mapperCore.c @@ -70,7 +70,7 @@ int Map_Mapping( Map_Man_t * p ) Map_MappingTruths( p ); p->timeTruth = clock() - clk; ////////////////////////////////////////////////////////////////////// -//PRT( "Truths", clock() - clk ); +//ABC_PRT( "Truths", clock() - clk ); ////////////////////////////////////////////////////////////////////// // compute the minimum-delay mapping @@ -88,7 +88,7 @@ printf( "Delay : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ", fShowSwitching? "Switch" : "Delay", fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo, Map_MappingGetAreaFlow(p), p->AreaBase, 0.0 ); -PRT( "Time", p->timeMatch ); +ABC_PRT( "Time", p->timeMatch ); } ////////////////////////////////////////////////////////////////////// @@ -119,7 +119,7 @@ printf( "AreaFlow : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ", fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo, Map_MappingGetAreaFlow(p), p->AreaFinal, 100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase ); -PRT( "Time", clock() - clk ); +ABC_PRT( "Time", clock() - clk ); } } p->timeArea += clock() - clk; @@ -145,7 +145,7 @@ printf( "Area : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ", fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo, 0.0, p->AreaFinal, 100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase ); -PRT( "Time", clock() - clk ); +ABC_PRT( "Time", clock() - clk ); } } p->timeArea += clock() - clk; @@ -171,7 +171,7 @@ printf( "Area : %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ", fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo, 0.0, p->AreaFinal, 100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase ); -PRT( "Time", clock() - clk ); +ABC_PRT( "Time", clock() - clk ); } } p->timeArea += clock() - clk; @@ -197,7 +197,7 @@ printf( "Switching: %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ", fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo, 0.0, p->AreaFinal, 100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase ); -PRT( "Time", clock() - clk ); +ABC_PRT( "Time", clock() - clk ); } // compute the required times @@ -215,7 +215,7 @@ printf( "Switching: %s = %8.2f Flow = %11.1f Area = %11.1f %4.1f %% ", fShowSwitching? Map_MappingGetSwitching(p,p->vMapping) : p->fRequiredGlo, 0.0, p->AreaFinal, 100.0*(p->AreaBase-p->AreaFinal)/p->AreaBase ); -PRT( "Time", clock() - clk ); +ABC_PRT( "Time", clock() - clk ); } } p->timeArea += clock() - clk; diff --git a/src/map/mapper/mapperCreate.c b/src/map/mapper/mapperCreate.c index 0a971542..ee2b089c 100644 --- a/src/map/mapper/mapperCreate.c +++ b/src/map/mapper/mapperCreate.c @@ -27,7 +27,7 @@ static void Map_TableResize( Map_Man_t * p ); static Map_Node_t * Map_TableLookup( Map_Man_t * p, Map_Node_t * p1, Map_Node_t * p2 ); // hash key for the structural hash table -static inline unsigned Map_HashKey2( Map_Node_t * p0, Map_Node_t * p1, int TableSize ) { return (unsigned)(((PORT_PTRUINT_T)(p0) + (PORT_PTRUINT_T)(p1) * 12582917) % TableSize); } +static inline unsigned Map_HashKey2( Map_Node_t * p0, Map_Node_t * p1, int TableSize ) { return (unsigned)(((ABC_PTRUINT_T)(p0) + (ABC_PTRUINT_T)(p1) * 12582917) % TableSize); } //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// @@ -190,7 +190,7 @@ Map_Man_t * Map_ManCreate( int nInputs, int nOutputs, int fVerbose ) } // start the manager - p = ALLOC( Map_Man_t, 1 ); + p = ABC_ALLOC( Map_Man_t, 1 ); memset( p, 0, sizeof(Map_Man_t) ); p->pSuperLib = Abc_FrameReadLibSuper(); p->nVarsMax = p->pSuperLib->nVarsMax; @@ -220,13 +220,13 @@ Map_Man_t * Map_ManCreate( int nInputs, int nOutputs, int fVerbose ) // create the PI nodes p->nInputs = nInputs; - p->pInputs = ALLOC( Map_Node_t *, nInputs ); + p->pInputs = ABC_ALLOC( Map_Node_t *, nInputs ); for ( i = 0; i < nInputs; i++ ) p->pInputs[i] = Map_NodeCreate( p, NULL, NULL ); // create the place for the output nodes p->nOutputs = nOutputs; - p->pOutputs = ALLOC( Map_Node_t *, nOutputs ); + p->pOutputs = ABC_ALLOC( Map_Node_t *, nOutputs ); memset( p->pOutputs, 0, sizeof(Map_Node_t *) * nOutputs ); return p; } @@ -258,17 +258,17 @@ void Map_ManFree( Map_Man_t * p ) Map_NodeVecFree( p->vMapping ); if ( p->vVisited ) Map_NodeVecFree( p->vVisited ); - if ( p->uCanons ) free( p->uCanons ); - if ( p->uPhases ) free( p->uPhases ); - if ( p->pCounters ) free( p->pCounters ); + if ( p->uCanons ) ABC_FREE( p->uCanons ); + if ( p->uPhases ) ABC_FREE( p->uPhases ); + if ( p->pCounters ) ABC_FREE( p->pCounters ); Extra_MmFixedStop( p->mmNodes ); Extra_MmFixedStop( p->mmCuts ); - FREE( p->pInputArrivals ); - FREE( p->pInputs ); - FREE( p->pOutputs ); - FREE( p->pBins ); - FREE( p->ppOutputNames ); - FREE( p ); + ABC_FREE( p->pInputArrivals ); + ABC_FREE( p->pInputs ); + ABC_FREE( p->pOutputs ); + ABC_FREE( p->pBins ); + ABC_FREE( p->ppOutputNames ); + ABC_FREE( p ); } @@ -287,17 +287,17 @@ void Map_ManPrintTimeStats( Map_Man_t * p ) { printf( "N-canonical = %d. Matchings = %d. Phases = %d. ", p->nCanons, p->nMatches, p->nPhases ); printf( "Choice nodes = %d. Choices = %d.\n", p->nChoiceNodes, p->nChoices ); - PRT( "ToMap", p->timeToMap ); - PRT( "Cuts ", p->timeCuts ); - PRT( "Truth", p->timeTruth ); - PRT( "Match", p->timeMatch ); - PRT( "Area ", p->timeArea ); - PRT( "Sweep", p->timeSweep ); - PRT( "ToNet", p->timeToNet ); - PRT( "TOTAL", p->timeTotal ); - if ( p->time1 ) { PRT( "time1", p->time1 ); } - if ( p->time2 ) { PRT( "time2", p->time2 ); } - if ( p->time3 ) { PRT( "time3", p->time3 ); } + ABC_PRT( "ToMap", p->timeToMap ); + ABC_PRT( "Cuts ", p->timeCuts ); + ABC_PRT( "Truth", p->timeTruth ); + ABC_PRT( "Match", p->timeMatch ); + ABC_PRT( "Area ", p->timeArea ); + ABC_PRT( "Sweep", p->timeSweep ); + ABC_PRT( "ToNet", p->timeToNet ); + ABC_PRT( "TOTAL", p->timeTotal ); + if ( p->time1 ) { ABC_PRT( "time1", p->time1 ); } + if ( p->time2 ) { ABC_PRT( "time2", p->time2 ); } + if ( p->time3 ) { ABC_PRT( "time3", p->time3 ); } } /**Function************************************************************* @@ -388,7 +388,7 @@ void Map_TableCreate( Map_Man_t * pMan ) { assert( pMan->pBins == NULL ); pMan->nBins = Cudd_Prime(5000); - pMan->pBins = ALLOC( Map_Node_t *, pMan->nBins ); + pMan->pBins = ABC_ALLOC( Map_Node_t *, pMan->nBins ); memset( pMan->pBins, 0, sizeof(Map_Node_t *) * pMan->nBins ); pMan->nNodes = 0; } @@ -473,7 +473,7 @@ clk = clock(); // get the new table size nBinsNew = Cudd_Prime(2 * pMan->nBins); // allocate a new array - pBinsNew = ALLOC( Map_Node_t *, nBinsNew ); + pBinsNew = ABC_ALLOC( Map_Node_t *, nBinsNew ); memset( pBinsNew, 0, sizeof(Map_Node_t *) * nBinsNew ); // rehash the entries from the old table Counter = 0; @@ -490,10 +490,10 @@ clk = clock(); if ( pMan->fVerbose ) { // printf( "Increasing the unique table size from %6d to %6d. ", pMan->nBins, nBinsNew ); -// PRT( "Time", clock() - clk ); +// ABC_PRT( "Time", clock() - clk ); } // replace the table and the parameters - free( pMan->pBins ); + ABC_FREE( pMan->pBins ); pMan->pBins = pBinsNew; pMan->nBins = nBinsNew; } diff --git a/src/map/mapper/mapperCut.c b/src/map/mapper/mapperCut.c index 46405547..00ec9fe5 100644 --- a/src/map/mapper/mapperCut.c +++ b/src/map/mapper/mapperCut.c @@ -151,7 +151,7 @@ void Map_MappingCuts( Map_Man_t * p ) nCuts = Map_MappingCountAllCuts(p); printf( "Nodes = %6d. Total %d-feasible cuts = %10d. Per node = %.1f. ", p->nNodes, p->nVarsMax, nCuts, ((float)nCuts)/p->nNodes ); - PRT( "Time", clock() - clk ); + ABC_PRT( "Time", clock() - clk ); } // print the cuts for the first primary output @@ -809,15 +809,15 @@ Map_CutTable_t * Map_CutTableStart( Map_Man_t * pMan ) { Map_CutTable_t * p; // allocate the table - p = ALLOC( Map_CutTable_t, 1 ); + p = ABC_ALLOC( Map_CutTable_t, 1 ); memset( p, 0, sizeof(Map_CutTable_t) ); p->nBins = Cudd_Prime( 10 * MAP_CUTS_MAX_COMPUTE ); - p->pBins = ALLOC( Map_Cut_t *, p->nBins ); + p->pBins = ABC_ALLOC( Map_Cut_t *, p->nBins ); memset( p->pBins, 0, sizeof(Map_Cut_t *) * p->nBins ); - p->pCuts = ALLOC( int, 2 * MAP_CUTS_MAX_COMPUTE ); - p->pArray = ALLOC( Map_Cut_t *, 2 * MAP_CUTS_MAX_COMPUTE ); - p->pCuts1 = ALLOC( Map_Cut_t *, 2 * MAP_CUTS_MAX_COMPUTE ); - p->pCuts2 = ALLOC( Map_Cut_t *, 2 * MAP_CUTS_MAX_COMPUTE ); + p->pCuts = ABC_ALLOC( int, 2 * MAP_CUTS_MAX_COMPUTE ); + p->pArray = ABC_ALLOC( Map_Cut_t *, 2 * MAP_CUTS_MAX_COMPUTE ); + p->pCuts1 = ABC_ALLOC( Map_Cut_t *, 2 * MAP_CUTS_MAX_COMPUTE ); + p->pCuts2 = ABC_ALLOC( Map_Cut_t *, 2 * MAP_CUTS_MAX_COMPUTE ); return p; } @@ -834,12 +834,12 @@ Map_CutTable_t * Map_CutTableStart( Map_Man_t * pMan ) ***********************************************************************/ void Map_CutTableStop( Map_CutTable_t * p ) { - free( p->pCuts1 ); - free( p->pCuts2 ); - free( p->pArray ); - free( p->pBins ); - free( p->pCuts ); - free( p ); + ABC_FREE( p->pCuts1 ); + ABC_FREE( p->pCuts2 ); + ABC_FREE( p->pArray ); + ABC_FREE( p->pBins ); + ABC_FREE( p->pCuts ); + ABC_FREE( p ); } /**Function************************************************************* @@ -1005,7 +1005,7 @@ Map_Cut_t * Map_CutSortCuts( Map_Man_t * pMan, Map_CutTable_t * p, Map_Cut_t * p // move them back into the list if ( nCuts > MAP_CUTS_MAX_USE - 1 ) { - // free the remaining cuts + // ABC_FREE the remaining cuts for ( i = MAP_CUTS_MAX_USE - 1; i < nCuts; i++ ) Extra_MmFixedEntryRecycle( pMan->mmCuts, (char *)p->pCuts1[i] ); // update the number of cuts diff --git a/src/map/mapper/mapperInt.h b/src/map/mapper/mapperInt.h index 00550deb..7f4c93dc 100644 --- a/src/map/mapper/mapperInt.h +++ b/src/map/mapper/mapperInt.h @@ -60,10 +60,10 @@ #define MAP_RANDOM_UNSIGNED ((((unsigned)rand()) << 24) ^ (((unsigned)rand()) << 12) ^ ((unsigned)rand())) // internal macros to work with cuts -#define Map_CutIsComplement(p) (((int)((PORT_PTRUINT_T) (p) & 01))) -#define Map_CutRegular(p) ((Map_Cut_t *)((PORT_PTRUINT_T)(p) & ~01)) -#define Map_CutNot(p) ((Map_Cut_t *)((PORT_PTRUINT_T)(p) ^ 01)) -#define Map_CutNotCond(p,c) ((Map_Cut_t *)((PORT_PTRUINT_T)(p) ^ (c))) +#define Map_CutIsComplement(p) (((int)((ABC_PTRUINT_T) (p) & 01))) +#define Map_CutRegular(p) ((Map_Cut_t *)((ABC_PTRUINT_T)(p) & ~01)) +#define Map_CutNot(p) ((Map_Cut_t *)((ABC_PTRUINT_T)(p) ^ 01)) +#define Map_CutNotCond(p,c) ((Map_Cut_t *)((ABC_PTRUINT_T)(p) ^ (c))) // internal macros for referencing of nodes #define Map_NodeReadRef(p) ((Map_Regular(p))->nRefs) diff --git a/src/map/mapper/mapperLib.c b/src/map/mapper/mapperLib.c index 9c47ed03..942caa8e 100644 --- a/src/map/mapper/mapperLib.c +++ b/src/map/mapper/mapperLib.c @@ -56,7 +56,7 @@ Map_SuperLib_t * Map_SuperLibCreate( char * pFileName, char * pExcludeFile, bool int clk; // start the supergate library - p = ALLOC( Map_SuperLib_t, 1 ); + p = ABC_ALLOC( Map_SuperLib_t, 1 ); memset( p, 0, sizeof(Map_SuperLib_t) ); p->pName = pFileName; p->fVerbose = fVerbose; @@ -98,7 +98,7 @@ clk = clock(); if ( fVerbose ) { printf( "Loaded %d unique %d-input supergates from \"%s\". ", p->nSupersReal, p->nVarsMax, pFileName ); - PRT( "Time", clock() - clk ); + ABC_PRT( "Time", clock() - clk ); } // assign the interver parameters @@ -155,8 +155,8 @@ void Map_SuperLibFree( Map_SuperLib_t * p ) Extra_MmFixedStop( p->mmSupers ); Extra_MmFixedStop( p->mmEntries ); Extra_MmFlexStop( p->mmForms ); - FREE( p->ppSupers ); - FREE( p ); + ABC_FREE( p->ppSupers ); + ABC_FREE( p ); } /**Function************************************************************* @@ -192,7 +192,7 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) // get the file name with the library pNameGeneric = Extra_FileNameGeneric( Mio_LibraryReadName(pLib) ); sprintf( FileNameSuper, "%s.super", pNameGeneric ); - free( pNameGeneric ); + ABC_FREE( pNameGeneric ); sprintf( CommandSuper, "super -l 1 -i 5 -d 10000000 -a 10000000 -t 100 %s", FileNameGenlib ); if ( Cmd_CommandExecute( pAbc, CommandSuper ) ) diff --git a/src/map/mapper/mapperRefs.c b/src/map/mapper/mapperRefs.c index a50b134a..852e759f 100644 --- a/src/map/mapper/mapperRefs.c +++ b/src/map/mapper/mapperRefs.c @@ -430,7 +430,7 @@ void Map_MappingSetRefs( Map_Man_t * pMan ) LevelMax = Map_Regular(pMan->pOutputs[i])->Level; // allocate place to store the nodes - ppStore = ALLOC( Map_Node_t *, LevelMax + 1 ); + ppStore = ABC_ALLOC( Map_Node_t *, LevelMax + 1 ); memset( ppStore, 0, sizeof(Map_Node_t *) * (LevelMax + 1) ); // visit nodes reachable from POs in the DFS order through the best cuts @@ -447,7 +447,7 @@ void Map_MappingSetRefs( Map_Man_t * pMan ) for ( i = LevelMax; i >= 0; i-- ) for ( pNode = ppStore[i]; pNode; pNode = (Map_Node_t *)pNode->pData0 ) Map_NodeVecPush( pMan->vMapping, pNode ); - free( ppStore ); + ABC_FREE( ppStore ); } /**Function************************************************************* diff --git a/src/map/mapper/mapperTable.c b/src/map/mapper/mapperTable.c index 3feba352..a0805991 100644 --- a/src/map/mapper/mapperTable.c +++ b/src/map/mapper/mapperTable.c @@ -46,12 +46,12 @@ Map_HashTable_t * Map_SuperTableCreate( Map_SuperLib_t * pLib ) { Map_HashTable_t * p; // allocate the table - p = ALLOC( Map_HashTable_t, 1 ); + p = ABC_ALLOC( Map_HashTable_t, 1 ); memset( p, 0, sizeof(Map_HashTable_t) ); p->mmMan = pLib->mmEntries; // allocate and clean the bins p->nBins = Cudd_Prime(20000); - p->pBins = ALLOC( Map_HashEntry_t *, p->nBins ); + p->pBins = ABC_ALLOC( Map_HashEntry_t *, p->nBins ); memset( p->pBins, 0, sizeof(Map_HashEntry_t *) * p->nBins ); return p; } @@ -70,8 +70,8 @@ Map_HashTable_t * Map_SuperTableCreate( Map_SuperLib_t * pLib ) ***********************************************************************/ void Map_SuperTableFree( Map_HashTable_t * p ) { - FREE( p->pBins ); - FREE( p ); + ABC_FREE( p->pBins ); + ABC_FREE( p ); } /**Function************************************************************* @@ -236,7 +236,7 @@ void Map_SuperTableResize( Map_HashTable_t * p ) // get the new table size nBinsNew = Cudd_Prime(2 * p->nBins); // allocate a new array - pBinsNew = ALLOC( Map_HashEntry_t *, nBinsNew ); + pBinsNew = ABC_ALLOC( Map_HashEntry_t *, nBinsNew ); memset( pBinsNew, 0, sizeof(Map_HashEntry_t *) * nBinsNew ); // rehash the entries from the old table Counter = 0; @@ -251,7 +251,7 @@ void Map_SuperTableResize( Map_HashTable_t * p ) } assert( Counter == p->nEntries ); // replace the table and the parameters - free( p->pBins ); + ABC_FREE( p->pBins ); p->pBins = pBinsNew; p->nBins = nBinsNew; } @@ -317,7 +317,7 @@ void Map_SuperTableSortSupergates( Map_HashTable_t * p, int nSupersMax ) int nSupers, i; // copy all the supergates into one array - ppSupers = ALLOC( Map_Super_t *, nSupersMax ); + ppSupers = ABC_ALLOC( Map_Super_t *, nSupersMax ); nSupers = 0; for ( i = 0; i < p->nBins; i++ ) for ( pEnt = p->pBins[i]; pEnt; pEnt = pEnt->pNext ) @@ -342,7 +342,7 @@ void Map_SuperTableSortSupergates( Map_HashTable_t * p, int nSupersMax ) printf( "%s", ppSupers[i]->pFormula ); printf( "\n" ); } - free( ppSupers ); + ABC_FREE( ppSupers ); } /**Function************************************************************* @@ -363,7 +363,7 @@ void Map_SuperTableSortSupergatesByDelay( Map_HashTable_t * p, int nSupersMax ) Map_Super_t * pSuper; int nSupers, i, k; - ppSupers = ALLOC( Map_Super_t *, nSupersMax ); + ppSupers = ABC_ALLOC( Map_Super_t *, nSupersMax ); for ( i = 0; i < p->nBins; i++ ) for ( pEnt = p->pBins[i]; pEnt; pEnt = pEnt->pNext ) { @@ -392,7 +392,7 @@ void Map_SuperTableSortSupergatesByDelay( Map_HashTable_t * p, int nSupersMax ) // save the number of supergates in the list pEnt->pGates->nSupers = nSupers; } - FREE( ppSupers ); + ABC_FREE( ppSupers ); } //////////////////////////////////////////////////////////////////////// diff --git a/src/map/mapper/mapperTree.c b/src/map/mapper/mapperTree.c index 6e69bc69..4cabf86c 100644 --- a/src/map/mapper/mapperTree.c +++ b/src/map/mapper/mapperTree.c @@ -198,7 +198,7 @@ int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileNam } // allocate room for supergate pointers - pLib->ppSupers = ALLOC( Map_Super_t *, pLib->nLines + 10000 ); + pLib->ppSupers = ABC_ALLOC( Map_Super_t *, pLib->nLines + 10000 ); // create the elementary supergates for ( i = 0; i < pLib->nVarsMax; i++ ) diff --git a/src/map/mapper/mapperVec.c b/src/map/mapper/mapperVec.c index f75138fb..f675e0c5 100644 --- a/src/map/mapper/mapperVec.c +++ b/src/map/mapper/mapperVec.c @@ -42,12 +42,12 @@ static int Map_NodeVecCompareLevels( Map_Node_t ** pp1, Map_Node_t ** pp2 ); Map_NodeVec_t * Map_NodeVecAlloc( int nCap ) { Map_NodeVec_t * p; - p = ALLOC( Map_NodeVec_t, 1 ); + p = ABC_ALLOC( Map_NodeVec_t, 1 ); if ( nCap > 0 && nCap < 16 ) nCap = 16; p->nSize = 0; p->nCap = nCap; - p->pArray = p->nCap? ALLOC( Map_Node_t *, p->nCap ) : NULL; + p->pArray = p->nCap? ABC_ALLOC( Map_Node_t *, p->nCap ) : NULL; return p; } @@ -64,8 +64,8 @@ Map_NodeVec_t * Map_NodeVecAlloc( int nCap ) ***********************************************************************/ void Map_NodeVecFree( Map_NodeVec_t * p ) { - FREE( p->pArray ); - FREE( p ); + ABC_FREE( p->pArray ); + ABC_FREE( p ); } /**Function************************************************************* @@ -115,7 +115,7 @@ void Map_NodeVecGrow( Map_NodeVec_t * p, int nCapMin ) { if ( p->nCap >= nCapMin ) return; - p->pArray = REALLOC( Map_Node_t *, p->pArray, nCapMin ); + p->pArray = ABC_REALLOC( Map_Node_t *, p->pArray, nCapMin ); p->nCap = nCapMin; } |