Commit 095345fc by Alan Mishchenko

Added new name manager and modified hierarchy manager to use it.

parent cb2d12bb
...@@ -2455,6 +2455,14 @@ SOURCE=.\src\misc\util\utilMem.h ...@@ -2455,6 +2455,14 @@ SOURCE=.\src\misc\util\utilMem.h
# End Source File # End Source File
# Begin Source File # Begin Source File
SOURCE=.\src\misc\util\utilNam.c
# End Source File
# Begin Source File
SOURCE=.\src\misc\util\utilNam.h
# End Source File
# Begin Source File
SOURCE=.\src\misc\util\utilSignal.c SOURCE=.\src\misc\util\utilSignal.c
# End Source File # End Source File
# Begin Source File # Begin Source File
......
...@@ -589,6 +589,14 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose ) ...@@ -589,6 +589,14 @@ Gia_Man_t * Abc_NtkHieCecTest( char * pFileName, int fVerbose )
assert( Abc_NtkIsNetlist(pNtk) ); assert( Abc_NtkIsNetlist(pNtk) );
assert( !Abc_NtkLatchNum(pNtk) ); assert( !Abc_NtkLatchNum(pNtk) );
// test the new data-structure
{
extern void Au_ManDeriveTest( Abc_Ntk_t * pRoot );
Au_ManDeriveTest( pNtk );
Abc_NtkDelete( pNtk );
return NULL;
}
// print stats // print stats
if ( fVerbose ) if ( fVerbose )
Abc_NtkPrintBoxInfo( pNtk ); Abc_NtkPrintBoxInfo( pNtk );
......
...@@ -298,6 +298,33 @@ static inline void Abc_PrintMemoryP( int level, const char * pStr, int time, int ...@@ -298,6 +298,33 @@ static inline void Abc_PrintMemoryP( int level, const char * pStr, int time, int
ABC_PRMP( pStr, time, Time ); ABC_PRMP( pStr, time, Time );
} }
// Returns the next prime >= p
static inline int Abc_PrimeCudd( unsigned int p )
{
int i,pn;
p--;
do {
p++;
if (p&1)
{
pn = 1;
i = 3;
while ((unsigned) (i * i) <= p)
{
if (p % i == 0) {
pn = 0;
break;
}
i += 2;
}
}
else
pn = 0;
} while (!pn);
return(p);
} // end of Cudd_Prime
extern void Abc_Sort( int * pInput, int nSize ); extern void Abc_Sort( int * pInput, int nSize );
extern int * Abc_SortCost( int * pCosts, int nSize ); extern int * Abc_SortCost( int * pCosts, int nSize );
......
SRC += src/misc/util/utilCex.c \ SRC += src/misc/util/utilCex.c \
src/misc/util/utilFile.c \ src/misc/util/utilFile.c \
src/misc/util/utilNam.c \
src/misc/util/utilSignal.c \ src/misc/util/utilSignal.c \
src/misc/util/utilSort.c src/misc/util/utilSort.c
/**CFile****************************************************************
FileName [utilNam.h]
SystemName [ABC: Logic synthesis and verification system.]
PackageName [Memory recycling utilities.]
Synopsis [Internal declarations.]
Author [Alan Mishchenko]
Affiliation [UC Berkeley]
Date [Ver. 1.0. Started - June 20, 2005.]
Revision [$Id: utilNam.h,v 1.00 2005/06/20 00:00:00 alanmi Exp $]
***********************************************************************/
#ifndef __UTIL_NAM_H__
#define __UTIL_NAM_H__
////////////////////////////////////////////////////////////////////////
/// INCLUDES ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// PARAMETERS ///
////////////////////////////////////////////////////////////////////////
ABC_NAMESPACE_HEADER_START
////////////////////////////////////////////////////////////////////////
/// BASIC TYPES ///
////////////////////////////////////////////////////////////////////////
typedef struct Abc_Nam_t_ Abc_Nam_t;
////////////////////////////////////////////////////////////////////////
/// MACRO DEFINITIONS ///
////////////////////////////////////////////////////////////////////////
////////////////////////////////////////////////////////////////////////
/// FUNCTION DECLARATIONS ///
////////////////////////////////////////////////////////////////////////
/*=== utilNam.c ===============================================================*/
extern Abc_Nam_t * Abc_NamStart( int nObjs, int nAveSize );
extern void Abc_NamStop( Abc_Nam_t * p );
extern void Abc_NamPrint( Abc_Nam_t * p );
extern Abc_Nam_t * Abc_NamRef( Abc_Nam_t * p );
extern void Abc_NamDeref( Abc_Nam_t * p );
extern int Abc_NamObjNumMax( Abc_Nam_t * p );
extern int Abc_NamMemUsed( Abc_Nam_t * p );
extern int Abc_NamMemAlloc( Abc_Nam_t * p );
extern int Abc_NamStrFind( Abc_Nam_t * p, char * pStr );
extern int Abc_NamStrFindOrAdd( Abc_Nam_t * p, char * pStr, int * pfFound );
extern char * Abc_NamStr( Abc_Nam_t * p, int id );
extern Vec_Int_t * Abc_NamComputeIdMap( Abc_Nam_t * p1, Abc_Nam_t * p2 );
extern int Abc_NamReportCommon( Vec_Int_t * vNameIds1, Abc_Nam_t * p1, Abc_Nam_t * p2 );
ABC_NAMESPACE_HEADER_END
#endif
////////////////////////////////////////////////////////////////////////
/// END OF FILE ///
////////////////////////////////////////////////////////////////////////
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment