1. Field of the Invention
The present invention generally relates to an embedded memory system, and more particularly to a memory card with a volatile memory capable of being shared with an electronic system.
2. Description of Related Art
A memory card, such as a Secure Digital (SD) card, is a non-volatile memory storage device commonly used in company with an electronic system, such as a mobile phone, to retain data without power.
A modern memory card is normally equipped with volatile memory, such as dynamic random access memory (DRAM), for temporarily storing some data. The electronic system mentioned above is also normally equipped with volatile or non-volatile memory for storing some temporary parameters.
It is observed that the volatile memory in the modern memory card is seldom used to the full. It is also noted that it is not uncommon that the electronic system with limited resource such as the mobile phone may sometimes be short of memory space to store more data, thereby degrading its operating speed. On the other hand, an outdated memory card may probably have inadequate memory space, while a state-of-the-art mobile phone may have a relatively large amount of memory. The situation becomes more complicated when the deficiency of the memory space is dynamically situated in either the memory card or the electronic system according to their current operating conditions.
In either case, the surplus memory space more than needed at one side is not helpful to the other side that is short of memory space, thereby causing the memory waste. The underlying rationale of this problem lies in the lack of good communication scheme between the memory card and the associated electronic system to adaptively share the surplus memory space.
For the reason that conventional memory cards and associated electronic systems could not effectively use their memory resources, a need has arisen to propose a novel scheme for dynamically sharing the memory resources between the memory cards and the associated electronic systems.
In view of the foregoing, it is an object of the embodiment of the present invention to provide an embedded memory system that is capable of effectively coordinating memory-sharing between the memory resources between the embedded memory system and an associated electronic system.
According to one embodiment, an embedded memory system includes a main interface, a memory-sharing auxiliary interface, a primary memory, a secondary memory, and an arbiter. The main interface is configured to communicate with an electronic system via a main bus. The memory-sharing auxiliary interface is configured to communicate with the electronic system via a memory-sharing auxiliary bus. The arbiter is configured to arbitrate among the main interface, the memory-sharing auxiliary interface, the primary memory, and the secondary memory. Accordingly, the electronic system is capable of sharing either the primary memory or the secondary memory via the memory-sharing auxiliary interface and the memory-sharing auxiliary bus, and the embedded memory system is capable of sharing a system memory of the electronic system via the memory-sharing auxiliary interface and the memory-sharing auxiliary bus.
Specifically, the embedded memory system 1 includes a main interface 10 that communicates with a system interface 20 via a main bus 3 and an associated protocol. Take eMMC for example, the main interface 10, the system interface 20, and the main bus 3 are compliant with eMMC for exchanging data between the embedded memory system 1 and the electronic system 2. The embedded memory system 1 includes a primary memory 12, which is commonly a non-volatile memory such as flash memory. In addition to the primary memory 12, the embedded memory system 1 also includes a secondary memory 14, which is, in the embodiment, a volatile memory such as dynamic random access memory (DRAM). The electronic system 2 commonly includes a system controller 22 (such as a microprocessor) and a system memory 24 (such as DRAM or flash memory).
According to one aspect of the embodiment, the embedded memory system 1 includes a memory-sharing auxiliary interface (“auxiliary interface” for short hereinafter) 16 that is capable of communicating with the system interface 20 via a memory-sharing auxiliary bus (“auxiliary bus” for short hereinafter) 4.
According to another aspect of the embodiment, the embedded memory system 1 includes an arbiter 18 that arbitrates among the main interface 10, the auxiliary interface 16, the primary memory 12, and the secondary memory 14. Accordingly, the electronic system 2 may access either the primary memory 12 or the secondary memory 14 via either the main interface 10 (and the main bus 3) or the auxiliary interface 16 (and the auxiliary bus 4). On the other hand, the embedded memory system 1, such as a memory controller (not shown) may access the system memory 24 via either the main interface 10 (and the main bus 3) or the auxiliary interface 16 (and the auxiliary bus 4).
According to the architecture of the embodiment, the memory resources, i.e., the primary memory 12, the secondary memory 14, and the system memory 24 may be efficiently shared between the embedded memory system 1 and the electronic system 2. In order to prevent some precious or protected memory area of the memory resources from being intruded or resulted in abnormal operation, the arbiter 18 may limit access range of the memory resource through the auxiliary bus 4.
In the embodiment, the main bus 3 is compliant with a non-proprietary protocol (being either public-domain or licensed protocol) such as eMMC, while the auxiliary bus 4 is a proprietary protocol that may be designed in accordance with specific application. In the embodiment, the auxiliary bus 4 is configured to carry address signals, data signals, and command signals. The formats of the address signals and the data signals may be similar to or the same as those of conventional protocols. In the embodiment, the electronic system 2 and the embedded memory system 1 establish a communication session in a handshaking manner via the command signals. The command signals of the embodiment include a request signal (issued from a host or master) and an acknowledge signal (issued from a slave). It is noted that one of the electronic system 2 and the embedded memory system 1 may act as the host, and the other of the electronic system 2 and the embedded memory system 1 may act as the slave.
According to the elementary signaling patterns as illustrated above, the memory sharing between the embedded memory system 1 and the electronic system 2 may be effectively achieved without complicated circuitry. Although the request signal req and the acknowledge signal ack are utilized in the embodiment to end the data transfer, it is appreciated by those skilled in the pertinent art that the data transfer ending may be accomplished via an individual terminating signal instead.
Specifically, in step 31, it is determined which one of the embedded memory system 1 and the electronic system 2 will act as the host and the other as the slave. In the embodiment, the electronic system 2 determines the host/slave via the main bus 3. Take eMMC for example, the electronic system 2 determines the host/slave via eMMC bus (i.e., the main bus 3).
When the electronic system 2 acts as the host, in step 32A, the electronic system 2 requests the arbiter 18 to share the secondary memory 14 or the primary memory 12 by issuing the asserted request signal req (time a in
Subsequently, in step 33A, the host (i.e., the electronic system 2) may end the data transfer by de-asserting the request signal req (time c in
In a similar manner, when the embedded memory system 1 acts as the host, in step 32B, the embedded memory system 1 requests to share the system memory 24 via the arbiter 18 by issuing the asserted request signal req (time a in
Subsequently, in step 33B, the host (i.e., the embedded memory system 1) may end the data transfer by de-asserting the request signal req (time c in
Although specific embodiments have been illustrated and described, it will be appreciated by those skilled in the art that various modifications may be made without departing from the scope of the present invention, which is intended to be limited solely by the appended claims.