def METHOD_NAME(self):
    if not self.f4pga_device:
        try:
            self.f4pga_device = {
                # FIXME: fine for now since only a few devices are supported, do more clever device re-mapping.
                "xc7a35ticsg324-1L" : "xc7a35t",
                "xc7a100tcsg324-1"  : "xc7a100t",
                "xc7z010clg400-1"   : "xc7z010",
                "xc7z020clg400-1"   : "xc7z020",
            }[self.platform.device]
        except KeyError:
            raise ValueError(f"f4pga_device is not specified")
    if not self.bitstream_device:
        try:
            # bitstream_device points to a directory in prjxray database
            # available bitstream_devices: artix7, kintex7, zynq7
            self.bitstream_device = {
                "xc7a": "artix7", # xc7a35t, xc7a50t, xc7a100t, xc7a200t
                "xc7z": "zynq7", # xc7z010, xc7z020
            }[self.platform.device[:4]]
        except KeyError:
            raise ValueError(f"Unsupported device: {self.platform.device}")
    # FIXME: prjxray-db doesn't have xc7a35ticsg324-1L - use closest replacement
    self._partname = {
        "xc7a35ticsg324-1L" : "xc7a35tcsg324-1",
        "xc7a100tcsg324-1"  : "xc7a100tcsg324-1",
        "xc7a200t-sbg484-1" : "xc7a200tsbg484-1",
        "xc7z010clg400-1"   : "xc7z010clg400-1",
        "xc7z020clg400-1"   : "xc7z020clg400-1",
    }.get(self.platform.device, self.platform.device)