APPARATUS AND METHOD TO SHARE HOST SYSTEM RAM WITH MASS STORAGE MEMORY RAM

20230027240 · 2023-01-26

Assignee

Inventors

Cpc classification

International classification

Abstract

A method includes, in one non-limiting embodiment, sending a request from a mass memory storage device to a host device, the request being one to allocate memory in the host device; writing data from the mass memory storage device to allocated memory of the host device; and subsequently reading the data from the allocated memory to the mass memory storage device. The memory may be embodied as flash memory, and the data may be related to a file system stored in the flash memory. The method enables the mass memory storage device to extend its internal volatile RAM to include RAM of the host device, enabling the internal RAM to be powered off while preserving data and context stored in the internal RAM.

Claims

1. A memory device comprising: a controller; a non-volatile flash memory; a first volatile random access memory that is readable and writable by the controller; and an interface for connecting the memory device to a host device, wherein the host device is separate from the memory device, the controller operable to: receive, from the host device and via the interface, an indication of an allocation of a second volatile random access memory, wherein the second volatile random access memory is associated with the host device; and extend, based at least in part on the indication, accessible volatile random access memory of the memory device to include the second volatile random access memory, wherein the controller is configured to read or store data in any of the non-volatile flash memory, the first volatile random access memory, or the second volatile random access memory.

2. The memory device of claim 1, wherein the controller is further operable to: receive the indication of the allocation during an initialization of the memory device.

3. The memory device of claim 1, wherein the controller is further operable to: determine, based at least in part on the indication of the allocation, that the allocation has been made.

4. The memory device of claim 1, wherein the controller is further operable to: utilize data from the second volatile random access memory during a re-initialization of the memory device after a power down state.

5. The memory device of claim 1, wherein the controller is further operable to: receive, from the host device, a shutdown command; store, responsive to the shutdown command, data in the second volatile random access memory; and send, to the host device responsive to storing the data in the second volatile random access memory, a shutdown OK indication.

6. The memory device of claim 1, wherein the controller is further operable to: store, in the second volatile random access memory, data that includes a Logical-to-Physical mapping table.

7. The memory device of claim 1, wherein an address location and a size of the second volatile random access memory is static.

8. The memory device of claim 1, wherein the controller is further operable to: receive, from the host device, a pointer associated with the allocation of the second volatile random access memory.

9. The memory device of claim 1, wherein the first volatile random access memory comprises static random access memory and the second volatile random access memory comprises dynamic random access memory.

10. The memory device of claim 1, wherein the controller is further operable to copy data between the first volatile random access memory and the second volatile random access memory and copy data between the second volatile random access memory and the non-volatile flash memory.

11. A method comprising: receiving, from a host device, via an interface, and by a memory device including a controller configured to read and write to a non-volatile flash memory and a first volatile random access memory, an indication of an allocation of a second volatile random access memory, wherein the second volatile random access memory is associated with the host device; and extending, by the controller and based at least in part on the indication, accessible random access memory of the memory device to include the second volatile random access memory, wherein the controller is configured to read or store data in any of the non-volatile flash memory, the first volatile random access memory, or the second volatile random access memory.

12. The method of claim 11, further comprising: receiving the indication of the allocation during an initialization of the memory device.

13. The method of claim 11, further comprising: determining, based at least in part on the indication of the allocation, that the allocation has been made.

14. The method of claim 11, further comprising: utilizing data from the second volatile random access memory during a re-initialization of the memory device after a power down state.

15. The method of claim 11, further comprising: receiving, by the controller and from the host device, a shutdown command; storing, by the controller and responsive to the shutdown command, data in the second volatile random access memory; and sending, by the controller and to the host device responsive to storing the data in the second volatile random access memory, a shutdown OK indication.

16. The method of claim 11, further comprising: store, in the second volatile random access memory, data that includes a Logical-to-Physical mapping table.

17. A host device comprising: an interface to connect the host device to a memory device separate from the host device; a host volatile random access memory; and one or more processors that are operable to: allocate, based at least in part on detecting the memory device, a portion of the host volatile random access memory for use by the memory device, such that the portion of the host volatile random access memory is accessible by the memory device; generate a message indicating an allocation of the portion of the host volatile random access memory for use by the memory device; and send the message to the memory device.

18. The host device of claim 17, wherein an address location and a size of the portion of the host volatile random access memory is static.

19. The host device of claim 17, wherein the message includes a pointer associated with the portion of the host volatile random access memory that is allocated for use by the memory device.

