diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-22 23:04:43 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2015-06-22 23:04:43 -0700 |
commit | 70697f868a263930e971c062e5b46e64fbb1ee18 (patch) | |
tree | 7ecd062ec16b58d5a625fe3591589728f705814c /src/aig/ntl/ntlTable.c | |
parent | d5b0fdee741dbc64bcfe75c54420219a7cbeac1a (diff) | |
download | abc-70697f868a263930e971c062e5b46e64fbb1ee18.tar.gz abc-70697f868a263930e971c062e5b46e64fbb1ee18.tar.bz2 abc-70697f868a263930e971c062e5b46e64fbb1ee18.zip |
Version abc90528
committer: Baruch Sterin <baruchs@gmail.com>
Diffstat (limited to 'src/aig/ntl/ntlTable.c')
-rw-r--r-- | src/aig/ntl/ntlTable.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/aig/ntl/ntlTable.c b/src/aig/ntl/ntlTable.c index d227b1b9..0b87c8be 100644 --- a/src/aig/ntl/ntlTable.c +++ b/src/aig/ntl/ntlTable.c @@ -65,6 +65,30 @@ Ntl_Net_t * Ntl_ModelCreateNet( Ntl_Mod_t * p, const char * pName ) /**Function************************************************************* + Synopsis [Allocates memory for the net.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +char * Ntl_ModelCreateNetName( Ntl_Mod_t * p, const char * pName, int Num ) +{ + char * pResult; + char Buffer[1000]; + assert( strlen(pName) < 900 ); + do { + sprintf( Buffer, "%s%d", pName, Num++ ); + } while ( Ntl_ModelFindNet( p, Buffer ) != NULL ); + pResult = (char *)Aig_MmFlexEntryFetch( p->pMan->pMemObjs, strlen(Buffer) + 1 ); + strcpy( pResult, Buffer ); + return pResult; +} + +/**Function************************************************************* + Synopsis [Resizes the table.] Description [] |