80 pFile = fopen(
"nnclass_stats5.txt",
"r" );
81 for ( i = 0; i < 13719; i++ )
83 int RetValue = fscanf( pFile,
"%s%d", Buffer, &pFreqs[i] );
89 for ( i = 0; i < 13719; i++ )
92 qsort( (
void *)pPerm, (
size_t)13719,
sizeof(
int),
96 pFile = fopen(
"5npn_100.blif",
"w" );
97 fprintf( pFile,
"# Most frequent NPN classes of 5 vars.\n" );
98 fprintf( pFile,
".model 5npn\n" );
99 fprintf( pFile,
".inputs a b c d e\n" );
100 fprintf( pFile,
".outputs" );
101 for ( i = 0; i < nEntries; i++ )
102 fprintf( pFile,
" %02d", i );
103 fprintf( pFile,
"\n" );
105 for ( i = 0; i < nEntries; i++ )
107 fprintf( pFile,
".names a b c d e %02d\n", i );
108 uTruth = pTruths[pPerm[i]];
109 for ( k = 0; k < 32; k++ )
110 if ( uTruth & (1 << k) )
113 fprintf( pFile,
" 1\n" );
116 fprintf( pFile,
".end\n" );