20. The host device of claim 17, wherein the one or more processors are further operable to: send, to the host device, a shutdown command; and receive, from the memory device and responsive to the shutdown command, a shutdown OK indication.

Description

BRIEF DESCRIPTION OF THE DRAWINGS

[0024] In the attached Drawing Figures:

[0025] FIG. 1A reproduces FIG. 2 from JEDEC Standard, Embedded MultiMediaCard (eMMC) Product Standard, High Capacity, JESD84-A42, June 2007, JEDEC Solid State Technology Association, and shows a functional block diagram of an eMMC.

[0026] FIG. 1B reproduces FIG. 1 of Lin et al., and shows an example of an overall block diagram of a NAND flash controller architecture for a SD/MMC card.

[0027] FIG. 2 is a simplified block diagram of a host device connected with a mass storage memory device, and is helpful in describing the exemplary embodiments of this invention.

[0028] FIG. 3 is a signal/message flow diagram that describes an exemplary embodiment of this invention for the mass storage memory device of FIG. 2 to allocate, use and de-allocate RAM of the host device.

[0029] FIG. 4 is a signal/message flow diagram that describes another exemplary embodiment of this invention, where the mass storage memory device of FIG. 2 has a built-in file system.

[0030] FIG. 5 shows a block diagram of one exemplary embodiment of the host device when embodied as a wireless communication device.

[0031] FIG. 6 is a logic flow diagram that illustrates the operation of a method, and a result of execution of computer program instructions embodied on a computer readable memory, in accordance with the exemplary embodiments of this invention.

[0032] FIG. 7 is a logic flow diagram that illustrates the operation of a method, and a result of execution of computer program instructions embodied on a computer readable memory, further in accordance with the exemplary embodiments of this invention.

DETAILED DESCRIPTION

[0033] At present, most mass storage memories provide LBA-based access, e.g., eMMC and different types of external memory cards such as SD. However, it may also be the case that the entire file system (FS) SW is embedded in the mass storage memory device.

[0034] When a mass storage memory is used in a high volume consumer device, such as a mobile wireless communication device, one important consideration is cost, and one factor affecting the cost is the amount of RAM in the mass storage memory device itself.

[0035] Another important consideration is performance. The overall performance depends on many factors. For example, for lengthy (time consuming) operations (in particular if the mass storage memory device contains an entire file system SW) there would be an advantage to include a substantial amount of RAM in the mass storage memory device. However, this can have a negative impact on the cost.

[0036] It may be the case that system context (metadata) would be stored in the flash memory of the mass storage memory device. However, this approach has several associated disadvantages. For example, repeatedly writing the system context (metadata) to the mass storage memory device raises wearing issues that can impact the usable life of the mass storage memory device. Also, writing data to the flash memory can be a relatively slow process.

[0037] Another important consideration is the power efficiency. To provide good power efficiency the mass storage memories are preferably shutdown (powered-off) when not needed (meaning also that the internal RAM of the device is preferably shutdown as well). However, and assuming that the RAM is volatile in nature, then whatever data is stored in the RAM is lost when the power is removed from the RAM. To then perform re-initialization after power-up all needed information (e.g., logical-to-physical mapping information and/or file system structures) need to be restored. A full re-initialization of a LBA mass storage memory may require a substantial (and user-noticeable) amount of time (e.g., up to one second with an SD card), and entire file system initialization (if the file system is resident in the mass storage memory) may take even longer. Therefore, it is desirable to retain internal device context over the power-off/power-on cycle.

[0038] Before further describing the exemplary embodiments of this invention, reference is made to FIG. 2 which shows is a simplified block diagram of a host system or device 10 connected with a mass storage memory 20 via a mass storage memory bus (MSMB) 18. The MSMB 18 may be compatible with any suitable mass memory interface standard such as MMC or UFS, as two non-limiting examples. The MSMB 18 may include signal lines such as those shown in FIG. 1A for an eMMC embodiment. The host device 10 includes at least one controller, such as a CPU 12 that operates in accordance with stored program instructions. The program instructions may be stored in a RAM 14 or in another memory or memories. The CPU 12 is connected with the RAM 14 and a MSMB interface (I/F) 16 via at least one internal bus 17. The MSMB interface 16 may include a memory controller (MC), or may be coupled with a MC unit associated with the CPU 12. The host device 10 may be a computer, a cellular phone, a digital camera, a gaming device or a PDA, as several non-limiting examples. Note that the RAM 14 may be any read/write memory or memory device, such as semiconductor memory or a disk-based memory.

