Virtual memory device
Technical field
The utility model is a kind of virtual memory device, and particularly the content in this virtual memory device is to specify true storage device by software switching and temporary user.
Background technology
The access architecture of present common single general-purpose universal serial bus mass storage, as shown in Figure 1.It comprises a USB host 10 and a USB (universal serial bus) mass storage 20; This USB host comprises a controller 11; This USB (universal serial bus) mass storage 20 comprises a universal serial bus device controller 21 and a storage device 22; This storage device 22 further comprises a Storage Media controller 221 and a Storage Media 222.
Wherein, the controller of this USB host electrically connects this universal serial bus device controller, this universal serial bus device controller electrically connects the Storage Media controller of this storage device, and the Storage Media controller of this storage device electrically connects the Storage Media of this storage device.After transmitting by this USB host and this universal serial bus device controller message, data through this Storage Media controller of this storage device and in the Storage Media of this storage device of access again.
Though the framework of this this USB (universal serial bus) mass storage of USB host access is very convenient; And this USB host is when desiring a plurality of this USB (universal serial bus) mass storage of access, as shown in Figure 2, it comprises a USB host 10, at least one universal serial bus concentrator 30 and a plurality of USB (universal serial bus) mass storage; This USB host comprises a controller; This USB (universal serial bus) mass storage comprises a universal serial bus device controller and a storage device; This storage device further comprises a Storage Media controller and a Storage Media.
Wherein, the controller of this USB host electrically connects this universal serial bus concentrator, this universal serial bus concentrator electrically connects respectively this universal serial bus device controller, respectively this universal serial bus device controller electrically connects the Storage Media controller of this corresponding storage device, and respectively the Storage Media controller of this storage device electrically connects the Storage Media of this corresponding storage device.By this USB host through this USB (universal serial bus) line concentration, after corresponding this universal serial bus device controller message is transmitted, again through to this Storage Media controller that should storage device and access to data in should the Storage Media of storage device.
Compared to the access architecture of above-mentioned single general-purpose universal serial bus mass storage, this universal serial bus concentrator is the assembly that increases newly with this universal serial bus device controller of part, and required on the whole assembly will improve more; Relatively, cost also improves much.
So the framework of access a plurality of USB (universal serial bus) mass storages, still have the space of improvement.
The utility model content
For overcoming the problems referred to above, the utility model is that a kind of virtual memory device is provided, and the content in this virtual memory device is switched by software and kept in the user and specify true storage device, reduces required on the whole assembly, to reduce cost.
In order to achieve the above object, the utility model virtual memory device, this virtual memory device is can deal with data and signal, and detects one and choose signal this is chosen signal pairing one true storage device and further comprises at least one universal serial bus device controller, a plurality of storage device, a processor and a virtual Storage Media with access.This universal serial bus device controller electrically connects a USB host.This storage device is true storage device and more comprises a Storage Media controller and a Storage Media that this Storage Media electrically connects this Storage Media controller.This processor electrically connects this universal serial bus device controller and this Storage Media controller, and detecting is specified this storage device corresponding to the signal of choosing of this storage device respectively to choose.This virtual Storage Media is specified this storage device temporal data for a contiguous memory space and the storage of being disposed in this virtual memory device, and electrically connects this processor.
Further, this Storage Media is calculating punch and memory card, universal serial bus (USB) hard disk or the carry-on dish of universal serial bus (Pen Drive); This virtual Storage Media is a volatile memory.
Virtual memory device of the present utility model, except that above-mentioned formation and effect are arranged, its control be by this processor receive this storage device corresponding one signal of choosing of choosing assembly, the inner temporal data of this virtual Storage Media returns earlier deposits this storage device of choosing to the last time; Then, this processor transmits a cancellation and links signal to this USB host, and then, up-to-date this storage device Data Update of choosing is to this virtual Storage Media, and this processor rebulids this virtual memory device and this USB host links; At last, this USB host is through these virtual Storage Media data of this universal serial bus device controller access.
Description of drawings
The block scheme of the known access single general-purpose of Fig. 1 universal serial bus mass storage
The block scheme of a plurality of USB (universal serial bus) mass storages of the known access of Fig. 2
The block scheme of Fig. 3 the utility model embodiment
The synoptic diagram of data stream between Fig. 4 the utility model universal serial bus device controller and virtual Storage Media
The synoptic diagram of data stream between virtual Storage Media of Fig. 5 the utility model and storage device
Fig. 6 the utility model is chosen the control flow synoptic diagram of storage device
Embodiment
Now cooperate and graphic the utility model preferred embodiment is described in detail as follows.
As shown in Figure 3, it is the block scheme of the utility model embodiment.Comprising:
One USB host 10; One virtual memory device 40.
Wherein, this virtual memory device 40 further comprises at least one universal serial bus device controller 41, a plurality of storage device 42, a processor 44 and a virtual Storage Media 43.This storage device 42 is for true storage device and more comprise a Storage Media controller 421 and a Storage Media 422.
This universal serial bus device controller 41 electrically connects this USB host 10; This Storage Media 422 electrically connects this Storage Media controller 421; This processor 44 electrically connects this universal serial bus device controller 41, this Storage Media controller 421 and this virtual Storage Media 43.
This processor 44 can be detected corresponding to the signal of choosing of this storage device 42 respectively and specify this storage device 42 to choose, and should virtual Storage Media 43 contiguous memory spaces and temporary these storage device 42 data of appointment for being disposed in this virtual memory device 40.
As Fig. 4 and Fig. 5, it is respectively the synoptic diagram of data stream between the synoptic diagram of data stream between the utility model universal serial bus device controller and virtual Storage Media and virtual Storage Media and storage device.Comprising:
One USB host 10; At least one universal serial bus device controller 41; A plurality of storage devices 42; One processor 44; One virtual Storage Media 43.
Wherein, this USB host 10, this universal serial bus device controller 41, this storage device 42, this virtual Storage Media 43 and this processor 44, as mentioned above.
Required order between passing interface between this USB host 10 and this universal serial bus device controller 41.As shown in Figure 4, this USB host 10 transmits the order of reading of data block N numbering package to this universal serial bus device controller 41, this processor 44 is obtained the numbering of block N to read the block N data in this virtual Storage Media 43 from this universal serial bus device controller 41, comprise the order of block N data to this USB host 10 through transmitting from this universal serial bus device controller 41; Perhaps, this USB host 10 transmit store block N data order to this universal serial bus device controller 41, this processor 44 again scratch block N data to this virtual Storage Media 43.
As shown in Figure 5, this processor 44 reads all in this virtual Storage Media 43 or changed temporary block data (for example block A data~block Z data), to be stored to this storage device 42 corresponding block; Perhaps, this processor 44 reads the block (for example block A data~block Z data) in this storage device 42, with corresponding block in temporary extremely this virtual Storage Media 43.
As Fig. 6, it chooses the control flow synoptic diagram of storage device for the utility model.Wherein step is as follows: at first in step S10, this processor 44 receives the signal of choosing that 42 correspondences one of this storage device are chosen assembly 50; Then, these virtual Storage Media 43 inner temporal datas return deposits this storage device 42 of choosing to the last time, shown in step S20; Then, this processor 44 transmits a cancellation binding signal to this USB host 10, shown in step S30; Then, up-to-date these storage device 42 Data Update of choosing are to this virtual Storage Media 43, shown in step S40; Then, this processor 44 rebulids this virtual memory device 40 and links with this USB host 10, shown in step S50; At last, shown in step S60, this USB host 10 is through these virtual Storage Media 43 data of these universal serial bus device controller 41 accesses.
The above is specifying of a possible embodiments of the present utility model only, is not to be used for limiting the scope that the utility model is implemented.All equalizations of being done according to the utility model claim change and modify, and are all the utility model claim and contain, and also all belong to the utility model claim at the embodiment that does not change the utility model essence.