DECLARATIONS ///.
Date [Ver. 1.0. Started - June 20, 2005.]
DECLARATIONS ///.
94 char FileNameIni[100];
95 char FileNameFin[100];
106 strcpy( FileNameIni, pFileGeneric );
107 strcat( FileNameIni,
"_ENC.blif" );
109 strcpy( FileNameFin, pFileGeneric );
110 strcat( FileNameFin,
"_LUT.blif" );
115 for ( i = 0; i < nVarsEnc; i++ )
120 nNames = nVars + nVarsEnc;
121 for ( i = 0; i < nVars; i++ )
124 sprintf( Buffer,
"pi%03d", i );
128 for ( ; i < nNames; i++ )
130 sprintf( Buffer,
"OutEnc_%02d", i-nVars );
169 printf(
"MTBDD reordered = %6d nodes\n",
Cudd_DagSize( aFunc ) );
171 printf(
"Variable reordering time = %.2f sec\n", (
float)(
Abc_Clock() - clk1)/(
float)(CLOCKS_PER_SEC) );
189 // verification of single output function
196 g_Func.FileInput = Extra_UtilStrsav(FileNameIni);
198 if ( Extra_ReadFile( &g_Func ) == 0 )
200 printf( "\nSomething did not work out while reading the input file for verification\n");
201 Extra_Dissolve( &g_Func );
205 aRes = Cudd_BddToAdd( dd, g_Func.pOutputs[0] ); Cudd_Ref( aRes );
208 printf( "\nVerification FAILED!\n");
210 printf( "\nVerification okay!\n");
212 Cudd_RecursiveDeref( dd, aRes );
215 Extra_Dissolve( &g_Func );
217 printf( "Preliminary verification time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
226 // verification of the decomposed LUT network
233 g_Func.FileInput = Extra_UtilStrsav(FileNameFin);
235 if ( Extra_ReadFile( &g_Func ) == 0 )
237 printf( "\nSomething did not work out while reading the input file for verification\n");
238 Extra_Dissolve( &g_Func );
242 aRes = Cudd_BddToAdd( dd, g_Func.pOutputs[0] ); Cudd_Ref( aRes );
245 printf( "\nFinal verification FAILED!\n");
247 printf( "\nFinal verification okay!\n");
249 Cudd_RecursiveDeref( dd, aRes );
252 Extra_Dissolve( &g_Func );
254 printf( "Final verification time = %.2f sec\n", (float)(Abc_Clock() - clk1)/(float)(CLOCKS_PER_SEC) );
262 sprintf( Command,
"cec %s %s", FileNameIni, FileNameFin );
269 for ( i = 0; i < nNames; i++ )
void Cudd_RecursiveDeref(DdManager *table, DdNode *n)
int Cmd_CommandExecute(void *pAbc, char *pCommandLine)
#define MAXINPUTS
INCLUDES ///.
ABC_NAMESPACE_IMPL_START DdNode * GetSingleOutputFunction(DdManager *dd, DdNode **pbOuts, int nOuts, DdNode **pbVarsEnc, int nVarsEnc, int fVerbose)
static functions ///
void WriteSingleOutputFunctionBlif(DdManager *dd, DdNode *aFunc, char **pNames, int nNames, char *FileName)
static abctime Abc_Clock()
int CreateDecomposedNetwork(DdManager *dd, DdNode *aFunc, char **pNames, int nNames, char *FileName, int nLutSize, int fCheck, int fVerbose)
EXTERNAL FUNCTIONS ///.
DdNode * Cudd_bddNewVarAtLevel(DdManager *dd, int level)
void * Abc_FrameGetGlobalFrame()
static int Abc_Base2Log(unsigned n)
int Cudd_ReduceHeap(DdManager *table, Cudd_ReorderingType heuristic, int minsize)
int Cudd_DagSize(DdNode *node)