Commit b21447b6 by Alan Mishchenko

Bug fix in writing constants in write_verilog.

parent 260fe083
...@@ -523,7 +523,7 @@ void Io_WriteVerilogObjects( FILE * pFile, Abc_Ntk_t * pNtk ) ...@@ -523,7 +523,7 @@ void Io_WriteVerilogObjects( FILE * pFile, Abc_Ntk_t * pNtk )
{ {
Mio_Gate_t * pGate = (Mio_Gate_t *)pObj->pData; Mio_Gate_t * pGate = (Mio_Gate_t *)pObj->pData;
Mio_Pin_t * pGatePin; Mio_Pin_t * pGatePin;
if ( Abc_ObjFaninNum(pObj) == 0 ) if ( Abc_ObjFaninNum(pObj) == 0 && (!strcmp(Mio_GateReadName(pGate), "_const0_") || !strcmp(Mio_GateReadName(pGate), "_const1_")) )
{ {
fprintf( pFile, " %-*s %s = 1\'b%d;\n", Length, "assign", Io_WriteVerilogGetName(Abc_ObjName( Abc_ObjFanout0(pObj) )), !strcmp(Mio_GateReadName(pGate), "_const1_") ); fprintf( pFile, " %-*s %s = 1\'b%d;\n", Length, "assign", Io_WriteVerilogGetName(Abc_ObjName( Abc_ObjFanout0(pObj) )), !strcmp(Mio_GateReadName(pGate), "_const1_") );
continue; continue;
......
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