diff options
Diffstat (limited to 'src/base/acb')
-rw-r--r-- | src/base/acb/acbFunc.c | 4 | ||||
-rw-r--r-- | src/base/acb/acbUtil.c | 14 |
2 files changed, 10 insertions, 8 deletions
diff --git a/src/base/acb/acbFunc.c b/src/base/acb/acbFunc.c index f063f7fb..e7fe2f53 100644 --- a/src/base/acb/acbFunc.c +++ b/src/base/acb/acbFunc.c @@ -245,7 +245,7 @@ void * Acb_VerilogSimpleParse( Vec_Int_t * vBuffer, Abc_Nam_t * pNames ) vCur = vWires; else if ( Token >= ACB_BUF && Token <= ACB_XNOR ) { - char * pToken = Abc_NamStr(pNames, Vec_IntEntry(vBuffer, i+1)); + //char * pToken = Abc_NamStr(pNames, Vec_IntEntry(vBuffer, i+1)); Vec_IntPush( vTypes, Token ); Vec_IntPush( vTypes, Vec_IntSize(vFanins) ); vCur = vFanins; @@ -1976,7 +1976,7 @@ Vec_Str_t * Acb_GenerateInstance2( Vec_Ptr_t * vIns, Vec_Ptr_t * vOuts ) Vec_Str_t * vStr = Vec_StrAlloc( 100 ); Vec_StrAppend( vStr, " patch p0 (" ); Vec_PtrForEachEntry( char *, vOuts, pName, i ) - Vec_StrPrintF( vStr, "%s .%s(target_%s)", i ? ",":"", pName, pName ); + Vec_StrPrintF( vStr, "%s .%s(t%d_%s)", i ? ",":"", pName, i, pName ); Vec_PtrForEachEntry( char *, vIns, pName, i ) Vec_StrPrintF( vStr, ", .%s(%s)", pName, pName ); Vec_StrAppend( vStr, " );\n\n" ); diff --git a/src/base/acb/acbUtil.c b/src/base/acb/acbUtil.c index 6c409c45..39c97859 100644 --- a/src/base/acb/acbUtil.c +++ b/src/base/acb/acbUtil.c @@ -519,10 +519,12 @@ int Acb_ObjToGia2( Gia_Man_t * pNew, Acb_Ntk_t * p, int iObj, Vec_Int_t * vTemp, return 0; if ( Type == ABC_OPER_CONST_T ) return 1; - if ( Type == ABC_OPER_BIT_BUF ) - return Vec_IntEntry(vTemp, 0); - if ( Type == ABC_OPER_BIT_INV ) - return Abc_LitNot( Vec_IntEntry(vTemp, 0) ); + if ( Type == ABC_OPER_BIT_BUF || Type == ABC_OPER_BIT_INV ) + { + Res = fUseXors ? Gia_ManAppendBuf(pNew, Vec_IntEntry(vTemp, 0)) : Vec_IntEntry(vTemp, 0); + //Res = Vec_IntEntry(vTemp, 0); + return Abc_LitNotCond( Res, Type == ABC_OPER_BIT_INV ); + } if ( Type == ABC_OPER_BIT_AND || Type == ABC_OPER_BIT_NAND ) { Res = 1; @@ -886,7 +888,7 @@ void Acb_NtkInsert( char * pFileNameIn, char * pFileNameOut, Vec_Ptr_t * vNames, else { Vec_PtrForEachEntry( char *, vNames, pName, i ) - fprintf( pFile, " target_%s%s", pName, i==Vec_PtrSize(vNames)-1 ? ";" : "," ); + fprintf( pFile, " t%d_%s%s", i, pName, i==Vec_PtrSize(vNames)-1 ? ";" : "," ); } fprintf( pFile, "\n\n" ); if ( fNumber ) @@ -897,7 +899,7 @@ void Acb_NtkInsert( char * pFileNameIn, char * pFileNameOut, Vec_Ptr_t * vNames, else { Vec_PtrForEachEntry( char *, vNames, pName, i ) - fprintf( pFile, " buf( %s, target_%s ); // t_%d\n", pName, pName, i ); + fprintf( pFile, " buf( %s, t%d_%s );\n", pName, i, pName ); } fprintf( pFile, "\n" ); for ( k = Pos2; pBuffer[k]; k++ ) |