[0039] The mass storage memory 20 includes a microcontroller or, more simply, a controller 22 that is connected via at least one internal bus 27 with a volatile RAM 24, a non-volatile mass memory 26 (e.g., a multi-gigabyte flash memory mass storage) and a MSMB interface (I/F) 28. The controller 22 operates in accordance with stored program instructions. The program instructions may be stored in the RAM 24 or in a ROM or in the mass memory 26. The mass storage memory 20 may be embodied as an MMC, eMMC or a SD device, as non-limiting examples, and may be external to (plugged into) the host device 10 or installed within the host device 10. Note that the mass memory 26 may, in some embodiments, store a file system (FS) 26A. In this case then the RAM 24 may store FS-related metadata 24A, such as one or more data structures comprised of bit maps, file allocation table data and/or other FS-associated information.

[0040] The exemplary embodiments of this invention provide a technique to share the RAM 14 of the host device 10 with the mass storage memory device 20. It may be assumed that the host device 10 (e.g., a mobile computer, a cellular phone, a digital camera, a gaming device, a PDA, etc.) has the capability to allocate and de-allocate the RAM 14. As will be discussed in further detail below, the allocation of the RAM 14 may be performed dynamically or it may be performed statically. The allocation of a portion of the RAM may be performed in response to a request received at the host device 10, or at the initiative of the host device 10.

[0041] In the exemplary embodiments of this invention the RAM 14 allocation is provided for the mass storage memory 20 (connected via the MSMB 18 to the host CPU 12), if the mass storage memory 20 has a need to extend its own RAM 24 space and/or if the mass storage memory 20 has a need for non-volatile RAM (the contents of which are not lost when the mass storage memory 20 is powered-off). It is also within the scope of the exemplary embodiments of this invention for the mass storage memory 20 to read and/or write (R/W) allocated RAM 14 in the host device 10. The allocation/de-allocation and R/W access methods may be implemented by extensions to a command set used to communicate with the mass storage memory 20 via an applicable mass storage memory protocol.

[0042] In accordance with certain exemplary embodiments of this invention the mass storage memory device 20 is provided with a mechanism to interrupt/send a message to host device 10 to initiate an allocation of space in the RAM 14. The interrupt/message is sent over the MSMB 18, and may be considered as an extension to current command sets. Referring to FIG. 3, an allocate memory command is sent during operation 3-1. If the allocation request succeeds (indicated during operation 3-2) the controller 22 is enabled to extend its own RAM 24 with the RAM 14 of the host device 10. The mass storage memory device 20 may store, for example, large tables into the RAM 14 using a RAM WRITE command (a newly specified command), or it may fetch data from the host device RAM 14 using a RAM READ command (another newly specified command). The read or write operation is shown as interleaved operations 3-3, 3-4, 3-5, 3-6, . . . , 3-(N−1), 3-N. When the mass storage memory device 20 completes the operation with the RAM 14 it may free the host device RAM 14 using another newly specified command that requests that the host 10 RAM memory be de-allocated (operation 3-(N+1)).

[0043] FIG. 4 illustrates a further exemplary embodiment that utilizes the host system RAM 14 for the mass storage memory 26 having a built-in file system, such as the FS 26A shown in FIG. 2. First the host system 10 sends a SHUTDOWN command to the mass storage memory device 20 (operation 4-1). Next the mass storage memory device 20 allocates RAM 14 from the host 10 and then loads (stores using a RAM WRITE command) all vital ‘static’ file system-related data (meta-data 24A) into host RAM 14 (operation 4-2). ‘Static’ data in this context may be, for example, various bitmaps, such as an allocation bitmap in the exFAT or ext3 file systems. This data may be processed (e.g., at least one of sorted, arranged and filtered) by the CPU 12 (controller) of the host device, and may include data from a large number of sectors in the mass storage memory 26. Mass memory storage device 20 may then send a shutdown OK indication (operation 4-3). The host 10 can remove power from the mass memory storage device 20, and the device 20 may be physically removed from the MSMB 18. Re-initialization (operations 4-4, 4-5, 4-6) of the mass storage memory device 20 is performed when host device 10 needs to get/put certain data from or into the mass storage memory device 20. Re-initialization of the mass storage memory 26 (and the file system 26A) may be sped up by using the sorted/arranged/filtered read data from the RAM 14. When the re-initialization operation is completed the mass storage memory device 20 may de-allocate the used RAM 14 in the host device 10, or the RAM 14 may not be de-allocated thereby reserving the RAM space for future use by the mass storage memory device 20.

