Commit 094c68f9 by Alan Mishchenko

Supporting X-valued constants in Wlc_Ntk_t.

parent c81b6cb5
...@@ -208,8 +208,6 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops ) ...@@ -208,8 +208,6 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops )
fprintf( pFile, "x" ); fprintf( pFile, "x" );
} }
else else
fprintf( pFile, "%-16s = %d\'%sh", Wlc_ObjName(p, i), Wlc_ObjRange(pObj), Wlc_ObjIsSigned(pObj) ? "s":"" );
Abc_TtPrintHexArrayRev( pFile, (word *)Wlc_ObjConstValue(pObj), (Wlc_ObjRange(pObj) + 3) / 4 ); Abc_TtPrintHexArrayRev( pFile, (word *)Wlc_ObjConstValue(pObj), (Wlc_ObjRange(pObj) + 3) / 4 );
} }
else if ( pObj->Type == WLC_OBJ_ROTATE_R || pObj->Type == WLC_OBJ_ROTATE_L ) else if ( pObj->Type == WLC_OBJ_ROTATE_R || pObj->Type == WLC_OBJ_ROTATE_L )
...@@ -360,10 +358,19 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops ) ...@@ -360,10 +358,19 @@ void Wlc_WriteVerInt( FILE * pFile, Wlc_Ntk_t * p, int fNoFlops )
fprintf( pFile, "%s", Wlc_ObjName(p, Wlc_ObjId(p, Wlc_NtkPi(p, Vec_IntEntry(p->vInits, i-Wlc_NtkPiNum(p)))))); fprintf( pFile, "%s", Wlc_ObjName(p, Wlc_ObjId(p, Wlc_NtkPi(p, Vec_IntEntry(p->vInits, i-Wlc_NtkPiNum(p))))));
else else
{ {
if ( p->pInits[0] == 'x' || p->pInits[0] == 'X' )
{
fprintf( pFile, "%d\'h", Wlc_ObjRange(pObj) );
for ( k = 0; k < (Wlc_ObjRange(pObj) + 3) / 4; k++ )
fprintf( pFile, "x" );
}
else
{
fprintf( pFile, "%d\'b", Wlc_ObjRange(pObj) ); fprintf( pFile, "%d\'b", Wlc_ObjRange(pObj) );
for ( k = Wlc_ObjRange(pObj)-1; k >= 0; k-- ) for ( k = Wlc_ObjRange(pObj)-1; k >= 0; k-- )
fprintf( pFile, "%c", p->pInits[iFanin + k] ); fprintf( pFile, "%c", p->pInits[iFanin + k] );
} }
}
fprintf( pFile, ";\n" ); fprintf( pFile, ";\n" );
iFanin += Wlc_ObjRange(pObj); iFanin += Wlc_ObjRange(pObj);
} }
......
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