WO2010103760A1 - アクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システム - Google Patents
アクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システム Download PDFInfo
- Publication number
- WO2010103760A1 WO2010103760A1 PCT/JP2010/001510 JP2010001510W WO2010103760A1 WO 2010103760 A1 WO2010103760 A1 WO 2010103760A1 JP 2010001510 W JP2010001510 W JP 2010001510W WO 2010103760 A1 WO2010103760 A1 WO 2010103760A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- data
- information
- file
- information recording
- area
- Prior art date
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0628—Interfaces specially adapted for storage systems making use of a particular technique
- G06F3/0638—Organizing or formatting or addressing of data
- G06F3/0643—Management of files
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0602—Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
- G06F3/061—Improving I/O performance
- G06F3/0613—Improving I/O performance in relation to throughput
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F3/00—Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
- G06F3/06—Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
- G06F3/0601—Interfaces specially adapted for storage systems
- G06F3/0668—Interfaces specially adapted for storage systems adopting a particular infrastructure
- G06F3/0671—In-line storage system
- G06F3/0673—Single storage device
- G06F3/0679—Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]
Definitions
- the present invention relates to an access module, an information recording module, a controller, and an information recording system that store data in a nonvolatile memory and manage it as a file.
- recording media for recording digital data such as music content and video data
- memory cards using semiconductor memories such as FlashROM as recording elements can be miniaturized, and rapidly spread mainly in small portable devices such as digital still cameras and mobile phone terminals. is doing.
- semiconductors such as flash ROMs can be used in place of removable removable media such as conventional memory cards, such as semiconductor memory built into devices and used in place of hard disks.
- Memory has come to be used.
- a semiconductor element called a NAND flash memory is mainly used.
- the NAND flash memory is a recording element that can once erase already recorded data and then record another data again, and forms an information recording device that can be rewritten a plurality of times, similar to a conventional hard disk. Is possible.
- data stored in a memory card or device built-in storage is managed by a file system.
- a file system By managing data with a file system, it becomes possible to share data as a file between devices that interpret the same file system, and users can easily reference their stored data among multiple devices, It is possible to copy.
- the most widely used file system is called a FAT file system.
- the FAT file system has a feature that the area management is centrally managed by a table called a file allocation table (FAT). Since the structure is relatively simple and easy to implement, a floppy (registered trademark) disk or a PC is used. Widely used as a file system for hard disks, memory cards, etc.
- FIG. 2 shows the configuration of the FAT file system.
- FAT file system there are types such as FAT12, FAT16, and FAT32 depending on the bit width of the management unit in the file allocation table.
- FAT16 is taken as an example.
- FAT16 is taken as an example.
- a file system management information area 301 which is an area for storing file system management information such as an area allocation unit and the size of the area managed by the file system. To do.
- management information of a file system called a master boot record / partition table (MBR) 303, a partition boot sector (PBS) 304, FAT (305, 306), and a root directory entry (RDE) 307 is stored. And information necessary for managing the user data area 302 is stored.
- MLR master boot record / partition table
- PBS partition boot sector
- FAT 305, 306
- RDE root directory entry
- the master boot record / partition table 303 is an area in which information for managing the area in the logical address space managed by the file system by dividing the area into a plurality of areas called partitions is stored.
- the partition boot sector 304 is an area for storing management information in one partition such as the size of the area management unit in the partition.
- the FAT (305, 306) is an area in which information regarding the storage location of data included in a file is stored. Usually, there are two FATs (305, 306) having the same information, and one FAT (305, 306). Even if 306) is damaged, it is duplexed so that the file can be accessed by the other FAT (305, 306).
- the root directory entry 307 is an area in which information (directory entry) of files and directories existing directly under the root directory is stored.
- a user data area 302 for storing file body data and the like exists in an area subsequent to the file system management information area 301.
- the user data area 302 is divided and managed for each management unit called a cluster having a size of about 512 bytes to 32 KB, and data contained in a file is stored in each cluster.
- a file storing a lot of data stores data across a plurality of clusters, and the connection between the clusters is managed by link information stored in the FAT (305, 306).
- information (directory entry) on files and subdirectories existing in the directory immediately under the root directory is stored using a part of the user data area 302.
- FIG. 3 is a diagram showing the structure of the directory entry of FAT16.
- the directory entry 308 is assigned with a 32-byte directory entry 308 for each file and directory, and stores information related to the file and directory. That is, each time a file or directory is added, information of a 32-byte directory entry 308 is newly created and recorded in the area of the root directory entry 307 or the user data area 302.
- the name of the file or directory is stored in the first 8 bytes of the directory entry 308, the name of the file or directory is stored.
- the extension is stored in the following 3 bytes.
- the subsequent 1 byte stores attribute information such as a flag for identifying the type of the file / directory and a flag for identifying whether the file / directory is read-only. Further, information on the last update date / time of the file / directory, the start cluster number indicating the start position of the cluster in which the substance of the file / directory data is stored, the number of bytes of the file size, and the like are stored.
- the directory entry 308 holds only information on the position of the cluster storing the head data of the file
- the position information is stored in the FAT (305, 306). Retained. That is, when updating a file, it is necessary to write the file data and also write the information of the directory entry 308 and FAT (305, 306).
- the directory entry 308 of the target file is read out.
- S402 The start cluster number stored in the read directory entry 308 is acquired, and the head position of the file data is confirmed.
- S403 The FAT (305, 306) is read onto the RAM of the access module, and the link is traced in the FAT (305, 306) on the RAM in order from the start position of the file data acquired in S402, and the cluster number of the write position is acquired.
- the FAT entries in the FAT (305, 306) on the RAM are sequentially referred to, a FAT entry whose value is set to 0x0000 is found, and the value of the corresponding cluster number of the FAT entry is obtained.
- the FAT entry search processing may be performed sequentially from the beginning to the end of the FAT (305, 306), or the processing is started from the FAT entry next to the FAT entry to which the previous free area is allocated.
- , 306) may be returned to the beginning of the FAT (305, 306), and the process may be executed up to the FAT entry to which the previous free area is allocated.
- the FAT entry search processing procedure is not particularly limited as long as it can realize a process of searching for a free area over the entire FAT (305, 306) area.
- the value of the FAT entry corresponding to the current cluster number of the link end is set to 0xFFFF meaning the link end. Therefore, by connecting the link to the free cluster newly acquired in S405 by the process in S407, the file link becomes longer by one cluster, and the file data can be additionally written.
- the file management information is stored in both the FAT (305, 306) and the directory entry 308. Therefore, when updating the file, it is necessary to update both of the information. is there. That is, when the access module updates a file stored in the information recording module, as shown in FIG. 7, file data (DATA), directory entry 308 (DIR), FAT (305, 306) (FAT1, FAT2), etc. A series of writing processes are performed. On the other hand, NAND flash memory has a feature that data must be erased once before data is recorded.
- the recording address may move between a plurality of blocks, so the above-described conventional technique prevents a decrease in speed.
- a recording device such as a movie
- the directory entry 308 or FAT (305, 306) cannot be updated, the file data recorded until then is lost.
- the directory entry 308 and the FAT (305, 306) are periodically updated at intervals of several seconds.
- data of one file DATA
- directory entry 308 DIR
- FAT (305, 306) FAT1, FAT2
- the recording address may move across multiple blocks, and the recording It will not be possible to prevent the decline.
- the recording address may move across a plurality of blocks.
- the directory entry 308 (DIR1, DIR2) of each file may be stored at different addresses, there is a possibility that the recording address similarly moves across a plurality of blocks.
- an access module in view of the above problems, an access module, an information recording module, a controller, and an information recording system that prevent real-time recording even when a plurality of files are recorded in the NAND flash memory in parallel and prevent real-time recording.
- the purpose is to provide.
- the access module of the present invention is an access module for accessing an information recording module having a nonvolatile memory for storing data, and an address for notifying the information recording module of position information of an area for storing data of a predetermined data type
- an access module for accessing an information recording module having a nonvolatile memory for storing data, and an address for notifying the information recording module of position information of an area for storing data of a predetermined data type
- arbitrary data is added to change to the predetermined recording processing unit size.
- a data shaping processing unit for recording file data in the information recording module.
- the information is arranged while arranging the file data of the plurality of files in an arbitrary order so that addresses are continuous within a predetermined continuous area size. It is effective to record in the recording module.
- the predetermined data type may be file system management information including information such as a name of a recording target file and a file size. Further, the predetermined data type is file system management information including information such as a name of a recording target file and a file size, and the address management information setting processing unit stores a position of an area for storing the file system management information. A plurality of information may be notified to the information recording module. Further, when arbitrary data is added to the file data to be recorded in the information recording module, the size of the effective data before the data addition is added to the file system management information including information such as the file name and file size. It is better to set as.
- the predetermined recording processing unit size may be a multiple of the physical data recording processing unit size of the nonvolatile memory included in the information recording module.
- the predetermined continuous area size may be a multiple of the physical data erasure processing unit size of the nonvolatile memory included in the information recording module.
- the information recording module of the present invention includes a nonvolatile memory for storing data, address management information for storing position information of an area for storing data of a predetermined data type designated by an external access module, and the address management information An entry storage control unit for storing data in a specific area in the non-volatile memory when it is recognized that data of the predetermined data type is recorded based on the data.
- the predetermined data type may be file system management information including information such as a name of a recording target file and a file size.
- the predetermined data type is file system management information including information such as a name of a recording target file and a file size
- the address management information includes a plurality of location information of an area for storing the file system management information. You may make it hold
- the entry storage control unit allocates a specific area to each of the position information of the areas for storing a plurality of file system management information held in the address management information, and stores the file system management information. Good.
- the address management information further includes position information of an area for storing data of a second data type different from the predetermined data type, and the entry storage control unit is configured to store the second data type based on the address management information.
- the second data type may be area management information used by the file system.
- the controller of the present invention is a controller for controlling an information recording module having a nonvolatile memory for storing data, and stores position information of an area for storing data of a predetermined data type designated by an external access module.
- an entry storage control unit is provided for storing data in a specific area in the nonvolatile memory when it is recognized that data of the predetermined data type is recorded.
- the information recording system of the present invention is an information recording system comprising an information recording module and an access module for accessing the information recording module, the information recording module comprising a nonvolatile memory for storing data, and the access module If it is recognized that the address management information for storing the location information of the area for storing the data of the predetermined data type designated from the above and the data of the predetermined data type is recorded based on the address management information,
- An entry storage control unit for storing data in a specific area in the nonvolatile memory, and the access module is an address for notifying the information recording module of positional information of an area for storing data of the predetermined data type Management information setting processing unit and file data to be recorded in the information recording module
- a data shaping processing section for adding arbitrary data to change to the predetermined recording processing unit size and recording file data in the information recording module when the effective data in is less than the predetermined recording processing unit size;
- the speed reduction can be prevented and real-time recording can be realized.
- Explanatory drawing which showed the structure of the access module in 1st Embodiment, and an information recording module Explanatory diagram showing the configuration of the FAT file system Explanatory diagram showing the structure of the directory entry Flow chart showing file data write processing procedure in FAT file system Explanatory drawing which showed an example of the state before file data writing in a FAT file system Explanatory drawing which showed an example of the state after file data writing in a FAT file system Explanatory drawing which showed an example of the recording procedure in the case of recording 1 file in a FAT file system Explanatory drawing which showed an example of the recording procedure in the case of recording two files in parallel in a FAT file system Explanatory drawing which showed an example of the structure of the non-volatile memory in 1st Embodiment Explanatory drawing which showed an example of the relationship between the logical address and the physical address in the non-volatile memory in 1st Embodiment Explanatory drawing which showed an example of the structure of the address management information in 1st Embodiment Explanatory drawing which
- FIG. 1 is a configuration diagram of an access module 1 and an information recording module 2 in the first embodiment.
- the access module 1 includes a CPU 11, a RAM 12, an information recording module interface 13, and a ROM 14.
- the ROM 14 stores a program for controlling the access module 1, and this program uses the RAM 12 as a temporary storage area and operates on the CPU 11.
- the information recording module interface 13 is a connection part between the information recording module 2 and the access module 1 and transmits and receives control signals and data.
- the ROM 14 further includes an application control unit 101, a file system control unit 102, and an information recording module access unit 103.
- the application control unit 101 performs overall control of the access module 1 such as data generation and power control.
- the file system control unit 102 performs control for managing data as a file by a file system such as a FAT file system.
- the information recording module access unit 103 receives the size and address along with the data from the file system control unit 102, records the data of the specified size at a specified position in the nonvolatile memory of the information recording module 2, etc. Controls transmission / reception of commands and data to / from the recording module 2.
- the file system 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 performs processing for notifying the information recording module 2 of information related to the location of the directory entry 308 of the corresponding file when data is recorded in the file. It does not exist. Further, the data shaping processing unit 105 performs processing for padding data and recording it in the information recording module 2 when the size of the data to be recorded in the file is not a multiple of the recording unit in the information recording module 2 Similar to the address management information setting processing unit 104, the conventional access module does not exist. Details of these processing units will be described later.
- the information recording module 2 includes a controller 21 and a nonvolatile memory 22.
- the controller 21 is a module that performs overall control of the nonvolatile memory 22 and is configured as a system LSI including 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 nonvolatile memory interface 215.
- the access module interface 211 is a connection part between the information recording module 2 and the access module 1, and is an interface that transmits and receives control signals and data, like the information recording module interface 13.
- the ROM 214 stores a program for controlling the information recording module 2, and this program uses the RAM 213 as a temporary storage area and operates on the CPU 212.
- the non-volatile memory interface 215 is a connection part between the controller 21 and the non-volatile memory 22 and controls transmission / reception of commands and data to / from the non-volatile memory 22.
- the ROM 214 further includes an entry storage control unit 217, a FAT storage control unit 218, and a user data storage control unit 219.
- the entry storage control unit 217 stores data in the entry storage area 221 when the data write command issued from the access module 1 to the information recording module 2 is a process of writing specific data corresponding to the directory entry. It is a control part which performs processing to perform.
- the FAT storage control unit 218 is a control unit that performs a process of storing data in the FAT storage area 222 when the process is a process of writing specific data corresponding to the FAT.
- the user data storage control unit 219 is a control unit that performs a process of storing data in the user data storage area 223 when the process is a process of writing other data.
- the processing of the user data storage control unit 219 is almost the same as the processing included in the conventional information recording module 2, but the processing of the entry storage control unit 217 and the FAT storage control unit 218 is similar to that of the conventional information recording module 2. It does not exist. Details of these control units will be described later.
- the RAM 213 includes address management information 216 used as control information by the entry storage control unit 217, the FAT storage control unit 218, and the user data storage control unit 219.
- the nonvolatile memory 22 includes the entry storage area 221, the FAT storage area 222, and the user data storage area 223 described above.
- the entry storage area 221 further includes a first entry storage area 224 and a second entry storage area. 225.
- the information recording module 2 in the present embodiment uses the entry storage area 221, the FAT storage area 222, and the user data storage area 223 in the nonvolatile memory 22 as data storage destinations depending on the type of data.
- the access module 1 When a plurality of files are recorded in parallel, data obtained by padding the data of the plurality of files to a multiple of a predetermined write processing unit is recorded in a continuous address area in units of blocks.
- the access module 1 includes an address management information setting processing unit 104 that notifies the information recording module 2 of the location information of the directory entry 308, and a data shaping process that pads the fraction data and records the information in the information recording module 2. Unit 105.
- the nonvolatile memory 22 is composed of a plurality of physical blocks.
- a physical block is a unit for erasing data, and it is necessary to erase data once in this unit before data is written.
- a physical block is composed of a plurality of pages.
- a page is a unit for writing data. Further, the page includes a data portion and a redundant portion.
- the data part is an area that can be accessed from the access module 1 as a logical address space, and is an area in which file data and the like are actually stored.
- the redundant part is an area in which management information, ECC, and the like of the nonvolatile memory 22 are stored and cannot be accessed from the access module 1.
- the size of the data portion is, for example, 4 KB, and the size of the redundant portion is about 128 bytes.
- the size of the physical block when attention is focused only on the data portion is, for example, about 512 KB. Therefore, as an example of the nonvolatile memory 22, when configured with 2048 physical blocks of this size, the capacity of the nonvolatile memory 22 is 1 GB.
- the addresses in the nonvolatile memory 22 include a logical address and a physical address.
- the logical address is a virtual address used when accessing the information recording module 2 from the access module 1.
- the physical address means a real address assigned to all physical blocks in the nonvolatile memory 22, and this physical address is used when accessing the nonvolatile memory 22 in the information recording module 2.
- the logical address is associated with the physical address, and the correspondence is managed by the address management information 216 in the RAM 213 of the information recording module 2.
- FIG. 10 is a diagram illustrating an example of a correspondence relationship between logical addresses and physical addresses in the nonvolatile memory 22.
- file system management information such as a master boot record / partition table is stored, and a file system is constructed.
- the physical address space there are a first entry storage area 224, a second entry storage area 225, a FAT storage area 222, a user data storage area 223, and the like.
- the first entry storage area 224 is a dedicated physical block in which the directory entry 308 (“ENTRY1” in the logical address space) of the first file is stored. In the example of FIG. 10, the physical block number 0x0000 is assigned. It has been.
- the second entry storage area 225 is a dedicated physical block in which the directory entry 308 (“ENTRY2” in the logical address space) of the second file is stored. In the example of FIG. 10, the physical block number 0x0001 is stored. Is assigned.
- the FAT storage area 222 is a dedicated physical block in which the FAT (305, 306) is stored, and a physical block number 0x0002 is assigned in the example of FIG.
- the user data storage area 223 is a physical block in which other data is stored.
- the user data storage area 223 further includes a temporary block area 226 that is a physical block temporarily used when data is updated in the user data storage area 223.
- the physical block number 0xF000 is assigned to the temporary block area.
- the information recording module 2 manages the directory entry 308 and FAT (305, 306) with dedicated physical blocks and performs a special writing process to reduce the speed at the time of data recording.
- the address management information 216 in this embodiment will be described with reference to FIG.
- the address management information 216 includes data type information 401, temporary block information 402, and address conversion information 403.
- the data type information 401 is management information used to control the first entry position information 411 and the second entry storage area 225, which are management information used to control the first entry storage area 224.
- Second entry position information 412 and FAT position information 413 which is management information used for controlling the FAT storage area 222 are included.
- the first entry location information 411 is information relating to the storage location of the first directory entry 308, and the physical address (physical block number) and logical address (logical block number, logical page) where the corresponding directory entry 308 is stored. Number). This logical address is notified to the information recording module 2 by the address management information setting processing unit 104 of the access module 1.
- the second entry position information 412 is information related to the storage position of the second directory entry 308, and the content is the same as the first entry position information 411.
- the FAT position information is information relating to the storage position of the FAT (305, 306), and similarly includes a physical address and a logical address.
- the address information managed by the FAT position information 413 is also address information for a plurality of pages. Since the logical address of the FAT (305, 306) is determined when the information recording module 2 is formatted and thereafter becomes a fixed value, the FAT position information 413 is the address management information of the access module 1 like the first entry position information 411. The information processing module 2 may be notified by the setting processing unit 104, or a fixed logical address may be used in advance in the information recording module 2.
- the temporary block information 402 is information related to the state of the temporary block area 226 in the user data storage area 223, and is associated with the physical address of the physical block currently allocated as the temporary block area 226 and the physical block. It consists of logical address information.
- the address conversion information 403 is information indicating the correspondence between the physical address of each physical block in the user data storage area 223 and the logical address. This information is the same as the information possessed by the conventional information recording module 2 and is generally called “address conversion table”, “logical / physical address conversion table”, or the like.
- the entry storage control unit 217, the FAT storage control unit 218, and the user data storage control unit 219 in the present embodiment control the recording area in the nonvolatile memory 22 using these address management information 216.
- the directory entry 308 and the FAT (305, 306) are stored by a special writing process using a dedicated physical block, thereby preventing a decrease in speed during data recording.
- the present embodiment provides a method for preventing a decrease in speed during data recording even when a plurality of files are recorded in parallel.
- still image data is recorded at an address continuous with the moving image data.
- the still image data for 2 clusters is continuously recorded.
- the size of the still image file is not necessarily a multiple of the cluster length, normally, no data is recorded in the invalid data portion of FIG.
- user data is recorded in continuous addresses in units of multiple lengths of processing units.
- the still image data 2 recorded in the cluster number 6 is padded to a multiple of the cluster size by the data shaping processing unit 105 of the access module 1 and recorded in the information recording module 2 as data for one cluster.
- the padding size is adjusted when the directory entry 308 is recorded in the information recording module 2, and details of this processing will be described later. Further, after the still image data is recorded, the continuation of the moving image data is recorded.
- the notified information is stored in the first entry position information 411 or the second entry position information 412 in the address management information 216 in the RAM 213 of the information recording module 2. If the file to be recorded is the first, it is stored in the first entry position information 411, and if it is the second file, it is stored in the second entry position information 412.
- the data shaping processing unit 105 of the access module 1 pads the data to a multiple of the recording processing unit and stores the data in the information recording module 2. Write. Details of this process will be described with reference to FIG.
- an empty block has been acquired means that an arbitrary empty block has been selected as a recording area and a file data writing process for the block has been started.
- “No free block has been acquired” means that it is necessary to select any free block immediately after writing the file data to the end of any free block and before writing new data. means.
- S1402 If it is determined in S1401 that an empty block has not been acquired, an empty block is acquired. Specifically, the FAT (305, 306) is referred to, and a process for finding a block in which all of the area of an arbitrary block is an empty area is performed.
- S1403 Get free pages in free blocks. Since it is assumed that data recording in the empty block is continuously performed from the beginning of the area, the empty page that exists first when searching from the beginning in the target block is acquired as the empty page to be recorded. In addition, “page” is described because the recording processing unit is a page unit. When the recording processing unit is implemented with a page size other than the page size, this processing acquires an empty area of the recording processing unit size. It becomes processing.
- the size of the block or page used in the description of FIG. 14 may be acquired by the access module 1 from the information recording module 2, or a fixed value may be determined in advance and used in the access module 1. good.
- data is recorded at continuous addresses in units of multiple lengths of processing units.
- the fraction size at the end of the file is padded to a multiple of the processing unit and recorded in the information recording module 2.
- the information recording module 2 is processed as if one file is continuously recorded, and data can be recorded at high speed.
- the writing of the directory entry 308 and the FAT (305, 306) is collectively performed at the end of the file. However, it is performed between file data recordings, such as periodically updating at intervals of several seconds. May be.
- FIG. 15 is a diagram showing an example of a write sequence when a plurality of files are written in parallel in the present embodiment.
- File1 means the first file
- File2 means the second file.
- the case where the second file is recorded during the data recording of the first file is shown, for example, the process in the case where the still image file is recorded during the recording of the moving image file.
- the recording process of the second file is switched during the recording of the first file in accordance with the processing procedure described with reference to FIG. 13, and after the recording of the second file is completed, the first file is recorded again.
- the recording speed does not decrease even when the file to be recorded is switched. Data can be recorded stably.
- the unused page means a page in which valid data is not stored in a page where data has been erased and data can be written.
- FIG. 17 is a diagram showing an example of the state of the first entry storage area 224 in the present embodiment. In FIG.
- the directory entry 308 (ENTRY1_1) is stored in the first page of the first entry storage area 224, and all subsequent pages are erased unused pages.
- the access module 1 overwrites the directory entry 308 with the data of ENTRY1_2, the state changes to the state shown in FIG. In FIG. 17B, the ENTRY1_2 data is stored in the second page which is the first unused page. In this state, the gray ENTRY1_2 data is the latest data, and the ENTRY1_1 data is treated as old data. That is, when the access module 1 reads the directory entry 308 in this state, the information recording module 2 outputs the data of ENTRY1_2 to the access module 1.
- the entry storage control unit 217 performs the first entry position information 411 or the second entry notified by the address management information setting processing unit 104 of the access module 1.
- the directory entry 308 is stored in the first entry storage area 224 or the second entry storage area 225 using the position information 412. As a result, it is possible to prevent unnecessary copy processing from occurring when the directory entry 308 is written, and to write the directory entry 308 at high speed.
- the FAT write processing procedure in the FAT storage control unit 218 of this embodiment will be described with reference to FIG. Since the processing procedure of FIG. 17 is almost the same as the processing procedure of FIG. 16, detailed description thereof is omitted.
- FIG. 17 differs from FIG. 16 in that “first entry location information” is “FAT location information” and “first entry storage area” is “FAT storage area”, and the write processing unit is one page unit. Rather, it has multiple pages.
- FIG. 19 is a diagram showing an example of the state of the FAT storage area 222 in the present embodiment.
- FAT (305, 306) data is stored in the first four pages of the FAT storage area 222. That is, in this example, the size of the FAT (305, 306) is 4 pages, which means that data from FAT_A_1 to FAT_D_1 is stored. The remaining four pages in the FAT storage area 222 are erased unused pages.
- the access module 1 overwrites the data from FAT_A_2 to FAT_D_2 in the FAT (305, 306), the state changes to the state of FIG. In FIG.
- data from FAT_A_2 to FAT_D_2 is stored in the fifth and subsequent pages that are the first unused pages.
- gray data from FAT_A_2 to FAT_D_2 is the latest data, and data from FAT_A_1 to FAT_D_1 is treated as old data. That is, when the access module 1 reads FAT (305, 306) in this state, the information recording module 2 outputs data from FAT_A_2 to FAT_D_2 to the access module 1.
- the data in the FAT storage area 222 is temporarily deleted by the processing of S1805, and the data from FAT_A_3 to FAT_D_3 is stored from the first page. In this way, the FAT storage area 222 always holds valid FAT data for the required size, and no unnecessary copy processing occurs in the write processing.
- FIG. 20 is a flowchart showing a user data write processing procedure in the user data storage control unit 219 of the present embodiment.
- FIG. 21 is a diagram showing an example of the state of the user data storage area 223 of the present embodiment.
- FIG. 22 is a diagram showing another example of the state of the user data storage area 223 of the present embodiment.
- a temporary block area 226 is shown inside the dotted line.
- the data when data is written in the user data storage area 223, the data is temporarily written in the temporary block area 226, and all the data for one block is formally written when the data is written in the entire temporary block area 226. It will be in the state. That is, for the logical address to which the temporary block area 226 is assigned, two physical blocks, a physical block partially including old data and a temporary block area 226, are assigned. For example, two physical blocks of physical block number 0x0003 (old data only in the first page) and physical block number 0xF000 (new data only in the first page) in FIG. 22A are assigned to the same logical address. (S2001): Based on the write command issued from the access module 1 to the information recording module 2, the address of the write destination is acquired.
- the write destination address means a logical address designated by the access module 1 with a write command for the information recording module 2.
- S2004 When it is determined that the directory entry 308 or FAT (305, 306) is not written in the determination process of S2002, the write destination address acquired in S2001 is compared with the temporary block information 402, and the write process is performed on the temporary block area 226. To determine. If it is determined that the write process is to the temporary block area 226, the process proceeds to S2005. If it is determined that the write process is not for the temporary block area 226, the process proceeds to S2006.
- S2005 In the determination process of S2004, if it is determined that the write process is for the temporary block area 226, it is determined whether an address jump occurs in the temporary block area 226. If it is determined that an address jump occurs, the process proceeds to S2006. If it is determined that an address jump does not occur, the process proceeds to S2009.
- the occurrence of the address jump means that the address of the user data last written in the temporary block area 226 and the write destination address acquired in S2001 are not continuous.
- user data (DATA1A_2) is written up to the first page of the temporary block area 226.
- the access module 1 tries to write user data for one page from the logical address immediately after the logical address of DATA1A_2 to the logical address one page ahead, a writing process to the third page of the temporary block area 226 occurs.
- an address jump occurs.
- since writing to the temporary block area 226 assumes that data is written to continuous addresses from the beginning to the end of the area, as shown in S2006, the data for one page jumped The process to copy is required.
- FIG. 22 shows an example where the write destination address does not match the temporary block information 402.
- the state shown in FIG. 22B changes to the state shown in FIG. 22C before and after the data copy process. That is, in the state of FIG. 22B, the case where the access module 1 has written user data to the area on the logical address corresponding to the physical block number 0x0003 is shown. From this state, the physical block number is shown in FIG. The case where the access module 1 writes user data in the area on the logical address corresponding to 0x0004 is shown.
- the recording in the area on the logical address corresponding to the physical block number 0x0003 is once completed. It is necessary to let Therefore, the valid data of DATA1B_1 to DATA2D_1 stored in the physical block number 0x0003 is copied to an unused page of the physical block number 0xF000, which is the temporary block area 226.
- S2007 It is determined whether an unused page exists in the physical block allocated to the current temporary block area 226. If there is an unused page, the process proceeds to S2009. If there is no unused page, the process proceeds to S2008. For example, if data is copied to the physical block 0xF000 and there are no unused pages as shown in FIG. 22C by the processing of S2006, it is determined that there are no unused pages in the temporary block area 226.
- S2008 In the determination process of S2007, when it is determined that there is no unused page in the physical block allocated to the current temporary block area 226, the data included in the physical block storing only the old data is temporarily deleted, and this physical block
- the temporary block information 402 is updated so as to be a new temporary block area 226.
- the data of the physical block having the physical block number 0x0003, which is the physical block storing only the old data is once erased, and this physical block becomes a new temporary block area 226. In this way, the temporary block area 226 is sequentially moved to a new physical block.
- the user data storage control unit 219 uses the temporary block area 226 to perform data write processing on the user data storage area 223.
- the processing of the access module 1 according to the present embodiment prevents unnecessary copy processing from occurring when user data is written, and enables user data to be written at high speed.
- the access module 1 and the information recording module 2 of this embodiment are used in combination and a plurality of files are recorded in parallel, useless copy processing that occurs in the information recording module 2 is reduced. By preventing a decrease in recording speed, file data can be written to the information recording module 2 stably at high speed.
- the configuration of the controller 21 of the information recording module 2 has been described, but other configurations may be used.
- the CPU 212 and the RAM 213 in the controller 21 may be arranged outside the controller 21, and conversely other components may be included in the controller 21.
- the FAT 16 is described as an example of the file system.
- the number of non-volatile memories 22 used in the information recording module 2 is not necessarily one, and a plurality of non-volatile memories 22 may be used in combination. In particular, when the data can be written to a plurality of nonvolatile memories 22 in parallel, the writing process can be further accelerated.
- the method for adjusting the file size on the directory entry 308 in the processing of S1304 when the data shaping processing unit 105 pads the write data has been described.
- the file size on the directory entry 308 may store the size after padding as it is.
- the recording processing unit size is the same as the page size has been described, other sizes may be used as the recording processing unit size.
- a multiple of the cluster size which is the data management unit size of the file system, may be used as the recording processing unit size.
- an example in which two files are written in parallel has been described. However, three or more files may be written in parallel. In this case, the number of entry storage areas can be increased by increasing the number of files to be written in parallel.
- the present invention may be used for storing metadata of the corresponding file.
- extension information called Named Stream can be stored as metadata about the file separately from the file data. Therefore, for example, the second entry storage area of the present invention can be used to store the information on the Named Stream of the corresponding file. This makes it possible to record such file metadata at high speed.
- the method of executing the entry position information setting process in advance in step S1301 in FIG. 13 prior to file data recording has been described.
- the information recording module 2 You may make it notify entry position information to.
- a block including a free area may be a write target block.
- the FAT (305, 306) is composed of four pages and all FATs (305, 306) are updated at the time of updating. However, the entire FAT (305, 306) is not necessarily described. Need not be updated, and only a part of the area on the FAT (305, 306), which has been changed as the file data is written, may be updated.
- each block may be individually made into one chip by a semiconductor device such as an LSI, or part or all of the blocks. It may be made into one chip so as to include.
- LSI LSI
- IC system LSI
- super LSI ultra LSI depending on the degree of integration
- the method of circuit integration is not limited to LSI's, and implementation using dedicated circuitry or general purpose processors is also possible.
- An FPGA Field Programmable Gate Array
- reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
- integrated circuit technology comes out to replace LSI's as a result of the advancement of semiconductor technology or a derivative other technology, it is naturally also possible to carry out function block integration using this technology. Biotechnology can be applied as a possibility.
- Each processing of the above embodiment may be realized by hardware, or may be realized by software (including a case where the processing is realized together with an OS (Operating System), middleware, or a predetermined library). Further, it may be realized by mixed processing of software and hardware. Needless to say, when the access module (access device) and the information recording module (information recording device) according to the above embodiment are realized by hardware, it is necessary to adjust the timing for performing each process. In the above embodiment, for convenience of explanation, details of timing adjustment of various signals generated in actual hardware design are omitted.
- the execution order of the processing method in the said embodiment is not necessarily restricted to description of the said embodiment, The execution order can be changed in the range which does not deviate from the summary of invention.
- an access module (access apparatus) and an information recording module (information recording apparatus) are another apparatuses (separate module) was demonstrated, it is not limited to this, Access module The (access device) and the information recording module (information recording device) may be configured in one device.
- the access module includes an address management information setting processing unit for notifying the information recording module of information relating to the storage location of the directory entry, and padding the file data when writing half-end data such as the end of the file to the information recording module. And a data shaping processing unit to be written.
- the information recording module of the present invention includes an entry storage control unit, a FAT storage control unit, and a user data storage control unit that change a storage destination and a storage method according to the type of data instructed to be written by the access module. Including.
- Such an access module is a device that handles digital content such as music, still images, and moving images, especially devices that need to record content data in an information recording module in real time, and multiple files such as moving image files and still image files. It is optimal for devices that record simultaneously, and can be used as PC applications, audio recorders, DVD recorders, HDD recorders, movies, digital still cameras, mobile phone terminals, and the like.
- the information recording module of the present invention can be used as a removable medium such as a memory card for storing the digital content or the like, or a built-in recording device.
- Access Module 2 Information Recording Module 11, 212 CPU 12,213 RAM 13 Information recording module interface 14,214 ROM DESCRIPTION OF SYMBOLS 21 Controller 22 Non-volatile memory 101 Application control part 102 File system control part 103 Information recording module access part 104 Address management information setting process part 105 Data shaping process part 211 Access module interface 215 Non-volatile memory interface 216 Address management information 217 Entry storage control Section 218 FAT storage control section 219 User data storage control section 221 Entry storage area 222 FAT storage area 223 User data storage area 224 First entry storage area 225 Second entry storage area 226 Temporary block area 301 File system management information area 302 User data area 303 Master boot record / partition table 304 Partition boot sector 30 5,306 FAT 307 Root directory entry 308 Directory entry 401 Data type information 402 Temporary block information 403 Address conversion information 411 First entry position information 412 Second entry position information 413 FAT position information
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
情報記録モジュールの不揮発性メモリをファイルシステムにより領域管理する場合において、複数ファイルを並行して書き込む際の処理を高速化し、安定してファイルデータを書き込む方法を提供する。アクセスモジュール(1)は、ディレクトリエントリの格納位置に関する情報を情報記録モジュール(2)に通知する手段(104)を備えると共に、ファイル終端等の半端データを書き込む際にファイルデータをパディングして情報記録モジュール(2)に書き込む手段(105)を備える。情報記録モジュール(2)は、前記通知された情報を元にディレクトリエントリの書き込みであることを認識すると、専用の物理ブロックにディレクトリエントリを格納する。更にアクセスモジュール(1)が複数ファイルのデータを必要に応じてパディングしながら所定の記録処理単位サイズの倍数長単位で連続したアドレスに記録する。
Description
本発明は、データを不揮発性メモリに格納し、ファイルとして管理するアクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システムに関する。
音楽コンテンツや、映像データ等のデジタルデータを記録する記録媒体には、磁気ディスク、光ディスク、光磁気ディスク等、様々な種類が存在する。これら記録媒体の内、記録素子にFlashROM等の半導体メモリを使用したメモリカードは、記録媒体の小型化が図れることから、デジタルスチルカメラや携帯電話端末等、小型の携帯機器を中心に急速に普及している。更に最近では、FlashROM等の半導体メモリを機器に内蔵してハードディスクの代わりに使用する等、従来のメモリカードのような着脱可能なリムーバブルメディアとしての用途のみならず、機器内蔵ストレージとしての用途でも半導体メモリが使用されるようになってきた。
このようなメモリカードや機器内蔵ストレージには、主にNAND型フラッシュメモリと呼ばれる半導体素子が使用されている。NAND型フラッシュメモリは、既に記録されたデータを一旦消去した後、再度別のデータを記録することが可能な記録素子であり、従来のハードディスクと同様に、複数回書き換え可能な情報記録装置を構成することが可能である。
このようなメモリカードや機器内蔵ストレージには、主にNAND型フラッシュメモリと呼ばれる半導体素子が使用されている。NAND型フラッシュメモリは、既に記録されたデータを一旦消去した後、再度別のデータを記録することが可能な記録素子であり、従来のハードディスクと同様に、複数回書き換え可能な情報記録装置を構成することが可能である。
従来、メモリカードや機器内蔵ストレージに格納されたデータはファイルシステムにより管理されている。データをファイルシステムにより管理することで、同一のファイルシステムを解釈する機器間でデータをファイルとして共有することが可能となり、ユーザは自分の格納したデータを複数の機器間で容易に参照したり、コピーしたりすることが可能となる。
従来最も広く使用されているファイルシステムは、FATファイルシステムと呼ばれるものである。FATファイルシステムは、領域管理をファイルアロケーションテーブル(FAT)と呼ばれるテーブルで一元管理するという特徴を持っており、比較的構造がシンプルで実装が容易なことから、フロッピー(登録商標)ディスクやPCのハードディスク、メモリカード等のファイルシステムとして広く使用されている。
従来最も広く使用されているファイルシステムは、FATファイルシステムと呼ばれるものである。FATファイルシステムは、領域管理をファイルアロケーションテーブル(FAT)と呼ばれるテーブルで一元管理するという特徴を持っており、比較的構造がシンプルで実装が容易なことから、フロッピー(登録商標)ディスクやPCのハードディスク、メモリカード等のファイルシステムとして広く使用されている。
図2にFATファイルシステムの構成を示す。FATファイルシステムではファイルアロケーションテーブル内の管理単位のビット幅の違いにより、FAT12、FAT16、FAT32等の種類が存在するが、ファイルアロケーションテーブルによる領域管理方法はほぼ同じであり、以下ではFAT16を例に説明する。
同図に示すように、論理アドレス空間の先頭には、領域割り当て単位やファイルシステムが管理する領域の大きさ等、ファイルシステムの管理情報が格納される領域であるファイルシステム管理情報領域301が存在する。このファイルシステム管理情報領域301には、マスターブートレコード・パーティションテーブル(MBR)303、パーティションブートセクタ(PBS)304、FAT(305、306)、ルートディレクトリエントリ(RDE)307と呼ばれるファイルシステムの管理情報が含まれ、ユーザデータ領域302を管理するために必要な情報が各々格納されている。
同図に示すように、論理アドレス空間の先頭には、領域割り当て単位やファイルシステムが管理する領域の大きさ等、ファイルシステムの管理情報が格納される領域であるファイルシステム管理情報領域301が存在する。このファイルシステム管理情報領域301には、マスターブートレコード・パーティションテーブル(MBR)303、パーティションブートセクタ(PBS)304、FAT(305、306)、ルートディレクトリエントリ(RDE)307と呼ばれるファイルシステムの管理情報が含まれ、ユーザデータ領域302を管理するために必要な情報が各々格納されている。
マスターブートレコード・パーティションテーブル303は、ファイルシステムが管理する論理アドレス空間上の領域を複数のパーティションと呼ばれる領域に分割して管理するための情報が格納される領域である。パーティションブートセクタ304は、パーティション内の領域管理単位の大きさ等、1つのパーティション内の管理情報が格納される領域である。
FAT(305、306)は、ファイルに含まれるデータの格納位置に関する情報が格納される領域であり、通常、同じ情報を持つ2つのFAT(305、306)が存在し、一方のFAT(305、306)が破損したとしても他方のFAT(305、306)によりファイルにアクセスできるよう二重化されている。ルートディレクトリエントリ307は、ルートディレクトリ直下に存在するファイル、ディレクトリの情報(ディレクトリエントリ)が格納される領域である。
FAT(305、306)は、ファイルに含まれるデータの格納位置に関する情報が格納される領域であり、通常、同じ情報を持つ2つのFAT(305、306)が存在し、一方のFAT(305、306)が破損したとしても他方のFAT(305、306)によりファイルにアクセスできるよう二重化されている。ルートディレクトリエントリ307は、ルートディレクトリ直下に存在するファイル、ディレクトリの情報(ディレクトリエントリ)が格納される領域である。
またFATファイルシステムでは、このファイルシステム管理情報領域301に引き続く領域にファイル本体のデータ等を格納するユーザデータ領域302が存在する。ユーザデータ領域302は、512バイトから32KB程度の大きさを持つクラスタと呼ばれる管理単位毎に分割管理されており、各クラスタにはファイルに含まれるデータが格納されている。多くのデータを格納するファイルは、複数のクラスタに跨ってデータを格納しており、各クラスタ間の繋がりは、FAT(305、306)に格納されたリンク情報により管理されている。また、ルートディレクトリ直下のディレクトリ内に存在するファイル、サブディレクトリの情報(ディレクトリエントリ)は、このユーザデータ領域302の一部を利用して格納される。
図3は、FAT16のディレクトリエントリの構成を示した図である。ディレクトリエントリ308は1つのファイル、ディレクトリ毎に32バイトのディレクトリエントリ308が割り当てられ、ファイル、ディレクトリに関する情報を格納している。すなわち、1つのファイルやディレクトリが追加される度に32バイトのディレクトリエントリ308の情報が新規に作成され、ルートディレクトリエントリ307の領域、あるいはユーザデータ領域302に記録される。
図3は、FAT16のディレクトリエントリの構成を示した図である。ディレクトリエントリ308は1つのファイル、ディレクトリ毎に32バイトのディレクトリエントリ308が割り当てられ、ファイル、ディレクトリに関する情報を格納している。すなわち、1つのファイルやディレクトリが追加される度に32バイトのディレクトリエントリ308の情報が新規に作成され、ルートディレクトリエントリ307の領域、あるいはユーザデータ領域302に記録される。
ディレクトリエントリ308の先頭8バイトにはファイルやディレクトリの名称が格納される。続く3バイトには拡張子が格納される。続く1バイトにはファイル・ディレクトリの種別を識別するフラグや、ファイル・ディレクトリがリードオンリーか否かを識別するフラグ等の属性情報が格納される。また、ファイル・ディレクトリの最終更新日時の情報や、ファイル・ディレクトリデータの実体が格納されているクラスタの開始位置を示す開始クラスタ番号、ファイルサイズのバイト数等が格納される。
このようにディレクトリエントリ308ではファイルの先頭データを格納したクラスタの位置に関する情報しか保持しないため、ファイルデータが複数クラスタに跨って格納される場合には、その位置情報はFAT(305、306)に保持される。すなわち、ファイルを更新する場合にはファイルデータを書き込むと共に、ディレクトリエントリ308、FAT(305、306)の情報も書き込む必要がある。
このようにディレクトリエントリ308ではファイルの先頭データを格納したクラスタの位置に関する情報しか保持しないため、ファイルデータが複数クラスタに跨って格納される場合には、その位置情報はFAT(305、306)に保持される。すなわち、ファイルを更新する場合にはファイルデータを書き込むと共に、ディレクトリエントリ308、FAT(305、306)の情報も書き込む必要がある。
続いて、図4を用いて、FATファイルシステムにおけるファイルデータ書き込み処理手順について説明する。
(S401):
対象ファイルのディレクトリエントリ308を読み出す。
(S402):
読み出したディレクトリエントリ308に格納された開始クラスタ番号を取得し、ファイルデータの先頭位置を確認する。
(S403):
FAT(305、306)をアクセスモジュールのRAM上に読み出し、S402で取得したファイルデータの先頭位置から順にRAM上のFAT(305、306)内でリンクを辿り、書き込み位置のクラスタ番号を取得する。
(S401):
対象ファイルのディレクトリエントリ308を読み出す。
(S402):
読み出したディレクトリエントリ308に格納された開始クラスタ番号を取得し、ファイルデータの先頭位置を確認する。
(S403):
FAT(305、306)をアクセスモジュールのRAM上に読み出し、S402で取得したファイルデータの先頭位置から順にRAM上のFAT(305、306)内でリンクを辿り、書き込み位置のクラスタ番号を取得する。
(S404):
ファイルデータ書き込みに際し、ファイルに新たに空き領域を割り当てる必要があるか判定する。空き領域の割り当てが必要な場合S405の処理に進む。空き領域の割り当てが不要な場合S408の処理に進む。
(S405):
RAM上のFAT(305、306)内で空き領域を検索し、1クラスタの空き領域を取得する。FAT(305、306)では値が0x0000に設定されているFATエントリが空きクラスタを意味するため、空き領域を取得する処理は、FAT(305、306)上で0x0000の値を持つFATエントリを取得するという処理になる。具体的にはRAM上のFAT(305、306)内のFATエントリを順次参照し、値が0x0000に設定されているFATエントリを見つけ、該FATエントリの対応クラスタ番号の値を求める。FATエントリの検索処理は例えばFAT(305、306)の先頭から終端まで順に処理を実施しても良いし、前回空き領域を割り当てたFATエントリの次のFATエントリから処理を開始してFAT(305、306)の終端まで到達したらFAT(305、306)の先頭に折り返し、前回空き領域を割り当てたFATエントリまで処理を実施しても良い。このようにFATエントリの検索処理手順はFAT(305、306)領域の全面に対して空き領域を検索する処理を実現できるものであれば良く、特に限定はされない。
ファイルデータ書き込みに際し、ファイルに新たに空き領域を割り当てる必要があるか判定する。空き領域の割り当てが必要な場合S405の処理に進む。空き領域の割り当てが不要な場合S408の処理に進む。
(S405):
RAM上のFAT(305、306)内で空き領域を検索し、1クラスタの空き領域を取得する。FAT(305、306)では値が0x0000に設定されているFATエントリが空きクラスタを意味するため、空き領域を取得する処理は、FAT(305、306)上で0x0000の値を持つFATエントリを取得するという処理になる。具体的にはRAM上のFAT(305、306)内のFATエントリを順次参照し、値が0x0000に設定されているFATエントリを見つけ、該FATエントリの対応クラスタ番号の値を求める。FATエントリの検索処理は例えばFAT(305、306)の先頭から終端まで順に処理を実施しても良いし、前回空き領域を割り当てたFATエントリの次のFATエントリから処理を開始してFAT(305、306)の終端まで到達したらFAT(305、306)の先頭に折り返し、前回空き領域を割り当てたFATエントリまで処理を実施しても良い。このようにFATエントリの検索処理手順はFAT(305、306)領域の全面に対して空き領域を検索する処理を実現できるものであれば良く、特に限定はされない。
(S406):
S405で取得した空きクラスタの番号に対応するFATエントリの値を、リンク終端を意味する値に設定する。FAT(305、306)では値が0xFFFFに設定されているFATエントリがリンク終端を意味するため、S406では該当FATエントリの値をRAM上で0xFFFFに設定する処理を実施する。
(S407):
現在のリンク終端のクラスタ番号に対応するFATエントリの値を0xFFFFからS405で取得した空きクラスタの番号にRAM上で設定する。空き領域を取得する必要がある場合は、ファイル終端への追記を意味し、その場合S403でのリンクを辿る処理においてファイル終端までリンクが辿られている。そのため、現在のリンク終端のクラスタ番号に対応するFATエントリの値はリンク終端を意味する0xFFFFが設定されている。そのため、S407の処理により、S405で新たに取得した空きクラスタへリンクを接続することによりファイルのリンクが1クラスタ分長くなり、ファイルデータを追記することが可能となる。
S405で取得した空きクラスタの番号に対応するFATエントリの値を、リンク終端を意味する値に設定する。FAT(305、306)では値が0xFFFFに設定されているFATエントリがリンク終端を意味するため、S406では該当FATエントリの値をRAM上で0xFFFFに設定する処理を実施する。
(S407):
現在のリンク終端のクラスタ番号に対応するFATエントリの値を0xFFFFからS405で取得した空きクラスタの番号にRAM上で設定する。空き領域を取得する必要がある場合は、ファイル終端への追記を意味し、その場合S403でのリンクを辿る処理においてファイル終端までリンクが辿られている。そのため、現在のリンク終端のクラスタ番号に対応するFATエントリの値はリンク終端を意味する0xFFFFが設定されている。そのため、S407の処理により、S405で新たに取得した空きクラスタへリンクを接続することによりファイルのリンクが1クラスタ分長くなり、ファイルデータを追記することが可能となる。
(S408):
現在参照している書き込み位置のクラスタ内にファイルデータを書き込む。S404で空き領域取得が必要と判断した場合は、現在参照している書き込み位置はS405で取得した空きクラスタとなる。またS404で空き領域取得が不要と判断した場合は、現在参照している書き込み位置はS403でリンクを辿った結果到達したクラスタとなる。
(S409):
全ファイルデータの書き込みが完了したか判定する。まだファイルデータが残っている場合S404の処理に戻る。全ファイルデータの書き込みが完了した場合S410の処理に進む。
(S410):
ディレクトリエントリ308内に格納されたファイルサイズや最終更新日時等の情報を更新し、情報記録モジュールの不揮発性メモリ内に格納されたディレクトリエントリ308を上書きする。
現在参照している書き込み位置のクラスタ内にファイルデータを書き込む。S404で空き領域取得が必要と判断した場合は、現在参照している書き込み位置はS405で取得した空きクラスタとなる。またS404で空き領域取得が不要と判断した場合は、現在参照している書き込み位置はS403でリンクを辿った結果到達したクラスタとなる。
(S409):
全ファイルデータの書き込みが完了したか判定する。まだファイルデータが残っている場合S404の処理に戻る。全ファイルデータの書き込みが完了した場合S410の処理に進む。
(S410):
ディレクトリエントリ308内に格納されたファイルサイズや最終更新日時等の情報を更新し、情報記録モジュールの不揮発性メモリ内に格納されたディレクトリエントリ308を上書きする。
(S411):
情報記録モジュールの不揮発性メモリ内に格納されたFAT(305、306)に、アクセスモジュールのRAM上のFAT(305、306)のデータを上書きし、処理を完了する。
このファイルデータ書き込み処理により、図5に示された60000バイトのデータを持つFILE1.TXTに10000バイトのデータを追記した場合、図6に示されるような70000バイトのデータを持つファイルに変化する。すなわち、空きクラスタとしてクラスタ番号6のクラスタが取得されてファイルデータが追記され、FAT(305、306)上のリンクにクラスタ番号6が接続される。その結果、FILE1.TXTのリンクは、クラスタ番号2~5の4クラスタからなる状態から、クラスタ番号2~6の5クラスタからなる状態に更新される。
情報記録モジュールの不揮発性メモリ内に格納されたFAT(305、306)に、アクセスモジュールのRAM上のFAT(305、306)のデータを上書きし、処理を完了する。
このファイルデータ書き込み処理により、図5に示された60000バイトのデータを持つFILE1.TXTに10000バイトのデータを追記した場合、図6に示されるような70000バイトのデータを持つファイルに変化する。すなわち、空きクラスタとしてクラスタ番号6のクラスタが取得されてファイルデータが追記され、FAT(305、306)上のリンクにクラスタ番号6が接続される。その結果、FILE1.TXTのリンクは、クラスタ番号2~5の4クラスタからなる状態から、クラスタ番号2~6の5クラスタからなる状態に更新される。
このようにFATファイルシステムでは、ファイルの管理情報がFAT(305、306)とディレクトリエントリ308の両方に格納されていることから、ファイルを更新する場合には、これらの情報も共に更新する必要がある。すなわち、アクセスモジュールが情報記録モジュールに格納されたファイルを更新する場合、図7に示すようにファイルデータ(DATA)、ディレクトリエントリ308(DIR)、FAT(305、306)(FAT1、FAT2)のような一連の書き込み処理を実施することになる。
一方、NAND型フラッシュメモリは、データを記録する前に一旦データを消去しなければならないという特徴を持つ。そのため、データ消去単位であるブロックの大きさ以下の書き込みを実施する場合、該当するブロックに直接上書きをすることができないため、別の未使用ブロックを取得してブロック内のデータを一旦消去し、そのブロックに対して新しいデータを書込む必要がある。この際、古いブロックに含まれている有効なデータを新しいブロックにコピーする必要があり、記録速度が低下する。このコピー量は、データ書き込みサイズが小さい程大きくなり、データ書き込みサイズがブロックサイズに近くなる程小さくなることから、一般にNAND型フラッシュメモリに対しては、ブロックサイズ単位でのデータ書き込みを実施した場合、記録速度が最速になることが知られている。
一方、NAND型フラッシュメモリは、データを記録する前に一旦データを消去しなければならないという特徴を持つ。そのため、データ消去単位であるブロックの大きさ以下の書き込みを実施する場合、該当するブロックに直接上書きをすることができないため、別の未使用ブロックを取得してブロック内のデータを一旦消去し、そのブロックに対して新しいデータを書込む必要がある。この際、古いブロックに含まれている有効なデータを新しいブロックにコピーする必要があり、記録速度が低下する。このコピー量は、データ書き込みサイズが小さい程大きくなり、データ書き込みサイズがブロックサイズに近くなる程小さくなることから、一般にNAND型フラッシュメモリに対しては、ブロックサイズ単位でのデータ書き込みを実施した場合、記録速度が最速になることが知られている。
従来、NAND型フラッシュメモリに対する記録速度を高速化し、且つ上記コピー処理による記録速度の低下を防ぎ、動画コンテンツ等のリアルタイム記録を実現する方法が提案されている(例えば、特許文献1参照)。この方法では、フラッシュメモリ内の領域をブロック単位で区切った場合に、1ブロック内に含まれる空き領域(空きクラスタ)の数が多いブロックのみを取得して、動画コンテンツ等のデータを記録するようにしている。このようにすることで、1ブロック内のデータコピー量を削減し、記録速度の低下を防いでいる。
しかしながら、FAT(305、306)やディレクトリエントリ308等の更新をする際においては、記録アドレスが複数のブロック間に跨って移動する可能性があるため、上記の従来技術では速度低下を防ぐことができない。例えば、ムービー等の記録機器では、ファイルデータ記録中に電源断が生じ、ディレクトリエントリ308やFAT(305、306)を更新できなかった場合、それまで記録していたファイルデータが消失してしまうことから、数秒間隔等、定期的にディレクトリエントリ308やFAT(305、306)を更新するようにしている。このような機器では、図7のように1ファイルのデータ(DATA)、ディレクトリエントリ308(DIR)、FAT(305、306)(FAT1、FAT2)を記録する場合に、データ記録の合間にディレクトリエントリ308やFAT(305、306)の更新記録が発生するため、この時点で速度低下が生じることになる。
また、動画記録中に静止画ファイルを記録する場合等、複数のファイルを並行して記録する場合には、記録アドレスが複数のブロック間に跨って移動する可能性があり、同様に記録速度の低下を防ぐことができなくなる。例えば、図8のように、1つ目のファイルのデータ(DATA1)と、2つ目のファイルのデータ(DATA2)が記録された場合に記録アドレスが複数のブロック間に跨って移動する可能性がある。更にこの場合、各々のファイルのディレクトリエントリ308(DIR1、DIR2)も異なるアドレスに格納される場合があることから、同様に記録アドレスが複数のブロック間に跨って移動する可能性がある。
本発明では上記問題点に鑑み、複数のファイルを並行してNAND型フラッシュメモリに記録する場合等においても速度低下を防ぎ、リアルタイム記録を実現するアクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システムを提供することを目的とする。
本発明では上記問題点に鑑み、複数のファイルを並行してNAND型フラッシュメモリに記録する場合等においても速度低下を防ぎ、リアルタイム記録を実現するアクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システムを提供することを目的とする。
本発明のアクセスモジュールは、データを格納する不揮発性メモリを有する情報記録モジュールにアクセスするアクセスモジュールであって、所定のデータ種別のデータを格納する領域の位置情報を前記情報記録モジュールに通知するアドレス管理情報設定処理部と、前記情報記録モジュールに記録するファイルデータにおける有効データが所定の記録処理単位サイズ未満であった場合に、任意のデータを付加して前記所定の記録処理単位サイズに変更し、前記情報記録モジュールにファイルデータを記録するデータ整形処理部とを備える。
また、複数ファイルのファイルデータを並行して前記情報記録モジュールに記録する場合には、所定の連続領域サイズ内で連続したアドレスになるよう、複数ファイルのファイルデータを任意の順番で並べながら前記情報記録モジュールに記録するようにすると効果的である。
また、複数ファイルのファイルデータを並行して前記情報記録モジュールに記録する場合には、所定の連続領域サイズ内で連続したアドレスになるよう、複数ファイルのファイルデータを任意の順番で並べながら前記情報記録モジュールに記録するようにすると効果的である。
また、前記所定のデータ種別は、記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であっても良い。
更に、前記所定のデータ種別は、記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であって、前記アドレス管理情報設定処理部は、該ファイルシステム管理情報を格納する領域の位置情報を複数前記情報記録モジュールに通知するようにしても良い。
また、前記情報記録モジュールに記録するファイルデータに任意のデータを付加した場合、該ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報に、データ付加前の有効データの大きさをファイルサイズとして設定するようにすると良い。
また、前記所定の記録処理単位サイズは、前記情報記録モジュールに含まれる不揮発性メモリの物理的なデータ記録処理単位サイズの倍数長であると良い。
更に、前記所定のデータ種別は、記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であって、前記アドレス管理情報設定処理部は、該ファイルシステム管理情報を格納する領域の位置情報を複数前記情報記録モジュールに通知するようにしても良い。
また、前記情報記録モジュールに記録するファイルデータに任意のデータを付加した場合、該ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報に、データ付加前の有効データの大きさをファイルサイズとして設定するようにすると良い。
また、前記所定の記録処理単位サイズは、前記情報記録モジュールに含まれる不揮発性メモリの物理的なデータ記録処理単位サイズの倍数長であると良い。
更に、前記所定の連続領域サイズは、前記情報記録モジュールに含まれる不揮発性メモリの物理的なデータ消去処理単位サイズの倍数長であると良い。
本発明の情報記録モジュールは、データを格納する不揮発性メモリと、外部のアクセスモジュールから指定される所定のデータ種別のデータを格納する領域の位置情報を格納するアドレス管理情報と、前記アドレス管理情報に基づき前記所定のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の特定の領域にデータを格納するエントリ格納制御部とを備える。
また、前記所定のデータ種別は、記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であると良い。
更に、前記所定のデータ種別は、記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であって、前記アドレス管理情報は、該ファイルシステム管理情報を格納する領域の位置情報を複数保持するようにしても良い。
本発明の情報記録モジュールは、データを格納する不揮発性メモリと、外部のアクセスモジュールから指定される所定のデータ種別のデータを格納する領域の位置情報を格納するアドレス管理情報と、前記アドレス管理情報に基づき前記所定のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の特定の領域にデータを格納するエントリ格納制御部とを備える。
また、前記所定のデータ種別は、記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であると良い。
更に、前記所定のデータ種別は、記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であって、前記アドレス管理情報は、該ファイルシステム管理情報を格納する領域の位置情報を複数保持するようにしても良い。
また、前記エントリ格納制御部は、前記アドレス管理情報に保持された、複数のファイルシステム管理情報を格納する領域の位置情報のそれぞれに特定の領域を割り当て、該ファイルシステム管理情報を格納するようにすると良い。
また、前記アドレス管理情報は、前記所定のデータ種別とは異なる第2のデータ種別のデータを格納する領域の位置情報を更に含み、前記エントリ格納制御部は、前記アドレス管理情報に基づき前記第2のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の前記所定のデータ種別のデータを格納する領域とは異なる特定の領域にデータを格納する処理を更に含むようにすると効果的である。
また、前記第2のデータ種別は、ファイルシステムが使用する領域管理情報であると良い。
また、前記アドレス管理情報は、前記所定のデータ種別とは異なる第2のデータ種別のデータを格納する領域の位置情報を更に含み、前記エントリ格納制御部は、前記アドレス管理情報に基づき前記第2のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の前記所定のデータ種別のデータを格納する領域とは異なる特定の領域にデータを格納する処理を更に含むようにすると効果的である。
また、前記第2のデータ種別は、ファイルシステムが使用する領域管理情報であると良い。
本発明のコントローラは、データを格納する不揮発性メモリを有する情報記録モジュールを制御するコントローラであって、外部のアクセスモジュールから指定される所定のデータ種別のデータを格納する領域の位置情報を格納するアドレス管理情報を参照し、前記所定のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の特定の領域にデータを格納するエントリ格納制御部を備える。
本発明の情報記録システムは、情報記録モジュールと、前記情報記録モジュールにアクセスするアクセスモジュールとを備える情報記録システムであって、前記情報記録モジュールは、データを格納する不揮発性メモリと、前記アクセスモジュールから指定される所定のデータ種別のデータを格納する領域の位置情報を格納するアドレス管理情報と、前記アドレス管理情報に基づき前記所定のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の特定の領域にデータを格納するエントリ格納制御部とを有し、前記アクセスモジュールは、前記所定のデータ種別のデータを格納する領域の位置情報を前記情報記録モジュールに通知するアドレス管理情報設定処理部と、前記情報記録モジュールに記録するファイルデータにおける有効データが所定の記録処理単位サイズ未満であった場合に、任意のデータを付加して前記所定の記録処理単位サイズに変更し、前記情報記録モジュールにファイルデータを記録するデータ整形処理部とを有する。
本発明の情報記録システムは、情報記録モジュールと、前記情報記録モジュールにアクセスするアクセスモジュールとを備える情報記録システムであって、前記情報記録モジュールは、データを格納する不揮発性メモリと、前記アクセスモジュールから指定される所定のデータ種別のデータを格納する領域の位置情報を格納するアドレス管理情報と、前記アドレス管理情報に基づき前記所定のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の特定の領域にデータを格納するエントリ格納制御部とを有し、前記アクセスモジュールは、前記所定のデータ種別のデータを格納する領域の位置情報を前記情報記録モジュールに通知するアドレス管理情報設定処理部と、前記情報記録モジュールに記録するファイルデータにおける有効データが所定の記録処理単位サイズ未満であった場合に、任意のデータを付加して前記所定の記録処理単位サイズに変更し、前記情報記録モジュールにファイルデータを記録するデータ整形処理部とを有する。
本発明によれば、複数のファイルを並行してNAND型フラッシュメモリに記録する場合等においても速度低下を防ぎ、リアルタイム記録を実現することが可能となる。
以下、本発明のアクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システムについて、図面を参照しつつ説明する。
[第1実施形態]
図1は、第1実施形態におけるアクセスモジュール1及び情報記録モジュール2の構成図である。
図1においてアクセスモジュール1は、CPU11、RAM12、情報記録モジュールインタフェース13、ROM14を含む。ROM14にはアクセスモジュール1を制御するプログラムが格納されており、このプログラムはRAM12を一時記憶領域として使用し、CPU11上で動作する。情報記録モジュールインタフェース13は、情報記録モジュール2とアクセスモジュール1との接続部であり、制御信号及びデータの送受信を行う。
[第1実施形態]
図1は、第1実施形態におけるアクセスモジュール1及び情報記録モジュール2の構成図である。
図1においてアクセスモジュール1は、CPU11、RAM12、情報記録モジュールインタフェース13、ROM14を含む。ROM14にはアクセスモジュール1を制御するプログラムが格納されており、このプログラムはRAM12を一時記憶領域として使用し、CPU11上で動作する。情報記録モジュールインタフェース13は、情報記録モジュール2とアクセスモジュール1との接続部であり、制御信号及びデータの送受信を行う。
ROM14は更に、アプリケーション制御部101、ファイルシステム制御部102、情報記録モジュールアクセス部103を含む。アプリケーション制御部101は、データの生成や電源の制御等、アクセスモジュール1全体の制御を行う。ファイルシステム制御部102は、FATファイルシステム等のファイルシステムによりデータをファイルとして管理するための制御を行う。情報記録モジュールアクセス部103は、ファイルシステム制御部102からデータと共にサイズとアドレスを渡され、指定されたサイズのデータを情報記録モジュール2の不揮発性メモリ内の指定された位置に記録する等、情報記録モジュール2に対するコマンドやデータの送受信を制御する。
ファイルシステム制御部102は更に、アドレス管理情報設定処理部104、データ整形処理部105を含む。アドレス管理情報設定処理部104は、ファイルにデータを記録する際に、該当ファイルのディレクトリエントリ308の位置に関する情報を情報記録モジュール2に通知する処理を行う処理部であり、従来のアクセスモジュールには存在しないものである。また、データ整形処理部105は、ファイルに記録するデータの大きさが情報記録モジュール2への記録単位の倍数長ではない場合に、データをパディングして情報記録モジュール2に記録する処理を行う処理部であり、アドレス管理情報設定処理部104と同様に従来のアクセスモジュールには存在しないものである。これら処理部の詳細については後述する。
ファイルシステム制御部102は更に、アドレス管理情報設定処理部104、データ整形処理部105を含む。アドレス管理情報設定処理部104は、ファイルにデータを記録する際に、該当ファイルのディレクトリエントリ308の位置に関する情報を情報記録モジュール2に通知する処理を行う処理部であり、従来のアクセスモジュールには存在しないものである。また、データ整形処理部105は、ファイルに記録するデータの大きさが情報記録モジュール2への記録単位の倍数長ではない場合に、データをパディングして情報記録モジュール2に記録する処理を行う処理部であり、アドレス管理情報設定処理部104と同様に従来のアクセスモジュールには存在しないものである。これら処理部の詳細については後述する。
一方、図1において情報記録モジュール2は、コントローラ21と不揮発性メモリ22を含む。
コントローラ21は、不揮発性メモリ22の制御全般を行うモジュールであり、CPU等を含むシステムLSIとして構成される。コントローラ21は更に、アクセスモジュールインタフェース211、CPU212、RAM213、ROM214、不揮発性メモリインタフェース215を含む。アクセスモジュールインタフェース211は、情報記録モジュール2とアクセスモジュール1との接続部であり、情報記録モジュールインタフェース13同様、制御信号及びデータを送受信するインタフェースである。ROM214には情報記録モジュール2を制御するプログラムが格納されており、このプログラムはRAM213を一時記憶領域として使用し、CPU212上で動作する。不揮発性メモリインタフェース215はコントローラ21と不揮発性メモリ22との接続部であり、不揮発性メモリ22に対するコマンドやデータの送受信を制御する。
コントローラ21は、不揮発性メモリ22の制御全般を行うモジュールであり、CPU等を含むシステムLSIとして構成される。コントローラ21は更に、アクセスモジュールインタフェース211、CPU212、RAM213、ROM214、不揮発性メモリインタフェース215を含む。アクセスモジュールインタフェース211は、情報記録モジュール2とアクセスモジュール1との接続部であり、情報記録モジュールインタフェース13同様、制御信号及びデータを送受信するインタフェースである。ROM214には情報記録モジュール2を制御するプログラムが格納されており、このプログラムはRAM213を一時記憶領域として使用し、CPU212上で動作する。不揮発性メモリインタフェース215はコントローラ21と不揮発性メモリ22との接続部であり、不揮発性メモリ22に対するコマンドやデータの送受信を制御する。
ROM214は更に、エントリ格納制御部217、FAT格納制御部218、ユーザデータ格納制御部219を含む。エントリ格納制御部217は、アクセスモジュール1から情報記録モジュール2に発行されたデータ書き込み命令が、ディレクトリエントリに相当する特定のデータを書き込む処理であった場合に、データをエントリ格納領域221内に格納する処理を実施する制御部である。FAT格納制御部218は、FATに相当する特定のデータを書き込む処理であった場合に、データをFAT格納領域222内に格納する処理を実施する制御部である。ユーザデータ格納制御部219は、その他のデータを書き込む処理であった場合に、データをユーザデータ格納領域223内に格納する処理を実施する制御部である。
ユーザデータ格納制御部219の処理は、従来の情報記録モジュール2が含んでいた処理とほぼ同じであるが、エントリ格納制御部217とFAT格納制御部218の処理は従来の情報記録モジュール2には存在しないものである。これらの制御部の詳細については後述する。
ユーザデータ格納制御部219の処理は、従来の情報記録モジュール2が含んでいた処理とほぼ同じであるが、エントリ格納制御部217とFAT格納制御部218の処理は従来の情報記録モジュール2には存在しないものである。これらの制御部の詳細については後述する。
また、RAM213は、エントリ格納制御部217、FAT格納制御部218、ユーザデータ格納制御部219が制御用の情報として使用するアドレス管理情報216を含む。
また、不揮発性メモリ22は、先に説明したエントリ格納領域221、FAT格納領域222、ユーザデータ格納領域223を含み、エントリ格納領域221は更に第1のエントリ格納領域224、第2のエントリ格納領域225を含む。
本実施形態における情報記録モジュール2は、データの種別により、不揮発性メモリ22内のエントリ格納領域221、FAT格納領域222、ユーザデータ格納領域223をデータ格納先として使い分ける。また、複数ファイルを並行して記録する場合には、複数ファイルのデータを所定の書き込み処理単位の倍数長にパディングしたデータをブロック単位で連続したアドレス領域に記録する。また、本実施形態におけるアクセスモジュール1は、情報記録モジュール2にディレクトリエントリ308の位置情報を通知するアドレス管理情報設定処理部104と、端数データをパディングして情報記録モジュール2に記録するデータ整形処理部105とを備える。これらアクセスモジュール1、情報記録モジュール2を組み合わせることにより、複数のファイルを並行して記録する場合においても、情報記録モジュール2内で生じる無駄なコピー処理を削減して記録速度の低下を防止し、高速に安定して情報記録モジュール2にデータを記録することが可能となる。
また、不揮発性メモリ22は、先に説明したエントリ格納領域221、FAT格納領域222、ユーザデータ格納領域223を含み、エントリ格納領域221は更に第1のエントリ格納領域224、第2のエントリ格納領域225を含む。
本実施形態における情報記録モジュール2は、データの種別により、不揮発性メモリ22内のエントリ格納領域221、FAT格納領域222、ユーザデータ格納領域223をデータ格納先として使い分ける。また、複数ファイルを並行して記録する場合には、複数ファイルのデータを所定の書き込み処理単位の倍数長にパディングしたデータをブロック単位で連続したアドレス領域に記録する。また、本実施形態におけるアクセスモジュール1は、情報記録モジュール2にディレクトリエントリ308の位置情報を通知するアドレス管理情報設定処理部104と、端数データをパディングして情報記録モジュール2に記録するデータ整形処理部105とを備える。これらアクセスモジュール1、情報記録モジュール2を組み合わせることにより、複数のファイルを並行して記録する場合においても、情報記録モジュール2内で生じる無駄なコピー処理を削減して記録速度の低下を防止し、高速に安定して情報記録モジュール2にデータを記録することが可能となる。
続いて図9を用いて、本実施形態における不揮発性メモリ22の構成について説明する。不揮発性メモリ22には、例えばNAND型フラッシュメモリ等が用いられる。不揮発性メモリ22は複数の物理ブロックから構成される。物理ブロックはデータを消去する単位であり、データを書き込む前にこの単位で一旦データを消去する必要がある。また物理ブロックは複数のページから構成される。ページはデータの書き込みを行う単位である。更にページはデータ部と冗長部を含む。データ部は論理アドレス空間としてアクセスモジュール1からアクセスが可能な領域であり、実際にファイルデータ等が格納される領域である。また冗長部は、不揮発性メモリ22の管理情報やECC等が格納される領域であり、アクセスモジュール1からアクセスできない領域である。データ部の大きさは例えば4KB、冗長部の大きさは128バイト程度となる。また、データ部にのみ着目した場合の物理ブロックの大きさは、例えば512KB程度となる。よって、不揮発性メモリ22の一例として、この大きさの物理ブロック2048個から構成された場合は、不揮発性メモリ22の容量は1GBとなる。
続いて図10を用いて、本実施形態における不揮発性メモリ22内の論理アドレスと物理アドレスの関係について説明する。不揮発性メモリ22内のアドレスには、論理アドレスと物理アドレスが存在する。論理アドレスは、アクセスモジュール1から情報記録モジュール2にアクセスする際に使用する仮想的なアドレスである。一方物理アドレスは、不揮発性メモリ22内の全物理ブロックに割り当てられた実アドレスを意味し、情報記録モジュール2内で不揮発性メモリ22にアクセスする際には、この物理アドレスが使用される。また、論理アドレスは物理アドレスに対応付けられており、その対応関係は情報記録モジュール2のRAM213内のアドレス管理情報216により管理されている。
図10は、不揮発性メモリ22内の論理アドレスと物理アドレスの対応関係の一例を示した図である。論理アドレス空間上にはマスターブートレコード・パーティションテーブル等のファイルシステム管理情報等が格納され、ファイルシステムが構築されている。物理アドレス空間内には、第1のエントリ格納領域224、第2のエントリ格納領域225、FAT格納領域222、ユーザデータ格納領域223等が存在する。
図10は、不揮発性メモリ22内の論理アドレスと物理アドレスの対応関係の一例を示した図である。論理アドレス空間上にはマスターブートレコード・パーティションテーブル等のファイルシステム管理情報等が格納され、ファイルシステムが構築されている。物理アドレス空間内には、第1のエントリ格納領域224、第2のエントリ格納領域225、FAT格納領域222、ユーザデータ格納領域223等が存在する。
第1のエントリ格納領域224は、1つ目のファイルのディレクトリエントリ308(論理アドレス空間上の“ENTRY1”)が格納される専用の物理ブロックであり、図10の例では物理ブロック番号0x0000が割り当てられている。また、第2のエントリ格納領域225は、2つ目のファイルのディレクトリエントリ308(論理アドレス空間上の“ENTRY2”)が格納される専用の物理ブロックであり、図10の例では物理ブロック番号0x0001が割り当てられている。FAT格納領域222は、FAT(305、306)が格納される専用の物理ブロックであり、図10の例では物理ブロック番号0x0002が割り当てられている。ユーザデータ格納領域223は、その他のデータが格納される物理ブロックであり、図10の例では物理ブロック番号0x0003以降の領域が割り当てられている。ユーザデータ格納領域223は更に、ユーザデータ格納領域223におけるデータ更新時に一時的に使用する物理ブロックである一時ブロック領域226を含む。図10の例では一時ブロック領域には物理ブロック番号0xF000が割り当てられている。
本実施形態における情報記録モジュール2は、図10のようにディレクトリエントリ308、FAT(305、306)を専用の物理ブロックで管理し、特別な書き込み処理を行うことにより、データ記録時の速度低下を防止する。
次に図11を用いて、本実施形態におけるアドレス管理情報216について説明する。アドレス管理情報216はデータ種別情報401、一時ブロック情報402、アドレス変換情報403を含む。データ種別情報401は、第1のエントリ格納領域224を制御するために使用する管理情報である第1エントリ位置情報411と、第2のエントリ格納領域225を制御するために使用する管理情報である第2エントリ位置情報412と、FAT格納領域222を制御するために使用する管理情報であるFAT位置情報413とを含む。
次に図11を用いて、本実施形態におけるアドレス管理情報216について説明する。アドレス管理情報216はデータ種別情報401、一時ブロック情報402、アドレス変換情報403を含む。データ種別情報401は、第1のエントリ格納領域224を制御するために使用する管理情報である第1エントリ位置情報411と、第2のエントリ格納領域225を制御するために使用する管理情報である第2エントリ位置情報412と、FAT格納領域222を制御するために使用する管理情報であるFAT位置情報413とを含む。
第1エントリ位置情報411は、1つ目のディレクトリエントリ308の格納位置に関する情報であり、該当するディレクトリエントリ308が格納されている物理アドレス(物理ブロック番号)及び論理アドレス(論理ブロック番号、論理ページ番号)から構成される。この論理アドレスは、アクセスモジュール1のアドレス管理情報設定処理部104により情報記録モジュール2に通知されるものである。また、第2エントリ位置情報412は、2つ目のディレクトリエントリ308の格納位置に関する情報であり、内容は第1エントリ位置情報411と同じである。またFAT位置情報は、FAT(305、306)の格納位置に関する情報であり、同様に物理アドレスと論理アドレスから構成されている。但し、FAT(305、306)はディレクトリエントリ308よりもサイズが大きいため、本FAT位置情報413で管理されるアドレス情報も複数ページ分のアドレス情報となる。FAT(305、306)の論理アドレスは情報記録モジュール2のフォーマット時に決められ、以後固定の値となるため、このFAT位置情報413は、第1エントリ位置情報411同様、アクセスモジュール1のアドレス管理情報設定処理部104により情報記録モジュール2に通知されるようにしても良いし、情報記録モジュール2内で予め固定の論理アドレスを使用するようにしても良い。
一時ブロック情報402は、ユーザデータ格納領域223内の一時ブロック領域226の状態に関する情報であり、現在一時ブロック領域226として割り当てられている物理ブロックの物理アドレスと、その物理ブロックに対応付けられている論理アドレスの情報から構成されている。
アドレス変換情報403は、ユーザデータ格納領域223内の各物理ブロックの物理アドレスと、論理アドレスとの対応関係を示す情報である。この情報は、従来の情報記録モジュール2が持つ情報と同様であり、一般に“アドレス変換テーブル”や、“論物アドレス変換表”等と呼ばれる情報である。
本実施形態におけるエントリ格納制御部217、FAT格納制御部218、ユーザデータ格納制御部219は、これらのアドレス管理情報216を用いて不揮発性メモリ22内の記録領域を制御する。すなわち、ディレクトリエントリ308やFAT(305、306)を専用の物理ブロックを用いて特別な書き込み処理により格納することにより、データ記録時の速度低下を防止する。また、本実施形態では、複数ファイルを並行して記録する場合においてもデータ記録時の速度低下を防止する方法を提供する。
アドレス変換情報403は、ユーザデータ格納領域223内の各物理ブロックの物理アドレスと、論理アドレスとの対応関係を示す情報である。この情報は、従来の情報記録モジュール2が持つ情報と同様であり、一般に“アドレス変換テーブル”や、“論物アドレス変換表”等と呼ばれる情報である。
本実施形態におけるエントリ格納制御部217、FAT格納制御部218、ユーザデータ格納制御部219は、これらのアドレス管理情報216を用いて不揮発性メモリ22内の記録領域を制御する。すなわち、ディレクトリエントリ308やFAT(305、306)を専用の物理ブロックを用いて特別な書き込み処理により格納することにより、データ記録時の速度低下を防止する。また、本実施形態では、複数ファイルを並行して記録する場合においてもデータ記録時の速度低下を防止する方法を提供する。
例えば図12のように動画ファイルを記録している最中に静止画データを記録するような場合には、動画データと連続したアドレスに静止画データを記録する。図12の例では書き込み処理単位を1クラスタ(=16KB)であると想定している。この場合、動画データを3クラスタ連続して記録した後に、続けて2クラスタの静止画データを記録する。この際、静止画ファイルのサイズはクラスタ倍数長であるとは限らないため、通常であれば、図12の無効データの部分には何もデータが記録されない。しかしながら、本実施形態では不揮発性メモリ22に高速にデータを記録するため、処理単位の倍数長単位で連続したアドレスにユーザデータを記録するようにする。そのため、クラスタ番号6に記録される静止画データ2は、アクセスモジュール1のデータ整形処理部105によりクラスタサイズの倍数長にパディングされ、1クラスタ分のデータとして情報記録モジュール2に記録される。このパディングサイズ分は、ディレクトリエントリ308を情報記録モジュール2に記録する際に調整されるが、この処理の詳細については後述する。更に静止画データを記録した後に、動画データの続きを記録する。
このように本実施形態では、複数のファイルを並行して記録する場合、処理単位の倍数長単位で連続したアドレスにデータを記録するようにする。更にファイル終端の端数サイズについては処理単位の倍数長にパディングして情報記録モジュール2に記録する。これにより、情報記録モジュール2に対しては、あたかも1つのファイルを連続して記録しているような処理となり、高速にデータを記録することが可能となる。
以降、本実施形態における詳細なデータ記録手順について説明する。
本実施形態におけるファイル書き込み処理手順について、図13、図14を用いて説明する。図13は本実施形態におけるファイル書き込み処理手順全体を示すフローチャートであり、図14はデータ書き込み処理を詳細化した処理手順を示すフローチャートである。以下の説明では、情報記録モジュール2に対する記録処理単位としてページサイズ単位の書き込みを実施する場合の例について説明する。
以降、本実施形態における詳細なデータ記録手順について説明する。
本実施形態におけるファイル書き込み処理手順について、図13、図14を用いて説明する。図13は本実施形態におけるファイル書き込み処理手順全体を示すフローチャートであり、図14はデータ書き込み処理を詳細化した処理手順を示すフローチャートである。以下の説明では、情報記録モジュール2に対する記録処理単位としてページサイズ単位の書き込みを実施する場合の例について説明する。
(S1301):
アクセスモジュール1のアドレス管理情報設定処理部104が、記録対象ファイルのディレクトリエントリ308の位置情報を情報記録モジュール2に通知する。通知された情報は、情報記録モジュール2のRAM213内のアドレス管理情報216における第1エントリ位置情報411、あるいは第2エントリ位置情報412に格納される。記録対象ファイルが1つ目であれば第1エントリ位置情報411に、2つ目であれば第2エントリ位置情報412に格納される。
(S1302):
記録対象ファイルのデータを情報記録モジュール2に書き込む。この際、ファイル終端等で書き込み処理サイズが記録処理単位の倍数長にならない場合は、アクセスモジュール1のデータ整形処理部105が記録処理単位の倍数長にデータをパディングし、情報記録モジュール2にデータを書き込む。本処理の詳細内容については図14で説明する。
アクセスモジュール1のアドレス管理情報設定処理部104が、記録対象ファイルのディレクトリエントリ308の位置情報を情報記録モジュール2に通知する。通知された情報は、情報記録モジュール2のRAM213内のアドレス管理情報216における第1エントリ位置情報411、あるいは第2エントリ位置情報412に格納される。記録対象ファイルが1つ目であれば第1エントリ位置情報411に、2つ目であれば第2エントリ位置情報412に格納される。
(S1302):
記録対象ファイルのデータを情報記録モジュール2に書き込む。この際、ファイル終端等で書き込み処理サイズが記録処理単位の倍数長にならない場合は、アクセスモジュール1のデータ整形処理部105が記録処理単位の倍数長にデータをパディングし、情報記録モジュール2にデータを書き込む。本処理の詳細内容については図14で説明する。
(S1303):
全ファイルデータの書き込みが完了したか判定する。まだファイルデータが残っている場合、S1302の処理に戻る。全ファイルデータの書き込みが完了した場合、S1304の処理に進む。
(S1304):
記録対象ファイルのディレクトリエントリ308を、ファイルサイズや最終更新日時等の情報を更新した上で、情報記録モジュール2に書き込む。この際、S1302の処理においてパディングを実施した場合、ファイルサイズには本来の半端な大きさのファイルサイズを設定する。これにより、S1302でファイルデータをパディングしたとしても本来のファイルサイズを持つファイルとして情報記録モジュール2に格納することができる。
全ファイルデータの書き込みが完了したか判定する。まだファイルデータが残っている場合、S1302の処理に戻る。全ファイルデータの書き込みが完了した場合、S1304の処理に進む。
(S1304):
記録対象ファイルのディレクトリエントリ308を、ファイルサイズや最終更新日時等の情報を更新した上で、情報記録モジュール2に書き込む。この際、S1302の処理においてパディングを実施した場合、ファイルサイズには本来の半端な大きさのファイルサイズを設定する。これにより、S1302でファイルデータをパディングしたとしても本来のファイルサイズを持つファイルとして情報記録モジュール2に格納することができる。
(S1305):
S1302で実施したデータ書き込み処理を元にFAT(305、306)内のリンク情報を更新し、情報記録モジュール2に書き込む。
続いて、図14に示すデータ書き込み処理の詳細手順について説明する。
(S1401):
論理アドレス空間上におけるユーザデータ領域302内をブロック単位に分割した場合に、空き領域を含む空きブロックを取得済みであるか判定する。取得済みである場合はS1403の処理に進む。取得していない場合はS1402の処理に進む。本実施形態では、ユーザデータ領域302にファイルデータを記録する場合、ユーザデータ領域302内をブロック単位に分割した場合、ブロック内全ての領域が空き領域となっているブロックを選択し、そのブロック内に連続的にファイルデータをページ単位で書き込むことを想定する。そのため、「空きブロックを取得済みである」というのは、記録領域として任意の空きブロックを選択済みであり、そのブロックに対するファイルデータ書き込み処理を開始している状態を意味する。逆に「空きブロックを取得済みではない」というのは、既に任意の空きブロックの終端までファイルデータを書き込んだ直後で新たにデータを書き込む前に、任意の空きブロックを選択する必要がある状態を意味する。
S1302で実施したデータ書き込み処理を元にFAT(305、306)内のリンク情報を更新し、情報記録モジュール2に書き込む。
続いて、図14に示すデータ書き込み処理の詳細手順について説明する。
(S1401):
論理アドレス空間上におけるユーザデータ領域302内をブロック単位に分割した場合に、空き領域を含む空きブロックを取得済みであるか判定する。取得済みである場合はS1403の処理に進む。取得していない場合はS1402の処理に進む。本実施形態では、ユーザデータ領域302にファイルデータを記録する場合、ユーザデータ領域302内をブロック単位に分割した場合、ブロック内全ての領域が空き領域となっているブロックを選択し、そのブロック内に連続的にファイルデータをページ単位で書き込むことを想定する。そのため、「空きブロックを取得済みである」というのは、記録領域として任意の空きブロックを選択済みであり、そのブロックに対するファイルデータ書き込み処理を開始している状態を意味する。逆に「空きブロックを取得済みではない」というのは、既に任意の空きブロックの終端までファイルデータを書き込んだ直後で新たにデータを書き込む前に、任意の空きブロックを選択する必要がある状態を意味する。
(S1402):
S1401の判定処理において、空きブロックを取得していないと判定した場合、空きブロックの取得を行う。具体的にはFAT(305、306)を参照し、任意のブロックの領域内全てが空き領域であるブロックを見つける処理を行う。
(S1403):
空きブロック内の空きページを取得する。空きブロック内へのデータ記録は領域先頭から連続して行うことを想定するため、対象ブロック内の先頭から探索した場合に最初に存在する空きページを記録対象の空きページとして取得する。また、ページと記載しているのは記録処理単位がページ単位であるためであり、記録処理単位をページサイズ以外で実施する場合には、本処理はその記録処理単位サイズの空き領域を取得する処理となる。
S1401の判定処理において、空きブロックを取得していないと判定した場合、空きブロックの取得を行う。具体的にはFAT(305、306)を参照し、任意のブロックの領域内全てが空き領域であるブロックを見つける処理を行う。
(S1403):
空きブロック内の空きページを取得する。空きブロック内へのデータ記録は領域先頭から連続して行うことを想定するため、対象ブロック内の先頭から探索した場合に最初に存在する空きページを記録対象の空きページとして取得する。また、ページと記載しているのは記録処理単位がページ単位であるためであり、記録処理単位をページサイズ以外で実施する場合には、本処理はその記録処理単位サイズの空き領域を取得する処理となる。
(S1404):
記録対象データの大きさがページサイズであるか判定する。ページサイズ以外の半端サイズである場合、S1404の処理に進む。また、ページサイズ丁度である場合はS1406の処理に進む。S1403同様、記録処理単位がページサイズではない場合、本処理も記録対象データの大きさと記録処理単位サイズとの比較処理となる。
(S1405):
記録対象データの大きさがページサイズと同じになるよう、データ整形処理部105は記録対象データをパディングする。パディングデータは0x00や0xFF等の固定値であっても良いし、任意の値でも良い。
(S1406):
ページサイズのデータを情報記録モジュール2に書き込み、処理を終了する。
記録対象データの大きさがページサイズであるか判定する。ページサイズ以外の半端サイズである場合、S1404の処理に進む。また、ページサイズ丁度である場合はS1406の処理に進む。S1403同様、記録処理単位がページサイズではない場合、本処理も記録対象データの大きさと記録処理単位サイズとの比較処理となる。
(S1405):
記録対象データの大きさがページサイズと同じになるよう、データ整形処理部105は記録対象データをパディングする。パディングデータは0x00や0xFF等の固定値であっても良いし、任意の値でも良い。
(S1406):
ページサイズのデータを情報記録モジュール2に書き込み、処理を終了する。
図14の説明で用いたブロックやページのサイズは、情報記録モジュール2からアクセスモジュール1が取得できるようにしても良いし、予め固定の値を決めておきアクセスモジュール1で使用するようにしても良い。
以上、図13、図14で説明したように、本実施形態では、複数のファイルを並行して記録する場合、処理単位の倍数長単位で連続したアドレスにデータを記録するようにする。更にファイル終端の端数サイズについては処理単位の倍数長にパディングして情報記録モジュール2に記録する。これにより、情報記録モジュール2に対しては、あたかも1つのファイルを連続して記録しているような処理となり、高速にデータを記録することが可能となる。また、ここではディレクトリエントリ308やFAT(305、306)の書き込みをファイル終端にまとめて実施する場合の例について説明したが、数秒間隔で定期的に更新する等、ファイルデータ記録の合間に実施しても良い。
以上、図13、図14で説明したように、本実施形態では、複数のファイルを並行して記録する場合、処理単位の倍数長単位で連続したアドレスにデータを記録するようにする。更にファイル終端の端数サイズについては処理単位の倍数長にパディングして情報記録モジュール2に記録する。これにより、情報記録モジュール2に対しては、あたかも1つのファイルを連続して記録しているような処理となり、高速にデータを記録することが可能となる。また、ここではディレクトリエントリ308やFAT(305、306)の書き込みをファイル終端にまとめて実施する場合の例について説明したが、数秒間隔で定期的に更新する等、ファイルデータ記録の合間に実施しても良い。
図15は、本実施形態において複数のファイルを並行して書き込む場合の書き込みシーケンス例について示した図である。図15のFile1が1つ目のファイル、File2が2つ目のファイルを意味している。この例では1つ目のファイルのデータ記録中に2つ目のファイルを記録する場合を示しており、例えば動画ファイル記録中に静止画ファイルを記録する場合の処理等が該当する。この場合、図13で説明した処理手順に従い1つ目のファイルを記録している最中に2つ目のファイルの記録処理に切り替わり、2つ目のファイルの記録完了後に、また1つ目のファイルの記録処理に戻る。しかしながら、これら2つのファイルのデータは、図13、図14で説明した処理手順に従い、任意のブロック内の連続したアドレスに記録されるため、記録するファイルが切り替わっても記録速度が低下することなく、安定してデータを記録することができる。
続いて図16を用いて、本実施形態のエントリ格納制御部217におけるディレクトリエントリ書き込み処理手順について説明する。図16の説明では1つ目のファイルのディレクトリエントリ308に対する書き込み処理を中心に説明するが、2つ目のファイルのディレクトリエントリ308に対する書き込み処理手順もほぼ同じとなる。すなわち、以降の処理において“第1エントリ位置情報”を“第2エントリ位置情報”、“第1のエントリ格納領域”を“第2のエントリ格納領域”と読み替えると2つ目のファイルのディレクトリエントリ308に対する書き込み処理手順となる。
(S1601):
アクセスモジュール1から情報記録モジュール2に対して発行された書き込み命令を元に、書き込み先のアドレスを取得する。ここで書き込み先のアドレスとは、アクセスモジュール1が情報記録モジュール2に対する書き込みコマンドで指定する論理アドレスを意味する。
(S1601):
アクセスモジュール1から情報記録モジュール2に対して発行された書き込み命令を元に、書き込み先のアドレスを取得する。ここで書き込み先のアドレスとは、アクセスモジュール1が情報記録モジュール2に対する書き込みコマンドで指定する論理アドレスを意味する。
(S1602):
S1601で取得した書き込み先アドレスと第1エントリ位置情報411を比較し、値が一致するか判定する。値が一致する場合はS1604の処理に進む。値が一致しない場合はS1603の処理に進む。
(S1603):
S1602の判定処理において値が一致しないと判定した場合、第1のエントリ格納領域224に対する書き込みではないため、ユーザデータ格納領域223に対する書き込み処理等、他の書き込み処理を実施して処理を終了する。
(S1604):
S1602の判定処理において値が一致すると判定した場合、第1のエントリ格納領域224内に未使用ページが存在するか判定する。未使用ページが存在する場合はS1606の処理に進む。未使用ページが存在しない場合はS1605の処理に進む。ここで未使用ページとは、データ消去済みのページで有効なデータを格納しておらず、データを書き込むことが可能なページであることを意味する。
S1601で取得した書き込み先アドレスと第1エントリ位置情報411を比較し、値が一致するか判定する。値が一致する場合はS1604の処理に進む。値が一致しない場合はS1603の処理に進む。
(S1603):
S1602の判定処理において値が一致しないと判定した場合、第1のエントリ格納領域224に対する書き込みではないため、ユーザデータ格納領域223に対する書き込み処理等、他の書き込み処理を実施して処理を終了する。
(S1604):
S1602の判定処理において値が一致すると判定した場合、第1のエントリ格納領域224内に未使用ページが存在するか判定する。未使用ページが存在する場合はS1606の処理に進む。未使用ページが存在しない場合はS1605の処理に進む。ここで未使用ページとは、データ消去済みのページで有効なデータを格納しておらず、データを書き込むことが可能なページであることを意味する。
(S1605):
S1604の判定処理において未使用ページが存在しないと判定した場合、第1のエントリ格納領域224にデータを書き込むことができないため、一旦第1のエントリ格納領域224に格納されているデータを全て消去する。これにより、第1のエントリ格納領域224に未使用ページを生成する。
(S1606):
未使用ページの先頭にデータを書き込む。未使用ページへのデータ記録は領域先頭から連続して行うことを想定するため、第1のエントリ格納領域224の先頭から探索した場合に最初に存在する未使用ページを記録対象の未使用ページとする。
図17は、本実施形態における第1のエントリ格納領域224の状態の一例を示した図である。図17(a)では、第1のエントリ格納領域224の先頭ページにディレクトリエントリ308(ENTRY1_1)が格納されており、以降のページは全て消去済みの未使用ページとなっている。ここで、アクセスモジュール1がディレクトリエントリ308にENTRY1_2のデータを上書きする場合、図17(b)の状態に変化する。図17(b)では、ENTRY1_2のデータが、先頭の未使用ページであった2ページ目に格納されている。また、この状態においては灰色のENTRY1_2のデータが最新のデータであり、ENTRY1_1のデータは古いデータとして扱われる。すなわち、この状態でアクセスモジュール1がディレクトリエントリ308を読み出した場合、情報記録モジュール2はENTRY1_2のデータをアクセスモジュール1に出力する。同様にディレクトリエントリ308にデータを上書きし続けた場合、図17(c)、図17(d)と変化する。図17(d)の状態で更にアクセスモジュール1がディレクトリエントリ308(ENTRY1_9)を上書きした場合、S1605の処理により第1のエントリ格納領域224のデータが一旦消去され、先頭ページにENTRY1_9のデータが格納される。このように第1のエントリ格納領域224には常に1ページ分の有効なディレクトリエントリ308のデータが保持され、書き込み処理においては無駄なコピー処理が発生しない。
S1604の判定処理において未使用ページが存在しないと判定した場合、第1のエントリ格納領域224にデータを書き込むことができないため、一旦第1のエントリ格納領域224に格納されているデータを全て消去する。これにより、第1のエントリ格納領域224に未使用ページを生成する。
(S1606):
未使用ページの先頭にデータを書き込む。未使用ページへのデータ記録は領域先頭から連続して行うことを想定するため、第1のエントリ格納領域224の先頭から探索した場合に最初に存在する未使用ページを記録対象の未使用ページとする。
図17は、本実施形態における第1のエントリ格納領域224の状態の一例を示した図である。図17(a)では、第1のエントリ格納領域224の先頭ページにディレクトリエントリ308(ENTRY1_1)が格納されており、以降のページは全て消去済みの未使用ページとなっている。ここで、アクセスモジュール1がディレクトリエントリ308にENTRY1_2のデータを上書きする場合、図17(b)の状態に変化する。図17(b)では、ENTRY1_2のデータが、先頭の未使用ページであった2ページ目に格納されている。また、この状態においては灰色のENTRY1_2のデータが最新のデータであり、ENTRY1_1のデータは古いデータとして扱われる。すなわち、この状態でアクセスモジュール1がディレクトリエントリ308を読み出した場合、情報記録モジュール2はENTRY1_2のデータをアクセスモジュール1に出力する。同様にディレクトリエントリ308にデータを上書きし続けた場合、図17(c)、図17(d)と変化する。図17(d)の状態で更にアクセスモジュール1がディレクトリエントリ308(ENTRY1_9)を上書きした場合、S1605の処理により第1のエントリ格納領域224のデータが一旦消去され、先頭ページにENTRY1_9のデータが格納される。このように第1のエントリ格納領域224には常に1ページ分の有効なディレクトリエントリ308のデータが保持され、書き込み処理においては無駄なコピー処理が発生しない。
以上、図16、図17で説明したように、本実施形態のエントリ格納制御部217は、アクセスモジュール1のアドレス管理情報設定処理部104により通知された第1エントリ位置情報411、あるいは第2エントリ位置情報412を用いて、ディレクトリエントリ308を第1のエントリ格納領域224、あるいは第2のエントリ格納領域225に格納する。これによりディレクトリエントリ308の書き込み時における無駄なコピー処理の発生を防止し、高速にディレクトリエントリ308を書き込むことが可能となる。
続いて図18を用いて、本実施形態のFAT格納制御部218におけるFAT書き込み処理手順について説明する。図17の処理手順は図16の処理手順とほぼ同じであるため、詳細な説明は割愛する。図17が図16と異なる点は、“第1エントリ位置情報”が“FAT位置情報”、“第1のエントリ格納領域”が“FAT格納領域”である点と、書き込み処理単位が1ページ単位ではなく、複数ページとなっている点である。
続いて図18を用いて、本実施形態のFAT格納制御部218におけるFAT書き込み処理手順について説明する。図17の処理手順は図16の処理手順とほぼ同じであるため、詳細な説明は割愛する。図17が図16と異なる点は、“第1エントリ位置情報”が“FAT位置情報”、“第1のエントリ格納領域”が“FAT格納領域”である点と、書き込み処理単位が1ページ単位ではなく、複数ページとなっている点である。
図19は、本実施形態におけるFAT格納領域222の状態の一例を示した図である。図19(a)では、FAT格納領域222の先頭4ページにFAT(305、306)のデータが格納されている。すなわち、この例ではFAT(305、306)の大きさは4ページであり、各々FAT_A_1からFAT_D_1までのデータが格納されていることを意味する。また、FAT格納領域222の残り4ページは消去済みの未使用ページとなっている。ここで、アクセスモジュール1がFAT(305、306)にFAT_A_2からFAT_D_2までのデータを上書きする場合、図19(b)の状態に変化する。図19(b)では、FAT_A_2からFAT_D_2までのデータが、先頭の未使用ページであった5ページ目以降に格納されている。また、この状態においては灰色のFAT_A_2からFAT_D_2までのデータが最新のデータであり、FAT_A_1からFAT_D_1までのデータは古いデータとして扱われる。すなわち、この状態でアクセスモジュール1がFAT(305、306)を読み出した場合、情報記録モジュール2はFAT_A_2からFAT_D_2までのデータをアクセスモジュール1に出力する。更にFAT(305、306)にFAT_A_3からFAT_D_3までのデータを上書きした場合、S1805の処理によりFAT格納領域222のデータが一旦消去され、先頭ページよりFAT_A_3からFAT_D_3までのデータが格納される。このようにFAT格納領域222には常に必要サイズ分の有効なFATデータが保持され、書き込み処理においては無駄なコピー処理が発生しない。
以上、図18、図19で説明したように、本実施形態のFAT格納制御部218は、アクセスモジュール1のアドレス管理情報設定処理部104により通知された、あるいは予め固定の値として保持していたFAT位置情報413を用いて、FAT(305、306)をFAT格納領域222に格納する。これによりFAT(305、306)の書き込み時における無駄なコピー処理の発生を防止し、高速にFAT(305、306)を書き込むことが可能となる。
続いて図20、図21、図22を用いて、本実施形態のユーザデータ格納制御部219におけるユーザデータ書き込み処理手順について説明する。
図20は、本実施形態のユーザデータ格納制御部219におけるユーザデータ書き込み処理手順を示したフローチャートである。図21は、本実施形態のユーザデータ格納領域223の状態の一例を示した図である。同様に図22は、本実施形態のユーザデータ格納領域223の状態の別の一例を示した図である。
続いて図20、図21、図22を用いて、本実施形態のユーザデータ格納制御部219におけるユーザデータ書き込み処理手順について説明する。
図20は、本実施形態のユーザデータ格納制御部219におけるユーザデータ書き込み処理手順を示したフローチャートである。図21は、本実施形態のユーザデータ格納領域223の状態の一例を示した図である。同様に図22は、本実施形態のユーザデータ格納領域223の状態の別の一例を示した図である。
図21、図22において、点線で囲んだ中は一時ブロック領域226を示す。本実施形態においてユーザデータ格納領域223にデータを書き込む際には、一旦一時ブロック領域226にデータを書き込み、一時ブロック領域226全体にデータが書き込まれた時点で1ブロック分のデータが全て正式に書き込まれた状態となる。すなわち、一時ブロック領域226が割り当てられている論理アドレスについては、部分的に古いデータを含む物理ブロックと一時ブロック領域226の2つの物理ブロックが割り当てられることになる。例えば、図22(a)の物理ブロック番号0x0003(先頭ページのみ古いデータ)と、物理ブロック番号0xF000(先頭ページのみ新しいデータ)の2つの物理ブロックが同一の論理アドレスに割り当てられている。
(S2001):
アクセスモジュール1から情報記録モジュール2に対して発行された書き込み命令を元に、書き込み先のアドレスを取得する。ここで書き込み先のアドレスとは、アクセスモジュール1が情報記録モジュール2に対する書き込みコマンドで指定する論理アドレスを意味する。
(S2001):
アクセスモジュール1から情報記録モジュール2に対して発行された書き込み命令を元に、書き込み先のアドレスを取得する。ここで書き込み先のアドレスとは、アクセスモジュール1が情報記録モジュール2に対する書き込みコマンドで指定する論理アドレスを意味する。
(S2002):
S2001で取得した書き込み先アドレスと第1エントリ位置情報411、第2エントリ位置情報412、FAT位置情報413を比較し、ディレクトリエントリ308やFAT(305、306)の書き込みであるか判定する。ディレクトリエントリ308やFAT(305、306)の書き込みであると判定した場合、S2003の処理に進む。ディレクトリエントリ308やFAT(305、306)の書き込みではないと判定した場合、S2004の処理に進む。
(S2003):
S2002の判定処理においてディレクトリエントリ308やFAT(305、306)の書き込みであると判定した場合、ユーザデータ格納領域223に対する書き込みではないため、第1のエントリ格納領域224に対する書き込み処理等、他の書き込み処理を実施して処理を終了する。
S2001で取得した書き込み先アドレスと第1エントリ位置情報411、第2エントリ位置情報412、FAT位置情報413を比較し、ディレクトリエントリ308やFAT(305、306)の書き込みであるか判定する。ディレクトリエントリ308やFAT(305、306)の書き込みであると判定した場合、S2003の処理に進む。ディレクトリエントリ308やFAT(305、306)の書き込みではないと判定した場合、S2004の処理に進む。
(S2003):
S2002の判定処理においてディレクトリエントリ308やFAT(305、306)の書き込みであると判定した場合、ユーザデータ格納領域223に対する書き込みではないため、第1のエントリ格納領域224に対する書き込み処理等、他の書き込み処理を実施して処理を終了する。
(S2004):
S2002の判定処理においてディレクトリエントリ308やFAT(305、306)の書き込みではないと判定した場合、S2001で取得した書き込み先アドレスと一時ブロック情報402とを比較し、一時ブロック領域226に対する書き込み処理であるか判定する。一時ブロック領域226に対する書き込み処理であると判定した場合、S2005の処理に進む。一時ブロック領域226に対する書き込み処理ではないと判定した場合、S2006の処理に進む。
(S2005):
S2004の判定処理において、一時ブロック領域226に対する書き込み処理であると判定した場合、一時ブロック領域226内でアドレスジャンプが発生するか判定する。アドレスジャンプが発生すると判定した場合、S2006の処理に進む。アドレスジャンプが発生しないと判定した場合、S2009の処理に進む。
S2002の判定処理においてディレクトリエントリ308やFAT(305、306)の書き込みではないと判定した場合、S2001で取得した書き込み先アドレスと一時ブロック情報402とを比較し、一時ブロック領域226に対する書き込み処理であるか判定する。一時ブロック領域226に対する書き込み処理であると判定した場合、S2005の処理に進む。一時ブロック領域226に対する書き込み処理ではないと判定した場合、S2006の処理に進む。
(S2005):
S2004の判定処理において、一時ブロック領域226に対する書き込み処理であると判定した場合、一時ブロック領域226内でアドレスジャンプが発生するか判定する。アドレスジャンプが発生すると判定した場合、S2006の処理に進む。アドレスジャンプが発生しないと判定した場合、S2009の処理に進む。
ここでアドレスジャンプが発生するとは、一時ブロック領域226内に最後に書き込まれたユーザデータのアドレスと、S2001で取得した書き込み先アドレスが連続していない場合を意味する。例えば、図21(a)の状態では、一時ブロック領域226の1ページ目までユーザデータ(DATA1A_2)が書込まれている。この状態でDATA1A_2の論理アドレスの直後の論理アドレスから1ページ先にある論理アドレスに1ページ分のユーザデータをアクセスモジュール1が書き込もうとした場合、一時ブロック領域226の3ページ目に対する書き込み処理が発生することになり、アドレスジャンプが発生することになる。この場合、本実施形態では、一時ブロック領域226への書き込みは領域先頭から終端まで連続したアドレスにデータを書き込むことを想定しているため、S2006で示すように、ジャンプされた1ページ分のデータをコピーする処理が必要となる。
(S2006):
S2004の判定処理で書き込み先アドレスが一時ブロック情報402と一致しないと判定した場合や、S2005の判定処理でアドレスジャンプが発生すると判定した場合、データコピー処理を実施する。図22は、書き込み先アドレスが一時ブロック情報402と一致しない場合の例を示している。この場合、本データコピー処理の前後で、図22(b)の状態から図22(c)の状態に変化する。すなわち、図22(b)の状態では物理ブロック番号0x0003に対応する論理アドレス上の領域にアクセスモジュール1がユーザデータを書き込んだ場合を示しており、この状態から図22(c)では物理ブロック番号0x0004に対応する論理アドレス上の領域にアクセスモジュール1がユーザデータを書き込んだ場合を示している。この場合、物理ブロック番号0x0004に対応する論理アドレス上の領域への記録のために、一時ブロック領域226を再割り当てするため、一旦物理ブロック番号0x0003に対応する論理アドレス上の領域への記録を完了させる必要がある。そのため、物理ブロック番号0x0003に格納されているDATA1B_1からDATA2D_1の有効データを、一時ブロック領域226である物理ブロック番号0xF000の未使用ページにコピーする。
S2004の判定処理で書き込み先アドレスが一時ブロック情報402と一致しないと判定した場合や、S2005の判定処理でアドレスジャンプが発生すると判定した場合、データコピー処理を実施する。図22は、書き込み先アドレスが一時ブロック情報402と一致しない場合の例を示している。この場合、本データコピー処理の前後で、図22(b)の状態から図22(c)の状態に変化する。すなわち、図22(b)の状態では物理ブロック番号0x0003に対応する論理アドレス上の領域にアクセスモジュール1がユーザデータを書き込んだ場合を示しており、この状態から図22(c)では物理ブロック番号0x0004に対応する論理アドレス上の領域にアクセスモジュール1がユーザデータを書き込んだ場合を示している。この場合、物理ブロック番号0x0004に対応する論理アドレス上の領域への記録のために、一時ブロック領域226を再割り当てするため、一旦物理ブロック番号0x0003に対応する論理アドレス上の領域への記録を完了させる必要がある。そのため、物理ブロック番号0x0003に格納されているDATA1B_1からDATA2D_1の有効データを、一時ブロック領域226である物理ブロック番号0xF000の未使用ページにコピーする。
(S2007):
現在の一時ブロック領域226に割り当てられた物理ブロックに未使用ページが存在するか判定する。未使用ページが存在する場合はS2009の処理に進む。未使用ページが存在しない場合はS2008の処理に進む。例えば、S2006の処理により図22(c)のように物理ブロック0xF000にデータがコピーされ未使用ページがなくなると、一時ブロック領域226に未使用ページが存在しないと判定する。
(S2008):
S2007の判定処理において、現在の一時ブロック領域226に割り当てられた物理ブロックに未使用ページが存在しないと判定した場合、旧データのみを格納した物理ブロックに含まれるデータを一旦消去し、この物理ブロックを新しい一時ブロック領域226とするよう、一時ブロック情報402を更新する。例えば、図22(c)の例の場合、旧データのみを格納した物理ブロックである物理ブロック番号0x0003の物理ブロックのデータが一旦消去され、この物理ブロックが新しい一時ブロック領域226となる。このように一時ブロック領域226は、逐次新しい物理ブロックに移動していくことになる。
現在の一時ブロック領域226に割り当てられた物理ブロックに未使用ページが存在するか判定する。未使用ページが存在する場合はS2009の処理に進む。未使用ページが存在しない場合はS2008の処理に進む。例えば、S2006の処理により図22(c)のように物理ブロック0xF000にデータがコピーされ未使用ページがなくなると、一時ブロック領域226に未使用ページが存在しないと判定する。
(S2008):
S2007の判定処理において、現在の一時ブロック領域226に割り当てられた物理ブロックに未使用ページが存在しないと判定した場合、旧データのみを格納した物理ブロックに含まれるデータを一旦消去し、この物理ブロックを新しい一時ブロック領域226とするよう、一時ブロック情報402を更新する。例えば、図22(c)の例の場合、旧データのみを格納した物理ブロックである物理ブロック番号0x0003の物理ブロックのデータが一旦消去され、この物理ブロックが新しい一時ブロック領域226となる。このように一時ブロック領域226は、逐次新しい物理ブロックに移動していくことになる。
(S2009):
一時ブロック領域226内の未使用ページの先頭にユーザデータを書き込み、処理を終了する。未使用ページへのデータ記録は領域先頭から連続して行うことを想定するため、一時ブロック領域226の先頭から探索した場合に最初に存在する未使用ページを記録対象の未使用ページとする。
図20で説明した処理手順は、従来の情報記録モジュール2におけるユーザデータ書き込み処理手順とほぼ同じものである。しかしながら、本実施形態におけるアクセスモジュール1はユーザデータを記録する際に、複数ファイルを並行して記録する場合においても、半端サイズデータの場合はパディングしながら連続したアドレスに記録処理単位サイズの倍数長単位で記録を行う。そのため、実際には図22で示すようなコピー処理が発生することはなく、図21のように一時ブロック領域226の先頭から終端まで連続してユーザデータが格納されることになり、無駄なコピー処理は発生しない。
一時ブロック領域226内の未使用ページの先頭にユーザデータを書き込み、処理を終了する。未使用ページへのデータ記録は領域先頭から連続して行うことを想定するため、一時ブロック領域226の先頭から探索した場合に最初に存在する未使用ページを記録対象の未使用ページとする。
図20で説明した処理手順は、従来の情報記録モジュール2におけるユーザデータ書き込み処理手順とほぼ同じものである。しかしながら、本実施形態におけるアクセスモジュール1はユーザデータを記録する際に、複数ファイルを並行して記録する場合においても、半端サイズデータの場合はパディングしながら連続したアドレスに記録処理単位サイズの倍数長単位で記録を行う。そのため、実際には図22で示すようなコピー処理が発生することはなく、図21のように一時ブロック領域226の先頭から終端まで連続してユーザデータが格納されることになり、無駄なコピー処理は発生しない。
以上、図20、図21、図22で説明したように、本実施形態のユーザデータ格納制御部219は、一時ブロック領域226を用いてユーザデータ格納領域223に対するデータ書き込み処理を実施する。しかしながら、本実施形態のアクセスモジュール1の処理により、ユーザデータ書き込み時における無駄なコピー処理の発生を防止し、高速にユーザデータを書き込むことが可能となる。
以上のように、本実施形態のアクセスモジュール1と情報記録モジュール2を組み合わせて使用し、複数のファイルを並行して記録する場合において、情報記録モジュール2内で生じる無駄なコピー処理を削減して記録速度の低下を防止することにより、高速に安定して情報記録モジュール2にファイルデータを書き込むことが可能となる。
尚、本発明を上記の実施形態に基づいて説明してきたが、本発明は上記の実施形態に限定されないのは勿論である。本発明の趣旨を逸脱しない範囲で実施変更することができる。本実施形態で記載された数値は一例であり、他の値を使用しても良い。例えば、物理ブロックサイズやページサイズ等の値は全て一例であり、本実施形態で記載した値に限定されるものではない。
以上のように、本実施形態のアクセスモジュール1と情報記録モジュール2を組み合わせて使用し、複数のファイルを並行して記録する場合において、情報記録モジュール2内で生じる無駄なコピー処理を削減して記録速度の低下を防止することにより、高速に安定して情報記録モジュール2にファイルデータを書き込むことが可能となる。
尚、本発明を上記の実施形態に基づいて説明してきたが、本発明は上記の実施形態に限定されないのは勿論である。本発明の趣旨を逸脱しない範囲で実施変更することができる。本実施形態で記載された数値は一例であり、他の値を使用しても良い。例えば、物理ブロックサイズやページサイズ等の値は全て一例であり、本実施形態で記載した値に限定されるものではない。
また、図1の説明において情報記録モジュール2のコントローラ21の構成を説明したが、その他の構成としても良い。例えば、コントローラ21内のCPU212やRAM213等をコントローラ21の外部に配置しても良いし、逆にその他の構成要素をコントローラ21内に含ませても良い。
また、本実施形態ではファイルシステムとしてFAT16を例として説明したが、その他のファイルシステムを用いても良い。
また、情報記録モジュール2に使用される不揮発性メモリ22の枚数は1枚である必要はなく、複数枚を組み合わせて使用しても良い。特に複数の不揮発性メモリ22に対して並列にデータ書き込みできるように構成した場合、更に書き込み処理を高速化することが可能となる。
また、本実施形態ではファイルシステムとしてFAT16を例として説明したが、その他のファイルシステムを用いても良い。
また、情報記録モジュール2に使用される不揮発性メモリ22の枚数は1枚である必要はなく、複数枚を組み合わせて使用しても良い。特に複数の不揮発性メモリ22に対して並列にデータ書き込みできるように構成した場合、更に書き込み処理を高速化することが可能となる。
また、データ整形処理部105で書き込みデータをパディングした場合、S1304の処理において、ディレクトリエントリ308上のファイルサイズを調整する方法について説明した。しかしながら、動画ファイルや静止画ファイルのファイルフォーマット上でパディングを入れる機能をサポートしている場合には、ディレクトリエントリ308上のファイルサイズはパディング後のサイズをそのまま格納するようにしても良い。
また、記録処理単位サイズがページサイズと同じである場合の例について説明したが、その他のサイズを記録処理単位サイズとして用いても良い。例えば、ファイルシステムのデータ管理単位サイズであるクラスタサイズの倍数長等を記録処理単位サイズとして使用しても良い。
また、本実施形態では2つのファイルを並行して書き込む場合の例について説明したが、3つ以上のファイルを並行して書き込めるようにしても良い。その場合は、エントリ格納領域の個数を並行して書き込むファイルの数に増やすことにより対応することが可能となる。
また、記録処理単位サイズがページサイズと同じである場合の例について説明したが、その他のサイズを記録処理単位サイズとして用いても良い。例えば、ファイルシステムのデータ管理単位サイズであるクラスタサイズの倍数長等を記録処理単位サイズとして使用しても良い。
また、本実施形態では2つのファイルを並行して書き込む場合の例について説明したが、3つ以上のファイルを並行して書き込めるようにしても良い。その場合は、エントリ格納領域の個数を並行して書き込むファイルの数に増やすことにより対応することが可能となる。
また、本実施形態では2つのファイルを並行して書き込む場合の例について説明したが、ファイルシステムにより、ファイルのメタデータをファイルデータとは別に格納する機能をサポートしている場合には、本発明の第2のエントリ格納領域を該当ファイルのメタデータ格納に使用しても良い。例えば、NTFSファイルシステムでは、ファイルデータとは別にそのファイルに関するメタデータとしてNamed Streamと呼ばれる拡張情報を格納することができる。そのため、例えば本発明の第2のエントリ格納領域を該当ファイルのNamed Streamの情報を格納するために使用することも可能である。これにより、このようなファイルのメタデータも高速に記録することが可能となる。
また、図13のS1301において、エントリ位置情報設定の処理をファイルデータ記録に先立ち予め実施する方法について説明したが、S1304の処理等、実際にディレクトリエントリを書き込む際にアクセスモジュール1から情報記録モジュール2にエントリ位置情報を通知するようにしても良い。
また、図13のS1301において、エントリ位置情報設定の処理をファイルデータ記録に先立ち予め実施する方法について説明したが、S1304の処理等、実際にディレクトリエントリを書き込む際にアクセスモジュール1から情報記録モジュール2にエントリ位置情報を通知するようにしても良い。
また、図14のデータ書き込み処理手順においては、ブロック内全てが空き領域であるブロックのみを取得して、書き込み対象のブロックとしていたが、特許文献1に開示されているように、所定の閾値以上の空き領域を含むブロックを書き込み対象のブロックとしても良い。
また、図19では、FAT(305、306)が4ページから構成され、更新時には全てのFAT(305、306)を一度に更新する場合の例について説明したが、必ずしもFAT(305、306)全体を更新する必要はなく、ファイルデータ書き込みに伴い変更された、FAT(305、306)上の一部の領域のみを更新するようにしても良い。
[他の実施形態]
なお、上記実施形態で説明したアクセスモジュール(アクセス装置)、情報記録モジュール(情報記録装置)において、各ブロックは、LSIなどの半導体装置により個別に1チップ化されても良いし、一部又は全部を含むように1チップ化されても良い。
また、図19では、FAT(305、306)が4ページから構成され、更新時には全てのFAT(305、306)を一度に更新する場合の例について説明したが、必ずしもFAT(305、306)全体を更新する必要はなく、ファイルデータ書き込みに伴い変更された、FAT(305、306)上の一部の領域のみを更新するようにしても良い。
[他の実施形態]
なお、上記実施形態で説明したアクセスモジュール(アクセス装置)、情報記録モジュール(情報記録装置)において、各ブロックは、LSIなどの半導体装置により個別に1チップ化されても良いし、一部又は全部を含むように1チップ化されても良い。
なお、ここでは、LSIとしたが、集積度の違いにより、IC、システムLSI、スーパーLSI、ウルトラLSIと呼称されることもある。
また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。
さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適用等が可能性としてあり得る。
また、上記実施形態の各処理をハードウェアにより実現してもよいし、ソフトウェア(OS(オペレーティングシステム)、ミドルウェア、あるいは、所定のライブラリとともに実現される場合を含む。)により実現してもよい。さらに、ソフトウェアおよびハードウェアの混在処理により実現しても良い。なお、上記実施形態に係るアクセスモジュール(アクセス装置)、情報記録モジュール(情報記録装置)をハードウェアにより実現する場合、各処理を行うためのタイミング調整を行う必要があるのは言うまでもない。上記実施形態においては、説明便宜のため、実際のハードウェア設計で生じる各種信号のタイミング調整の詳細については省略している。
また、集積回路化の手法はLSIに限るものではなく、専用回路又は汎用プロセサで実現してもよい。LSI製造後に、プログラムすることが可能なFPGA(Field Programmable Gate Array)や、LSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサーを利用しても良い。
さらには、半導体技術の進歩又は派生する別技術によりLSIに置き換わる集積回路化の技術が登場すれば、当然、その技術を用いて機能ブロックの集積化を行ってもよい。バイオ技術の適用等が可能性としてあり得る。
また、上記実施形態の各処理をハードウェアにより実現してもよいし、ソフトウェア(OS(オペレーティングシステム)、ミドルウェア、あるいは、所定のライブラリとともに実現される場合を含む。)により実現してもよい。さらに、ソフトウェアおよびハードウェアの混在処理により実現しても良い。なお、上記実施形態に係るアクセスモジュール(アクセス装置)、情報記録モジュール(情報記録装置)をハードウェアにより実現する場合、各処理を行うためのタイミング調整を行う必要があるのは言うまでもない。上記実施形態においては、説明便宜のため、実際のハードウェア設計で生じる各種信号のタイミング調整の詳細については省略している。
また、上記実施形態における処理方法の実行順序は、必ずしも、上記実施形態の記載に制限されるものではなく、発明の要旨を逸脱しない範囲で、実行順序を入れ替えることができるものである。
また、上記実施形態において、アクセスモジュール(アクセス装置)と情報記録モジュール(情報記録装置)とは、別装置(別モジュール)である場合について説明したが、これに限定されることはなく、アクセスモジュール(アクセス装置)と情報記録モジュール(情報記録装置)とは、1つの装置内に構成されるものであってもよい。
また、上記実施形態において、アクセスモジュール(アクセス装置)と情報記録モジュール(情報記録装置)とは、別装置(別モジュール)である場合について説明したが、これに限定されることはなく、アクセスモジュール(アクセス装置)と情報記録モジュール(情報記録装置)とは、1つの装置内に構成されるものであってもよい。
本発明に関わるアクセスモジュールは、ディレクトリエントリの格納位置に関する情報を情報記録モジュールに通知するアドレス管理情報設定処理部と、ファイル終端等の半端データを書き込む際にファイルデータをパディングして情報記録モジュールに書き込むデータ整形処理部とを含む。また、本発明の情報記録モジュールは、アクセスモジュールにより書き込みが指示されたデータの種別に応じて格納先、及び格納方法を変更するエントリ格納制御部、FAT格納制御部、及びユーザデータ格納制御部を含む。これらアクセスモジュールと情報記録モジュールとを組み合わせることにより、複数のファイルを並行して記録する場合において、情報記録モジュール内で生じる無駄なコピー処理を削減して記録速度の低下を防止し、高速に安定して情報記録モジュールにファイルデータを書き込むことが可能となる。このようなアクセスモジュールは、音楽や静止画、動画等のデジタルコンテンツを取り扱う機器、とりわけコンテンツデータをリアルタイムに情報記録モジュールに記録する必要がある機器、及び動画ファイルと静止画ファイル等の複数ファイルを同時に記録する機器に最適であり、PCアプリケーション、オーディオレコーダ、DVDレコーダ、HDDレコーダ、ムービー、デジタルスチルカメラ、携帯電話端末等として利用することができる。また、本発明の情報記録モジュールは、上記デジタルコンテンツ等を格納するメモリカード等のリムーバブルメディア、あるいは内蔵記録装置等として利用することができる。
1 アクセスモジュール
2 情報記録モジュール
11,212 CPU
12,213 RAM
13 情報記録モジュールインタフェース
14,214 ROM
21 コントローラ
22 不揮発性メモリ
101 アプリケーション制御部
102 ファイルシステム制御部
103 情報記録モジュールアクセス部
104 アドレス管理情報設定処理部
105 データ整形処理部
211 アクセスモジュールインタフェース
215 不揮発性メモリインタフェース
216 アドレス管理情報
217 エントリ格納制御部
218 FAT格納制御部
219 ユーザデータ格納制御部
221 エントリ格納領域
222 FAT格納領域
223 ユーザデータ格納領域
224 第1のエントリ格納領域
225 第2のエントリ格納領域
226 一時ブロック領域
301 ファイルシステム管理情報領域
302 ユーザデータ領域
303 マスターブートレコード・パーティションテーブル
304 パーティションブートセクタ
305,306 FAT
307 ルートディレクトリエントリ
308 ディレクトリエントリ
401 データ種別情報
402 一時ブロック情報
403 アドレス変換情報
411 第1エントリ位置情報
412 第2エントリ位置情報
413 FAT位置情報
2 情報記録モジュール
11,212 CPU
12,213 RAM
13 情報記録モジュールインタフェース
14,214 ROM
21 コントローラ
22 不揮発性メモリ
101 アプリケーション制御部
102 ファイルシステム制御部
103 情報記録モジュールアクセス部
104 アドレス管理情報設定処理部
105 データ整形処理部
211 アクセスモジュールインタフェース
215 不揮発性メモリインタフェース
216 アドレス管理情報
217 エントリ格納制御部
218 FAT格納制御部
219 ユーザデータ格納制御部
221 エントリ格納領域
222 FAT格納領域
223 ユーザデータ格納領域
224 第1のエントリ格納領域
225 第2のエントリ格納領域
226 一時ブロック領域
301 ファイルシステム管理情報領域
302 ユーザデータ領域
303 マスターブートレコード・パーティションテーブル
304 パーティションブートセクタ
305,306 FAT
307 ルートディレクトリエントリ
308 ディレクトリエントリ
401 データ種別情報
402 一時ブロック情報
403 アドレス変換情報
411 第1エントリ位置情報
412 第2エントリ位置情報
413 FAT位置情報
Claims (15)
- データを格納する不揮発性メモリを有する情報記録モジュールにアクセスするアクセスモジュールであって、
所定のデータ種別のデータを格納する領域の位置情報を前記情報記録モジュールに通知するアドレス管理情報設定処理部と、
前記情報記録モジュールに記録するファイルデータにおける有効データが所定の記録処理単位サイズ未満であった場合に、任意のデータを付加して前記所定の記録処理単位サイズに変更し、前記情報記録モジュールにファイルデータを記録するデータ整形処理部と、
を備えるアクセスモジュール。 - 前記アクセスモジュールは、
複数ファイルのファイルデータを並行して前記情報記録モジュールに記録する場合に、所定の連続領域サイズ内で連続したアドレスになるよう、複数ファイルのファイルデータを任意の順番で並べながら前記情報記録モジュールに記録する、
請求項1記載のアクセスモジュール。 - 前記所定のデータ種別は、
記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報である、
請求項1記載のアクセスモジュール。 - 前記所定のデータ種別は、
記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であって、
前記アドレス管理情報設定処理部は、該ファイルシステム管理情報を格納する領域の位置情報を複数前記情報記録モジュールに通知する、
請求項2記載のアクセスモジュール。 - 前記アクセスモジュールは、
前記情報記録モジュールに記録するファイルデータに任意のデータを付加した場合、該ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報に、データ付加前の有効データの大きさをファイルサイズとして設定する、
請求項1記載のアクセスモジュール。 - 前記所定の記録処理単位サイズは、
前記情報記録モジュールに含まれる不揮発性メモリの物理的なデータ記録処理単位サイズの倍数長である、
請求項1記載のアクセスモジュール。 - 前記所定の連続領域サイズは、
前記情報記録モジュールに含まれる不揮発性メモリの物理的なデータ消去処理単位サイズの倍数長である、
請求項2記載のアクセスモジュール。 - データを格納する不揮発性メモリと、
外部のアクセスモジュールから指定される所定のデータ種別のデータを格納する領域の位置情報を格納するアドレス管理情報と、
前記アドレス管理情報に基づき前記所定のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の特定の領域にデータを格納するエントリ格納制御部と、
を備える情報記録モジュール。 - 前記所定のデータ種別は、
記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報である、
請求項8記載の情報記録モジュール。 - 前記所定のデータ種別は、
記録対象ファイルの名前やファイルサイズ等の情報を含むファイルシステム管理情報であって、
前記アドレス管理情報は、該ファイルシステム管理情報を格納する領域の位置情報を複数保持する、
請求項8記載の情報記録モジュール。 - 前記エントリ格納制御部は、
前記アドレス管理情報に保持された、複数のファイルシステム管理情報を格納する領域の位置情報のそれぞれに特定の領域を割り当て、該ファイルシステム管理情報を格納する、
請求項10記載の情報記録モジュール。 - 前記アドレス管理情報は、
前記所定のデータ種別とは異なる第2のデータ種別のデータを格納する領域の位置情報を更に含み、
前記エントリ格納制御部は、
前記アドレス管理情報に基づき前記第2のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の前記所定のデータ種別のデータを格納する領域とは異なる特定の領域にデータを格納する処理を更に含む、
請求項8記載の情報記録モジュール。 - 前記第2のデータ種別は、
ファイルシステムが使用する領域管理情報である、
請求項12記載の情報記録モジュール。 - データを格納する不揮発性メモリを有する情報記録モジュールを制御するコントローラであって、
外部のアクセスモジュールから指定される所定のデータ種別のデータを格納する領域の位置情報を格納するアドレス管理情報を参照し、前記所定のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の特定の領域にデータを格納するエントリ格納制御部、
を備えるコントローラ。 - 情報記録モジュールと、前記情報記録モジュールにアクセスするアクセスモジュールとを備える情報記録システムであって、
前記情報記録モジュールは、
データを格納する不揮発性メモリと、
前記アクセスモジュールから指定される所定のデータ種別のデータを格納する領域の位置情報を格納するアドレス管理情報と、
前記アドレス管理情報に基づき前記所定のデータ種別のデータが記録されると認識した場合には、前記不揮発性メモリ内の特定の領域にデータを格納するエントリ格納制御部と、
を有し、
前記アクセスモジュールは、
前記所定のデータ種別のデータを格納する領域の位置情報を前記情報記録モジュールに通知するアドレス管理情報設定処理部と、
前記情報記録モジュールに記録するファイルデータにおける有効データが所定の記録処理単位サイズ未満であった場合に、任意のデータを付加して前記所定の記録処理単位サイズに変更し、前記情報記録モジュールにファイルデータを記録するデータ整形処理部と、
を有する、
情報記録システム。
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010535157A JP5485163B2 (ja) | 2009-03-13 | 2010-03-04 | アクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システム |
US12/921,829 US20110055297A1 (en) | 2009-03-13 | 2010-03-04 | Access module, information recording module, controller, and information recording system |
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009060695 | 2009-03-13 | ||
JP2009-060695 | 2009-03-13 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2010103760A1 true WO2010103760A1 (ja) | 2010-09-16 |
Family
ID=42728056
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/JP2010/001510 WO2010103760A1 (ja) | 2009-03-13 | 2010-03-04 | アクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システム |
Country Status (3)
Country | Link |
---|---|
US (1) | US20110055297A1 (ja) |
JP (1) | JP5485163B2 (ja) |
WO (1) | WO2010103760A1 (ja) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102455975A (zh) * | 2010-10-15 | 2012-05-16 | 慧荣科技股份有限公司 | 用来进行数据整形的方法以及其记忆装置及控制器 |
JP2014044490A (ja) * | 2012-08-24 | 2014-03-13 | Toshiba Corp | ホスト装置及びメモリデバイス |
US8676026B2 (en) | 2010-12-28 | 2014-03-18 | Panasonic Corporation | Data recording apparatus |
Families Citing this family (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9093445B2 (en) * | 2011-08-26 | 2015-07-28 | International Business Machines Corporation | Packaging identical chips in a stacked structure |
US9986696B2 (en) * | 2013-08-26 | 2018-06-05 | Et Water Systems, Inc. | Irrigation smart controllers with programming and firmware updating |
KR102247087B1 (ko) | 2014-07-08 | 2021-05-03 | 삼성전자주식회사 | 스토리지 장치 및 스토리지 장치의 동작 방법 |
US9639275B2 (en) * | 2014-08-06 | 2017-05-02 | Seagate Technology Llc | Managing data within a storage device based on file system metadata |
KR101886176B1 (ko) * | 2016-10-25 | 2018-08-08 | 시큐리티플랫폼 주식회사 | 소유자만 기록 가능한 부트영역을 포함하는 저장장치 |
TWI631461B (zh) * | 2017-06-27 | 2018-08-01 | 晨星半導體股份有限公司 | 行車記錄器之儲存裝置的控制方法與儲存裝置控制系統 |
US11435922B2 (en) | 2017-06-27 | 2022-09-06 | Sigmastar Technology Ltd. | Control method for storage device of driving recorder and storage device control system |
CN108664577B (zh) * | 2018-05-03 | 2021-03-12 | 中北大学 | 一种基于flash空闲区的文件管理方法及系统 |
CN112567327B (zh) * | 2018-08-21 | 2024-10-18 | 索尼公司 | 非易失性存储装置、主机装置和数据存储系统 |
KR20200072639A (ko) * | 2018-12-12 | 2020-06-23 | 삼성전자주식회사 | 저장 장치 및 그것의 동작 방법 |
CN113495681B (zh) | 2020-04-07 | 2024-09-24 | 杭州萤石软件有限公司 | 一种nand flash文件数据存取方法、装置及存储介质 |
KR20220057355A (ko) * | 2020-10-29 | 2022-05-09 | 삼성전자주식회사 | 호스트 및 스토리지 시스템을 포함하는 컴퓨팅 시스템 및 컴퓨팅 시스템의 동작 방법 |
CN112905112B (zh) * | 2021-02-09 | 2023-03-31 | 上海锐伟电子科技有限公司 | 一种嵌入式设备的数据处理方法及系统 |
Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005055064A1 (ja) * | 2003-12-03 | 2005-06-16 | Matsushita Electric Industrial Co., Ltd. | 情報記録媒体のデータ処理装置及びデータ記録方法 |
JP2009503738A (ja) * | 2005-08-03 | 2009-01-29 | サンディスク コーポレイション | 直接データファイル記憶を用いるフラッシュメモリにおけるデータ操作 |
Family Cites Families (11)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5717951A (en) * | 1995-08-07 | 1998-02-10 | Yabumoto; Kan W. | Method for storing and retrieving information on a magnetic storage medium via data blocks of variable sizes |
US6910038B1 (en) * | 2000-03-30 | 2005-06-21 | Sonic Solutions, Inc. | Methods for efficient host processing of data files selected for recording to an optical disc media |
CN100356344C (zh) * | 2003-04-25 | 2007-12-19 | 松下电器产业株式会社 | 数据记录装置 |
JP4228288B2 (ja) * | 2003-06-11 | 2009-02-25 | ソニー株式会社 | 記録制御装置および方法、プログラム、並びにデータ記録方法 |
US7558906B2 (en) * | 2005-08-03 | 2009-07-07 | Sandisk Corporation | Methods of managing blocks in nonvolatile memory |
US7552271B2 (en) * | 2005-08-03 | 2009-06-23 | Sandisk Corporation | Nonvolatile memory with block management |
US7949845B2 (en) * | 2005-08-03 | 2011-05-24 | Sandisk Corporation | Indexing of file data in reprogrammable non-volatile memories that directly store data files |
US7669003B2 (en) * | 2005-08-03 | 2010-02-23 | Sandisk Corporation | Reprogrammable non-volatile memory systems with indexing of directly stored data files |
US7480766B2 (en) * | 2005-08-03 | 2009-01-20 | Sandisk Corporation | Interfacing systems operating through a logical address space and on a direct data file basis |
US20070143566A1 (en) * | 2005-12-21 | 2007-06-21 | Gorobets Sergey A | Non-volatile memories with data alignment in a directly mapped file storage system |
WO2009013877A1 (ja) * | 2007-07-20 | 2009-01-29 | Panasonic Corporation | メモリコントローラ、メモリカード、不揮発性メモリシステム |
-
2010
- 2010-03-04 JP JP2010535157A patent/JP5485163B2/ja active Active
- 2010-03-04 WO PCT/JP2010/001510 patent/WO2010103760A1/ja active Application Filing
- 2010-03-04 US US12/921,829 patent/US20110055297A1/en not_active Abandoned
Patent Citations (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2005055064A1 (ja) * | 2003-12-03 | 2005-06-16 | Matsushita Electric Industrial Co., Ltd. | 情報記録媒体のデータ処理装置及びデータ記録方法 |
JP2009503738A (ja) * | 2005-08-03 | 2009-01-29 | サンディスク コーポレイション | 直接データファイル記憶を用いるフラッシュメモリにおけるデータ操作 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102455975A (zh) * | 2010-10-15 | 2012-05-16 | 慧荣科技股份有限公司 | 用来进行数据整形的方法以及其记忆装置及控制器 |
US8676026B2 (en) | 2010-12-28 | 2014-03-18 | Panasonic Corporation | Data recording apparatus |
JP2014044490A (ja) * | 2012-08-24 | 2014-03-13 | Toshiba Corp | ホスト装置及びメモリデバイス |
Also Published As
Publication number | Publication date |
---|---|
US20110055297A1 (en) | 2011-03-03 |
JPWO2010103760A1 (ja) | 2012-09-13 |
JP5485163B2 (ja) | 2014-05-07 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5485163B2 (ja) | アクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システム | |
JP5481493B2 (ja) | アクセス装置、情報記録装置、コントローラ、リアルタイム情報記録システム、アクセス方法、および、プログラム | |
JP5577238B2 (ja) | アクセス装置、情報記録装置、コントローラ、及び情報記録システム | |
JP5129156B2 (ja) | アクセス装置、および、ライトワンス記録システム | |
JP5400875B2 (ja) | メモリコントローラ、不揮発性記憶装置、アクセス装置、不揮発性記憶システム、データ書き込み方法、および、プログラム | |
JP4722704B2 (ja) | 情報記録媒体、情報記録媒体に対するアクセス装置及びアクセス方法 | |
JP5362594B2 (ja) | アクセス装置、及び残容量算出方法 | |
US9778857B2 (en) | Recording device, access device, recording system, and recording method | |
JP4551328B2 (ja) | 情報記録媒体におけるデータ領域管理方法、及びデータ領域管理方法を用いた情報処理装置 | |
JP4608434B2 (ja) | 情報記録媒体のデータ処理装置及びデータ記録方法 | |
US20080288710A1 (en) | Semiconductor Memory Device and Its Control Method | |
JP2011210235A (ja) | 不揮発性記憶装置、アクセス装置、及び不揮発性記憶システム | |
JP2005202942A (ja) | 情報記録媒体、データ処理装置及びデータ処理方法 | |
JP4130808B2 (ja) | フォーマット方法 | |
WO2010001606A1 (ja) | コントローラ、情報記録装置、アクセス装置、情報記録システム、及び情報記録方法 | |
JP2009205590A (ja) | アクセスモジュール、情報記録モジュール、コントローラ、及び情報記録システム | |
JP2009205591A (ja) | アクセスモジュール、情報記録モジュール、及び情報記録システム | |
WO2018186455A1 (ja) | 不揮発性メモリにおける空き容量管理方法、及び不揮発性メモリを含む情報記録装置にデータを記録するアクセス装置、情報記録装置および情報記録システム | |
JP2011133947A (ja) | 不揮発性記憶装置、アクセス装置、及び不揮発性記憶システム | |
JP4881469B1 (ja) | 情報処理装置、及び情報処理方法 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
WWE | Wipo information: entry into national phase |
Ref document number: 2010535157 Country of ref document: JP |
|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 10750518 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |
|
122 | Ep: pct application non-entry in european phase |
Ref document number: 10750518 Country of ref document: EP Kind code of ref document: A1 |