Patent ID: 6910117

Claim:
A method for detecting logical addresses of a nonvolatile storage medium comprising the steps of: defining several zones each having a plurality of blocks in said nonvolatile storage medium, building a first address mapping table according to the relation between physical addresses of a first zone and corresponding logical addresses, storing said address mapping table in a random access memory, simultaneously setting the threshold of an error function; calculating out the zone address and block address to which a logical address belongs when the system sends out said logical address to be looked up, the system then determining whether said logical address to be looked up is within said first zone according to the calculated zone address, said random access memory immediately obtaining a corresponding physical block address from said first address mapping table according to said logical address to be looked up and the system setting the value of said error function to 0 if the answer is yes, representing said logical address to be looked up exists in said first address mapping table; the system adding 1 to the value of said error function if the answer is no, the system building a second address mapping table with the calculated zone as a unit based on the relation between said logical address to be looked up and another corresponding zone address and storing said second address mapping table in said random access memory to let the system obtain the physical address corresponding to said logical address to be looked up directly from said second address mapping table when the logical address consecutively calculated by the system is not in said first zone so that the value of said error function reaches said threshold; and the system obtaining the physical block address corresponding to said logical address to be looked up directly from said nonvolatile storage medium according to the calculated zone address and block address if the value of said error function does not reach the threshold.