diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2012-08-28 19:42:53 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2012-08-28 19:42:53 -0700 |
commit | 5ff49be9931a7be3037812230f5d9eb085f59593 (patch) | |
tree | 1f1ec505e5f527239ca078b886d5b1bf9d446542 /src/map/scl/scl.c | |
parent | 9b02fe59bdf1437c6de99c7dad348f3e18a19f10 (diff) | |
download | abc-5ff49be9931a7be3037812230f5d9eb085f59593.tar.gz abc-5ff49be9931a7be3037812230f5d9eb085f59593.tar.bz2 abc-5ff49be9931a7be3037812230f5d9eb085f59593.zip |
Ensured that SC mapped network is always in a topo order.
Diffstat (limited to 'src/map/scl/scl.c')
-rw-r--r-- | src/map/scl/scl.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/map/scl/scl.c b/src/map/scl/scl.c index cbe7b3aa..7b18bb12 100644 --- a/src/map/scl/scl.c +++ b/src/map/scl/scl.c @@ -34,6 +34,9 @@ static int Scl_CommandStime ( Abc_Frame_t * pAbc, int argc, char **argv ); static int Scl_CommandGsize ( Abc_Frame_t * pAbc, int argc, char **argv ); static int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char **argv ); +extern int Abc_SclCheckNtk( Abc_Ntk_t * p, int fVerbose ); +extern Abc_Ntk_t * Abc_SclPerformBuffering( Abc_Ntk_t * p, int Degree, int fVerbose ); + //////////////////////////////////////////////////////////////////////// /// FUNCTION DEFINITIONS /// //////////////////////////////////////////////////////////////////////// @@ -254,6 +257,11 @@ int Scl_CommandStime( Abc_Frame_t * pAbc, int argc, char **argv ) fprintf( pAbc->Err, "The current network is not mapped.\n" ); return 1; } + if ( !Abc_SclCheckNtk(Abc_FrameReadNtk(pAbc), 0) ) + { + fprintf( pAbc->Err, "The current networks is not in a topo order (run \"buffer -N 1000\").\n" ); + return 1; + } if ( pAbc->pLibScl == NULL ) { fprintf( pAbc->Err, "There is no Liberty library available.\n" ); @@ -307,13 +315,18 @@ int Scl_CommandGsize( Abc_Frame_t * pAbc, int argc, char **argv ) fprintf( pAbc->Err, "The current network is not mapped.\n" ); return 1; } + if ( !Abc_SclCheckNtk(Abc_FrameReadNtk(pAbc), 0) ) + { + fprintf( pAbc->Err, "The current networks is not in a topo order (run \"buffer -N 1000\").\n" ); + return 1; + } if ( pAbc->pLibScl == NULL ) { fprintf( pAbc->Err, "There is no Liberty library available.\n" ); return 1; } - Abc_SclSizingPerform( pAbc->pLibScl, Abc_FrameReadNtk(pAbc) ); +// Abc_SclSizingPerform( pAbc->pLibScl, Abc_FrameReadNtk(pAbc) ); return 0; usage: @@ -336,7 +349,6 @@ usage: ***********************************************************************/ int Scl_CommandBuffer( Abc_Frame_t * pAbc, int argc, char ** argv ) { - extern Abc_Ntk_t * Abc_SclPerformBuffering( Abc_Ntk_t * p, int Degree, int fVerbose ); Abc_Ntk_t * pNtk = Abc_FrameReadNtk(pAbc); Abc_Ntk_t * pNtkRes; int Degree; |