def correlate_features(features, tile, site, set_features):
    """
    Correlate each feature with the fasm disassembly for given tile/site.

    Given a set of all possible fasm features (for an IOB) in the first
    argument, checks whether they are set or cleared for the given tile+site in
    a design. The parameter set_features contains fasm dissassembly of the
    design.

    Returns a list of tuples with feature names and whether they are set or not.
    """
    result = []

    for feature in features:
        full_feature = "{}.{}.{}".format(tile, site, feature)
        if full_feature in set_features:
            result.append((
                feature,
                True,
            ))
        else:
            result.append((
                feature,
                False,
            ))

    return result