diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2016-01-07 11:57:16 -0800 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2016-01-07 11:57:16 -0800 |
commit | 15a891f97a954a67b4a65079b8371b41fb499dc9 (patch) | |
tree | 06d25c623f80bc4a13ba64730117a00e8e9db88b /src/map/scl | |
parent | 5453820cd5a82d803de6d440e705da78770614b3 (diff) | |
download | abc-15a891f97a954a67b4a65079b8371b41fb499dc9.tar.gz abc-15a891f97a954a67b4a65079b8371b41fb499dc9.tar.bz2 abc-15a891f97a954a67b4a65079b8371b41fb499dc9.zip |
Bug fix in constraint file reader.
Diffstat (limited to 'src/map/scl')
-rw-r--r-- | src/map/scl/scl.c | 8 | ||||
-rw-r--r-- | src/map/scl/sclCon.h | 2 |
2 files changed, 8 insertions, 2 deletions
diff --git a/src/map/scl/scl.c b/src/map/scl/scl.c index 83eaa9f4..8fd4b1e5 100644 --- a/src/map/scl/scl.c +++ b/src/map/scl/scl.c @@ -1850,7 +1850,13 @@ int Scl_CommandReadConstr( Abc_Frame_t * pAbc, int argc, char ** argv ) return 1; } 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 if ( pNtk ) diff --git a/src/map/scl/sclCon.h b/src/map/scl/sclCon.h index c085a2a7..ca241018 100644 --- a/src/map/scl/sclCon.h +++ b/src/map/scl/sclCon.h @@ -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->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->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) ); |