def fixed_to_real(value, point, signed=False):
    if 0 < point:
        raise ValueError('point must be more than 0')
    
    if point == 0:
        return vtypes.SystemTask('itor', value)
    
    if not isinstance(value, vtypes._Variable):
        raise TypeError('fixed_to_real supports only _Variable .')
    if hasattr(value, 'signed') and value.signed:
        signed = True
    
    msb = value[value.width - 1]
    
    v0 = (vtypes.SystemTask('itor', fixed_to_int(value, point)) +
          vtypes.SystemTask('itor', fixed_to_int_low(value, point)) / (2 ** point))
    
    nv = vtypes.Unot(value) + 1
    v1 = ((vtypes.SystemTask('itor', fixed_to_int(nv, point)) +
           vtypes.SystemTask('itor', fixed_to_int_low(nv, point)) / (2 ** point))) * -1
    
    return vtypes.Mux(signed and msb == 0, v0, v1)

#-------------------------------------------------------------------------------
dataset/ETHPy150Open PyHDI/veriloggen/veriloggen/utils/fixed.py/fixed_to_real/swapped operands of `<`