diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2022-06-05 18:27:40 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2022-06-05 18:27:40 -0700 |
commit | 617eb759ae67b7fc839322639ab97cc6200e53af (patch) | |
tree | b92fab5f7886f308ea396280425f13293e89a3e9 /src/aig/gia/giaSimBase.c | |
parent | aebf1e7b9c531c7907263cb573d8ff2d1a55cebd (diff) | |
download | abc-617eb759ae67b7fc839322639ab97cc6200e53af.tar.gz abc-617eb759ae67b7fc839322639ab97cc6200e53af.tar.bz2 abc-617eb759ae67b7fc839322639ab97cc6200e53af.zip |
Enabling support for reading AIGs with XOR gates.
Diffstat (limited to 'src/aig/gia/giaSimBase.c')
-rw-r--r-- | src/aig/gia/giaSimBase.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/aig/gia/giaSimBase.c b/src/aig/gia/giaSimBase.c index c8808532..002f6bc2 100644 --- a/src/aig/gia/giaSimBase.c +++ b/src/aig/gia/giaSimBase.c @@ -2485,15 +2485,21 @@ void Gia_ManSimGen( Gia_Man_t * pGia ) SeeAlso [] ***********************************************************************/ -int Gia_ManSimTwo( Gia_Man_t * p0, Gia_Man_t * p1, int nWords, int nRounds, int fVerbose ) +int Gia_ManSimTwo( Gia_Man_t * p0, Gia_Man_t * p1, int nWords, int nRounds, int TimeLimit, int fVerbose ) { Vec_Wrd_t * vSim0, * vSim1, * vSim2; abctime clk = Abc_Clock(); int n, i, RetValue = 1; + int TimeStop = TimeLimit ? TimeLimit * CLOCKS_PER_SEC + Abc_Clock() : 0; // in CPU ticks printf( "Simulating %d round with %d machine words.\n", nRounds, nWords ); Abc_RandomW(0); for ( n = 0; RetValue && n < nRounds; n++ ) { + if ( TimeStop && Abc_Clock() > TimeStop ) + { + printf( "Computation timed out after %d seconds and %d rounds.\n", TimeLimit, n ); + break; + } vSim0 = Vec_WrdStartRandom( Gia_ManCiNum(p0) * nWords ); p0->vSimsPi = vSim0; p1->vSimsPi = vSim0; |