Commit d0197d83 by Alan Mishchenko

Changed printouts in a few places in supergate computation.

parent 4ab0c4b2
...@@ -80,7 +80,7 @@ int Abc_NtkAttach( Abc_Ntk_t * pNtk ) ...@@ -80,7 +80,7 @@ int Abc_NtkAttach( Abc_Ntk_t * pNtk )
Abc_AttachSetupTruthTables( uTruths ); Abc_AttachSetupTruthTables( uTruths );
// collect all the gates // collect all the gates
ppGates = Mio_CollectRoots( pGenlib, 6, (float)1.0e+20, 1, &nGates ); ppGates = Mio_CollectRoots( pGenlib, 6, (float)1.0e+20, 1, &nGates, 0 );
// derive the gate truth tables // derive the gate truth tables
puTruthGates = ABC_ALLOC( unsigned *, nGates ); puTruthGates = ABC_ALLOC( unsigned *, nGates );
......
...@@ -206,6 +206,8 @@ int IoCommandRead( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -206,6 +206,8 @@ int IoCommandRead( Abc_Frame_t * pAbc, int argc, char ** argv )
sprintf( Command, "read_liberty %s", pFileName ); sprintf( Command, "read_liberty %s", pFileName );
else if ( !strcmp( Extra_FileNameExtension(pFileName), "scl" ) ) else if ( !strcmp( Extra_FileNameExtension(pFileName), "scl" ) )
sprintf( Command, "read_scl %s", pFileName ); sprintf( Command, "read_scl %s", pFileName );
else if ( !strcmp( Extra_FileNameExtension(pFileName), "super" ) )
sprintf( Command, "read_super %s", pFileName );
else if ( !strcmp( Extra_FileNameExtension(pFileName), "c" ) ) else if ( !strcmp( Extra_FileNameExtension(pFileName), "c" ) )
sprintf( Command, "so %s", pFileName ); sprintf( Command, "so %s", pFileName );
if ( Command[0] ) if ( Command[0] )
......
...@@ -147,6 +147,8 @@ int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileNam ...@@ -147,6 +147,8 @@ int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileNam
#ifdef __linux__ #ifdef __linux__
snprintf( pLibFile, 5000, "%s/%s", dirname(strdup(pFileName)), pLibName ); snprintf( pLibFile, 5000, "%s/%s", dirname(strdup(pFileName)), pLibName );
#else #else
// strcpy( pLibFile, pFileName );
{ {
char * pStr; char * pStr;
strcpy( pLibFile, pFileName ); strcpy( pLibFile, pFileName );
...@@ -158,6 +160,7 @@ int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileNam ...@@ -158,6 +160,7 @@ int Map_LibraryReadFileTree( Map_SuperLib_t * pLib, FILE * pFile, char *pFileNam
else else
sprintf( pStr, "\\%s", pLibName ); sprintf( pStr, "\\%s", pLibName );
} }
#endif #endif
pFileGen = Io_FileOpen( pLibFile, "open_path", "r", 1 ); pFileGen = Io_FileOpen( pLibFile, "open_path", "r", 1 );
......
...@@ -144,7 +144,7 @@ extern void Mio_GateDelete( Mio_Gate_t * pGate ); ...@@ -144,7 +144,7 @@ extern void Mio_GateDelete( Mio_Gate_t * pGate );
extern void Mio_PinDelete( Mio_Pin_t * pPin ); extern void Mio_PinDelete( Mio_Pin_t * pPin );
extern Mio_Pin_t * Mio_PinDup( Mio_Pin_t * pPin ); extern Mio_Pin_t * Mio_PinDup( Mio_Pin_t * pPin );
extern void Mio_WriteLibrary( FILE * pFile, Mio_Library_t * pLib, int fPrintSops ); extern void Mio_WriteLibrary( FILE * pFile, Mio_Library_t * pLib, int fPrintSops );
extern Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay, int fSkipInv, int * pnGates ); extern Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay, int fSkipInv, int * pnGates, int fVerbose );
extern word Mio_DeriveTruthTable6( Mio_Gate_t * pGate ); extern word Mio_DeriveTruthTable6( Mio_Gate_t * pGate );
extern void Mio_DeriveTruthTable( Mio_Gate_t * pGate, unsigned uTruthsIn[][2], int nSigns, int nInputs, unsigned uTruthRes[] ); extern void Mio_DeriveTruthTable( Mio_Gate_t * pGate, unsigned uTruthsIn[][2], int nSigns, int nInputs, unsigned uTruthRes[] );
extern void Mio_DeriveGateDelays( Mio_Gate_t * pGate, extern void Mio_DeriveGateDelays( Mio_Gate_t * pGate,
......
...@@ -297,7 +297,7 @@ int Mio_DelayCompare( Mio_Gate_t ** ppG1, Mio_Gate_t ** ppG2 ) ...@@ -297,7 +297,7 @@ int Mio_DelayCompare( Mio_Gate_t ** ppG1, Mio_Gate_t ** ppG2 )
SeeAlso [] SeeAlso []
***********************************************************************/ ***********************************************************************/
Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay, int fSkipInv, int * pnGates ) Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay, int fSkipInv, int * pnGates, int fVerbose )
{ {
Mio_Gate_t * pGate; Mio_Gate_t * pGate;
Mio_Gate_t ** ppGates; Mio_Gate_t ** ppGates;
...@@ -334,6 +334,9 @@ Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay, ...@@ -334,6 +334,9 @@ Mio_Gate_t ** Mio_CollectRoots( Mio_Library_t * pLib, int nInputs, float tDelay,
continue; continue;
assert( iGate < nGates ); assert( iGate < nGates );
ppGates[ iGate++ ] = pGate; ppGates[ iGate++ ] = pGate;
if ( fVerbose )
printf( "Selected gate %3d: %-20s A = %7.2f D = %7.2f %3s = %-s\n",
iGate+1, pGate->pName, pGate->dArea, pGate->dDelayMax, pGate->pOutName, pGate->pForm );
} }
// sort by delay // sort by delay
if ( iGate > 0 ) if ( iGate > 0 )
......
...@@ -243,7 +243,7 @@ void Abc_SclTimeGate( SC_Man * p, Abc_Obj_t * pObj, int fDept ) ...@@ -243,7 +243,7 @@ void Abc_SclTimeGate( SC_Man * p, Abc_Obj_t * pObj, int fDept )
// get the library cell // get the library cell
pCell = Abc_SclObjCell( p, pObj ); pCell = Abc_SclObjCell( p, pObj );
// get the output pin // get the output pin
assert( pCell->n_outputs == 1 ); // assert( pCell->n_outputs == 1 );
pPin = SC_CellPin( pCell, pCell->n_inputs ); pPin = SC_CellPin( pCell, pCell->n_inputs );
// compute timing using each fanin // compute timing using each fanin
assert( Vec_PtrSize(pPin->vRTimings) == pCell->n_inputs ); assert( Vec_PtrSize(pPin->vRTimings) == pCell->n_inputs );
......
...@@ -156,7 +156,7 @@ void Super_Precompute( Mio_Library_t * pLibGen, int nVarsMax, int nLevels, int n ...@@ -156,7 +156,7 @@ void Super_Precompute( Mio_Library_t * pLibGen, int nVarsMax, int nLevels, int n
} }
// get the root gates // get the root gates
ppGates = Mio_CollectRoots( pLibGen, nVarsMax, tDelayMax, 0, &nGates ); ppGates = Mio_CollectRoots( pLibGen, nVarsMax, tDelayMax, 0, &nGates, fVerbose );
if ( nGates >= nGatesMax ) if ( nGates >= nGatesMax )
{ {
fprintf( stdout, "Warning! Genlib library contains more gates than can be computed.\n"); fprintf( stdout, "Warning! Genlib library contains more gates than can be computed.\n");
...@@ -386,7 +386,7 @@ Super_Man_t * Super_Compute( Super_Man_t * pMan, Mio_Gate_t ** ppGates, int nGat ...@@ -386,7 +386,7 @@ Super_Man_t * Super_Compute( Super_Man_t * pMan, Mio_Gate_t ** ppGates, int nGat
if ( pMan->fVerbose ) if ( pMan->fVerbose )
{ {
printf ("Trying %d choices for %d inputs\n", t, Mio_GateReadPinNum(ppGates[k]) ); printf ("Trying %d choices for %d inputs\r", t, Mio_GateReadPinNum(ppGates[k]) );
} }
// resort part of this range by area // resort part of this range by area
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment