Commit 29c58e5e by Alan Mishchenko

Decoupling identical flop-input names in &put.

parent a32dd8f7
...@@ -29668,12 +29668,20 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pAbc, int argc, char ** argv ) ...@@ -29668,12 +29668,20 @@ int Abc_CommandAbc9Put( Abc_Frame_t * pAbc, int argc, char ** argv )
// transfer PO names to pNtk // transfer PO names to pNtk
if ( pAbc->pGia->vNamesOut ) if ( pAbc->pGia->vNamesOut )
{ {
char pSuffix[100];
Abc_Obj_t * pObj; Abc_Obj_t * pObj;
int i; int i, nDigits = Abc_Base10Log( Abc_NtkLatchNum(pNtk) );
Abc_NtkForEachCo( pNtk, pObj, i ) { Abc_NtkForEachCo( pNtk, pObj, i ) {
if (i < Vec_PtrSize(pAbc->pGia->vNamesOut)) { if (i < Vec_PtrSize(pAbc->pGia->vNamesOut)) {
Nm_ManDeleteIdName(pNtk->pManName, pObj->Id); Nm_ManDeleteIdName(pNtk->pManName, pObj->Id);
if ( Abc_ObjIsPo(pObj) )
Abc_ObjAssignName( pObj, (char *)Vec_PtrEntry(pAbc->pGia->vNamesOut, i), NULL ); 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 );
}
} }
} }
} }
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