[0044] It should be noted that in other exemplary embodiments of this invention the allocation of host RAM 14 may occur differently. For example, the host device 10 may allocate RAM 14 dynamically and pass a ‘pointer’ to the allocated RAM to the mass storage memory device 20. It is then up to the controller 22 of the mass storage memory device 20 how to utilize the allocated host RAM 14. Note that in this embodiment an explicit allocation request from the mass storage memory device 20 may not be sent to the host device 10. Instead, the host device 10 may on its own initiative allocate a portion of the RAM 14, such as when it first detects the presence of the mass memory storage device 20. Of course, subsequent signaling between the mass storage memory device 20 and the host device 10 may be used to change the size of the allocated RAM 14 if the initial allocation is not sufficient for the needs of the controller 22. As another example of RAM 14 allocation, a portion of the RAM 14 may be allocated by the host 10 in a static manner, and the mass storage memory device 20 then simply uses the same portion of the RAM 14 each time it needs to extend the RAM 24. In this case the mass storage memory device 20 may already have knowledge of the location/size of the allocated RAM 14, and a pointer is not needed to be sent from the host device 10.

[0045] Note that while it may typically be the case that the mass storage memory device 20 will receive an allocation of host memory to store contents of the volatile RAM 24, in general the allocation may be for storing data for any read/write memory contained within the mass storage memory device 20.

[0046] FIG. 5 illustrates one non-limiting embodiment of the host device 10 used with the mass storage memory device 20, referred to in FIG. 5 simply as a memory card. In this exemplary embodiment the host device is embodied as a user equipment (UE), shown in both plan view (left) and sectional view (right). In FIG. 5 the UE 10 has a graphical display interface 120 and a user interface 122 illustrated as a keypad but understood as also encompassing touch screen technology at the graphical display interface 120 and voice recognition technology received at the microphone 124. A power actuator 126 controls the device being turned on and off by the user. The exemplary UE 10 may have a camera 128 which is shown as being forward facing (e.g., for video calls) but may alternatively or additionally be rearward facing (e.g., for capturing images and video for local storage). The camera 128 is controlled by a shutter actuator 30 and optionally by a zoom actuator which may alternatively function as a volume adjustment for the speaker(s) 34 when the camera 128 is not in an active mode.

[0047] Within the sectional view of FIG. 5 are seen multiple transmit/receive antennas 36 that are typically used for cellular communication. The antennas 36 may be multi-band for use with other radios in the UE. The operable ground plane for the antennas 36 is shown by shading as spanning the entire space enclosed by the UE housing though in some embodiments the ground plane may be limited to a smaller area, such as disposed on a printed wiring board on which the power chip 38 is formed. The power chip 38 controls power amplification on the channels being transmitted and/or across the antennas that transmit simultaneously where spatial diversity is used, and amplifies the received signals. The power chip 38 outputs the amplified received signal to a radio frequency (RF) chip 40 which demodulates and downconverts the signal for baseband processing. A baseband (BB) chip 42 detects the signal which is then converted to a bit stream and finally decoded. Similar processing occurs in reverse for signals generated in the host device 10 and transmitted from it.

[0048] Signals going to and from the camera 128 may pass through an image/video processor 44 that encodes and decodes the various image frames. A separate audio processor 46 may also be present controlling signals to and from the speakers 34 and the microphone 124. The graphical display interface 120 is refreshed from a frame memory 48 as controlled by a user interface chip 50 which may process signals to and from the display interface 20 and/or additionally process user inputs from the keypad 22 and elsewhere.

[0049] Certain embodiments of the UE 10 may also include one or more secondary radios such as a wireless local area network radio WLAN 37 and a Bluetooth7 radio 39, which may incorporate an antenna on the chip or be coupled to an antenna off the chip. Throughout the apparatus are various memories such as random access memory RAM 43, read only memory ROM 45, and in some embodiments removable memory such as the illustrated memory card 20 on which various programs 10C may be stored. All of these components within the UE 10 are normally powered by a portable power supply such as a battery 49.

[0050] The processors 38, 40, 42, 44, 46, 50, if embodied as separate entities in a UE 10, may operate in a slave relationship to the main processor (CPU) 12, which may then be in a master relationship to them. Certain embodiments may be disposed across various chips and memories as shown, or disposed within another processor that combines some of the functions described above for FIG. 5. Any or all of these various processors of FIG. 5 access one or more of the various memories, which may be on chip with the processor or separate from the chip with the processor. Note that the various integrated circuits (e.g., chips 38, 40, 42, etc.) that were described above may be combined into a fewer number than described and, in a most compact case, may all be embodied physically within a single chip.

