diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-22 23:04:53 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-22 23:04:53 -0700 |
commit | 0398ced8243806439b814f21ca7d6e584cea13a1 (patch) | |
tree | 8812787fdd028d6fa04b1206c628a1b0c4743417 /src/map | |
parent | 70697f868a263930e971c062e5b46e64fbb1ee18 (diff) | |
download | abc-0398ced8243806439b814f21ca7d6e584cea13a1.tar.gz abc-0398ced8243806439b814f21ca7d6e584cea13a1.tar.bz2 abc-0398ced8243806439b814f21ca7d6e584cea13a1.zip |
Version abc90714
committer: Baruch Sterin <baruchs@gmail.com>
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/amap/amapRule.c | 2 | ||||
-rw-r--r-- | src/map/if/ifMap.c | 4 | ||||
-rw-r--r-- | src/map/mapper/mapperLib.c | 25 | ||||
-rw-r--r-- | src/map/super/superGate.c | 16 |
4 files changed, 37 insertions, 10 deletions
diff --git a/src/map/amap/amapRule.c b/src/map/amap/amapRule.c index 212f7631..27de49ee 100644 --- a/src/map/amap/amapRule.c +++ b/src/map/amap/amapRule.c @@ -296,7 +296,7 @@ Kit_DsdPrint( stdout, pNtk ); { assert( iNod > 1 ); pNod = Amap_LibNod( pLib, Amap_Lit2Var(iNod) ); - assert( pNod->Type == AMAP_OBJ_MUX || pNod->nSuppSize == pGate->nPins ); +// assert( pNod->Type == AMAP_OBJ_MUX || pNod->nSuppSize == pGate->nPins ); pSet = (Amap_Set_t *)Aig_MmFlexEntryFetch( pLib->pMemSet, sizeof(Amap_Set_t) ); memset( pSet, 0, sizeof(Amap_Set_t) ); pSet->iGate = pGate->Id; diff --git a/src/map/if/ifMap.c b/src/map/if/ifMap.c index fd1078a6..ca57868d 100644 --- a/src/map/if/ifMap.c +++ b/src/map/if/ifMap.c @@ -207,7 +207,9 @@ void If_ObjPerformMappingChoice( If_Man_t * p, If_Obj_t * pObj, int Mode, int fP for ( pTemp = pObj->pEquiv; pTemp; pTemp = pTemp->pEquiv ) { assert( pTemp->nRefs == 0 ); - assert( p->pPars->fSeqMap || pTemp->pCutSet->nCuts > 0 ); +// assert( p->pPars->fSeqMap || pTemp->pCutSet->nCuts > 0 ); // June 9, 2009 + if ( pTemp->pCutSet->nCuts == 0 ) + continue; // go through the cuts of this node If_ObjForEachCut( pTemp, pCutTemp, i ) { diff --git a/src/map/mapper/mapperLib.c b/src/map/mapper/mapperLib.c index 942caa8e..cc64d8b8 100644 --- a/src/map/mapper/mapperLib.c +++ b/src/map/mapper/mapperLib.c @@ -174,15 +174,20 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) { Abc_Frame_t * pAbc = Abc_FrameGetGlobalFrame(); char * pNameGeneric; - char FileNameGenlib[100]; - char FileNameSuper[100]; - char CommandSuper[500]; - char CommandRead[500]; + char * FileNameGenlib; + char * FileNameSuper; + char * CommandSuper; + char * CommandRead; FILE * pFile; if ( pLib == NULL ) return 0; + FileNameGenlib = ABC_ALLOC( char, 10000 ); + FileNameSuper = ABC_ALLOC( char, 10000 ); + CommandSuper = ABC_ALLOC( char, 10000 ); + CommandRead = ABC_ALLOC( char, 10000 ); + // write the current library into the file sprintf( FileNameGenlib, "%s_temp", Mio_LibraryReadName(pLib) ); pFile = fopen( FileNameGenlib, "w" ); @@ -197,6 +202,10 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) sprintf( CommandSuper, "super -l 1 -i 5 -d 10000000 -a 10000000 -t 100 %s", FileNameGenlib ); if ( Cmd_CommandExecute( pAbc, CommandSuper ) ) { + ABC_FREE( FileNameGenlib ); + ABC_FREE( FileNameSuper ); + ABC_FREE( CommandSuper ); + ABC_FREE( CommandRead ); fprintf( stdout, "Cannot execute command \"%s\".\n", CommandSuper ); return 0; } @@ -215,6 +224,10 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) unlink( FileNameSuper ); #endif fprintf( stdout, "Cannot execute command \"%s\".\n", CommandRead ); + ABC_FREE( FileNameGenlib ); + ABC_FREE( FileNameSuper ); + ABC_FREE( CommandSuper ); + ABC_FREE( CommandRead ); return 0; } @@ -225,6 +238,10 @@ int Map_SuperLibDeriveFromGenlib( Mio_Library_t * pLib ) unlink( FileNameSuper ); #endif */ + ABC_FREE( FileNameGenlib ); + ABC_FREE( FileNameSuper ); + ABC_FREE( CommandSuper ); + ABC_FREE( CommandRead ); return 1; } diff --git a/src/map/super/superGate.c b/src/map/super/superGate.c index 7bc5e703..cb7d8d78 100644 --- a/src/map/super/superGate.c +++ b/src/map/super/superGate.c @@ -67,8 +67,8 @@ struct Super_ManStruct_t_ int Time; // the runtime of the generation procedure int TimeLimit; // the runtime limit (in seconds) int TimeSec; // the time passed (in seconds) - int TimeStop; // the time to stop computation (in miliseconds) - int TimePrint; // the time to print message + double TimeStop; // the time to stop computation (in miliseconds) + double TimePrint; // the time to print message }; struct Super_GateStruct_t_ @@ -1107,10 +1107,12 @@ void Super_WriteLibrary( Super_Man_t * pMan ) { Super_Gate_t * pGate, * pGateNext; FILE * pFile; - char FileName[100]; + char * FileName; char * pNameGeneric; int i, Counter; + FileName = ABC_ALLOC( char, 10000 ); + // get the file name pNameGeneric = Extra_FileNameGeneric( pMan->pName ); sprintf( FileName, "%s.super_old", pNameGeneric ); @@ -1152,6 +1154,8 @@ if ( pMan->fVerbose ) printf( "The supergates are written using old format \"%s\" ", FileName ); printf( "(%0.3f Mb).\n", ((double)Extra_FileSize(FileName))/(1<<20) ); } + + ABC_FREE( FileName ); } /**Function************************************************************* @@ -1251,11 +1255,13 @@ void Super_WriteLibraryTree( Super_Man_t * pMan ) { Super_Gate_t * pSuper; FILE * pFile; - char FileName[100]; + char * FileName; char * pNameGeneric; int i, Counter; int posStart; + FileName = ABC_ALLOC( char, 10000 ); + // get the file name pNameGeneric = Extra_FileNameGeneric( pMan->pName ); sprintf( FileName, "%s.super", pNameGeneric ); @@ -1286,6 +1292,8 @@ if ( pMan->fVerbose ) printf( "The supergates are written using new format \"%s\" ", FileName ); printf( "(%0.3f Mb).\n", ((double)Extra_FileSize(FileName))/(1<<20) ); } + + ABC_FREE( FileName ); } /**Function************************************************************* |