diff options
author | Alan Mishchenko <alanmi@berkeley.edu> | 2019-04-10 23:01:11 -0700 |
---|---|---|
committer | Alan Mishchenko <alanmi@berkeley.edu> | 2019-04-10 23:01:11 -0700 |
commit | 29c58e5ec8c39e13f4b6731489155bdc5c8190fc (patch) | |
tree | 9f8050fc7d5e450c61b9523019ad2d0d2da24d7b | |
parent | a32dd8f7ed48e43d9689d90dc56299760ee55b66 (diff) | |
download | abc-29c58e5ec8c39e13f4b6731489155bdc5c8190fc.tar.gz abc-29c58e5ec8c39e13f4b6731489155bdc5c8190fc.tar.bz2 abc-29c58e5ec8c39e13f4b6731489155bdc5c8190fc.zip |
Decoupling identical flop-input names in &put.
-rw-r--r-- | src/base/abci/abc.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/base/abci/abc.c b/src/base/abci/abc.c index ec9bc97d..54348c31 100644 --- a/src/base/abci/abc.c +++ b/src/base/abci/abc.c @@ -29668,12 +29668,20 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pAbc, int argc, char ** argv ) // transfer PO names to pNtk if ( pAbc->pGia->vNamesOut ) { + char pSuffix[100]; Abc_Obj_t * pObj; - int i; + int i, nDigits = Abc_Base10Log( Abc_NtkLatchNum(pNtk) ); Abc_NtkForEachCo( pNtk, pObj, i ) { if (i < Vec_PtrSize(pAbc->pGia->vNamesOut)) { Nm_ManDeleteIdName(pNtk->pManName, pObj->Id); - Abc_ObjAssignName( pObj, (char *)Vec_PtrEntry(pAbc->pGia->vNamesOut, i), NULL ); + if ( Abc_ObjIsPo(pObj) ) + Abc_ObjAssignName( pObj, (char *)Vec_PtrEntry(pAbc->pGia->vNamesOut, i), NULL ); + else + { + assert( i >= Abc_NtkPoNum(pNtk) ); + sprintf( pSuffix, "_li%0*d", nDigits, i-Abc_NtkPoNum(pNtk) ); + Abc_ObjAssignName( pObj, (char *)Vec_PtrEntry(pAbc->pGia->vNamesOut, i), pSuffix ); + } } } } |