diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2008-03-30 08:01:00 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2008-03-30 08:01:00 -0700 |
commit | 2c7f6e39b84d29db096388459db7583c01b79b01 (patch) | |
tree | 7fd628f0ac0391c45d2f8c95483887a984b8789c /src/aig/ntl/ntlObj.c | |
parent | 93c3f16066b69c840dc636f827f5f3ca18749906 (diff) | |
download | abc-2c7f6e39b84d29db096388459db7583c01b79b01.tar.gz abc-2c7f6e39b84d29db096388459db7583c01b79b01.tar.bz2 abc-2c7f6e39b84d29db096388459db7583c01b79b01.zip |
Version abc80330
Diffstat (limited to 'src/aig/ntl/ntlObj.c')
-rw-r--r-- | src/aig/ntl/ntlObj.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/aig/ntl/ntlObj.c b/src/aig/ntl/ntlObj.c index 2e39fbbf..ad43623a 100644 --- a/src/aig/ntl/ntlObj.c +++ b/src/aig/ntl/ntlObj.c @@ -163,6 +163,33 @@ Ntl_Obj_t * Ntl_ModelCreateBox( Ntl_Mod_t * pModel, int nFanins, int nFanouts ) /**Function************************************************************* + Synopsis [Create the latch.] + + Description [] + + SideEffects [] + + SeeAlso [] + +***********************************************************************/ +Ntl_Obj_t * Ntl_ModelDupObj( Ntl_Mod_t * pModel, Ntl_Obj_t * pOld ) +{ + Ntl_Obj_t * pNew; + if ( Ntl_ObjIsPi( pOld ) ) + pNew = Ntl_ModelCreatePi( pModel ); + else if ( Ntl_ObjIsPo( pOld ) ) + pNew = Ntl_ModelCreatePo( pModel, NULL ); + else if ( Ntl_ObjIsLatch( pOld ) ) + pNew = Ntl_ModelCreateLatch( pModel ); + else if ( Ntl_ObjIsNode( pOld ) ) + pNew = Ntl_ModelCreateNode( pModel, Ntl_ObjFaninNum(pOld) ); + else if ( Ntl_ObjIsBox( pOld ) ) + pNew = Ntl_ModelCreateBox( pModel, Ntl_ObjFaninNum(pOld), Ntl_ObjFanoutNum(pOld) ); + return pNew; +} + +/**Function************************************************************* + Synopsis [Allocates memory and copies the name into it.] Description [] |