Commit 15a891f9 by Alan Mishchenko

Bug fix in constraint file reader.

parent 5453820c
...@@ -1850,7 +1850,13 @@ int Scl_CommandReadConstr( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -1850,7 +1850,13 @@ int Scl_CommandReadConstr( Abc_Frame_t * pAbc, int argc, char ** argv )
return 1; return 1;
} }
fclose( pFile ); fclose( pFile );
Abc_SclReadTimingConstr( pAbc, pFileName, fVerbose ); // Abc_SclReadTimingConstr( pAbc, pFileName, fVerbose );
if ( pNtk == NULL )
{
fprintf( pAbc->Err, "There is no current network.\n" );
return 1;
}
// input constraint manager // input constraint manager
if ( pNtk ) if ( pNtk )
......
...@@ -212,7 +212,7 @@ static inline void Scl_ConWrite( Scl_Con_t * p, char * pFileName ) ...@@ -212,7 +212,7 @@ static inline void Scl_ConWrite( Scl_Con_t * p, char * pFileName )
if ( p->tOutReqDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_OUTPUT_REQ, Scl_Int2Flt(p->tOutReqDef) ); if ( p->tOutReqDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_OUTPUT_REQ, Scl_Int2Flt(p->tOutReqDef) );
if ( p->tOutLoadDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_OUTPUT_LOAD, Scl_Int2Flt(p->tOutLoadDef) ); if ( p->tOutLoadDef != 0 ) fprintf( pFile, ".default_%s %.2f\n", SCL_OUTPUT_LOAD, Scl_Int2Flt(p->tOutLoadDef) );
Vec_PtrForEachEntry(char *, &p->vInCells, pName, i) if ( pName ) fprintf( pFile, ".%s %s %s\n", SCL_INPUT_CELL, Abc_NamStr(p->pNamI, i+1), pName ); Vec_PtrForEachEntry(char *, &p->vInCells, pName, i) if ( pName && (!p->pInCellDef || strcmp(pName,p->pInCellDef)) ) fprintf( pFile, ".%s %s %s\n", SCL_INPUT_CELL, Abc_NamStr(p->pNamI, i+1), pName );
Vec_IntForEachEntry( &p->vInArrs, Value, i ) if ( Value != p->tInArrDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_ARR, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) ); Vec_IntForEachEntry( &p->vInArrs, Value, i ) if ( Value != p->tInArrDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_ARR, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) );
Vec_IntForEachEntry( &p->vInSlews, Value, i ) if ( Value != p->tInSlewDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_SLEW, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) ); Vec_IntForEachEntry( &p->vInSlews, Value, i ) if ( Value != p->tInSlewDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_SLEW, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) );
Vec_IntForEachEntry( &p->vInLoads, Value, i ) if ( Value != p->tInLoadDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_LOAD, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) ); Vec_IntForEachEntry( &p->vInLoads, Value, i ) if ( Value != p->tInLoadDef ) fprintf( pFile, ".%s %s %.2f\n", SCL_INPUT_LOAD, Abc_NamStr(p->pNamI, i+1), Scl_Int2Flt(Value) );
......
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