summaryrefslogtreecommitdiffstats
path: root/src/misc/nm
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2007-04-08 08:01:00 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2007-04-08 08:01:00 -0700
commitc09d4d499cee70f02e3e9a18226554b8d1d34488 (patch)
tree89ac20b1029dc8407f655224f6ef2b5f431fa453 /src/misc/nm
parent94112fd22fc6f09ccc488cfc577d43aebeff9c5f (diff)
downloadabc-c09d4d499cee70f02e3e9a18226554b8d1d34488.tar.gz
abc-c09d4d499cee70f02e3e9a18226554b8d1d34488.tar.bz2
abc-c09d4d499cee70f02e3e9a18226554b8d1d34488.zip
Version abc70408
Diffstat (limited to 'src/misc/nm')
-rw-r--r--src/misc/nm/nm.h1
-rw-r--r--src/misc/nm/nmApi.c23
2 files changed, 24 insertions, 0 deletions
diff --git a/src/misc/nm/nm.h b/src/misc/nm/nm.h
index 89a9efac..c6344bbf 100644
--- a/src/misc/nm/nm.h
+++ b/src/misc/nm/nm.h
@@ -77,6 +77,7 @@ extern void Nm_ManDeleteIdName( Nm_Man_t * p, int ObjId );
extern char * Nm_ManCreateUniqueName( Nm_Man_t * p, int ObjId );
extern char * Nm_ManFindNameById( Nm_Man_t * p, int ObjId );
extern int Nm_ManFindIdByName( Nm_Man_t * p, char * pName, int Type );
+extern int Nm_ManFindIdByNameTwoTypes( Nm_Man_t * p, char * pName, int Type1, int Type2 );
extern Vec_Int_t * Nm_ManReturnNameIds( Nm_Man_t * p );
#ifdef __cplusplus
diff --git a/src/misc/nm/nmApi.c b/src/misc/nm/nmApi.c
index c46866d5..9165922f 100644
--- a/src/misc/nm/nmApi.c
+++ b/src/misc/nm/nmApi.c
@@ -222,6 +222,29 @@ int Nm_ManFindIdByName( Nm_Man_t * p, char * pName, int Type )
/**Function*************************************************************
+ Synopsis [Returns ID of the object if its name is known.]
+
+ Description [This procedure may return two IDs because POs and latches
+ may have the same name (the only allowed case of name duplication).]
+
+ SideEffects []
+
+ SeeAlso []
+
+***********************************************************************/
+int Nm_ManFindIdByNameTwoTypes( Nm_Man_t * p, char * pName, int Type1, int Type2 )
+{
+ int iNodeId;
+ iNodeId = Nm_ManFindIdByName( p, pName, Type1 );
+ if ( iNodeId == -1 )
+ iNodeId = Nm_ManFindIdByName( p, pName, Type2 );
+ if ( iNodeId == -1 )
+ return -1;
+ return iNodeId;
+}
+
+/**Function*************************************************************
+
Synopsis [Return the IDs of objects with names.]
Description []