Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that is obtained under the creative work prerequisite.
As shown in Figure 1, the embodiment of the invention provides a kind of date storage method, is applied to comprise in the solid state hard disc:
S101 stores the management information data of solid state hard disc among the FRAM into;
In the present embodiment, FRAM is connected with the control module of solid state hard disc by SPI/I2C bus or outside Memory, as the cache module of solid state hard disc.
The management information data of solid state hard disc self is drawn together the global variable information that is used to control hard disk work, the flag information of hard disk, mapping table lastest imformation, and the maintenance management information of some hard disks.Some management data be when dispatching from the factory initialization, dispose down as global variable information, some is collected in the hard disk operational process, or main frame issues, as the maintenance management information of mapping table lastest imformation and hard disk.
Solid state hard disc all needs to read these hard disk management information datas of self in each work, so need a storage medium to store these management information data fast and reliably.
These hard disk management information datas can be saved in the reserved area in the solid-state storage unit of solid state hard disc, but because solid state hard disc adopts storage mediums such as Flash, SDRAM as the solid-state storage unit more, though and Flash is non-volatile storage medium, the data of storing when power down can not lost, but what the speed of reading of data will be slow with respect to FRAM from media such as Flash is many; And SDRAM is the storage medium of volatibility, and data are lost easily when power down.
So solid state hard disc is when each the startup, all the management information data of solid state hard disc to be stored among the FRAM, solid state hard disc just directly reads these hard disk management information datas from FRAM in each work like this, because the characteristic of FRAM, so both can improve reading speed, management information data can not lost again after the power down.What certainly can understand is also the management information data of solid state hard disc can be stored among the FRAM in advance in another embodiment.
S102 will resolve from the user data that outer computer sends, and obtain the user storage data that can be used for storing;
User data generally comprises, some documents, program that the user handles, perhaps information such as some pictures, audio frequency or video, these data generally have the certain protocol form, as SATA (Serial AdvancedTechnology Attachment, Serial Advanced Technology Attachment) protocol format, SCSI (Small ComputerSystem Interface, small computer system interface) protocol format or SAS (Serial AttachedSCSI, Serial Attached SCSI (SAS)) protocol format etc.So just need resolve, obtain the user storage data that can be used to store the data of these specific protocol forms.
S103, the user storage data that storing and resolving obtains;
To user data resolve obtain user storage data after, need store these user storage data.
And because solid state hard disc user in work need read the user data of oneself, so in one embodiment, in solid state hard disc work, these user storage data are stored among the FRAM, can improve the speed that the user reads these user storage data, and when powered-off fault, user storage data can not lost again.
These user storage data can be stored among the FRAM always in one embodiment, because FRAM is non-volatile storage medium, user storage data can not lost in the time of power down, it is fast many that its reading speed is wanted with respect to Flash, these user storage data that parsing is obtained are saved among the FRAM, reading speed when not only can the drawings family these user storage data being conducted interviews can improve the reliability of these user storage data storages again.
And in another embodiment, consider the FRAM finite capacity, can when solid state hard disc is idle, these user storage data transfers be stored in the memory module of solid state hard disc, so that the space among the FRAM can be cleared, leave next time for and need store into the user data among the FRAM.
What certainly can understand is, also FRAM can be replaced with non-volatile RAM such as MRAM (Magnetoresistive Random Access Memory, magnetoresistive RAM), EEPROM (Electrically Erasable Programmable Read-Only Memory) or phase transformation RAM in another embodiment.
The embodiment of the invention is passed through the cache module of FRAM as solid state hard disc; with the management information data of solid state hard disc and storage of subscriber data in FRAM; when the solid state hard disc power down, can reduce losing of data; improve the reliability of solid state hard disc; and the FRAM occupation space is much smaller with respect to the solid state hard disc holding circuit; and toggle speed to have a solid state hard disc of hard disk protection circuit also very fast relatively, can reduce the power consumption of solid state hard disc, prolong the life-span of solid state hard disc.
As shown in Figure 2, the embodiment of the invention provides a kind of date storage method, is applied to comprise in the solid state hard disc:
S201 stores the management information data of solid state hard disc among the FRAM into;
FRAM is connected with the control module of solid state hard disc by SPI/I2C bus or outside Memory, as the management information data cache module of solid state hard disc.
The management information data of solid state hard disc self is drawn together the global variable information that is used to control hard disk work, the flag information of hard disk, mapping table lastest imformation, and the maintenance management information of some hard disks.Some management data be when dispatching from the factory initialization, dispose down as global variable information, some is collected in the hard disk operational process, or main frame issues, as the maintenance management information of mapping table lastest imformation and hard disk.
Solid state hard disc all needs to read these hard disk management information datas of self in each work, so need a storage medium to store these management information data fast and reliably.
These hard disk management information datas can be saved in the reserved area in the solid-state storage unit of solid state hard disc, but because solid state hard disc adopts storage mediums such as Flash, SDRAM as the solid-state storage unit more, though and Flash is non-volatile storage medium, the data of storing when power down can not lost, but what the speed of reading of data will be slow with respect to FRAM from media such as Flash is many; And SDRAM is the storage medium of volatibility, and data are lost easily when power down, so the hard disk management information data that these hard disks all will be read in each work is stored among the FRAM, both can improve reading speed, can not lose again after the power down
S202 will resolve from the user data that outer computer sends, and obtain the user storage data that can be used for storing;
User data generally comprises, some documents, program that the user handles, perhaps information such as some pictures, audio frequency or video.These data generally have the certain protocol form, as the SATA protocol format, and SCSI protocol format or SAS protocol format etc.So just need resolve, obtain the user storage data that can be used to store the data of these specific protocol forms.
S203, the user storage data that parsing is obtained stores among the SDRAM;
SDRAM is connected with the control module of solid state hard disc by SPI/I2C bus or outside Memory, as the user storage data cache module of solid state hard disc.
Because the FRAM price is higher, when cost is relatively more responsive, user storage data can be stored among the SDRAM.It is fast many that the reading speed of SDRAM is wanted with respect to Flash, and these user storage data that parsing is obtained are saved among the SDRAM, can improve the reading speed of user when these user storage data are conducted interviews.
And in another embodiment, consider the volatibility of sdram size finite sum SDRAM, be that the data among the SDRAM can be lost after the power down, can be when solid state hard disc be idle, these user storage data transfers are stored in the memory module of solid state hard disc, and the memory module of solid state hard disc comprises at least one non-volatile storage medium.So just the space among the SDRAM can be cleared, leave next time for and need store into the user data among the SDRAM, and can reduce loss of user data.
What certainly can understand is, also FRAM can be replaced with non-volatile RAM such as MRAM (Magnetoresistive Random Access Memory, magnetoresistive RAM), EEPROM (Electrically Erasable Programmable Read-Only Memory) or phase transformation RAM in another embodiment.
The embodiment of the invention is passed through the cache module of FRAM as solid state hard disc; the management information data of solid state hard disc is stored among the FRAM; when the solid state hard disc power down, can reduce losing of data; improve the reliability of solid state hard disc; and the FRAM occupation space is much smaller with respect to the solid state hard disc holding circuit; and toggle speed to have a solid state hard disc of hard disk protection circuit also very fast relatively; FRAM can also be reduced the power consumption of solid state hard disc as cache module, prolong the life-span of solid state hard disc.Simultaneously some data that need often to handle of user are saved among the SDRAM, have improved the speed of user's reading of data.
As shown in Figure 3, the embodiment of the invention provides a kind of solid state hard disc, comprising:
Control module 210 is used to control whole solid state hard disc and carries out work, sends solid state hard disc management information data memory command;
The management information data of FRAM buffer memory solid state hard disc self is drawn together the global variable information that is used to control hard disk work, the flag information of hard disk, mapping table lastest imformation, and the maintenance management information of some hard disks.The management information data memory command is used for, assign the directive command that the management information data of hard disk is stored, and comprised the type of the hard disk management information data of needs storage, can be whole hard disk management information datas in one embodiment, also can be the hard disk management information data of part key in another embodiment, global variable information as previously mentioned, the crucial management information data such as flag information of mapping table lastest imformation and hard disk.
FRAM cache module 220 is used to receive the solid state hard disc management information data memory command of control module 210, according to the management information data memory command, and the management information data of storage solid state hard disc;
FRAM cache module 220 is connected with control module 2 10 by SPI/I2C bus or outside Memory.When FRAM cache module 220 receives the management information data memory command that control module 210 sends over, root is lifted the relevant informations such as directive command in the management information data memory command, and the management information data of hard disk is stored in the corresponding zone of FRAM cache module 220.
Need to prove that here the management information data of solid state hard disc self is drawn together the global variable information that is used to control hard disk work, the flag information of hard disk, the mapping table lastest imformation, and the maintenance management information of some hard disks etc.Solid state hard disc all needs to read these hard disk management information datas of self in each work, so need a storage medium to store these management information data fast and reliably.
These hard disk management information datas can be saved in the reserved area in the solid-state storage unit of solid state hard disc, but because solid state hard disc adopts storage mediums such as Flash, SDRAM as the solid-state storage unit more, though and Flash is non-volatile storage medium, the data of storing when power down can not lost, but what the speed of reading of data will be slow with respect to FRAM cache module 210 from media such as Flash is many; And SDRAM is the storage medium of volatibility, and data are lost easily when power down, so the hard disk management information data that these hard disks all will be read in each work is stored in the FRAM cache module 210, both can improve reading speed, can not lose again after the power down.
Interface module 230 is used for the user data with specific protocol form that outer computer sends is resolved, and obtains the user storage data that is used to store;
User data generally comprises, some documents, program that the user handles, perhaps information such as some pictures, audio frequency or video.These data generally have the certain protocol form when computing machine sends solid state hard disc to, as the SATA protocol format, and SCSI protocol format or SAS protocol format etc.So just need resolve, obtain the user storage data that can be used to store the data of these specific protocol forms.According to data certain protocol form, interface module 230 can be SATA interface module, scsi interface module or SAS interface module etc. accordingly.
Memory module 240 is used for docking port module 230 and resolves the user storage data that obtains and store;
Memory module 240 is resolved the user storage data that obtains according to interface module 230, selects corresponding data storage location docking port module 230 to resolve the user storage data that obtains and stores.
Here need to prove, memory module 240 comprises at least one non-volatile memory medium, said non-volatile memory medium can be Flash in one embodiment, can also be non-volatile storage mediums such as PRAM or PCRAM in another embodiment.
In the present embodiment, with the cache module of FRAM, the management information data of solid state hard disc is stored in the FRAM cache module 220 as solid state hard disc.When solid state hard disc starts behind powered-off fault once more, read management information data in the control module 210 direct FRAM cache modules 220, control module 210 is according to the management information data that reads, in the running environment when the control solid state hard disc returns to powered-off fault.Here because the global variable information that management information data is drawn together solid state hard disc, the attribute information of disc, and the maintenance management information of some solid state hard discs etc., control module 210 just can be according to these information that read, in the running environment when the control solid state hard disc returns to powered-off fault.
What the FRAM cache module 220 in the embodiment of the invention was stored is the management information data of solid state hard disc, also storage of subscriber data that can part is specific is in FRAM cache module 220, at this moment only need mark off a data buffer area in the internal storage space of FRAM cache module 220 and get final product, this data buffer area is used for the specific user data of storage area.Specifically:
Because solid state hard disc user in work need read the user data of oneself, so in one embodiment, in solid state hard disc work, these user storage data are stored in the FRAM cache module 220, can improve the speed that the user reads these user storage data like this, and when powered-off fault, user storage data can not lost again.
These user storage data can be stored in the FRAM cache module 220 always in one embodiment, because FRAM cache module 220 is non-volatile storage mediums, user storage data can not lost in the time of power down, it is fast many that its reading speed is wanted with respect to Flash, these user storage data that parsing is obtained are saved in the FRAM cache module 220, reading speed when not only can the drawings family these user storage data being conducted interviews can improve the reliability of these user storage data storages again.
And in another embodiment, consider FRAM cache module 220 finite capacities, can be when solid state hard disc be idle, under the control of control module 210, these user storage data transfers are stored in the memory module of solid state hard disc, so that the space in the FRAM cache module 220 can be cleared, leave next time for and need store into the user data in the FRAM cache module 220.
At solid state hard disc shown in Figure 3 FRAM during as its FRAM cache module 220, can be divided the internal storage space in the FRAM cache module 220.As shown in Figure 4, the embodiment of the invention provides a kind of FRAM cache module internal storage space structural representation, comprising:
Data buffer area 0 is used for the specific user data of storage area;
Initial configuration data field 1 is used to store global variable information, and global variable information is some operating strategy information, is used for solid state hard disc is managed;
Identify data field 2 is used for the storage disks attribute information, comprises the characteristic information of disc, the capacity information of disc etc.;
SMART (" Self-Monitoring, Analysis and Reporting Technology ", self-monitoring, analysis and reporting techniques) data field 3, be used to store the maintenance management information of hard disk, as the temperature of disc, the read-write number of times of disc, information such as the operation conditions of disc.
Shine upon list area 4, be used for the mapping relations table of store logical addresses and physical address;
All be physical address in the disc of solid state hard disc, and be logical addresses, so need a mapping table that both relations are mapped from the data that computing machine is come.
Firmware district 5 is used for storage control program, and control program is used for controlling whole disc and carries out work.
The embodiment of the invention is passed through the cache module of FRAM as solid state hard disc; the management information data of solid state hard disc is stored among the FRAM; when the solid state hard disc power down, can reduce losing of data; improve the reliability of solid state hard disc; and the FRAM occupation space is much smaller with respect to the solid state hard disc holding circuit; can reduce the power consumption of solid state hard disc, prolong the life-span of solid state hard disc.
As shown in Figure 5, a kind of solid state hard disc of providing of the embodiment of the invention can also comprise in another embodiment:
SDRAM cache module 250 is used to receive the user storage data memory command that control module 210 sends, and according to described data storage command, docking port module 230 is resolved the user storage data that obtains and stored;
The read or write speed of SDRAM cache module 250 relatively with memory module 240 will be fast many.
So in the embodiment of the invention, in solid state hard disc work, at the user data that 230 pairs of computing machines of interface module are sent, after resolving the user storage data that obtains, user storage data can be stored in the SDRAM cache module 250, in hard disk work, can improve the user like this to these data write speed; The hard disk free time, the user storage data that control module 210 will store among the SDRAM is again transferred in the memory module 240.
At solid state hard disc shown in Figure 5 FRAM during as its FRAM cache module 220, can be divided the internal storage space in the FRAM cache module 220.As shown in Figure 6, the embodiment of the invention provides a kind of FRAM cache module internal storage space structural representation, comprising:
Initial configuration data field 1 is used to store global variable information, and global variable information is some operating strategy information, is used for solid state hard disc is managed;
Identify data field 2 is used for the storage disks attribute information, comprises the characteristic information of disc, the capacity information of disc etc.;
SMART (" Self-Monitoring, Analysis and Reporting Technology ", self-monitoring, analysis and reporting techniques) data field 3, be used to store the maintenance management information of hard disk, as the temperature of disc, the read-write number of times of disc, information such as the operation conditions of disc.
Shine upon list area 4, be used for the mapping relations table of store logical addresses and physical address;
All be physical address in the disc of solid state hard disc, and be logical addresses, so need a mapping table that both relations are mapped from the data that computing machine is come.
Firmware district 5 is used for storage control program, and control program is used for controlling whole disc and carries out work.
What certainly can understand is, also FRAM can be replaced with non-volatile RAM such as MRAM (Magnetoresistive Random Access Memory, magnetoresistive RAM), EEPROM (Electrically Erasable Programmable Read-Only Memory) or phase transformation RAM in another embodiment.
The embodiment of the invention is passed through the cache module of FRAM as solid state hard disc; the management information data of solid state hard disc is stored among the FRAM; when the solid state hard disc power down, can reduce losing of data; improve the reliability of solid state hard disc; and the FRAM occupation space is much smaller with respect to the solid state hard disc holding circuit; and toggle speed to have a solid state hard disc of hard disk protection circuit also very fast relatively, FRAM can be reduced the power consumption of solid state hard disc as cache module, prolong the life-span of solid state hard disc.Simultaneously some data that need often to handle of user are saved among the SDRAM, have improved the speed of user's reading of data.
The above only is several embodiments of the present invention, and those skilled in the art can carry out various changes or modification to the present invention and do not break away from the spirit and scope of the present invention according to application documents are disclosed.