Patent ID: 7743221

Claim:
A memory sharing method for a plurality of functional modules and a target module, each functional module comprising at least a static random access memory (SRAM), the memory sharing method comprising: (a) calculating a memory capacity of the plurality of functional modules; (b) if a total memory capacity of a module group satisfies a memory capacity requirement of the target module, allocating SRAMs of the module group, wherein the module group comprises the functional modules; and (c) accessing the SRAMs of the plurality of functional modules of the module group by utilizing the target module, wherein the memory capacity requirement of the target module is a product of an address number X and a bit number Y, the number of functional modules within the module group is m, the number of physically separated SRAM within the module group is n, an i th SRAM has an address number X i and a bit number Y i , the memory capacity of the i th SRAM is a product of X i and Y i , and i≦n, wherein when each address number X i , where i=1˜n, is not less than X and a sum of each bit number Y i , where i=1˜n, is not less than Y, the step (b) comprises: allocating a portion of at least one of the i th SRAM as an allocated SRAM that with a bit number Y i — first and the address number X to meet the memory capacity requirement of the target module, where a sum of each bit number Y i — first is equal to Y and i≦n.