The present invention relates to an access module, an information recording module, a controller, and an information recording system that store data in a non-volatile memory and manage the data as files.
Various types of recording media for recording digital data such as audio content, video data, and so on exist, such as magnetic disks, optical disks, magneto-optical disks, and so on. Of such recording media, memory cards that use semiconductor memories such as flash ROMs or the like as their recording elements have quickly become widespread among small-sized mobile devices such as digital still cameras, mobile telephone terminals, and so on due to their ability to reduce the size of the recording medium. Furthermore, in addition to functioning as removable media as conventional memory cards, semiconductor memories are also recently being used for built-in storage in devices, whereby semiconductor memories such as flash ROMs or the like are installed within devices instead of hard disks.
Semiconductor elements called NAND flash memories are primarily used in such memory cards, built-in storage in devices, and so on. NAND flash memories are recording elements cable of recording different data after data that has already been recorded is erased, and like conventional hard disks, are capable of being configured as information recording apparatuses that can be rewritten multiple times.
Thus far, data stored in memory cards, built-in storage in devices, and so on has been managed using filesystems. Managing data using a filesystem makes it possible to share data as files among devices that handle the same filesystem, and thus a user can easily use multiple devices to refer to or copy data that he/she has stored him/herself.
The filesystem most widely used thus far is called the FAT filesystem. A feature of the FAT filesystem is that it performs the uniform management of regions using a table called a file allocation table (FAT), and is widely used as the filesystem for Floppy® discs, hard disks in PCs, memory cards, and so on due to its comparatively simple structure and ease of implementation.
As shown in
The master boot record partition table 303 is a region that holds information for managing regions called partitions, obtained by dividing a region in the logical address space managed by the filesystem into multiple regions. The partition boot sector 304 is a region that holds management information of a single partition, such as the size of the unit by which the regions within the partition are managed and so on.
The FATs (305 and 306) are regions that hold information regarding the storage locations of data contained in files; normally, two FATs (305 and 306) hold the same information duplicated, so that even if one of the FATs (305 or 306) fails, the files can be accessed through the other FAT (305 or 306). The root directory entry 307 is a region that holds files and directory information (directory entries) immediately below the root directory.
Furthermore, the FAT filesystem also includes the user data region 302, which holds, in a region continuing from the filesystem management information region 301, the actual data of the file. The user data region 302 is divided into and managed as units of management called clusters, each of which has a size of approximately 512 bytes to 32 KB, and each cluster holds data that belongs to the file. Files that hold a large amount of data hold that data across multiple clusters, and the connections between those clusters are managed using link information that is held in the FATs (305 and 306). Meanwhile, the files and subdirectory information (directory entries) present within the directory immediately below the root directory are stored using part of this user data region 302.
The first 8 bytes of the directory entry 308 hold the name of the file or directory. The next 3 bytes hold an extension. The next byte after that holds attribute information such as a flag identifying the type of the file/directory, a flag identifying whether or not the file/directory is read-only, and so on. Bytes holding information indicating the last update date/time of the file/directory, a starting cluster number indicating the starting position of the clusters that hold the actual file/directory, the number of bytes indicating the file size, and so on are held as well.
In this manner, the directory entry 308 does not hold information regarding the position of the cluster in which the starting data of the file is stored, and thus in the case where the file data is spread out among multiple clusters, that position information is held in the FATs (305 and 306). In other words, when updating the file, it is necessary to write the information of the directory entry 308 and FATs (305 and 306) as well as write the file data.
Next, a file data writing process performed in the FAT filesystem will be described using
(S401):
The directory entry 308 of the target file is read out.
(S402):
The starting cluster number held in the directory entry 308 that has been read out is obtained and the starting position of the file data confirmed.
(S403):
The FATs (305 and 306) are read out into the access module of a RAM and the links within the FATs (305 and 306) in the RAM are followed in order starting with the starting position of the file data obtained in S402, thus obtaining the cluster number at the write position.
(S404):
It is determined whether or not it will be necessary to allocate a new empty region for the file when writing the file data. In the case where it is necessary to allocate a new empty region, the process advances to S405. However, in the case where it is not necessary to allocate a new empty region, the process advances to S408.
(S405):
An empty region is searched for within the FATs (305 and 306) in the RAM, and a single-cluster empty region is obtained. In the FATs (305 and 306), an FAT entry whose value is set at 0x0000 indicates an empty cluster, and thus the process for obtaining an empty region is a process in which an FAT entry whose value is 0x0000 within the FATs (305 and 306) is obtained. To be more specific, the FAT entries within the FATs (305 and 306) in the RAM are checked in order, an FAT entry whose value is set at 0x0000 is obtained, and the value of the corresponding cluster number of that FAT entry is found. The process for searching the FAT entries may, for example, be carried out in order from the start of the FATs (305 and 306) to the end of the FATs (305 and 306), or the process may be commenced from the FAT entry following the FAT entry to which an empty region was allocated the previous time, returning to the start of the FATs (305 and 306) when the end of the FATs (305 and 306) has been reached, and performing the process up until the FAT entry to which an empty region was allocated the previous time. In this manner, the process for searching the FAT entries is not particularly limited, and any process that enables the entirety of the regions of the FATs (305 and 306) to be searched for an empty region may be used.
(S406):
The value of the FAT entry corresponding to the number of the empty cluster obtained in S405 is set as a value indicating a link end. In the FATs (305 and 306), the FAT entry whose value is set to 0xFFFF indicates a link end, and thus a process for setting the value of that FAT entry in the RAM as 0xFFFF is carried out in S406.
(S407):
The value of the FAT entry corresponding to the cluster number of the current link end is set in the RAM from 0xFFFF to the number of the empty cluster obtained in S405. When it is necessary to obtain an empty region, this indicates an addition to the end of the file, and thus in such a case, the links are followed to the file end in the process for following the links performed in S403. For this reason, the value of the FAT entry corresponding to the cluster number at the current link end is set to 0xFFFF, indicating the link end. Accordingly, as a result of the process of S407, the linking continues to the empty cluster newly obtained in S405, thus lengthening the file links by one cluster's worth, which makes it possible to add file data.
(S408):
The file data is written into the cluster in the write position currently being referred to. In the case where it has been determined in S404 that it is necessary to obtain an empty region, the write position currently referred to is the empty cluster obtained in S405. On the other hand, in the case where it has been determined in S404 that it is not necessary to obtain an empty region, the write position currently referred to is the cluster reached as a result of following the links in S403.
(S409):
It is determined whether all the file data has been written. If file data still remains, the process returns to S404. However, if all the file data has been written, the process advances to S410.
(S410):
The information held within the directory entry 308, such as the file size, the last update date/time, and so on is updated, and the directory entry 308 held in the non-volatile memory of the information recording module is overwritten.
(S411):
The FATs (305 and 306) held in the non-volatile memory of the information recording module are overwritten with the data of the FATs (305 and 306) in the RAM of the access module, and the process ends.
Through this file data writing process, when, as shown in
In this manner, with the FAT filesystem, the file management information is held in both the FATs (305 and 306) and the directory entry 308, and thus it is necessary to update the information in both when updating the file. In other words, when the access module updates a file held in the information recording module, a series of writing processes, such as file data (DATA), directory entry 308 (DIR), and FATs (305 and 306) (FAT1 and FAT2) as shown in
Meanwhile, one feature of NAND flash memories is that it is necessary to erase the data thereof prior to recording data. Accordingly, when carrying out a write of a size less than the size of a block, which is the unit by which data is erased, that block cannot be directly overwritten; thus it is necessary to obtain a different, unused block, erase the data within the block, and then write the new data into that block. At this time, it is necessary to copy the valid data in the old block into the new block, which reduces the recording speed. Because the amount that is copied increases as the data write size decreases, and because the data write size decreases as it approaches the block size, it is generally known that the recording speed is highest in NAND flash memories when writing data in block-size units.
A conventional method has been disclosed in which the real-time recording of video content or the like is realized by increasing the speed of recording into a NAND flash memory and preventing a drop in the recording speed caused by the aforementioned copy process (for example, see Patent Citation 1). In this method, when regions in the flash memory are divided into block units, only blocks in which the number of empty regions (empty clusters) is high are obtained, and data such as video content is recorded. Doing so eliminates data copying within blocks and prevents a drop in the recording speed.
Patent Citation 1: International Publication WO05/055064
However, when updating the FATs (305 and 306), the directory entry 308, and so on, there is the possibility that the recording address moves across multiple blocks, and thus the aforementioned conventional technique cannot prevent a drop in speed. For example, with devices that record movies and the like, in the case where the power supply has been interrupted during the recording of file data and the directory entry 308, FATs (305 and 306), and so on could not be updated, the file data recorded up until that point is lost; thus the directory entry 308, the FATs (305 and 306), and so on are updated periodically, every several seconds or so. When recording the data (DATA), directory entry 308 (DIR), and the FATs (305 and 306) (FAT1 and FAT2) of a single file as shown in
Furthermore, in the case where multiple files are recorded in parallel, such as when recording a still image file during the recording of video, there is the possibility that the recording address will move across multiple blocks, and thus a drop in the recording speed cannot be prevented in this case as well. For example, as shown in
Having been achieved in light of the aforementioned problems, it is an object of the present invention to provide an access module, an information recording module, a controller, and an information recording system that prevent a drop in speed, even in a case such as where multiple files are recorded into a NAND flash memory in parallel, and achieve real-time recording.
An access module according to the present invention is an access module that accesses an information recording module having a non-volatile memory that stores data, and includes: an address management information setting processing unit that communicates, to the information recording module, location information indicating a region that stores data of a predetermined data type; and a data shaping processing unit that, in the case where valid data of file data to be recorded into the information recording module is smaller in size than a predetermined unit of recording processing, changes the size of the file data to the size of the predetermined unit of recording processing by adding arbitrary data to the file data, and records the file data into the information recording module.
Meanwhile, in the case where file data of multiple files is recorded into the information recording module in parallel, it is effective for the file data of the multiple files to be arranged in an arbitrary order and recorded into the information recording module so that addresses of the file data are continuous within a predetermined continuous region size.
In addition, the predetermined data type may be filesystem management information that includes information such as the name, file size, or the like of the file to be recorded.
Furthermore, the predetermined data type may be filesystem management information that includes information such as the name, file size, or the like of the file to be recorded; and the address management information setting processing unit may communicate multiple pieces of location information indicating regions in which the filesystem management information is stored to the information recording module.
In addition, in the case where arbitrary data has been added to the file data recorded into the information recording module, it is preferable for the size of the valid data before the arbitrary data was added to be set as the file size in the filesystem management information that includes information such as the name, the file size, or the like of the file.
In addition, it is preferable for the size of the predetermined unit of recording processing to be a multiple of the physical size of the unit of data recording processing of the non-volatile memory included in the information recording module.
Furthermore, it is preferable for the predetermined continuous region size to be a multiple of the physical size of the unit of data erasing processing of the non-volatile memory included in the information recording module.
An information recording module according to the present invention includes: a non-volatile memory that stores data; address management information that holds location information indicating a region in which is stored data of a predetermined data type specified by an external access module; and an entry storage control unit that, in the case where it has been determined based on the address management information that data of the predetermined data type is to be recorded, stores the data in a specific region within the non-volatile memory.
In addition, it is preferable for the predetermined data type to be filesystem management information that includes information such as the name, file size, or the like of the file to be recorded.
Furthermore, the predetermined data type may be filesystem management information that includes information such as the name, file size, or the like of the file to be recorded; and the address management information may hold multiple pieces of location information indicating regions in which the filesystem management information is stored.
In addition, it is preferable for the entry storage control unit to allocate a specific region to each piece of location information, indicating regions in which the filesystem management information is stored, that is held in the address management information, and store the filesystem management information in the specific regions.
In addition, it is effective for the address management information to further include location information of a region that stores data of a second data type that is different from the predetermined data type; and for the entry storage control unit to further perform a process that, in the case where it has been determined based on the address management information that data of the second data type is to be recorded, stores the data in a specific region within the non-volatile memory that is different from the region in which the data of the predetermined data type is stored.
In addition, it is preferable for the second data type to be region management information used by a filesystem.
A controller according to the present invention is a controller that controls an information recording module having a non-volatile memory that stores data, and includes: an entry storage control unit that refers to address management information that holds location information of a region in which data of a predetermined data type specified by an external access module is stored, and in the case where it has been determined that data of the predetermined data type is to be recorded, stores the data in a specific region within the non-volatile memory.
An information recording system according to the present invention includes an information recording module and an access module that accesses the information recording module. The information recording module has: a non-volatile memory that stores data; address management information that holds location information indicating a region in which is stored data of a predetermined data type specified by the access module; and an entry storage control unit that, in the case where it has been determined based on the address management information that data of the predetermined data type is to be recorded, stores the data in a specific region within the non-volatile memory. The access module has: an address management information setting processing unit that communicates, to the information recording module, location information indicating a region that stores data of the predetermined data type; and a data shaping processing unit that, in the case where valid data of file data to be recorded into the information recording module is smaller in size than a predetermined unit of recording processing, changes the size of the file data to the size of the predetermined unit of recording processing by adding arbitrary data to the file data, and records the file data into the information recording module.
According to the present invention, it is possible to prevent a drop in speed, even in a case such as where multiple files are recorded into a NAND flash memory in parallel, and achieve real-time recording.
An access module, an information recording module, a controller, and an information recording system according to the present invention will be described hereinafter with reference to the drawings.
The access module 1 shown in
The ROM 14 further includes an application control unit 101, a filesystem control unit 102, and an information recording module access unit 103. The application control unit 101 carries out control of the access module 1 as a whole, generating data, controlling the power thereof, and so on. The filesystem control unit 102 carries out control for managing data as files through a filesystem such as the FAT filesystem. The information recording module access unit 103 is provided with a size and an address along with data from the filesystem control unit 102, and controls the exchange of commands, data, and so on with the information recording module 2, recording data of a specified size into a specified location within a non-volatile memory of the information recording module 2 and so on.
The filesystem control unit 102 further includes an address management information setting processing unit 104 and a data shaping processing unit 105. The address management information setting processing unit 104 is a processing unit that carries out a process for, when data is recorded into a file, communicating information regarding the location of a directory entry 308 of that file to the information recording module 2, and does not exist in conventional access modules. Meanwhile, the data shaping processing unit 105 is a processing unit that pads data and records the padded data into the information recording module 2 in the case where the size of the data to be recorded into the file is not a multiple of the unit used for recording into the information recording module 2, and, like the address management information setting processing unit 104, does not exist in conventional access modules. These processing units will be described in greater detail later.
Meanwhile, the information recording module 2 shown in
The controller 21 is a module that carries out the overall control of the non-volatile memory 22, and is configured as a system LSI that includes a CPU and the like. The controller 21 further includes an access module interface 211, a CPU 212, a RAM 213, a ROM 214, and a non-volatile memory interface 215. The access module interface 211 serves as a connection unit between the information recording module 2 and the access module 1, and like the information recording module interface 13, is an interface that exchanges control signals and data. A program for controlling the information recording module 2 is stored in the ROM 214, and the program is run by the CPU 212 using the RAM 213 as a temporary storage region. The non-volatile memory interface 215 serves as a connection unit between the controller 21 and the non-volatile memory 22, and controls the exchange of commands, data, and so on with the non-volatile memory 22.
The ROM 214 further includes an entry storage control unit 217, an FAT storage control unit 218, and a user data storage control unit 219. The entry storage control unit 217 is a control unit that, in the case where a data write command issued by the access module 1 to the information recording module 2 indicates a process for writing specific data corresponding to a directory entry, carries out a process for storing that data within an entry storage region 221. The FAT storage control unit 218 is a control unit that, in the case where the data write command indicates a process for writing specific data corresponding to an FAT, carries out a process for storing that data within an FAT storage region 222. The user data storage control unit 219 is a control unit that, in the case where the data write command indicates a process for writing other data, carries out a process for storing that data in a user data storage region 223.
Although the process performed by the user data storage control unit 219 is essentially the same as processing handled by the conventional information recording module 2, the processes performed by the entry storage control unit 217 and the FAT storage control unit 218 do not exist in the conventional information recording module 2. Details of these control units will be given later.
Meanwhile, the RAM 213 includes address management information 216, which is used by the entry storage control unit 217, the FAT storage control unit 218, and the user data storage control unit 219 as control information.
In addition, the non-volatile memory 22 includes the entry storage region 221, the FAT storage region 222, and the user data storage region 223 mentioned earlier, and the entry storage region 221 further includes a first entry storage region 224 and a second entry storage region 225.
The information recording module 2 according to the present embodiment uses the entry storage region 221, the FAT storage region 222, and the user data storage region 223 within the non-volatile memory 22 as different data storage destinations depending on the type of data. Meanwhile, in the case where multiple files are recorded in parallel, data obtained by padding the data of the multiple files to a length that is a multiple of a predetermined write process unit is recorded, in block units, into sequential address regions. Furthermore, the access module 1 according to the present embodiment includes the address management information setting processing unit 104, which communicates location information of the directory entry 308 to the information recording module 2, and the data shaping processing unit 105, which pads fractional data and records that data into the information recording module 2. Combining the access module 1 and the information recording module 2 eliminates wasteful copying processes that occur within the information recording module 2 and prevents a drop in the recording speed even in the case where multiple files are recorded in parallel, making it possible to quickly and stably record data into the information recording module 2.
The configuration of the non-volatile memory 22 according to the present embodiment will now be described using
Relationships between logical addresses and physical addresses within the non-volatile memory 22 according to the present embodiment will now be described using
The first entry storage region 224 is a dedicated physical block in which the directory entry 308 of the first file (an “ENTRY1” in the logical address space) is stored, and in the example shown in
As shown in
The address management information 216 according to the present embodiment will be described next using
The first entry location information 411 is information regarding the storage location of the first directory entry 308, and is configured of the physical address (physical block number) and the logical address (logical block number, logical page number) in which that directory entry 308 is stored. This logical address is communicated to the information recording module 2 by the address management information setting processing unit 104 of the access module 1. Meanwhile, the second entry location information 412 is information regarding the storage location of the second directory entry 308, and the content thereof is the same as the first entry location information 411. Finally, the FAT location information is information regarding the storage location of the FATs (305 and 306), and is likewise configured of a physical address and a logical address. However, because the size of the FATs (305 and 306) is greater than the directory entry 308, the address information managed by the FAT location information 413 is multiple pages' worth of address information. The logical address of the FATs (305 and 306) is determined when the information recording module 2 is formatted and assumes a fixed value thereafter; for this reason, the FAT location information 413 may, like the first entry location information 411, be communicated to the information recording module 2 by the address management information setting processing unit 104 of the access module 1, or a pre-set logical address within the information recording module 2 may be used.
The temporary block information 402 is information regarding the state of the temporary block region 226 within the user data storage region 223, and is configured of information of the physical address of the physical block that is currently allocated as the temporary block region 226, and a logical address associated with that physical block.
The address conversion information 403 is information indicating the correspondence relationships between the respective physical addresses and logical addresses of the physical blocks within the user data storage region 223. This information is the same as information held by the conventional information recording module 2, and is information that is generally called an “address conversion table”, a “logical address conversion chart”, and so on.
The entry storage control unit 217, the FAT storage control unit 218, and the user data storage control unit 219 according to the present embodiment control recording regions within the non-volatile memory 22 using this address management information 216. In other words, a drop in speed during data recording is prevented by storing the directory entry 308, the FATs (305 and 306), and so on through a special write process that uses dedicated physical blocks. Furthermore, the present embodiment also provides a method that prevents a drop in speed during data recording even in the case where multiple files are recorded in parallel.
For example, in a case such as that shown in
In this manner, in the present embodiment, data is recorded into continuous addresses in multiples of the size of the unit of processing in the case where multiple files are recorded in parallel. Furthermore, a fractional size at the end of the file is padded so as to attain a multiple of the unit of processing, and is then recorded in the information recording module 2. As a result, it is possible to record data in the information recording module 2 at high speed, as if a single file is being continuously recorded.
Hereinafter, a detailed data recording procedure according to the present embodiment will be described.
The procedures of a file writing process according to the present embodiment will now be described using
(S1301):
The address management information setting processing unit 104 of the access module 1 communicates, to the information recording module 2, the location information of the directory entry 308 of the file to be recorded. The communicated information is stored in the first entry location information 411 or the second entry location information 412 in the address management information 216 within the RAM 213 of the information recording module 2. If the file to be recorded is the first file, the information is stored in the first entry location information 411, whereas if the file to be recorded is the second file, the information is stored in the second entry location information 412.
(S1302):
The data of the file to be recorded is written into the information recording module 2. At this time, in the case where the size of the write is not a multiple of the unit of recording processing, as with the end of a file or the like, the data shaping processing unit 105 of the access module 1 pads the data so as to attain a multiple of the unit of recording processing, and writes the data into the information recording module 2. Details of the content of this process are illustrated in
(S1303):
It is determined whether all the file data has been written. If file data still remains, the process returns to S1302. However, if all the file data has been written, the process advances to S1304.
(S1304):
The directory entry 308 of the file to be recorded is written into the information recording module 2 having updated the information of the directory entry 308, such as the file size, the last update date/time, and so on. At this time, in the case where padding has been carried out in the process of S1302, the file size is set to a file size that is a fraction of the original file size. This makes it possible to store the file data in the information recording module 2 as a file of the original file size, even if the file data has been padded in S1302.
(S1305):
The link information within the FATs (305 and 306) is updated based on the data write process carried out in S1302 and is written into the information recording module 2.
Next, the procedure of the data write process indicated in
(S1401):
In the case where the user data region 302 in the logical address space has been divided into block units, it is determined whether an empty block that includes an empty region has already been obtained. In the case where an empty block has already been obtained, the process advances to S1403. However, in the case where an empty block has not yet been obtained, the process advances to S1402. In the present embodiment, when recording file data into the user data region 302, in the case where the user data region 302 has been divided into block units, it is assumed that a block in which all of the regions within the block are empty regions will be selected and the file data will be written continuously into that block in units of pages. For this reason, “an empty block already being obtained” refers to a state in which a given empty block has already been selected as the recording region and the process of writing the file data into that block has commenced. Conversely, “an empty block not yet being obtained” refers to a state immediately after file data has been written up to the end of a given empty block, and it is thus necessary to select a given empty block before writing new data.
(S1402):
In the case where it has been determined in the determination process of S1401 that an empty block has not yet been obtained, an empty block is obtained. To be more specific, the FATs (305 and 306) are referred to, and a process for finding a given block in which all the regions in the block are empty regions is carried out.
(S1403):
An empty page within the empty block is obtained. It is assumed that the recording of data into the empty block will be carried out continuously from the start of the region, and thus the first empty page that is present when searching the target block from the start is obtained as the empty page for recording. Meanwhile, the term “page” is used because the unit of recording processing is the page, and thus in the case where the recording is carried out using a unit aside from the page size as the unit of the recording processing, an empty region of the size of that unit of recording processing is obtained in this process.
(S1404):
It is determined whether the size of the data to be recorded is the same as the page size. In the case where the size is not the same as the page size and is instead a fractional size, the process advances to S1404. On the other hand, in the case where the size is exactly the same as the page size, the process advances to S1406. As with S1403, in the case where the unit of recording processing is not the page size unit, this process is a process in which the size of the data to be recorded and the size of the unit for the recording processing are compared.
(S1405):
The data shaping processing unit 105 pads the data to be recorded so that the size of the data to be recorded is the same as the page size. The padding data may be a fixed value, such as 0x00 or 0xFF, or may be an arbitrary value.
(S1406):
The page-size data is written into the information recording module 2, and the processing ends.
The size of the block, the page, and so on used in the descriptions of
As described thus far using
Next, a directory entry write process performed by the entry storage control unit 217 according to the present embodiment will be described using
(S1601):
The write destination address is obtained based on a write command issued to the information recording module 2 by the access module 1. Here, the “write destination address” refers to a logical address specified by a write command issued to the information recording module 2 by the access module 1.
(S1602):
The write destination address obtained in S1601 is compared with the first entry location information 411, and it is determined whether the values thereof match. In the case where the values match, the process advances to S1604. However, in the case where the values do not match, the process advances to S1603.
(S1603):
In the case where it has been determined that the values do not match in the determination process of S1602, no write will be made into the first entry storage region 224; therefore, other write processes, such as a process for writing into the user data storage region 223, are carried out, and the processing ends.
(S1604):
In the case where it has been determined that the values match in the determination process of S1602, it is determined whether an unused page is present in the first entry storage region 224. In the case where an unused page is present, the process advances to S1606. However, in the case where an unused page is not present, the process advances to S1605. Here, an “unused page” refers to a page from which the data has already been erased and that therefore holds no valid data, and into which data can be written.
(S1605):
In the case where it has been determined that an unused page is not present in the determination process of S1604, data cannot be written into the first entry storage region 224, and thus the data that is held in the first entry storage region 224 is erased. As a result, an unused page is created within the first entry storage region 224.
(S1606):
Data is written into the start of the unused page. Because it is assumed that the recording of data into the unused page will be carried out continuously from the start of the region, the first unused page that is present when searching the first entry storage region 224 from the start thereof is taken as the unused page for recording.
As described thus far using
Next, an FAT write process performed by the FAT storage control unit 218 according to the present embodiment will be described using
As described thus far using
Next, a user data write process performed by the user data storage control unit 219 according to the present embodiment will be described using
In
(S2001):
The write destination address is obtained based on a write command issued to the information recording module 2 by the access module 1. Here, the “write destination address” refers to a logical address specified by a write command issued to the information recording module 2 by the access module 1.
(S2002):
The write destination address obtained in S2001 is compared to the first entry location information 411, the second entry location information 412, and the FAT location information 413, and it is determined whether the write is a write of the directory entry 308, the FATs (305 and 306), or the like. In the case where the write has been determined to be a write of the directory entry 308, the FATs (305 and 306), or the like, the process advances to S2003. However, in the case where the write has been determined not to be a write of the directory entry 308, the FATs (305 and 306), or the like, the process advances to S2004.
(S2003):
In the case where it has been determined that the write is a write of the directory entry 308, the FATs (305 and 306), or the like in the determination process performed in S2002, the write is not a write made into the user data storage region 223; therefore, other write processes, such as a process for writing into the first entry storage region 224, are carried out, and the process ends.
(S2004):
However, in the case where it has been determined that the write is not a write of the directory entry 308, the FATs (305 and 306), or the like in the determination process performed in S2002, the write destination address obtained in S2001 is compared with the temporary block information 402, and it is determined whether the process is a process for writing into the temporary block region 226. In the case where it has been determined that the process is a process for writing into the temporary block region 226, the process advances to S2005. However, in the case where it has been determined that the process is not a process for writing into the temporary block region 226, the process advances to S2006.
(S2005):
In the case where it has been determined that the process is a process for writing into the temporary block region 226 in the determination process performed in S2004, it is determined whether an address jump will occur within the temporary block region 226. In the case where it has been determined that an address jump will occur, the process advances to S2006. However, in the case where it has been determined that an address jump will not occur, the process advances to S2009.
Here, an “address jump occurring” refers to a case where the address of the last user data written into the temporary block region 226 and the write destination address obtained in S2001 are not sequential. For example, in a state shown in
(S2006):
In the case where it has been determined that the write destination address and the temporary block information 402 do not match in the determination process of S2004, the case where it has been determined that an address jump has occurred in the determination process of S2005, or the like, a data copy process is carried out.
(S2007):
It is determined whether an unused page is present in the physical block to which the temporary block region 226 is allocated. In the case where an unused page is present, the process advances to S2009. However, in the case where an unused page is not present, the process advances to S2008. For example, when data is copied into the physical block 0xF000 through the process indicated in S2006 and illustrated in
(S2008):
In the case where it has been determined, in the determination process of S2007, that an unused page is not present in the physical block to which the temporary block region 226 is currently allocated, the data contained in a physical block that stores only old data is erased, and the temporary block information 402 is updated so that that physical block is used as the new temporary block region 226. For example, in the example illustrated in
(S2009):
The user data is written into the start of the unused pages within the temporary block region 226, and the process ends. Because it is assumed that the recording of data into the unused pages will be carried out continuously from the start of the region, the first unused page that is present when searching the temporary block region 226 from the start thereof is taken as the unused page for recording.
The processing illustrated in
As described thus far using
As described thus far, in the case where the access module 1 and the information recording module 2 of the present embodiment are used in combination and multiple files are recorded in parallel, wasteful copy processes occurring in the information recording module 2 are eliminated and a drop in the recording speed is prevented, which makes it possible to write file data into the information recording module 2 in a fast and stable manner.
Although the present invention has been described based on the aforementioned embodiment, it should be noted that the present invention is of course not limited to the embodiment discussed above. Many variations can be made within a scope that does not depart from the spirit of the present invention. The numerical values denoted in the present embodiment are exemplary, and other values may be used instead. For example, the values of the physical block size, page size, and so on are all exemplary, and those sizes are not intended to be limited to the values denoted in the present embodiment.
Meanwhile, although the configuration of the controller 21 of the information recording module 2 has been described using
In addition, although FAT 16 has been described as an example of the filesystem in the present embodiment, a different filesystem may be employed.
In addition, it is not necessary for the number of non-volatile memories 22 used in the information recording module 2 to be limited to one, and multiple memories may be used in combination. The speed of the write process can be further increased particularly in the case of a configuration in which data is written into multiple non-volatile memories 22 in parallel.
In addition, a method has been described in which the file size in the directory entry 308 is adjusted in the process indicated in S1304 in the case where the data shaping processing unit 105 has padded the data to be written. However, in the case where the file format of the video file, the still image file, or the like supports a function for adding padding, the data may be stored directly using the post-padding size as the file size of the directory entry 308.
In addition, although a case in which the size of the unit of the recording processing is the same as the page size has been described as an example, a different size may be used as the size of the unit of the recording processing. For example, a multiple of the cluster size, which is the size of the unit by which data is managed in the filesystem, may be used as the size of the unit of the recording processing.
In addition, although the present embodiment describes an example in which two files are written in parallel, the configuration may be such that three or more files can be written in parallel. Such a configuration can be accommodated by increasing the number of entry storage regions to the number of files to be written in parallel.
In addition, although the present embodiment describes an example in which two files are written in parallel, in the case where the filesystem supports a function for storing metadata of a file separately from the file data, the second entry storage region of the present invention may be used to store the metadata of the file. For example, in the NTFS filesystem, extension information called a “named stream” can be stored separately from the file data as metadata regarding that file. For this reason, the second entry storage region of the present invention can, for example, be used to store the named stream information of that file. Through this, such metadata of files can also be recorded at a high speed.
In addition, although a method has been described in which a process for setting the entry location information is carried out in S1301 of
In addition, although
In addition, although
Note that the various blocks of the access module (access apparatus) and the information recording module (information recording apparatus) described in the aforementioned embodiment may be implemented as single individual chips by employing semiconductor devices such as LSIs, or some or all of the blocks may be implemented as a single chip.
Note that although the term “LSI” is used here, other names, such as IC, system LSI, super LSI, ultra LSI, and so on are used depending on the degree of integration.
Further, the manner in which the circuit integration is achieved is not limited to LSIs, and it is also possible to use a dedicated circuit or a general purpose processor. FPGAs (Field Programmable Gate Arrays) that can be programmed after the LSI manufacture, configurable processors in which the connections, settings, and so on of circuit cells within the LSIs can be reconfigured, or the like may be used as well.
Furthermore, if other technologies that improve upon or are derived from semiconductor technology enable integration technology to replace LSIs, then naturally it is also possible to integrate the functional blocks using that technology. Biotechnology applications are one such foreseeable example.
In addition, the various processes in the aforementioned embodiment may be realized as hardware, or as software (this includes implementations through an OS (operating system), middleware, or a predetermined library). These processes may also be implemented through processes in which the software and hardware run integrated with one another. It goes without saying that it is necessary to adjust the timing at which to execute each process in the case where the access module (access apparatus) and the information recording module (information recording apparatus) according to the above embodiment are implemented through hardware. For simplicity's sake, the descriptions in the above embodiment have omitted the details regarding the adjustment of the timing of the various signals that arises in the actual hardware architecture.
In addition, the order of execution in the processing methods of the aforementioned embodiment are not necessarily limited to the descriptions in the aforementioned embodiments, and the order of execution can be interchanged without departing from the spirit of the invention.
In addition, although the access module (access apparatus) and the information recording module (information recording apparatus) have been described as separate apparatuses (separate modules) in the aforementioned embodiment, the present invention is not limited thereto, and the access module (access apparatus) and the information recording module (information recording apparatus) may be configured within a single apparatus.
An access module according to the present invention includes an address management information setting processing unit that communicates, to an information recording module, information regarding the storage location of a directory entry, and a data shaping processing unit that pads file data when writing fractional data such as the end of a file and writes the file data into the information recording module. The information recording module according to the present invention, meanwhile, includes an entry storage control unit, an FAT storage control unit, and a user data storage control unit that update a storage destination and a storage method in accordance with a data type specified to be written by the access module. By combining the access module and the information recording module, in the case where multiple files are recorded in parallel, wasteful copy processes occurring within the information recording module can be eliminated and a decrease in the recording speed prevented, and the file data can be written into the information recording module in a stable manner and at a high speed. Such an access module is optimal for devices that handle digital content such as music, still images, video, and so on, and particularly in such devices that are required to record content data into an information recording module in real time and such devices that record multiple files, such as video files and still image files, simultaneously; thus the access module can be employed in PC applications, audio recorders, DVD recorders, HDD recorders, video cameras, digital still cameras, mobile telephone terminals, and so on. Meanwhile, the information recording module according to the present invention can be employed in removable media such as memory cards, internal recording devices, or the like that store the stated digital content.
Number | Date | Country | Kind |
---|---|---|---|
2009-060695 | Mar 2009 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP2010/001510 | 3/4/2010 | WO | 00 | 9/10/2010 |