@staticmethod
def _add_generics(generics):
    """
        Generics are set accoring to this weird format: https://www.xilinx.com/support/answers/52217.html
        """
    if generics is None:
        return ''
    generic_list = []
    for name, value in generics.items():
        if isinstance(value, bool):
            generic_list.append('%s=%s' % (name, "1'b1" if value else "1'b0"))
        else:
            generic_list.append('%s=%s' % (name, value))
    return 'set_property generic {%s} [current_fileset]\n' % ' '.join(
        generic_list)
