Skip to content

Commit d4f4121

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 0163b34 commit d4f4121

3 files changed

Lines changed: 1 addition & 6 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 & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,6 @@ struct Abc_Frame_t_
139139
Vec_Ptr_t * vPlugInComBinPairs; // pairs of command and its binary name
140140
Vec_Ptr_t * vLTLProperties_global; // related to LTL
141141
Vec_Ptr_t * vSignalNames; // temporary storage for signal names
142-
// Vec_Ptr_t * vNodeRetention; // global map from node ID to name (char*)
143142
char * pSpecName;
144143
void * pSave1;
145144
void * pSave2;

0 commit comments

Comments
 (0)