

def mkLed():
    filename = (os.path.dirname(os.path.abspath(__file__)) + '/led.v')
    modules = from_verilog.read_verilog_module(filename)
    m = modules['blinkled']
    m.name = 'modified_led'
    enable = m.Input('enable')
    busy = m.Output('busy')
    ports = m.get_ports()
    led = ports['LED']
    led.width = 32
    old_statement = m.always[0].statement[0].false_statement
    m.always[0].statement[0].false_statement = If(enable)(*old_statement)
    m.Assign(busy((m.variable['count'] < 1023)))
    return filename

dataset/ETHPy150Open PyHDI/veriloggen/tests/verilog/read_verilog_/module_modify/read_verilog_module_modify.py mkLed/VarMisuse@151/191 `m`->`filename`