def METHOD_NAME(self):
    packages = {
        "lp384": ["qn32", "cm36", "cm49"],
        "lp1k": ["swg16tr", "cm36", "cm49", "cm81", "cb81", "qn84", "cm121", "cb121"],
        "hx1k": ["vq100", "cb132", "tq144"],
        "lp8k": ["cm81", "cm81:4k", "cm121", "cm121:4k", "cm225", "cm225:4k"],
        "hx8k": ["bg121", "bg121:4k", "cb132", "cb132:4k", "cm121",
                 "cm121:4k", "cm225", "cm225:4k", "cm81", "cm81:4k",
                 "ct256", "tq144:4k"],
        "up3k": ["sg48", "uwg30"],
        "up5k": ["sg48", "uwg30"],
        "u4k": ["sg48"],
    }
    (family, architecture, package) = self.platform.device.split("-")
    if family not in ["ice40"]:
        raise ValueError("Unknown device family {}".format(family))
    if architecture not in packages.keys():
        raise ValueError("Invalid device architecture {}".format(architecture))
    if package not in packages[architecture]:
        raise ValueError("Invalid device package {}".format(package))
    return (family, architecture, package)