summaryrefslogtreecommitdiffstats
path: root/src/base/abci
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2011-10-31 15:04:47 -0500
committerAlan Mishchenko <alanmi@berkeley.edu>2011-10-31 15:04:47 -0500
commit5b75410a5e0af4f99291393965efba7a5b5727c5 (patch)
tree159d62407ad1c114a28b3a06ed6eb863191a3029 /src/base/abci
parent868a1b9aeb2bf825a68c37c530107efe72d50d5d (diff)
downloadabc-5b75410a5e0af4f99291393965efba7a5b5727c5.tar.gz
abc-5b75410a5e0af4f99291393965efba7a5b5727c5.tar.bz2
abc-5b75410a5e0af4f99291393965efba7a5b5727c5.zip
Fixed the overflow timeout problem in bmc/bmc2/bmc3/int/pdr/sim, etc.
Diffstat (limited to 'src/base/abci')
-rw-r--r--src/base/abci/abcDar.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/base/abci/abcDar.c b/src/base/abci/abcDar.c
index 13aeaaa0..dc090791 100644
--- a/src/base/abci/abcDar.c
+++ b/src/base/abci/abcDar.c
@@ -1694,7 +1694,7 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
{
Aig_Man_t * pMan;
int status, RetValue = -1, clk = clock();
- int nTimeLimit = nTimeOut ? clock() + nTimeOut * CLOCKS_PER_SEC : 0;
+ int nTimeLimit = nTimeOut ? time(NULL) + nTimeOut : 0;
// derive the AIG manager
pMan = Abc_NtkToDar( pNtk, 0, 1 );
@@ -1722,7 +1722,7 @@ int Abc_NtkDarBmc( Abc_Ntk_t * pNtk, int nStart, int nFrames, int nSizeMax, int
else if ( RetValue == -1 )
{
printf( "No output asserted in %d frames. Resource limit reached ", iFrame );
- if ( nTimeLimit < clock() )
+ if ( time(NULL) > nTimeLimit )
printf( "(timeout %d sec). ", nTimeLimit );
else
printf( "(conf limit %d). ", nBTLimit );
@@ -1804,7 +1804,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars )
{
Aig_Man_t * pMan;
int status, RetValue = -1, clk = clock();
- int nTimeOut = pPars->nTimeOut ? clock() + pPars->nTimeOut * CLOCKS_PER_SEC : 0;
+ int nTimeOut = pPars->nTimeOut ? time(NULL) + pPars->nTimeOut : 0;
pMan = Abc_NtkToDar( pNtk, 0, 1 );
if ( pMan == NULL )
{
@@ -1825,7 +1825,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars )
if ( pPars->nFailOuts == 0 )
{
printf( "No output asserted in %d frames. Resource limit reached ", pPars->iFrame );
- if ( nTimeOut < clock() )
+ if ( time(NULL) > nTimeOut )
printf( "(timeout %d sec). ", pPars->nTimeOut );
else
printf( "(conf limit %d). ", pPars->nConfLimit );
@@ -1833,7 +1833,7 @@ int Abc_NtkDarBmc3( Abc_Ntk_t * pNtk, Saig_ParBmc_t * pPars )
else
{
printf( "The total of %d outputs asserted in %d frames. Resource limit reached ", pPars->nFailOuts, pPars->iFrame );
- if ( nTimeOut < clock() )
+ if ( time(NULL) > nTimeOut )
printf( "(timeout %d sec). ", pPars->nTimeOut );
else
printf( "(conf limit %d). ", pPars->nConfLimit );