[0051] In this exemplary embodiment the CPU 12 of the UE 10 (the host device) operates with the memory card 20 (the mass storage memory device) as described above with respect to FIGS. 3 and 4 so that the RAM 24 of the memory card 20 may be extended to use the RAM 14 of the UE 10.

[0052] There are a number of technical effects that may be realized by the use of the exemplary embodiments of the invention. For example, there is provided a cost efficient way to extend RAM in the mass storage memory device 20. Further by example, the mass storage memory device 20 may be powered off, while retaining mass storage memory device information on the RAM 14 of the host system.

[0053] Based on the foregoing it should be apparent that the exemplary embodiments of this invention provide a method, apparatus and computer program(s) to extend the RAM of a mass storage memory device to include the RAM of an attached host device.

[0054] FIG. 6 is a logic flow diagram that illustrates the operation of a method, and a result of execution of computer program instructions, in accordance with the exemplary embodiments of this invention. In accordance with these exemplary embodiments a method performs, at Block 6A, in response to an allocation of read/write memory in a host device for use by a mass memory storage device, writing data from the mass memory storage device to the allocated read/write memory of the host device. At Block 6B there is an operation of subsequently reading the data from the allocated memory to the mass memory storage device.

[0055] FIG. 7 is a logic flow diagram that illustrates the operation of a method, and a result of execution of computer program instructions, in accordance with the exemplary embodiments of this invention. In accordance with these exemplary embodiments a method performs, at Block 7A, an operation of allocating read/write memory in a host device for use by a mass memory storage device. At Block 7B there is an operation of receiving data from the mass memory storage device and writing the received data into the allocated read/write memory of the host device. At Block 7C there is an operation of subsequently sending the data from the allocated memory to the mass memory storage device.

[0056] The various blocks shown in FIGS. 6 and 7 may be viewed as method steps, and/or as operations that result from operation of computer program code, and/or as a plurality of coupled logic circuit elements constructed to carry out the associated function(s).

[0057] In general, the various exemplary embodiments may be implemented in hardware or special purpose circuits, software, logic or any combination thereof. For example, some aspects may be implemented in hardware, while other aspects may be implemented in firmware or software which may be executed by a controller, microprocessor or other computing device, although the invention is not limited thereto. While various aspects of the exemplary embodiments of this invention may be illustrated and described as block diagrams, flow charts, or using some other pictorial representation, it is well understood that these blocks, apparatus, systems, techniques or methods described herein may be implemented in, as non-limiting examples, hardware, software, firmware, special purpose circuits or logic, general purpose hardware or controller or other computing devices, or some combination thereof.

[0058] It should thus be appreciated that at least some aspects of the exemplary embodiments of the inventions may be practiced in various components such as integrated circuit chips and modules, and that the exemplary embodiments of this invention may be realized in an apparatus that is embodied as an integrated circuit. The integrated circuit, or circuits, may comprise circuitry (as well as possibly firmware) for embodying at least one or more of a data processor or data processors, a digital signal processor or processors, baseband circuitry and radio frequency circuitry that are configurable so as to operate in accordance with the exemplary embodiments of this invention.

[0059] Various modifications and adaptations to the foregoing exemplary embodiments of this invention may become apparent to those skilled in the relevant arts in view of the foregoing description, when read in conjunction with the accompanying drawings. However, any and all modifications will still fall within the scope of the non-limiting and exemplary embodiments of this invention.

[0060] It should be noted that the terms “connected,” “coupled,” or any variant thereof, mean any connection or coupling, either direct or indirect, between two or more elements, and may encompass the presence of one or more intermediate elements between two elements that are “connected” or “coupled” together. The coupling or connection between the elements can be physical, logical, or a combination thereof. As employed herein two elements may be considered to be “connected” or “coupled” together by the use of one or more wires, cables and/or printed electrical connections, as well as by the use of electromagnetic energy, such as electromagnetic energy having wavelengths in the radio frequency region, the microwave region and the optical (both visible and invisible) region, as several non-limiting and non-exhaustive examples.

[0061] Furthermore, some of the features of the various non-limiting and exemplary embodiments of this invention may be used to advantage without the corresponding use of other features. As such, the foregoing description should be considered as merely illustrative of the principles, teachings and exemplary embodiments of this invention, and not in limitation thereof.