Commit a02be725 by Alan Mishchenko

Updates to Exorcism package

parent 03dc5136
...@@ -83,7 +83,6 @@ int ReduceEsopCover() ...@@ -83,7 +83,6 @@ int ReduceEsopCover()
// SIMPLIFICATION // SIMPLIFICATION
//////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////
long clk1 = clock();
int nIterWithoutImprovement = 0; int nIterWithoutImprovement = 0;
int nIterCount = 0; int nIterCount = 0;
int GainTotal; int GainTotal;
...@@ -186,7 +185,7 @@ int ReduceEsopCover() ...@@ -186,7 +185,7 @@ int ReduceEsopCover()
printf( "\nShallow simplification time is "; printf( "\nShallow simplification time is ";
cout << (float)(clk2 - clk1)/(float)(CLOCKS_PER_SEC) << " sec\n" ); cout << (float)(clk2 - clk1)/(float)(CLOCKS_PER_SEC) << " sec\n" );
printf( "Deep simplification time is "; printf( "Deep simplification time is ";
cout << (float)(clock() - clk2)/(float)(CLOCKS_PER_SEC) << " sec\n" ); cout << (float)(Abc_Clock() - clk2)/(float)(CLOCKS_PER_SEC) << " sec\n" );
printf( "Cover after iterative simplification = " << s_nCubesInUse << endl; printf( "Cover after iterative simplification = " << s_nCubesInUse << endl;
printf( "Reduced by initial cube writing = " << g_CoverInfo.nCubesBefore-nCubesAfterWriting << endl; printf( "Reduced by initial cube writing = " << g_CoverInfo.nCubesBefore-nCubesAfterWriting << endl;
printf( "Reduced by shallow simplification = " << nCubesAfterWriting-nCubesAfterShallow << endl; printf( "Reduced by shallow simplification = " << nCubesAfterWriting-nCubesAfterShallow << endl;
...@@ -212,7 +211,7 @@ int ReduceEsopCover() ...@@ -212,7 +211,7 @@ int ReduceEsopCover()
// quite a good script // quite a good script
////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////
/* /*
long clk1 = clock(); long clk1 = Abc_Clock();
int nIterWithoutImprovement = 0; int nIterWithoutImprovement = 0;
do do
{ {
...@@ -254,7 +253,7 @@ int ReduceEsopCover() ...@@ -254,7 +253,7 @@ int ReduceEsopCover()
/* /*
// alu4 - 439 // alu4 - 439
long clk1 = clock(); long clk1 = Abc_Clock();
int nIterWithoutImprovement = 0; int nIterWithoutImprovement = 0;
do do
{ {
...@@ -296,7 +295,7 @@ int ReduceEsopCover() ...@@ -296,7 +295,7 @@ int ReduceEsopCover()
/* /*
// alu4 - 412 cubes, 700 sec // alu4 - 412 cubes, 700 sec
long clk1 = clock(); long clk1 = Abc_Clock();
int nIterWithoutImprovement = 0; int nIterWithoutImprovement = 0;
int nIterCount = 0; int nIterCount = 0;
do do
...@@ -351,7 +350,7 @@ int ReduceEsopCover() ...@@ -351,7 +350,7 @@ int ReduceEsopCover()
// pretty good script // pretty good script
// alu4 = 424 in 250 sec // alu4 = 424 in 250 sec
long clk1 = clock(); long clk1 = Abc_Clock();
int nIterWithoutImprovement = 0; int nIterWithoutImprovement = 0;
int nIterCount = 0; int nIterCount = 0;
do do
...@@ -406,7 +405,7 @@ int ReduceEsopCover() ...@@ -406,7 +405,7 @@ int ReduceEsopCover()
/* /*
alu4 = 435 70 secs alu4 = 435 70 secs
long clk1 = clock(); long clk1 = Abc_Clock();
int nIterWithoutImprovement = 0; int nIterWithoutImprovement = 0;
int nIterCount = 0; int nIterCount = 0;
...@@ -445,7 +444,7 @@ alu4 = 435 70 secs ...@@ -445,7 +444,7 @@ alu4 = 435 70 secs
/* /*
// the best previous // the best previous
long clk1 = clock(); long clk1 = Abc_Clock();
int nIterWithoutImprovement = 0; int nIterWithoutImprovement = 0;
int nIterCount = 0; int nIterCount = 0;
int GainTotal; int GainTotal;
...@@ -510,7 +509,7 @@ alu4 = 435 70 secs ...@@ -510,7 +509,7 @@ alu4 = 435 70 secs
/* /*
// the last tried // the last tried
long clk1 = clock(); long clk1 = Abc_Clock();
int nIterWithoutImprovement = 0; int nIterWithoutImprovement = 0;
int nIterCount = 0; int nIterCount = 0;
int GainTotal; int GainTotal;
...@@ -653,7 +652,7 @@ void AddCubesToStartingCover( Vec_Wec_t * vEsop ) ...@@ -653,7 +652,7 @@ void AddCubesToStartingCover( Vec_Wec_t * vEsop )
***********************************************************************/ ***********************************************************************/
int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut ) int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut )
{ {
long clk1; abctime clk1;
int RemainderBits; int RemainderBits;
int TotalWords; int TotalWords;
int MemTemp, MemTotal; int MemTemp, MemTotal;
...@@ -678,10 +677,10 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut ) ...@@ -678,10 +677,10 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut )
g_CoverInfo.cIDs = 1; g_CoverInfo.cIDs = 1;
// cubes // cubes
clk1 = clock(); clk1 = Abc_Clock();
// g_CoverInfo.nCubesBefore = CountTermsInPseudoKroneckerCover( g_Func.dd, nOuts ); // g_CoverInfo.nCubesBefore = CountTermsInPseudoKroneckerCover( g_Func.dd, nOuts );
g_CoverInfo.nCubesBefore = Vec_WecSize(vEsop); g_CoverInfo.nCubesBefore = Vec_WecSize(vEsop);
g_CoverInfo.TimeStart = clock() - clk1; g_CoverInfo.TimeStart = Abc_Clock() - clk1;
if ( g_CoverInfo.Verbosity ) if ( g_CoverInfo.Verbosity )
{ {
...@@ -738,7 +737,7 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut ) ...@@ -738,7 +737,7 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut )
// STEP 3: write the cube cover into the allocated storage // STEP 3: write the cube cover into the allocated storage
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
clk1 = clock(); clk1 = Abc_Clock();
if ( g_CoverInfo.Verbosity ) if ( g_CoverInfo.Verbosity )
printf( "Generating the starting cover...\n" ); printf( "Generating the starting cover...\n" );
AddCubesToStartingCover( vEsop ); AddCubesToStartingCover( vEsop );
...@@ -749,10 +748,10 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut ) ...@@ -749,10 +748,10 @@ int Exorcism( Vec_Wec_t * vEsop, int nIns, int nOuts, char * pFileNameOut )
/////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////
if ( g_CoverInfo.Verbosity ) if ( g_CoverInfo.Verbosity )
printf( "Performing minimization...\n" ); printf( "Performing minimization...\n" );
clk1 = clock(); clk1 = Abc_Clock();
ReduceEsopCover(); ReduceEsopCover();
g_CoverInfo.TimeMin = clock() - clk1; g_CoverInfo.TimeMin = Abc_Clock() - clk1;
// g_Func.TimeMin = (float)(clock() - clk1)/(float)(CLOCKS_PER_SEC); // g_Func.TimeMin = (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC);
if ( g_CoverInfo.Verbosity ) if ( g_CoverInfo.Verbosity )
{ {
printf( "\nMinimization time is %.2f sec\n", TICKS_TO_SECONDS(g_CoverInfo.TimeMin) ); printf( "\nMinimization time is %.2f sec\n", TICKS_TO_SECONDS(g_CoverInfo.TimeMin) );
......
...@@ -111,9 +111,9 @@ typedef struct cinfo_tag ...@@ -111,9 +111,9 @@ typedef struct cinfo_tag
int Verbosity; // verbosity level int Verbosity; // verbosity level
int Quality; // quality int Quality; // quality
int TimeRead; // reading time abctime TimeRead; // reading time
int TimeStart; // starting cover computation time abctime TimeStart; // starting cover computation time
int TimeMin; // pure minimization time abctime TimeMin; // pure minimization time
} cinfo; } cinfo;
// representation of one cube (24 bytes + bit info) // representation of one cube (24 bytes + bit info)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment