diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2011-10-31 14:59:47 -0500 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2011-10-31 14:59:47 -0500 |
commit | 868a1b9aeb2bf825a68c37c530107efe72d50d5d (patch) | |
tree | 872e030d59ce89d595812f1c8ae4e776905d3112 /src/aig/ssw/sswRarity2.c | |
parent | f08be2742e892b7b81f234785cbbae85c61ab024 (diff) | |
download | abc-868a1b9aeb2bf825a68c37c530107efe72d50d5d.tar.gz abc-868a1b9aeb2bf825a68c37c530107efe72d50d5d.tar.bz2 abc-868a1b9aeb2bf825a68c37c530107efe72d50d5d.zip |
Fixed the overflow timeout problem in bmc/bmc2/bmc3/int/pdr/sim, etc.
Diffstat (limited to 'src/aig/ssw/sswRarity2.c')
-rw-r--r-- | src/aig/ssw/sswRarity2.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/aig/ssw/sswRarity2.c b/src/aig/ssw/sswRarity2.c index 3026cf6b..d8cb9c16 100644 --- a/src/aig/ssw/sswRarity2.c +++ b/src/aig/ssw/sswRarity2.c @@ -309,6 +309,7 @@ int Ssw_RarSimulate2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, i int fMiter = 1; Ssw_RarMan_t * p; int r, clk, clkTotal = clock(); + int nTimeToStop = time(NULL) + TimeOut; int RetValue = -1; assert( Aig_ManRegNum(pAig) > 0 ); assert( Aig_ManConstrNum(pAig) == 0 ); @@ -351,7 +352,7 @@ int Ssw_RarSimulate2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSize, i printf( "." ); } // check timeout - if ( TimeOut && ((float)TimeOut <= (float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC)) ) + if ( TimeOut && time(NULL) > nTimeToStop ) { if ( fVerbose ) printf( "\n" ); printf( "Reached timeout (%d seconds).\n", TimeOut ); @@ -386,6 +387,7 @@ int Ssw_RarSignalFilter2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSiz int fMiter = 0; Ssw_RarMan_t * p; int r, i, k, clkTotal = clock(); + int nTimeToStop = time(NULL) + TimeOut; int RetValue = -1; assert( Aig_ManRegNum(pAig) > 0 ); assert( Aig_ManConstrNum(pAig) == 0 ); @@ -458,7 +460,7 @@ int Ssw_RarSignalFilter2( Aig_Man_t * pAig, int nFrames, int nWords, int nBinSiz Ssw_RarTransferPatterns( p, p->vInits ); Ssw_SmlInitializeSpecial( p->pSml, p->vInits ); // check timeout - if ( TimeOut && ((float)TimeOut <= (float)(clock()-clkTotal)/(float)(CLOCKS_PER_SEC)) ) + if ( TimeOut && time(NULL) > nTimeToStop ) { if ( fVerbose ) printf( "\n" ); printf( "Reached timeout (%d seconds).\n", TimeOut ); |