import json


def read_pips_from_tile(tile_file):
    """
    Loads pip definition from a tile type JSON file and returns non-pseudo
    PIP name strings. Names are formatted as <dst_wire>.<src_wire>
    """

    with open(tile_file, "r") as fp:
        root = json.load(fp)
        pips = root["pips"]

        pip_names = []
        for pip in pips.values():
            if int(pip["is_pseudo"]) == 0:
                pip_names.append(
                    "{}.{}".format(pip["dst_wire"], pip["src_wire"]))

    return pip_names