Skip to content

Commit fade76f

Browse files
committed
Updating how history is recorded.
1 parent 48d09e7 commit fade76f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/base/abci/abcSymm.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,10 @@ void Ntk_SymFunGenerate( int nVars, int fVerbose )
327327
if ( fVerbose )
328328
Extra_PrintHex( stdout, (unsigned *)pFun, nVars );
329329
Ntk_SymFunDeriveNpn( pFun, nVars, pComp );
330+
//int nClasses = Vec_MemEntryNum( vTtMem );
330331
Class = Vec_MemHashInsert( vTtMem, pFun );
332+
//if ( Class == nClasses )
333+
//printf( "Class %3d : %s\n", nClasses, Ones );
331334
if ( fVerbose )
332335
{
333336
printf( " : NPN " );

src/base/cmd/cmdHist.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,9 +160,15 @@ void Cmd_HistoryWrite( Abc_Frame_t * p, int Limit )
160160
return;
161161
}
162162
Limit = Abc_MaxInt( 0, Vec_PtrSize(p->aHistory)-Limit );
163-
Vec_PtrForEachEntryStart( char *, p->aHistory, pStr, i, Limit )
163+
Vec_Ptr_t * aHistory= Vec_PtrAlloc(Vec_PtrSize(p->aHistory));
164+
Vec_PtrForEachEntryStart( char *, p->aHistory, pStr, i, Limit ) {
164165
fprintf( pFile, "%s\n", pStr );
166+
Vec_PtrPush( aHistory, Abc_UtilStrsav(pStr) );
167+
}
165168
fclose( pFile );
169+
Vec_PtrFreeFree( p->aHistory );
170+
p->aHistory = aHistory;
171+
p->iStartHistory = Vec_PtrSize(p->aHistory);
166172
}
167173
#endif
168174
}

0 commit comments

Comments
 (0)