def METHOD_NAME(self, value):
    if self.mode not in ["rw", "wo"]:
        raise KeyError(self.name + "register not writable")
    datas = []
    for i in range(self.length):
        datas.append((value >> ((self.length-1-i)*self.data_width)) & (2**self.data_width-1))
    self.writefn(self.addr, datas)