From 0108175c6c32d3e8b693d80b9e4559a62767634d Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sat, 22 Jul 2023 17:08:01 -0700 Subject: [PATCH] Bug fix in 'dsd'. --- src/base/abci/abcDsd.c | 8 ++++---- src/bdd/dsd/dsd.h | 4 ++-- src/bdd/dsd/dsdApi.c | 4 ++-- src/bdd/dsd/dsdInt.h | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/base/abci/abcDsd.c b/src/base/abci/abcDsd.c index 5121a4fc4..27d86ae89 100644 --- a/src/base/abci/abcDsd.c +++ b/src/base/abci/abcDsd.c @@ -175,11 +175,11 @@ void Abc_NtkDsdConstruct( Dsd_Manager_t * pManDsd, Abc_Ntk_t * pNtk, Abc_Ntk_t * // save the CI nodes in the DSD nodes Abc_AigConst1(pNtk)->pCopy = pNodeNew = Abc_NtkCreateNodeConst1(pNtkNew); - Dsd_NodeSetMark( Dsd_ManagerReadConst1(pManDsd), (int)(ABC_PTRINT_T)pNodeNew ); + Dsd_NodeSetMark( Dsd_ManagerReadConst1(pManDsd), (word)(ABC_PTRINT_T)pNodeNew ); Abc_NtkForEachCi( pNtk, pNode, i ) { pNodeDsd = Dsd_ManagerReadInput( pManDsd, i ); - Dsd_NodeSetMark( pNodeDsd, (int)(ABC_PTRINT_T)pNode->pCopy ); + Dsd_NodeSetMark( pNodeDsd, (word)(ABC_PTRINT_T)pNode->pCopy ); } // collect DSD nodes in DFS order (leaves and const1 are not collected) @@ -298,7 +298,7 @@ printf( "\n" ); } } pNodeNew->pData = bLocal; - Dsd_NodeSetMark( pNodeDsd, (int)(ABC_PTRINT_T)pNodeNew ); + Dsd_NodeSetMark( pNodeDsd, (word)(ABC_PTRINT_T)pNodeNew ); return pNodeNew; } @@ -417,7 +417,7 @@ void Abc_NodeDecompDsdAndMux( Abc_Obj_t * pNode, Vec_Ptr_t * vNodes, Dsd_Manager Abc_ObjForEachFanin( pNode, pFanin, i ) { pFaninDsd = Dsd_ManagerReadInput( pManDsd, i ); - Dsd_NodeSetMark( pFaninDsd, (int)(ABC_PTRINT_T)pFanin ); + Dsd_NodeSetMark( pFaninDsd, (word)(ABC_PTRINT_T)pFanin ); } // construct the intermediate nodes diff --git a/src/bdd/dsd/dsd.h b/src/bdd/dsd/dsd.h index 837579510..4c5cd8915 100644 --- a/src/bdd/dsd/dsd.h +++ b/src/bdd/dsd/dsd.h @@ -92,8 +92,8 @@ extern DdNode * Dsd_NodeReadSupp( Dsd_Node_t * p ); extern Dsd_Node_t ** Dsd_NodeReadDecs( Dsd_Node_t * p ); extern Dsd_Node_t * Dsd_NodeReadDec ( Dsd_Node_t * p, int i ); extern int Dsd_NodeReadDecsNum( Dsd_Node_t * p ); -extern int Dsd_NodeReadMark( Dsd_Node_t * p ); -extern void Dsd_NodeSetMark( Dsd_Node_t * p, int Mark ); +extern word Dsd_NodeReadMark( Dsd_Node_t * p ); +extern void Dsd_NodeSetMark( Dsd_Node_t * p, word Mark ); extern DdManager * Dsd_ManagerReadDd( Dsd_Manager_t * pMan ); extern Dsd_Node_t * Dsd_ManagerReadRoot( Dsd_Manager_t * pMan, int i ); extern Dsd_Node_t * Dsd_ManagerReadInput( Dsd_Manager_t * pMan, int i ); diff --git a/src/bdd/dsd/dsdApi.c b/src/bdd/dsd/dsdApi.c index 181dfb281..a94d0d26c 100644 --- a/src/bdd/dsd/dsdApi.c +++ b/src/bdd/dsd/dsdApi.c @@ -56,7 +56,7 @@ DdNode * Dsd_NodeReadSupp( Dsd_Node_t * p ) { return p->S; } Dsd_Node_t ** Dsd_NodeReadDecs( Dsd_Node_t * p ) { return p->pDecs; } Dsd_Node_t * Dsd_NodeReadDec ( Dsd_Node_t * p, int i ) { return p->pDecs[i]; } int Dsd_NodeReadDecsNum( Dsd_Node_t * p ) { return p->nDecs; } -int Dsd_NodeReadMark( Dsd_Node_t * p ) { return p->Mark; } +word Dsd_NodeReadMark( Dsd_Node_t * p ) { return p->Mark; } /**Function************************************************************* @@ -74,7 +74,7 @@ int Dsd_NodeReadMark( Dsd_Node_t * p ) { return p->Mark; } SeeAlso [] ***********************************************************************/ -void Dsd_NodeSetMark( Dsd_Node_t * p, int Mark ){ p->Mark = Mark; } +void Dsd_NodeSetMark( Dsd_Node_t * p, word Mark ){ p->Mark = Mark; } /**Function************************************************************* diff --git a/src/bdd/dsd/dsdInt.h b/src/bdd/dsd/dsdInt.h index 37e9746f5..89bfd22ee 100644 --- a/src/bdd/dsd/dsdInt.h +++ b/src/bdd/dsd/dsdInt.h @@ -57,7 +57,7 @@ struct Dsd_Node_t_ DdNode * G; // function of the node DdNode * S; // support of this function Dsd_Node_t ** pDecs; // pointer to structures for formal inputs - int Mark; // the mark used by CASE 4 of disjoint decomposition + word Mark; // the mark used by CASE 4 of disjoint decomposition short nDecs; // the number of formal inputs short nVisits; // the counter of visits };