Skip to content

Commit 8a5259c

Browse files
committed
Fix latch retention bug and clean up dead code
Fix bug in Abc_NtkToDar where Nr_ManCopyOrigins for latches used a potentially complemented pointer (for Init1 latches) and was redundant with the CI loop that already tracks all latch CIs. Remove the duplicate commented-out include in abc.h and dead declaration in mainInt.h. Found by Greptile review on #4. Co-developed-by: Claude Code v2.1.49 (claude-opus-4-6)
1 parent 796570c commit 8a5259c

3 files changed

Lines changed: 1 addition & 7 deletions

File tree

src/base/abc/abc.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,6 @@
4242
#include "misc/extra/extra.h"
4343
#include "base/abc/node_retention.h"
4444

45-
// #include "base/abc/node_retention.h"
46-
4745
////////////////////////////////////////////////////////////////////////
4846
/// PARAMETERS ///
4947
////////////////////////////////////////////////////////////////////////

src/base/abci/abcDar.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -300,11 +300,9 @@ Aig_Man_t * Abc_NtkToDar( Abc_Ntk_t * pNtk, int fExors, int fRegisters )
300300

301301
// complement the 1-values registers
302302
if ( fRegisters ) {
303-
Abc_NtkForEachLatch( pNtk, pObj, i ) {
303+
Abc_NtkForEachLatch( pNtk, pObj, i )
304304
if ( Abc_LatchIsInit1(pObj) )
305305
Abc_ObjFanout0(pObj)->pCopy = Abc_ObjNot(Abc_ObjFanout0(pObj)->pCopy);
306-
Nr_ManCopyOrigins( pMan->pNodeRetention, pNtk->pNodeRetention, Abc_ObjId((Abc_Obj_t *)Abc_ObjFanout0(pObj)->pCopy), Abc_ObjId(pObj) );
307-
}
308306
}
309307
// perform the conversion of the internal nodes (assumes DFS ordering)
310308
// pMan->fAddStrash = 1;

src/base/main/mainInt.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ typedef void (*Abc_Frame_Callback_BmcFrameDone_Func)(int frame, int po, int stat
5959

6060
struct Abc_Frame_t_
6161
{
62-
// TODO move this one down
6362
Vec_Ptr_t * vNodeRetention; // global map from node ID to name (char*)
6463
// general info
6564
char * sVersion; // the name of the current version
@@ -139,7 +138,6 @@ struct Abc_Frame_t_
139138
Vec_Ptr_t * vPlugInComBinPairs; // pairs of command and its binary name
140139
Vec_Ptr_t * vLTLProperties_global; // related to LTL
141140
Vec_Ptr_t * vSignalNames; // temporary storage for signal names
142-
// Vec_Ptr_t * vNodeRetention; // global map from node ID to name (char*)
143141
char * pSpecName;
144142
void * pSave1;
145143
void * pSave2;

0 commit comments

Comments
 (0)