Patent ID: 8843681

Claim:
A method for accessing a memory, the method comprising: comparing priorities of N function modules accessing the memory to obtain location information of a function module with a highest priority from the N function modules, where N is a natural number larger than one; and switching a bus of the function module to the memory via a bus arbitration device by logically operating the location information and bus information of each of the function modules, wherein the location information is a binary code with N digits, the function module corresponding to the digit has the highest priority when one digit of the location information is “1”, and said comparing priorities of N function modules accessing the memory comprises: comparing a priority of each of the function modules with respective priorities of other of the function modules according to a comparing scheme, generating an intermediate comparing result presented in a binary code with N−1 digits corresponding to the each of the function modules, each digit of the intermediate comparing result indicating a comparison result of the priorities between the each of the function modules and the other of the function modules; and performing an AND-operation on all digits of the intermediate comparing result of the each of function modules to obtain an operation result represented in a single binary code, N operation results arranged in order of serial numbers corresponding to the function modules including the location information of the function module with the highest priority.