def METHOD_NAME(self, cpld_number):
    io_resource = "/dev/port"
    CPLD1_VERSION_ADDR = 0x100
    if (cpld_number == 1):
        fd = os.open(io_resource, os.O_RDONLY)
        if (fd < 0):
            return 'NA'
        if (os.lseek(fd, CPLD1_VERSION_ADDR, os.SEEK_SET)
            != CPLD1_VERSION_ADDR):
            os.close(fd)
            return 'NA'
        buf = os.read(fd, 1)
        cpld_version = str(ord(buf))
        os.close(fd)
        return cpld_version
    else:
        cpld_version_file = ("/sys/class/i2c-adapter/i2c-{0}/{0}-003e"
                             "/iom_cpld_vers").format(12 + cpld_number)
        ver_str = self._read_sysfs_file(cpld_version_file)
        if (ver_str == "read error") or (ver_str == 'ERR'):
            return 'NA'
        ver_str = ver_str.rstrip("\r\n")
        cpld_version = str(int(ver_str.split(":")[1], 16))
        return cpld_version