CN102455879B - Memory storage device, memory controller and method for automatically generating filled document - Google Patents

Memory storage device, memory controller and method for automatically generating filled document Download PDF

Info

Publication number
CN102455879B
CN102455879B CN201010527918.3A CN201010527918A CN102455879B CN 102455879 B CN102455879 B CN 102455879B CN 201010527918 A CN201010527918 A CN 201010527918A CN 102455879 B CN102455879 B CN 102455879B
Authority
CN
China
Prior art keywords
file
host computer
computer system
sector
memory
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201010527918.3A
Other languages
Chinese (zh)
Other versions
CN102455879A (en
Inventor
刘兴昌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Phison Electronics Corp
Original Assignee
Phison Electronics Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Phison Electronics Corp filed Critical Phison Electronics Corp
Priority to CN201010527918.3A priority Critical patent/CN102455879B/en
Publication of CN102455879A publication Critical patent/CN102455879A/en
Application granted granted Critical
Publication of CN102455879B publication Critical patent/CN102455879B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Abstract

A memory storage device, a memory controller and a method for automatically generating a filled document are disclosed. The method comprises the steps of configuring a plurality of logical addresses and grouping the logical addresses into a plurality of logical blocks to map the physical blocks of the memory chip of the memory storage device. The method also comprises the following steps of: after a host system is powered on, if determining that the logical addresses are formatted into a partition and no such a filled document in accordance with the predetermined document capacity exists, reading the document configuration table of the partition and the time of a root directory by means of the host system, and filling the data of the filled document in the document configuration table and the root directory, respectively, thereby automatically generating the filled document.

Description

Memory storage apparatus, Memory Controller and automatic generation are filled document method
Technical field
The present invention relates to a kind ofly produce the method for filling file, and be particularly related to and a kind ofly by memory storage apparatus, automatically produce and fill the method for file and memory storage apparatus and the Memory Controller thereof of implementation the method.
Background technology
For being connected to the host computer systems such as the mobile phone of memory storage or computing machine, in order to promote the efficiency of the data of read storage device, most likely adopt one to pre-read (pre-read) mechanism and first the data of part are read in the middle of the random access memory of host computer system.Once the random access memory of host computer system has the data that record certain address, in the future when host computer system need to read this address, just can be directly from random access memory reading out data.In other words, when the data that have the address of wanting to read in host computer system only are not also recorded in random access memory, host computer system just can go read storage device therefrom to obtain data.
Although the mechanism of pre-reading can promote the efficiency that data read, also can cause in some cases host computer system cannot obtain up-to-date data content.For example, after host computer system reads the data of a particular address and is recorded to random access memory, if host computer system has been upgraded data write storage device again the data content of this particular address, when host computer system will read this particular address next time, because random access memory records this particular address, therefore host computer system still can read random access memory but not memory storage, therefore can not obtain the data content after renewal.
In order to make host computer system all can read up-to-date data from memory storage at every turn, the practice of taking is at present to write a filling file by host computer system, and then utilizes this filling file to occupy random access memory and guarantee that host computer system can be from memory storage reading out data.Yet; by host computer system, write filling file and must expend the considerable time; in addition when memory storage need capture the address realm of this filling file; host computer system is also often can be because of the processing time of memory storage long and judge the action overtime of memory storage; even can therefore memory storage be removed or reset, increase on foot the inconvenience in many uses.
Summary of the invention
In view of this, the invention provides a kind of method that file is filled in automatic generation, can in response to different file system, produce fast and automatically jumbo filling file by memory storage apparatus.
The invention provides a kind of Memory Controller, the memory storage apparatus under making can produce jumbo filling file fast and automatically in response to different file system.
The invention provides a kind of memory storage apparatus, can produce fast and automatically jumbo filling file in response to different file system.
The present invention proposes a kind of method that file is filled in automatic generation, and for being coupled to the memory storage apparatus of host computer system, this memory storage apparatus comprises that memory chip and memory chip have a plurality of physical blocks.The method comprises above-mentioned physical blocks is at least grouped into data field, spare area and system region.Configure a plurality of logical addresses and above-mentioned logical address is grouped into a plurality of logical blocks with the physical blocks in mapping (enum) data district.When the power initiation of host computer system, if above-mentioned logical address is at least formatted as a cut section according to a file system, and cut section comprise disk cut apart start record, file configuration table and root directory, reading disk is cut apart start record and root directory, and then judges whether the filling file that meets default file capacity is present in memory chip.If filling file does not exist; when host computer system is wanted file reading allocation list; sector number corresponding to configuration default file capacity; from the predetermined sector of file configuration table, start a plurality of particular sector of delimiter hinge district number; to insert to above-mentioned particular sector about filling the login value of gathering together of file; and logical address corresponding to above-mentioned particular sector is being set as, after write protect state, file configuration table being sent to host computer system.And when host computer system is wanted to read root directory, the filling file header of filling file is inserted to the predetermined sector to root directory, and logical address corresponding to the predetermined sector of root directory is being set as after write protect state, root directory is sent to host computer system.
From another viewpoint, the present invention proposes a kind of Memory Controller, for a plurality of physical blocks of diode-capacitor storage memory storage one memory chip.This Memory Controller comprises host system interface, memory interface and memory management circuitry.Wherein, host system interface is in order to couple host computer system, and memory interface is in order to couple memory chip.And memory management circuitry is coupled to host system interface and memory interface, memory management circuitry is in order to be at least grouped into data field, spare area and system region by above-mentioned physical blocks.Configure a plurality of logical addresses and above-mentioned logical address is grouped into a plurality of logical blocks with the physical blocks in mapping (enum) data district.When the power initiation of host computer system, if above-mentioned logical address is according to a file system and be at least formatted as a cut section, and cut section comprise disk cut apart start record, file configuration table and root directory, memory management circuitry is more cut apart start record and root directory in order to reading disk, and whether the filling file that meets a default file capacity to judge is present in memory chip.If filling file does not exist; when memory management circuitry is wanted file reading allocation list in host computer system; sector number corresponding to configuration default file capacity; from the predetermined sector of file configuration table, start a plurality of particular sector of delimiter hinge district number; to insert to above-mentioned particular sector about filling the login value of gathering together of file; and logical address corresponding to above-mentioned particular sector is being set as, after write protect state, file configuration table being sent to host computer system.And when host computer system is wanted to read root directory; memory management circuitry is inserted the predetermined sector to root directory by the filling file header of filling file; and logical address corresponding to the predetermined sector of root directory is being set as, after write protect state, root directory being sent to host computer system.
From another viewpoint, the present invention proposes a kind of memory storage apparatus, comprises memory chip, connector and Memory Controller.Wherein, memory chip has a plurality of physical blocks.Connector is in order to couple a host computer system.Memory Controller is coupled to memory chip and connector, and Memory Controller is in order to be at least grouped into data field, spare area and system region by above-mentioned physical blocks.Configure a plurality of logical addresses and above-mentioned logical address is grouped into a plurality of logical blocks with the physical blocks in mapping (enum) data district.When the power initiation of host computer system, if above-mentioned logical address is according to a file system and be at least formatted as a cut section, and cut section comprise disk cut apart start record, file configuration table and root directory, Memory Controller reading disk is cut apart start record and root directory, and then judges whether the filling file that meets a default file capacity is present in memory chip.If filling file does not exist; when Memory Controller is wanted file reading allocation list in host computer system; sector number corresponding to configuration default file capacity; from the predetermined sector of file configuration table, start a plurality of particular sector of delimiter hinge district number; to insert to above-mentioned particular sector about filling the login value of gathering together of file; and logical address corresponding to above-mentioned particular sector is being set as, after write protect state, file configuration table being sent to host computer system.And when host computer system is wanted to read root directory; Memory Controller is inserted the predetermined sector to root directory by the filling file header of filling file; and logical address corresponding to the predetermined sector of root directory is being set as, after write protect state, root directory being sent to host computer system.
From another viewpoint, the present invention proposes a kind of memory storage apparatus, comprises memory chip, connector and Memory Controller.Wherein memory chip has a plurality of physical blocks.Connector is in order to couple host computer system.Memory Controller is coupled to memory chip and connector.Memory Controller is for the above-mentioned physical blocks of diode-capacitor storage chip.Wherein, Memory Controller is in order to above-mentioned physical blocks is at least grouped into data field, spare area and system region, and configures a plurality of logical addresses and above-mentioned logical address is grouped into a plurality of logical blocks with the physical blocks in mapping (enum) data district.When the power initiation of host computer system; Memory Controller is more in order to configure the corresponding data of the filling file of default file capacity to the file system that is stored in memory chip; and filling file is being set as after write protect state, the file configuration table of file system is sent to host computer system.Wherein, filling file is the cache space that occupies host computer system, so that host computer system is read desired data from memory chip.
Based on above-mentioned, the present invention is not affecting under the prerequisite of host system operation, by memory storage apparatus, automatically in response to different file system, produces jumbo filling file, thereby reduce, produces the large capacity filling spent time of file.Also just because of this filling file is produced by memory storage apparatus itself, memory storage apparatus energy fast fetching must be filled the memory address scope of file, and then promotes processing speed.
For above-mentioned feature and advantage of the present invention can be become apparent, special embodiment below, and coordinate accompanying drawing to be described in detail below.
Accompanying drawing explanation
Figure 1A is the schematic diagram of the host computer system of the use memory storage apparatus that one exemplary embodiment illustrates according to the present invention.
Figure 1B is the schematic diagram of exemplary embodiment illustrates according to the present invention computing machine, input/output device and memory storage apparatus.
Fig. 1 C is another exemplary embodiment illustrates according to the present invention host computer system and the schematic diagram of memory storage apparatus.
Fig. 2 is the summary calcspar that illustrates the memory storage apparatus shown in Figure 1A.
Fig. 3 is the summary calcspar of the Memory Controller that one exemplary embodiment illustrates according to the present invention.
Fig. 4, Fig. 5 are the example schematic of the diode-capacitor storage chip that one exemplary embodiment illustrates according to the present invention.
Fig. 6 is the example of the logical address with file system format memory chip that one exemplary embodiment illustrates according to the present invention.
Fig. 7 A, 7B are that the schematic diagram of the particular sector of file configuration table is filled up in the utilization that one exemplary embodiment illustrates according to the present invention about filling the login value of gathering together of file and at least one default file.
Fig. 8 A, 8B are that the filling file header of file and the schematic diagram that at least one default file header fills up first sector of root directory are filled in the utilization that one exemplary embodiment illustrates according to the present invention.
Fig. 9 is the process flow diagram of the method for the automatic generation filling file that one exemplary embodiment illustrates according to the present invention.
[main element symbol description]
1000: host computer system
1100: computing machine
1102: microprocessor
1104: random access memory
1106: input/output device
1108: system bus
1110: data transmission interface
1112: main storage means
1200: operating system
1202: mouse
1204: keyboard
1206: display
1208: printer
1212: Portable disk
1214: storage card
1216: solid state hard disc
1310: digital camera
1312:SD card
1314:MMC card
1316: memory stick
1318:CF card
1320: embedded memory storage
100: memory storage apparatus
102: connector
104: Memory Controller
106: memory chip
206 (0), 206 (1), 206 (D), 206 (D+1), 206 (D+2), 206 (N), 206 (N+1), 206 (N+2), 206 (S), 206 (S+1), 206 (S+2), 206 (K): physical blocks
1042: host interface
1046: memory management circuitry
1048: memory interface
2002: memory buffer
2004: Error-Correcting Circuit
2006: electric power management circuit
402: data field
404: spare area
406: system region
408: replace district
510 (0), 510 (1), 510 (L): logical blocks
600: cut section
602: main start magnetic region
604: cut apart start magnetic region
606: file configuration table district
608: directory area
610: file area
FATS (1), FATS (2), FATS (3), FATS (4), FATS (5), FATS (6), FATS (F), FATS (M), FATS (M+1), FATS (M+2), FATS (M+3), FATS (M+4), FATS (M+5), RDS (1): sector
S910~S990: each step of the method for file is filled in the automatic generation described in one example of the present invention embodiment
Embodiment
Figure 1A is the schematic diagram of the host computer system of the use memory storage apparatus that one exemplary embodiment illustrates according to the present invention.
Host computer system 1000 comprises computing machine 1100 and I/O (Input/Output, I/O) device 1106.Computing machine 1100 comprises microprocessor 1102, random access memory (Random Access Memory, RAM) 1104, system bus 1108, data transmission interface 1110 and main storage means 1112.Input/output device 1106 comprises mouse 1202, keyboard 1204, display 1206 and printer 1208 as shown in Figure 1B.It must be appreciated, the unrestricted input/output device 1106 of the device shown in Figure 1B, input/output device 1106 can also comprise other devices.
In exemplary embodiment of the present invention, memory storage apparatus 100 is to couple by data transmission interface 1110 and other elements of host computer system 1000.By microprocessor 1102, random access memory 1104, input/output device 1106 and the running that is arranged on the operating system 1200 in main storage means 1112, host computer system 1000 can write to data memory storage apparatus 100, or from memory storage apparatus 100 reading out data.For example, memory storage apparatus 100 can be storage card 1214, Portable disk 1212 or solid state hard disc (Solid State Drive, SSD) 1216 as shown in Figure 1B.
Generally speaking, host computer system 1000 is for storing any system of data.Although host computer system 1000 is to explain with computer system in this exemplary embodiment, yet, in another exemplary embodiment of the present invention, host computer system 1000 can be also the systems such as mobile phone, digital camera, video camera, communication device, reproducing apparatus for phonotape or video player.For example, when host computer system is digital camera 1310, memory storage apparatus is its secure digital using (Secure Digital, SD) card 1312, multimedia memory (Multimedia Card, MMC) card 1314, memory stick (Memory Stick) 1316, compact flash (Compact Flash, CF) card 1318 or embedded memory storage 1320 (as shown in Figure 1 C).Embedded memory storage 1320 comprises embedded multi-media card (Embedded MMC, eMMC).It is worth mentioning that, embedded multi-media card is to be directly coupled on the substrate of host computer system.
Fig. 2 is the calcspar that illustrates the memory storage apparatus 100 shown in Figure 1A.Please refer to Fig. 2, memory storage apparatus 100 comprises connector 102, Memory Controller 104 and memory chip 106.
Connector 102 is coupled to Memory Controller 104, and in order to couple host computer system 1000.In this exemplary embodiment, the transmission interface kind that connector 102 is supported is secure digital (Secure Digital, SD) interface.Yet in other exemplary embodiment, the transmission interface kind of connector 102 can be also multimedia storage card (Multimedia Card, MMC) interface, USB (universal serial bus) (Universal Serial Bus, USB) interface, advanced annex (the Serial Advanced Technology Attachment of serial, SATA) interface, parallel advanced annex (Parallel Advanced Technology Attachment, PATA) interface, Institute of Electrical and Electric Engineers (Institute of Electrical and Electronic Engineers, IEEE) 1394 interfaces, high-speed peripheral component connecting interface (Peripheral Component Interconnect Express, PCI Express) interface, memory stick (Memory Stick, MS) interface, compact flash (Compact Flash, CF) interface, or integration drives electronics (Integrated Drive Electronics, IDE) any applicable interface such as interface, at this, do not limited.
Memory Controller 104 can be carried out a plurality of logic locks or the steering order with example, in hardware or form of firmware implementation, and according to the instruction of host computer system 1000, in memory chip 106, carries out the runnings such as writing, read and wipe of data.In this exemplary embodiment, the efficiency that host computer system 1000 reads in order to promote data, can carry out one and pre-read (pre-read) mechanism and first the data of the part address of memory chip 106 are read in and in random access memory 1104, distribute to the cache space that the mechanism of pre-reading is used.For fear of 1000 of host computer systems, read the cache space of random access memory 1104 and fail to obtain data content up-to-date in memory chip 106, Memory Controller 104 is more special in to carry out the automatic generating routine of a filling file, to utilize this, fill the cache space that file occupies random access memory 1104, thereby guarantee that host computer system 1000 carries out while reading action each, can more positively read desired data from memory chip 106.And the automatic generating routine of the performed filling file of Memory Controller 104 will explain in rear cooperation accompanying drawing again.
Memory chip 106 is coupled to Memory Controller 104.Memory chip 106 is in order to store as file configuration table (File Allocation Table, FAT), disk is cut apart start record (Partition Boot Record, PBR) and the relevant information of the file system (file system) such as root directory (root directory), and in order to storage as general files such as word, image (video) or sound (audio) files.In this exemplary embodiment, memory chip 106 comprises a plurality of physical blocks (for example physical blocks 206 (0)~206 (K)), each physical blocks comprises respectively a plurality of physical addresss (being also referred to as physical page), and can independently write and wipe simultaneously corresponding to these physical pages of Same Physical block.In more detail, in this exemplary embodiment, physical blocks can be the least unit of wiping, that is, the memory cell being wiped free of in the lump that each physical blocks contains minimal amount.Physical page can be programmable minimum unit, that is the minimum unit of physical page while being data writing.
In this exemplary embodiment, memory chip 106 is duplicative nonvolatile memory.For instance, memory chip 106 is multilayer memory cell (Multi Level Cell, MLC) NAND flash memory chip, but the invention is not restricted to this, memory chip 106 can be also individual layer memory cell (Single Level Cell, SLC) NAND flash memory chip, other flash memory chips or any memory chip with identical characteristics.
Fig. 3 is the summary calcspar of the Memory Controller that one exemplary embodiment illustrates according to the present invention.Please refer to Fig. 3, Memory Controller 104 comprises host interface 1042, memory management circuitry 1046, and memory interface 1048.
Host interface 1042 is coupled to memory management circuitry 1046, and by connector 102 to couple host computer system 1000.Host interface 1042 is in order to receive instruction and the data that transmit with identification host computer system 1000.Accordingly, the instruction that host computer system 1000 transmits and data can reach memory management circuitry 1046 by host interface 1042.In this exemplary embodiment, the corresponding connector 102 of host interface 1042 and be SD interface, and in other exemplary embodiment, host interface 1042 can be also MMC interface, USB interface, SATA interface, PATA interface, IEEE 1394 interfaces, PCI Express interface, MS interface, CF interface, ide interface or the interface that meets other interface standards.
Memory management circuitry 1046 is in order to the overall operation of control store controller 104.Specifically, memory management circuitry 1046 has a plurality of steering orders, and when memory storage apparatus 100 running, above-mentioned steering order can be performed the automatic generating routine of the filling file of this exemplary embodiment.
In this exemplary embodiment, the steering order of memory management circuitry 1046 is to carry out implementation with form of firmware.For example, memory management circuitry 1046 has microprocessor unit (not illustrating) and ROM (read-only memory) (not illustrating), and above-mentioned steering order by burning in ROM (read-only memory).When memory storage apparatus 100 running, above-mentioned steering order can have been carried out by microprocessor unit the automatic generating routine of the filling file described in this exemplary embodiment.
In another exemplary embodiment, the steering order of memory management circuitry 1046 also can form of program code for example be stored in, in the specific region (, being exclusively used in the system region of storage system data in memory chip 106) of memory chip 106.In addition, memory management circuitry 1046 has microprocessor unit (not illustrating), ROM (read-only memory) (not illustrating) and random access memory (not illustrating).Wherein, ROM (read-only memory) has the code of driving section, and when Memory Controller 104 is enabled, microprocessor unit can first be carried out this and drive code section that the steering order being stored in memory chip 106 is loaded in the random access memory of memory management circuitry 1046.Afterwards, microprocessor unit can turn round above-mentioned steering order to carry out the automatic generating routine of the filling file of exemplary embodiment of the present invention.In addition,, in another exemplary embodiment of the present invention, the steering order of memory management circuitry 1046 also can an example, in hardware be carried out implementation.
Memory interface 1048 is coupled to memory management circuitry 1046, with so that Memory Controller 104 couple mutually with memory chip 106.Accordingly, Memory Controller 104 can be to memory chip 106 running of being correlated with.That is to say, the data of wanting to write to memory chip 106 can be converted to 106 receptible forms of memory chip via memory interface 1048.
In another exemplary embodiment of the present invention, Memory Controller 104 also comprises memory buffer 2002.Memory buffer 2002 is coupled to memory management circuitry 1046, in order to the temporary data that come from host computer system 1000, or the temporary data that come from memory chip 106.
In another exemplary embodiment of the present invention, Memory Controller 104 also comprises Error-Correcting Circuit 2004.Error-Correcting Circuit 2004 is coupled to memory management circuitry 1046, in order to carry out an error-correcting routine to guarantee the correctness of data.Specifically, when Memory Controller 104 receive from host computer system 1000 write instruction time, Error-Correcting Circuit 2004 can produce corresponding error-correcting code (Error Correcting Code for corresponding this data writing that writes instruction, and this data writing will be write to memory chip 106 in the lump with corresponding error-correcting code ECC).And when Memory Controller 104 receives the reading command from host computer system 1000, can from memory chip 106, read data and the error-correcting code thereof of corresponding this reading command.Now, Error-Correcting Circuit 2004 can be according to this error-correcting code to read data execution error correction program.
In another exemplary embodiment of the present invention, Memory Controller 104 also comprises electric power management circuit 2006.Electric power management circuit 2006 is coupled to memory management circuitry 1046, in order to the power supply of control store memory storage 100.
Fig. 4 and Fig. 5 are the example schematic of the diode-capacitor storage chip that one exemplary embodiment illustrates according to the present invention.
Should be noted that, while below describing the running of physical blocks of memory chip 106, with words such as " extraction ", " exchange ", " grouping ", " rotating ", carrying out operating physical block is concept in logic.That is the physical location of the physical blocks of memory chip 106 is not changed, but in logic the physical blocks of memory chip 106 is operated.
Please refer to Fig. 4, in this exemplary embodiment, memory management circuitry 1046 can logically be grouped into the physical blocks in memory chip 106 206 (0)~206 (K) data field 402, spare area 404, system region 406 and replace district 408.
The physical blocks that belongs in logic 402Yu spare area, data field 404 is in order to storage, to come from the data of host computer system 1000.Specifically, data field 402 is the physical blocks that had data, and the physical blocks in spare area 404 is the physical blocks in order to replacement data district 402.Therefore, the physical blocks of spare area 404 is empty or spendable physical blocks (that is, no record data or be labeled as invalid data useless).That is to say, the physical blocks in spare area 404 has been performed wipes running, or the physical blocks in spare area 404 is extracted for before storing data, and the physical blocks of extracting can be performed wipes running.Therefore, the physical blocks of the physical blocks of spare area 404 for being used.
The physical blocks that belongs in logic system region 406 is in order to register system data, and this system data comprises the physical blocks number about the manufacturer of memory chip 106 and model, memory chip 106, and the physical page number of each physical blocks etc.
Belong in logic the physical blocks replacing in district 408 and can be referred to as alternate physical block.For example, memory chip 106 can be reserved 4% physical blocks and uses as changing when dispatching from the factory.During the damage of physical blocks in data field 402,404Yu system region, spare area 406, reserve physical blocks in replacing district 408 and just can be used for replacing damaged physical blocks.Therefore,, if when there is physical blocks damage, replace in district 408 and still have normal physical blocks, memory management circuitry 1046 can be extracted the physical blocks that normal physical blocks is changed damage from replace district 408.If, without normal physical blocks, memory management circuitry 1046 is understood be declared as write protection (write protect) state by memory storage apparatus 100 replace district 408 when there is physical blocks damage in, and data writing again.
Please refer to Fig. 5, as mentioned above, the physical blocks of 402Yu spare area, data field 404 is data that the mode of rotating comes host system 1000 to write.In this exemplary embodiment, memory management circuitry 1046 can configure a plurality of logical blocks, and each logical blocks comprises respectively a plurality of logical addresses.Memory management circuitry 1046 offers host computer system 1000 by above-mentioned logical address, in order to host computer system 1000, in the physical blocks of storing data in the above-mentioned mode of rotating, carries out data access.Specifically, memory management circuitry 1046 can be grouped into logical blocks 510 (0)~510 (L) by the logical address that offers host computer system 1000, and logical blocks 510 (0)~510 (L) is mapped to the physical blocks of data field 402.Memory management circuitry 1046 can be set up logical blocks-physical blocks mapping table (logical block-physical block mapping table), to record the mapping relations between logical blocks and physical blocks.
Yet, the file attribute setting due to various operating system is not identical with authority, so the file system (for example FAT32 or FAT16) that must first can support with operating system 1200 of included these logical addresses of logical blocks 510 (0)~510 (L) could be used by operating system 1200 after formaing.
Fig. 6 is the example of the logical address with file system format memory chip that one exemplary embodiment illustrates according to the present invention.As shown in Figure 6, the file system that host computer system 1000 is used operating system 1200 to support, is formatted as a cut section 600 by these included logical addresses of the logical blocks of memory chip 106 510 (0)~510 (L).Cut section 600 comprises main start magnetic region 602, cuts apart start magnetic region 604, file configuration table district 606, directory area 608 and file area 610.
Wherein, the memory address that belongs to main start magnetic region 602 be in order to memory memory storage 100 can storage space system information, main start record (Master Boot Record, MBR) for example.Belonging to the memory address of cutting apart the magnetic region 604 of starting shooting is to cut apart start record in order to memory disk.
The memory address that belongs to file configuration table district 606 is in order to storage file allocation list.File configuration table is for recording the login value of gathering together of the logical address of storage file.In an exemplary embodiment, file configuration table district 606 can store two file configuration table, and one of them file configuration table is used by normal access, and another file configuration table is backup file allocation list.
The memory address that belongs to directory area 608 is to store root directory.The file that root directory record storage memory storage 100 is stored at present and the attribute information of catalogue.The memory address that belongs to file area 610 is in order to the content of storage file practically.
In this exemplary embodiment, main start magnetic region 602, cut apart start magnetic region 604,608Shi Yi sector, 606Yu directory area, file configuration table district (sector) as access unit.Specifically, the minimum memory unit of disk is sector, and the information content that each sector has comprised 512 bytes (byte).But can be very poor owing to take the efficiency of sector host computer system 1000 when unit stores, therefore the operating system 1200 of host computer system 1000 can be usingd and gathered together (cluster) as the base unit of accessing file, and each included number of sectors of gathering together must be 2 power.Suppose that 8 continuous sectors form one and gather together, this size of gathering together is exactly 4096 bytes so.In other words, operating system 1200 can read continuously and promote relative efficiency with 8 sectors when access data.
Must it should be noted that, although be that logical address is formatted as to a cut section 600 in this exemplary embodiment, in other exemplary embodiment, host computer system 1000 also can be used file system that logical address is formatted as to several cut sections.
When the power initiation of host computer system 1000, memory management circuitry 1046, after the included logical address of the logical blocks 510 (0)~510 (L) of confirming memory chip 106 is formatted, then can judge whether the filling file that meets a default file capacity is present in memory chip 106.Wherein, default file capacity is for example 20 to 100 megabytes (Megabyte, MB), but the present invention is not as limit.
Memory management circuitry 1046 if fill file, is not present in memory chip 106, just can utilize the time that host computer system 1000 wish reading disk are cut apart the filesystem informations such as start record, file configuration table and root directory to produce filling file.
In detail, the power initiation of host computer system 1000 and memory management circuitry 1046 determine memory chips 106 formatted after, the disk that memory management circuitry 1046 can read cut section 600 is cut apart start record and root directory, and whether the filling file that judgement according to this meets default file capacity is present in memory chip 106.
If disk is cut apart start record and is shown that with the content of root directory filling file does not exist, so when host computer system 1000 is wanted file reading allocation list, memory management circuitry 1046 is except reading file configuration table from memory chip 106, also can configure the corresponding sector of default file capacity number, and from the predetermined sector of file configuration table, by the several sector definition that meet sector number, be particular sector, and will insert to these particular sector about filling the login value of gathering together of file.And two file configuration table of storing for file configuration table district 606, memory management circuitry 1046 all will be taked identical action.
Particularly, when host computer system 1000 is used different file system format to move, not identical in order to record the required byte of each login value of gathering together in corresponding file configuration table yet.For example, with FAT32 file system, formaing the file configuration table of being set up needs 4 bytes to record the login value of gathering together, and with FAT16 file system, formaing the file configuration table of being set up needs 2 bytes to record the login value of gathering together.In this exemplary embodiment, predetermined sector is for example first sector of file configuration table, because there is partial bytes first sector of file configuration table, must remain the relevant information (for example beginning flag of file configuration table) of log file allocation list, so the login value quantity of gathering together that the login value quantity of gathering together that can deposit of first sector of file configuration table can be deposited from other each sectors is different.For example, under FAT32 file system, 125 (that is, (512-12)/4) individual login value of gathering together can be deposited in first sector of file configuration table, and 128 (that is, 512/4) individual login value of gathering together can be deposited respectively in all the other each sectors.And under FAT16 file system, 254 (that is, (512-4)/2) individual login value of gathering together can be deposited in first sector of file configuration table, 256 (that is, 512/2) individual login value of gathering together can be deposited respectively in all the other each sectors.
Memory management circuitry 1046 can be filled the required number of gathering together of file according to default file capacity configuration storage, and according to first sector of the number of gathering together, file configuration table, can deposit the quantity of the login value of gathering together, and the quantity that the login value of gathering together can be deposited respectively in other each sectors configures sector number.
In an exemplary embodiment, memory management circuitry 1046 is for example with following formula, to calculate storage to fill the required number CN that gathers together of file:
CN=(X*1024)/Y
Wherein, X is for filling the default file capacity (unit is MB) of file, and Y is a size of gathering together, and unit is Y kilobyte (kilobyte, KB).In addition, memory management circuitry 1046 for example can be calculated sector number SN with following formula:
Wherein, m represents that first sector of file configuration table can deposit the quantity of the login value of gathering together, and n represents that other each sectors can deposit respectively the quantity of the login value of gathering together.
In another exemplary embodiment, memory management circuitry 1046 can be utilized the corresponding table that records file size and the corresponding relation of sector number, according to the default file capacity of filling file, directly in the mode of tabling look-up, obtains the sector number SN that will configure.
After obtaining sector number SN, memory management circuitry 1046, by the predetermined sector from file configuration table, is particular sector by the sector definition that accords with sector number SN.For example, when first sector that predetermined sector is file configuration table, front SN sector of file configuration table just can be defined as particular sector.And when M sector that predetermined sector is file configuration table, the M of file configuration table just can be defined as particular sector to (M+SN-1) individual sector.
Then, memory management circuitry 1046 starts to insert about filling the login value of gathering together of file from the predetermined sector of file configuration table.By about filling after all login values of gathering together of file all insert above-mentioned particular sector, whether memory management circuitry 1046 judgements have remaining space in above-mentioned particular sector.If also have remaining space in particular sector, 1046 of memory management circuitry can utilize the login of gathering together about at least one default file to be worth to fill up remaining space.Wherein, default file can be hidden file, deleted file, or generic-document etc., at this, do not limited.
For instance, suppose that host computer system 1000 is to format action to set up cut section 600 by FAT32 file system, wherein each size of gathering together is 32KB, and the default file capacity of hypothesis filling file is 20MB.Memory management circuitry 1046 can be 640 by the mode of tabling look-up or the number CN that gathers together that uses above-mentioned formula to obtain in order to storage filling file, and corresponding sector number SN is 6.If first sector that predetermined sector is file configuration table, front 6 sectors of file configuration table will be defined as particular sector (as sector FATS (1)~FATS (6) of Fig. 7 A).Owing to filling the number CN that gathers together corresponding to file, be 640, in first particular sector FATS (1) except inserting the relevant information (in Fig. 7 A with straight line indicate) of file configuration table, its complementary space is in order to insert 125 the login values of gathering together (indicating with oblique line in Fig. 7 A) about filling file, particular sector FATS (2)~FATS (5) inserts individually about filling 128 login values of gathering together of file, and last particular sector FATS (6) is in order to insert about filling last 3 login values of gathering together of file.Because particular sector FATS (6) also has remaining space, so memory management circuitry 1046 can utilize the login value of gathering together (indicating with site in Fig. 7 A) about default file that remaining space is filled up.
If M the sector that predetermined sector is file configuration table, as shown in Figure 7 B, sector FATS (M)~FATS (M+5) can be defined as particular sector.Wherein, first particular sector FATS (M) for example, in order to insert identifying information (fill the beginning flag of file, indicate in Fig. 7 B with straight line) and about fill the login value of gathering together (indicating with oblique line) of file in Fig. 7 B.Particular sector FATS (M+1)~FATS (M+4) continues to insert about filling the login value of gathering together of file, and last particular sector FATS (M+5) is except inserting about filling the gathering together login value of file, remaining space can be inserted the login value of gathering together (indicating with site in Fig. 7 B) of default file.
Since particular sector is in order to record the gather together login value relevant to filling file, therefore need to avoid host computer system 1000 to delete arbitrarily or revise the content that record these addresses.Therefore, memory management circuitry 1046 can first be set as write protect state by logical address corresponding to all particular sector, then file configuration table is sent to host computer system 1000 again.
For example, and when host computer system 1000 is wanted to read root directory, memory management circuitry 1046, after memory chip 106 is read root directory, can be inserted the predetermined sector (first sector) to root directory by the filling file header of filling file.
In an exemplary embodiment, if memory management circuitry 1046 judgements are being inserted to the predetermined sector of root directory filling file header, (the predetermined sector of root directory still has remaining space, fill file header and cannot fill up the predetermined sector of root directory), memory management circuitry 1046 can utilize at least one default file header to fill up the predetermined sector of root directory so.Wherein, the quantity of default file header is corresponding fills the filename form of the filename form, the corresponding default file of each default file header (be for example hidden file, deleted file, or generic-document) of file and sector capacity.
For instance, the file header that corresponding filename form is short filename can occupy the space of 32 bytes in root directory.The filename form of supposing predetermined sector is root directory in this exemplary embodiment first sector and filling file is short filename, memory management circuitry 1046 is being inserted behind first sector of root directory filling file header, because first sector of root directory still has remaining space, therefore memory management circuitry 1046 also can be utilized remaining 480 (512-32) byte (shown in first sector RDS (1) of root directory as shown in Figure 8 A) in first sector that 15 default file headers that corresponding default file filename form is short filename fill up root directory, or utilize 1 default file header that corresponding default file filename form is long filenames to fill up remaining 480 bytes (shown in first sector RDS (1) of root directory as shown in Figure 8 B) in first sector of root directory.Similarly, if fill the long filenames of the filename form of file, memory management circuitry 1046 is except inserting first sector of root directory filling file header, when first sector of root directory also has remaining space, memory management circuitry 1046 also can utilize default file header to fill up first sector of root directory.
Similarly; for fear of host computer system 1000, other data are write to the predetermined sector of root directory; memory management circuitry 1046 can be set as write protect state by logical address corresponding to the predetermined sector of root directory, then root directory is sent to host computer system 1000 again.
Should be noted that in addition, under FAT32 file system, disk is cut apart start record and is had a remaining space field.If therefore host computer system 1000 is to format action to set up out cut section 600 by FAT32 file system, in memory management circuitry 1046 judgements, fill in the non-existent situation of file so, when host computer system 1000 is wanted reading disk and is cut apart start and record, memory management circuitry 1046 can be read disk from memory chip 106 and cut apart start record, and the difference between the total volume of memory chip 106 and default file capacity is write to this remaining space field, then again disk is cut apart to start record and be back to host computer system 1000.So because disk under FAT16 file system is cut apart start record and be there is no above-mentioned remaining space field, if therefore host computer system 1000 is to use FAT16 file system to set up out cut section 600, memory management circuitry 1046 is cut apart start record reading disk from memory chip 106, just can directly disk be cut apart to start record and being back to host computer system 1000.
In another exemplary embodiment, during the power initiation of host computer system 1000, if memory management circuitry 1046 is confirmed the logical blocks 510 (0)~510 (L) of memory chips 106, included logical address is formatted, and the filling file that meets default file capacity has been present in memory chip 106.So, when host computer system 1000 is wanted file reading allocation list, memory management circuitry 1046 can be set as write protect state by logical address corresponding to particular sector in file configuration table, then file configuration table is sent to host computer system 1000.When host computer system 1000 is wanted to read root directory, memory management circuitry 1046 can be set as write protect state by logical address corresponding to the predetermined sector of root directory, then root directory is sent to host computer system 1000 again in addition.
Host computer system 1000 is in order to be used memory storage apparatus 100, after power initiation, must go the relevant information of the file system of read memory memory storage 100, therefore formatted at memory chip 106 and fill in the non-existent situation of file, the time that memory management circuitry 1046 can utilize host computer system 1000 to read respectively various filesystem informations, will add individually disk to cut apart start record, file configuration table and root directory about filling the information of file.Thus, memory management circuitry 1046 will not need the extra execution time just can automatically produce filling file, and no matter memory chip 106 is by which kind of file system format, and memory management circuitry 1046 can produce filling file accordingly.The in the situation that and filling file formatted at memory chip 106 also existing in addition, memory management circuitry 1046 can be made as write protect state by the relative address of storage filling file and avoid host computer system 1000 to change arbitrarily its content.Owing to filling file, be automatically to be produced by memory management circuitry 1046, so memory management circuitry 1046 energy fast fetchings must be filled the memory address scope of file.Also just because of this, read after the information of file system in host computer system 1000, memory storage apparatus 100 just can be synchronizeed with host computer system 1000.
In another exemplary embodiment, when the power initiation of host computer system 1000, if the logical address of memory management circuitry 1046 determine memory chips 106 is not yet formatted, 1046 of memory management circuitry can wait for that host computer system 1000 starts to carry out format action, and after host computer system 1000 completes format action, more formatted but fill file non-existent situation from the raw file of filling of movable property according to memory chip 106.
In other words, the memory management circuitry 1046 of this exemplary embodiment possesses the host computer system of judgement 1000 and whether starts to carry out format action, and the ability whether action is finished is formatd in judgement.Memory management circuitry 1046 for example can judge whether host computer system 1000 starts to carry out format action by following several modes.
In an exemplary embodiment, the carve information recording address in memory chip 106 is in order to the record data relevant with cut section.Therefore when host computer system 1000 wishs write this carve information recording address by a data writing, whether the available data that memory management circuitry 1046 meeting inspection data writings are stored with carve information recording address is identical.If data writing is different from available data, expression host computer system 1000 wants to change file system, so memory management circuitry 1046 judges that host computer systems 1000 start to carry out format action.
In another exemplary embodiment, whether the data no matter host computer system 1000 is wanted to write are identical with the content that disk is cut apart start record script record, once host computer system 1000 is wanted to upgrade the content that disk is cut apart start record, all represent that host computer system 1000 starts to carry out format action possibly.But also because file in memory cell 106 is being carried out as deleted to host computer system 1000 or during by document change actions such as file write store unit 106, also can go to upgrade disk and cut apart start record, base this, the behavior that memory management circuitry 1046 must further be distinguished host computer system 1000 is to format action or document change action.
In this exemplary embodiment, disk is cut apart start record and is had a specified byte address, and the data content that memory management circuitry 1046 can write respectively this specified byte address in the front and back of upgrading disk and cut apart start record according to host computer system 1000 judges whether host computer system 1000 wants execute file change to move.If host computer system 1000 is execute file change action not, 1046 of memory management circuitry judge that host computer system 1000 preparations start to carry out format action.
In detail, along with the difference of file system, it is also not identical that disk is cut apart the specified byte address of start record.For example, under FAT16 file system, specified byte address is 0x25, and under FAT32 file system, specified byte address is 0x51.Take FAT16 file system as example, when host computer system 1000 is wanted execute file change action, can first the value of this address of 0x25 be set as to 1, and after complete the deletion of file or write etc. changed action, the value of this address of 0x25 be changed to 0.Base this, according to host computer system 1000, successively write the data content of specified byte address, memory management circuitry 1046 just can judge that host computer system 1000 is want merely change file or will carry out format and move.
In another exemplary embodiment, suppose that memory chip 106 is formatd by host computer system 1000 use FAT32 file system, because disk under this file system is cut apart start record and is had a remaining space field, therefore when host computer system 1000 wishs renewal disks are cut apart the content of start record, if the residual capacity that remaining space field records is less than the total volume of memory chip 106 and the difference between default file capacity, just memory management circuitry 1046 judges that host computer system 1000 starts to carry out format action.
When memory management circuitry 1046 judges that host computer system 1000 will start to carry out format action, memory management circuitry 1046 can check whether file configuration table and root directory exist.If file configuration table and root directory exist, represent that memory chip 106 is formatted.Because memory management circuitry 1046 can produce automatically, fill file, and after file is filled in generation, memory management circuitry 1046 can be write protect state by the partial logic address setting in file configuration table and root directory.For format action is successfully carried out, memory management circuitry 1046 can be set as the file configuration table all logical addresses corresponding with root directory can write state, then carries out format move in order to host computer system 1000.
Substantially, host computer system 1000, in carrying out the process of format action, can write, read for same address, and operation relatively.For example, host computer system 100, after writing file configuration table, can again be read file configuration table and compare, so memory management circuitry 1046 can judge according to the above-mentioned behavior of host computer system 1000 whether format action is finished.
In detail, when host computer system 1000 is wanted to write a logical address, memory management circuitry 1046 can be recorded this logical address.Until host computer system, complete the write activity of this logical address and then carry out one and read when action, memory management circuitry 1046 can judgement whether read the corresponding logical address of action identical with the logical address of previous write activity.If both are identical, represent that next host computer system 1000 will compare, also representative format action not yet finishes.Therefore when host computer system 1000 reads two different logical addresses continuously, or the logical address that reads of host computer system 1000 is while being different from the logical address last time writing, and memory management circuitry 1046 just judges that to format action executing complete.
After format action executing, memory management circuitry 1046 can start automatically to produce fills file.Because producing, memory management circuitry in the case 1046 fills after the modes of file and the power initiation of host computer system 1000, memory management circuitry 1046 judgement memory chips 106 are formatted but fill and when file does not exist, go to produce that to fill the method for file same or similar, therefore do not repeat them here.
No matter when host computer system 1000 is put is prepared to format action, memory management circuitry 1046 can detect beginning and the end of format action by the way, and automatically produces and fill file after host computer system 1000 completes format action.
In an exemplary embodiment, user can set the default file capacity of filling file by assigning a special instruction.After included these logical address forms of the logical blocks 510 (0)~510 (L) of host computer system 1000 reformatting memory chips 106, memory management circuitry 1046 just can remove to produce the filling file that meets the default file capacity that user upgrades automatically.
Fig. 9 is the process flow diagram of the method for the automatic generation filling file that one exemplary embodiment illustrates according to the present invention.
Refer to Fig. 9, as shown in step S910, memory management circuitry 1046 is grouped into physical blocks 206 (0)~206 (K) data field 402, spare area 404, system region 406 and replaces district 408.And in step S920, memory management circuitry 1046 a plurality of logical addresses of configuration are also grouped into a plurality of logical blocks 510 (0)~510 (L) with the physical blocks in mapping (enum) data district 402 by logical address.
As shown in step S930, when the power initiation of host computer system 1000, whether memory management circuitry 1046 decision logic addresses are formatted as a cut section.
If so, as shown in step S940, memory management circuitry 1046 reads the included disk of cut section to be cut apart start record and judges with root directory whether the filling file that meets default file capacity exists.
Filling file while not existing, as shown in step S950, when memory management circuitry 1046 is wanted file reading allocation list in host computer system 1000, will insert to the several particular sector in file configuration table about filling the login value of gathering together of file.If fill the login value of gathering together of file, cannot fill up above-mentioned particular sector, the login value of gathering together that recycles at least one default file is filled up particular sector (as shown in Figure 7).Memory management circuitry 1046, logical address corresponding to above-mentioned particular sector is set as after write protect state, is sent to host computer system 1000 by file configuration table.
And in step S960, when host computer system 1000 is wanted to read root directory, memory management circuitry 1046 is inserted the predetermined sector to root directory by the filling file header of filling file.Wherein, when the filling file header of filling file cannot be filled up the predetermined sector of root directory, memory management circuitry 1046 can utilize at least one default file header the predetermined sector of root directory to be filled up to (as shown in Fig. 8 A, 8B).The corresponding logical address in the predetermined sector of root directory is set as after write protect state, root directory is sent to host computer system 1000.
In addition in the situation that file existence is filled in memory management circuitry 1046 judgements; as shown in step S970; when memory management circuitry 1046 is wanted file reading allocation list in host computer system 1000; the logical address that particular sector is corresponding is set as write protect state; and file configuration table is sent to host computer system 1000; and when host computer system 1000 is wanted to read root directory; the logical address that the predetermined sector of root directory is corresponding is set as write protect state, then root directory is sent to host computer system 1000 again.
If memory management circuitry 1046 decision logic address in step S930 is not yet formatted, then, as shown in step S980, memory management circuitry 1046 continues to judge whether host computer system 1000 starts to carry out a format action.Host computer system 1000 to be determined starts to carry out after format action, and whether memory management circuitry 1046, as shown in step S990, continues judgement format action and be finished.
After memory management circuitry 1046 is judged format action executing, then as shown in step S950, S960, memory management circuitry 1046, when host computer system 1000 difference file reading allocation lists and root directory, will be inserted file configuration table and root directory about filling the data of file.
In one example of the present invention embodiment; when the power initiation of host computer system 1000; Memory Controller 104 just can configure the corresponding data that meets the filling file of default file capacity among the file system of storing to memory chip 106; and filling file is being set as after write protect state, the file configuration table of file system is sent to host computer system 1000.In detail, first Memory Controller 104 judges whether filling file is present in the file system of memory chip 106.If fill file, do not exist, just the corresponding data of filling file is configured to file system.Owing to filling file, be the cache space that occupies host computer system 1000, thereby while guaranteeing action that host computer system 1000 reads at executing data, can read desired data from memory chip 106.
In sum, memory storage apparatus of the present invention, its Memory Controller are under the prerequisite of normal running that does not affect host computer system with the method that automatically produces filling file, by memory storage apparatus, automatically produce jumbo filling file to fill up the cache space in the random access memory of host computer system, so guarantee to have pre-read machine-processed host computer system can be from memory storage apparatus sense data while reading action each execution.Because memory storage apparatus is to utilize the time of the information of host computer system file reading system to produce filling file, thereby can not increase the extra execution time, also because filling file, be just to be produced by memory storage apparatus itself, memory storage apparatus can be learnt the memory address scope of filling file fast, and then accelerates the speed that host computer system is carried out write activity.
Although the present invention with embodiment openly as above; so it is not in order to limit the present invention; those skilled in the art without departing from the spirit and scope of the present invention, when doing a little change and retouching, are as the criterion depending on the appended claims person of defining therefore protection scope of the present invention is worked as.

Claims (21)

1. automatically produce a method of filling file, for being coupled to a memory storage apparatus of a host computer system, this memory storage apparatus comprises that a memory chip and this memory chip have a plurality of physical blocks, and the method comprises:
These physical blocks are at least grouped into a data field, a spare area and a system region;
Configure a plurality of logical addresses and these logical addresses are grouped into a plurality of logical blocks to shine upon the physical blocks of this data field;
When the power initiation of this host computer system, if these logical addresses have been used a file system and have at least been formatted as a cut section, and this cut section comprises that a disk cuts apart start record, a file configuration table and a root directory, read this disk and cut apart start record and this root directory, whether a filling file that meets a default file capacity to judge is present in this memory chip;
If this filling file does not exist, when this host computer system wants to read this document allocation list, configure the sector number that this default file capacity is corresponding, from a predetermined sector of this document allocation list, start delimiter should a plurality of particular sector of sector number, the login value of gathering together about this filling file is inserted to these particular sector, and logical address corresponding to these particular sector is being set as after a write protect state, transmit this document allocation list to this host computer system; And
When this host computer system wants to read this root directory; by one of this filling file, fill file header and insert the predetermined sector to this root directory; and logical address corresponding to this predetermined sector of this root directory is being set as after this write protect state, transmit this root directory to this host computer system.
2. the method for file is filled in automatic generation as claimed in claim 1, and wherein this disk is cut apart start record and had a remaining space field, and the method also comprises:
If this filling file does not exist, in this host computer system, want to read this disk and cut apart start while recording, a difference of a total volume of this memory chip and this default file capacity is write to this remaining space field; And
Transmitting this disk cuts apart start and is recorded to this host computer system.
3. the method for file is filled in automatic generation as claimed in claim 1, wherein this predetermined sector of this document allocation list is in order to deposit the login value of gathering together of one first quantity, and other sectors of this document allocation list are respectively in order to deposit the login value of gathering together of one second quantity, and the step that configures this sector number that this default file capacity is corresponding comprises:
According to this default file capacity configuration, store the required number of gathering together of this filling file; And
According to this number of gathering together, this first quantity and this second quantity, configure this sector number.
4. the method for file is filled in automatic generation as claimed in claim 1, wherein by inserting about the login value of gathering together of this filling file to the step of these particular sector, also comprises:
The login value of gathering together about this filling file is being inserted behind these particular sector, judged whether these particular sector have a remaining space; And
If so, utilize about the login value of gathering together of at least one default file and fill up this remaining space.
5. the method for file is filled in automatic generation as claimed in claim 4, and wherein respectively this at least one default file is a hidden file, a deleted file, and a generic-document one of them.
6. the method for file is filled in automatic generation as claimed in claim 1, wherein this filling file header is inserted to the step of this predetermined sector of this root directory and is also comprised:
This filling file header is being inserted to this predetermined sector of this root directory, judged whether this predetermined sector of this root directory has a remaining space; And
If so, utilize at least one default file header to fill up this predetermined sector of this root directory.
7. the method for file is filled in automatic generation as claimed in claim 6, wherein the quantity of this at least one default file header is to filling a filename form of file, respectively this document name format of the corresponding default file of this at least one default file header, an and sector capacity.
8. the method for file is filled in automatic generation as claimed in claim 1, and wherein this predetermined sector is first sector.
9. the method for file is filled in automatic generation as claimed in claim 1, wherein cuts apart start record and this root directory reading this disk, and after judging whether this filling file is present in the step of this memory chip, the method also comprises:
If this is filled file and exists,, when this host computer system wants to read this document allocation list, logical address corresponding to these particular sector is set as to this write protect state, and transmits this document allocation list to this host computer system; And
When this host computer system wants to read this root directory, logical address corresponding to this predetermined sector of this root directory is set as to this write protect state, and transmits this root directory to this host computer system.
10. the method for file is filled in automatic generation as claimed in claim 1, also comprises:
Judge whether this host computer system starts to carry out a format action;
If so, judge whether this format action is finished;
After this format action executing, when this host computer system wants to read this document allocation list, configure this sector number that this default file capacity is corresponding, from this predetermined sector of this document allocation list, start delimiter should these particular sector of sector number, the login value of gathering together about this filling file is inserted to these particular sector, and logical address corresponding to these particular sector is being set as after this write protect state, transmit this document allocation list to this host computer system; And
When this host computer system wants to read this root directory; this filling file header of this filling file is inserted to this predetermined sector to this root directory; and logical address corresponding to this predetermined sector of this root directory is being set as after this write protect state, transmit this root directory to this host computer system.
The method of files is filled in 11. automatic generations as claimed in claim 10, wherein judges whether this host computer system starts to carry out the step that this format moves and comprise:
When this host computer system wish writes to a carve information recording address by a data writing, check that whether the available data that this data writing stores with this carve information recording address is identical; And
If this data writing is different from this available data, judge that this host computer system starts to carry out this format action.
The method of files is filled in 12. automatic generations as claimed in claim 10, wherein judges whether this host computer system starts to carry out the step that this format moves and comprise:
When this host computer system wish is upgraded this disk and cut apart the content of start record, according to this host computer system, before and after upgrading, write respectively this disk and cut apart the data content of a specified byte address in start record and judge whether this host computer system carries out a document change action; And
If this host computer system is not carried out this document change action, judge that this host computer system starts to carry out this format action.
The method of files is filled in 13. automatic generations as claimed in claim 10, and wherein this disk is cut apart start record and had a remaining space field, and judges whether this host computer system starts to carry out the step that this format moves and comprise:
When this host computer system wish is upgraded this disk and is cut apart the content of start record, if the residual capacity that this remaining space field records is less than a total volume of this memory chip and a difference of this default file capacity, judge that this host computer system starts to carry out this format action.
The method of file is filled in 14. automatic generations as claimed in claim 10, and wherein, after judging whether this host computer system starts to carry out the step of this format action, the method also comprises:
If so, check whether this document allocation list and this root directory exist; And
If so, this document allocation list all logical addresses corresponding with this root directory being set as to one can write state.
The method of file is filled in 15. automatic generations as claimed in claim 10, wherein judges that the step whether this format action is finished comprises:
When this host computer system reads two different logical addresses continuously, or the logical address that reads of this host computer system is while being different from the logical address that the last time writes, and judges that this format action executing is complete.
The method of file is filled in 16. automatic generations as claimed in claim 1, also comprises:
When the power initiation of this host computer system, if these logical addresses are not formatted, judge whether this host computer system starts to carry out a format action;
If so, judge whether this format action is finished;
After this format action executing, when this host computer system wants to read this document allocation list, configure this sector number that this default file capacity is corresponding, from this predetermined sector of this document allocation list, start delimiter should these particular sector of sector number, the login value of gathering together about this filling file is inserted to these particular sector, and logical address corresponding to these particular sector is being set as after this write protect state, transmit this document allocation list to this host computer system; And
When this host computer system wants to read this root directory; this filling file header of this filling file is inserted to this predetermined sector to this root directory; and logical address corresponding to this predetermined sector of this root directory is being set as after this write protect state, transmit this root directory to this host computer system.
17. 1 kinds of Memory Controllers, for managing a plurality of physical blocks of memory storage apparatus one memory chip, this Memory Controller comprises:
One host system interface, in order to couple a host computer system;
One memory interface, in order to couple this memory chip; And
One memory management circuitry, be coupled to this host system interface and this memory interface, wherein this memory management circuitry is in order to be at least grouped into these physical blocks one data field, a spare area and a system region, configure a plurality of logical addresses and these logical addresses are grouped into a plurality of logical blocks to shine upon the physical blocks of this data field
When the power initiation of this host computer system, if these logical addresses are according to a file system and be at least formatted as a cut section, and this cut section comprises that a disk cuts apart start record, a file configuration table and a root directory, this memory management circuitry is more cut apart start record and this root directory in order to read this disk, whether a filling file that meets a default file capacity with judgement is present in this memory chip
If this filling file does not exist, this memory management circuitry is in order to when this host computer system wants to read this document allocation list, configure the sector number that this default file capacity is corresponding, from a predetermined sector of this document allocation list, start delimiter should a plurality of particular sector of sector number, the login value of gathering together about this filling file is inserted to these particular sector, and logical address corresponding to these particular sector is being set as after a write protect state, transmit this document allocation list to this host computer system, and when this host computer system wants to read this root directory, by one of this filling file, fill file header and insert the predetermined sector to this root directory, and logical address corresponding to this predetermined sector of this root directory is being set as after this write protect state, transmit this root directory to this host computer system.
18. 1 kinds of memory storage apparatus, comprising:
One memory chip, has a plurality of physical blocks;
A connector, in order to couple a host computer system; And
One Memory Controller, be coupled to this memory chip and this connector, this Memory Controller is in order to be at least grouped into these physical blocks one data field, a spare area and a system region, configure a plurality of logical addresses and these logical addresses are grouped into a plurality of logical blocks to shine upon the physical blocks of this data field
When the power initiation of this host computer system, if these logical addresses are according to a file system and be at least formatted as a cut section, and this cut section comprises that a disk cuts apart start record, a file configuration table and a root directory, this Memory Controller is cut apart start record and this root directory in order to read this disk, whether a filling file that meets a default file capacity with judgement is present in this memory chip
If this filling file does not exist, this Memory Controller is in order to when this host computer system wants to read this document allocation list, configure the sector number that this default file capacity is corresponding, from a predetermined sector of this document allocation list, start delimiter should a plurality of particular sector of sector number, the login value of gathering together about this filling file is inserted to these particular sector, and logical address corresponding to these particular sector is being set as after a write protect state, transmit this document allocation list to this host computer system, and when this host computer system wants to read this root directory, by one of this filling file, fill file header and insert the predetermined sector to this root directory, and logical address corresponding to this predetermined sector of this root directory is being set as after this write protect state, transmit this root directory to this host computer system.
19. memory storage apparatus as claimed in claim 18, wherein this disk is cut apart start record and is had a remaining space field, when judging this filling file, this Memory Controller do not exist, this Memory Controller is more cut apart start while recording in order to want to read this disk in this host computer system, one difference of one total volume of this memory chip and this default file capacity is write to this remaining space field, and transmit this disk and cut apart start and be recorded to this host computer system.
20. memory storage apparatus as claimed in claim 18, wherein this predetermined sector of this document allocation list is in order to deposit the login value of gathering together of one first quantity, and other sectors of this document allocation list are respectively in order to deposit the login value of gathering together of one second quantity, and this Memory Controller is more in order to store the required number of gathering together of this filling file according to this default file capacity configuration, and configure this sector number according to this number of gathering together, this first quantity and this second quantity.
21. 1 kinds of memory storage apparatus, comprising:
One memory chip, has a plurality of physical blocks;
A connector, in order to couple a host computer system; And
One Memory Controller, be coupled to this memory chip and this connector, this Memory Controller these physical blocks for managing this memory chip, wherein this Memory Controller is in order to be at least grouped into these physical blocks one data field, a spare area and a system region, configure a plurality of logical addresses and these logical addresses are grouped into a plurality of logical blocks to shine upon the physical blocks of this data field
When the power initiation of this host computer system; this Memory Controller is filled corresponding data to file system of file in order to configure one of a default file capacity; and this filling file is being set as after a write protect state; transmit a file configuration table of this document system to this host computer system; wherein; this document system storage in this memory chip and this filling file be a cache space that occupies this host computer system so that host computer system is read desired data from this memory chip.
CN201010527918.3A 2010-10-21 2010-10-21 Memory storage device, memory controller and method for automatically generating filled document Active CN102455879B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201010527918.3A CN102455879B (en) 2010-10-21 2010-10-21 Memory storage device, memory controller and method for automatically generating filled document

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201010527918.3A CN102455879B (en) 2010-10-21 2010-10-21 Memory storage device, memory controller and method for automatically generating filled document

Publications (2)

Publication Number Publication Date
CN102455879A CN102455879A (en) 2012-05-16
CN102455879B true CN102455879B (en) 2014-10-15

Family

ID=46039107

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201010527918.3A Active CN102455879B (en) 2010-10-21 2010-10-21 Memory storage device, memory controller and method for automatically generating filled document

Country Status (1)

Country Link
CN (1) CN102455879B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105094742B (en) * 2014-05-09 2018-12-07 华为技术有限公司 A kind of method and apparatus for writing data
CN105988935B (en) * 2015-02-04 2019-04-23 群联电子股份有限公司 Smart card management method, memory storage apparatus and memorizer control circuit unit
US20200151119A1 (en) * 2018-11-08 2020-05-14 Silicon Motion, Inc. Method and apparatus for performing access control between host device and memory device
CN111813673A (en) * 2020-07-06 2020-10-23 珠海西山居移动游戏科技有限公司 Hard disk filling test method and system
CN114442903A (en) * 2020-10-30 2022-05-06 伊姆西Ip控股有限责任公司 Method, electronic device and computer program product for managing storage system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1405685A (en) * 2002-10-16 2003-03-26 威盛电子股份有限公司 Structure and method for quickly fetching renewed data of memory body
CN101154191A (en) * 2006-09-28 2008-04-02 英业达股份有限公司 Processing method for fast data access
CN101609392A (en) * 2008-06-16 2009-12-23 群联电子股份有限公司 Serial data transmits allocating method, system and controller thereof
CN101667157A (en) * 2008-09-04 2010-03-10 群联电子股份有限公司 Flash memory data transmission method, flash memory storage system and controller

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7676632B2 (en) * 2006-07-18 2010-03-09 Via Technologies, Inc. Partial cache way locking

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1405685A (en) * 2002-10-16 2003-03-26 威盛电子股份有限公司 Structure and method for quickly fetching renewed data of memory body
CN101154191A (en) * 2006-09-28 2008-04-02 英业达股份有限公司 Processing method for fast data access
CN101609392A (en) * 2008-06-16 2009-12-23 群联电子股份有限公司 Serial data transmits allocating method, system and controller thereof
CN101667157A (en) * 2008-09-04 2010-03-10 群联电子股份有限公司 Flash memory data transmission method, flash memory storage system and controller

Also Published As

Publication number Publication date
CN102455879A (en) 2012-05-16

Similar Documents

Publication Publication Date Title
US8707007B2 (en) Memory storage device, memory controller thereof, and method for automatically creating fill-file thereof
US8230160B2 (en) Flash memory storage system and flash memory controller and data processing method thereof
TWI425355B (en) Data access method, memory controller, memory storage system
CN106354615B (en) Solid state disk log generation method and device
US9176865B2 (en) Data writing method, memory controller, and memory storage device
US9389998B2 (en) Memory formatting method, memory controller, and memory storage apparatus
TW201432449A (en) Non-volatile memory apparatus and operating method thereof
CN102455879B (en) Memory storage device, memory controller and method for automatically generating filled document
US9304900B2 (en) Data reading method, memory controller, and memory storage device
TWI463313B (en) Memory management method and memory controller and memory storage device using the same
CN103377143B (en) Storage management method, Memory Controller and memory storage apparatus
US8954692B2 (en) File protecting method and system, and memory controller and memory storage apparatus thereof
US8255656B2 (en) Storage device, memory controller, and data protection method
CN102053796A (en) Flash memory storage system, flash memory controller and data processing method
CN102200946B (en) Data access method, memory controller and storage system
CN113490922A (en) Solid state hard disk write amplification optimization method
CN103389941B (en) Storer formatting method, Memory Controller and memory storage apparatus
CN110688323B (en) System controller and system garbage recycling method
CN102968385A (en) Data writing method, memory controller and storage device
CN103914391A (en) Data reading method, memory controller and memory storage device
CN102375781B (en) Data protecting method, memory controller and portable memory storage device
US9146861B2 (en) Memory address management method, memory controller and memory storage device
CN103578566A (en) Memory storage apparatus and restoration method thereof
CN103984635A (en) Data writing method, memory controller and memory storage device
CN102467460B (en) Data management method, memory controller and memory storage device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant