def METHOD_NAME(self, mem_type, devid):
    if mem_type != "noc":
        return
    ddrmc_number = idcode_ddrmc_num_dict.get(devid, 0)
    if ddrmc_number == 0:
        logging.info("Can not get ddrmc/noc number!")
        self.enabled = False
        return
    pre_base_addr = []
    for (dirpath, dirnames, filenames) in os.walk("/proc/device-tree/axi"):
        for file in dirnames:
            if file.startswith("memory-controller"):
                compatible = open(os.path.join(os.path.abspath(os.path.join(
                    dirpath, file)), "compatible"), "rt").read().strip().split(',')
                driver_name = compatible[1].split('-')
                if driver_name[1] != 'ddrmc':
                    continue
                reg = os.path.join(os.path.abspath(
                    os.path.join(dirpath, file)), "reg")
                f = open(reg, "rb")
                numl = list(f.read())
                addr_off = ((numl[20] << 24) + (numl[21] <<
                            16) + (numl[22] << 8) + (numl[23] << 0))
                pre_base_addr.append(int(addr_off))
    pre_base_addr.sort()
    return pre_base_addr[0:ddrmc_number]