summaryrefslogtreecommitdiffstats
path: root/src/base
diff options
context:
space:
mode:
authorAlan Mishchenko <alanmi@berkeley.edu>2018-05-03 22:28:21 -0700
committerAlan Mishchenko <alanmi@berkeley.edu>2018-05-03 22:28:21 -0700
commitaa313189c4fffcba13ff938ec01fa62a32fb8914 (patch)
treecc67ca4e3b4a7f8d566634cc2f779a7c1ef485be /src/base
parentf23ea8e33f6d5cc54f58bec6d9200483e5d8c704 (diff)
downloadabc-aa313189c4fffcba13ff938ec01fa62a32fb8914.tar.gz
abc-aa313189c4fffcba13ff938ec01fa62a32fb8914.tar.bz2
abc-aa313189c4fffcba13ff938ec01fa62a32fb8914.zip
Updates to NDR format (bug fixes).
Diffstat (limited to 'src/base')
-rw-r--r--src/base/wlc/wlcNdr.c13
-rw-r--r--src/base/wlc/wlcWriteVer.c8
2 files changed, 10 insertions, 11 deletions
diff --git a/src/base/wlc/wlcNdr.c b/src/base/wlc/wlcNdr.c
index 75601ba8..cc1b93f8 100644
--- a/src/base/wlc/wlcNdr.c
+++ b/src/base/wlc/wlcNdr.c
@@ -397,13 +397,6 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
ABC_SWAP( int, Vec_IntEntryP(vFanins, 1)[0], Vec_IntEntryP(vFanins, 2)[0] );
Wlc_ObjAddFanins( pNtk, Wlc_NtkObj(pNtk, iObj), vFanins );
Wlc_ObjSetNameId( pNtk, iObj, NameId );
- if ( Type == ABC_OPER_ARI_SMUL )
- {
- pObj = Wlc_NtkObj(pNtk, iObj);
- assert( Wlc_ObjFaninNum(pObj) == 2 );
- Wlc_ObjFanin0(pNtk, pObj)->Signed = 1;
- Wlc_ObjFanin1(pNtk, pObj)->Signed = 1;
- }
}
// mark primary outputs
Ndr_ModForEachPo( p, Mod, Obj )
@@ -426,6 +419,12 @@ Wlc_Ntk_t * Wlc_NtkFromNdr( void * pData )
int * pFanins = Wlc_ObjFanins(pObj);
for ( k = 0; k < Wlc_ObjFaninNum(pObj); k++ )
pFanins[k] = Vec_IntEntry(vName2Obj, pFanins[k]);
+ if ( Wlc_ObjType(pObj) == WLC_OBJ_ARI_MULTI )
+ {
+ assert( Wlc_ObjFaninNum(pObj) == 2 );
+ Wlc_ObjFanin0(pNtk, pObj)->Signed = 1;
+ Wlc_ObjFanin1(pNtk, pObj)->Signed = 1;
+ }
}
if ( pNtk->vInits )
{
diff --git a/src/base/wlc/wlcWriteVer.c b/src/base/wlc/wlcWriteVer.c
index fe14eedb..cc33b483 100644
--- a/src/base/wlc/wlcWriteVer.c
+++ b/src/base/wlc/wlcWriteVer.c
@@ -261,7 +261,7 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops )
fprintf( pFile, " " );
fprintf( pFile, "%s (", pObj->Type == WLC_OBJ_READ ? "ABC_READ" : "ABC_WRITE" );
Wlc_ObjForEachFanin( pObj, iFanin, k )
- fprintf( pFile, " .%s(%s)", k==0 ? "mem_in" : (k==1 ? "addr": "data"), Wlc_ObjName(p, iFanin) );
+ fprintf( pFile, " .%s(%s),", k==0 ? "mem_in" : (k==1 ? "addr": "data"), Wlc_ObjName(p, iFanin) );
fprintf( pFile, " .%s(%s) ) ;\n", pObj->Type == WLC_OBJ_READ ? "data" : "mem_out", Wlc_ObjName(p, i) );
continue;
}
@@ -276,19 +276,19 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops )
fprintf( pFile, " " );
fprintf( pFile, "%s_%d (", pObj->Type == WLC_OBJ_READ ? "CPL_MEM_READ" : "CPL_MEM_WRITE", Depth );
Wlc_ObjForEachFanin( pObj, iFanin, k )
- fprintf( pFile, " .%s(%s)", k==0 ? "mem_data_in" : (k==1 ? "addr_in": "data_in"), Wlc_ObjName(p, iFanin) );
+ fprintf( pFile, " .%s(%s),", k==0 ? "mem_data_in" : (k==1 ? "addr_in": "data_in"), Wlc_ObjName(p, iFanin) );
fprintf( pFile, " .%s(%s) ) ;\n", "data_out", Wlc_ObjName(p, i) );
continue;
}
}
else if ( pObj->Type == WLC_OBJ_FF )
{
- char * pInNames[7] = {"d", "clk", "reset", "set", "enable", "async", "init"};
+ char * pInNames[8] = {"d", "clk", "reset", "set", "enable", "async", "sre", "init"};
fprintf( pFile, "%s ;\n", Wlc_ObjName(p, i) );
fprintf( pFile, " " );
fprintf( pFile, "%s (", "ABC_DFFRSE" );
Wlc_ObjForEachFanin( pObj, iFanin, k )
- fprintf( pFile, " .%s(%s)", pInNames[k], Wlc_ObjName(p, iFanin) );
+ fprintf( pFile, " .%s(%s),", pInNames[k], Wlc_ObjName(p, iFanin) );
fprintf( pFile, " .%s(%s) ) ;\n", "q", Wlc_ObjName(p, i) );
continue;
}