CN200986701Y - File allocation table accessing device and chip - Google Patents
File allocation table accessing device and chip Download PDFInfo
- Publication number
- CN200986701Y CN200986701Y CN 200520038195 CN200520038195U CN200986701Y CN 200986701 Y CN200986701 Y CN 200986701Y CN 200520038195 CN200520038195 CN 200520038195 CN 200520038195 U CN200520038195 U CN 200520038195U CN 200986701 Y CN200986701 Y CN 200986701Y
- Authority
- CN
- China
- Prior art keywords
- fat
- storer
- sector
- cluster
- content
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Expired - Fee Related
Links
- 238000003860 storage Methods 0.000 claims abstract description 42
- 238000000034 method Methods 0.000 claims description 42
- 238000010586 diagram Methods 0.000 description 2
- 238000004519 manufacturing process Methods 0.000 description 2
- 230000007812 deficiency Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000004321 preservation Methods 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The utility model discloses an access unit of a file allocation table comprising an application specific integrated circuit chip of the access unit. The FAT is stored in a storage medium. The access unit comprises a processing unit of a FAT section used for reading a FAT data of N sections comprising a present cluster in the storage medium to a memory unit; wherein the N is a natural number; the memory unit used for storing the FAT data; and the processing unit of a next cluster used for obtaining the content of the present cluster by reading the FAT data in the memory unit and confirming an address of the memory unit of the next cluster according to the content of the present cluster; the processing unit of the next cluster sends the request of reading FAT data of the section having the next cluster to the processing unit of the FAT section when the next cluster is not in the N sections. The utility model utilizes a few RAM to improve the high speed FAT access performance so as to reduce the cost greatly.
Description
Technical field
The utility model relates to a kind of file access device and chip, especially, relates to a kind of file allocation table accessing device, comprises the dedicated IC chip of this access means.
Background technology
At present, in various asic chips, the operation of file system is mainly contained two kinds of methods: a kind of method is to read whole file allocation table (FAT) when system powers on, the relevant information of each file of record in random-access memory (ram).This method can reach than file access speed faster, but a significant disadvantages is arranged, and the total number of files that is exactly support is limited.Otherwise, just need jumbo RAM, and general built-in RAM there is very big restriction, if adopt external RAM, then cost rises.So, use the storage card that this method is operated high capacity (such as the 1G byte), not quite real with regard to some.
Another kind method is, uses the more powerful microcontroller (MCU) of build-in function and reads catalogue and FAT information on the storage card in real time, and this method does not need RAM substantially.But, be subjected to the sequential restriction of MCU visit exterior storage medium, make the big file of visit, during the big file of especially discontinuous storage, speed is slow, and need take a large amount of MCU times, inefficiency.
Summary of the invention
At the deficiencies in the prior art, the utility model provides a kind of hardware to realize, have the FAT access means of efficient FAT reading capability, utilizes less internal RAM to reach the purpose of high speed FAT visit.
According to first aspect of the present utility model, a kind of file allocation table (FAT) access means is provided, described FAT is stored in the storage medium, described access means comprises: FAT sectors process device, be used for storage medium is comprised when sector, prevariety place in the FAT data read of an interior N sector to storer, wherein N is a natural number; Storer is used to store described FAT data; Following cluster treating apparatus, be used for obtaining when the prevariety content by reading storer FAT data, and according to the described definite storage address of cluster down of prevariety content of working as, not under the situation of a described N sector, send the request of the FAT data of reading down sector, cluster place in following cluster to described FAT sectors process device.
In first aspect, preferably, described cluster treating apparatus down obtains to specify first bunch of content in advance, and it obtains when the prevariety content and determines that the cluster storage address is utilized two level production lines down.
Preferably, also comprise save set as a result, be used to preserve bunch content that described cluster treating apparatus down obtains.
Preferably, described N is 1, and the capacity of described storer is the sector-size of FAT.
Preferably, described storer is a random access memory.
Preferably, described cluster treating apparatus is down reading after the prevariety content, will work as prevariety in the file delete sign write store; Before FAT sectors process device sent read request, described FAT sectors process device was written back to FAT data in the storer FAT sector of storage medium at following cluster treating apparatus.
Preferably, described cluster treating apparatus is down reading after the prevariety content, will work as prevariety in bunch content write store that upgrade; Before FAT sectors process device sent read request, described FAT sectors process device was written back to FAT data in the storer FAT sector of storage medium at following cluster treating apparatus.
Preferably, described FAT sectors process device is by the direct memory access mode access storage media.
According to second aspect, a kind of file allocation table (FAT) access means is provided, described FAT is stored in the storage medium, described access means comprises: FAT sectors process device, be used for storage medium is comprised when sector, prevariety place in the FAT data read of an interior N sector to storer, wherein N is a natural number; Storer is used to store described FAT data; Following cluster treating apparatus is used for obtaining when the prevariety content by reading storer FAT data, and according to the storage address when prevariety, determines the storage address of cluster down; Not under the situation of a described N sector, send the request of the FAT data of reading down sector, cluster place in following cluster to described FAT sectors process device.
According to the third aspect, a kind of special IC (ASIC) chip is provided, it is characterized in that, comprise file allocation table (FAT) access means in aforementioned first aspect and the second aspect.
According to the utility model, utilize few RAM, FAT access performance at a high speed is provided, thereby has greatly reduced cost.And FAT access means that the utility model provides and concrete storage medium are irrelevant, can be widely used in various occasions.
Description of drawings
For understanding the utility model better, only the utility model is described in further detail in conjunction with the accompanying drawings with an embodiment below.In the accompanying drawing:
Fig. 1 is the structured flowchart of the FAT access means of an embodiment of the utility model;
Fig. 2 reads the FAT operational flowchart among this embodiment of the utility model;
Fig. 3 is for reading the oscillogram of specifying bunch content among this embodiment of the utility model;
Fig. 4 is the process flow diagram of the corresponding FAT operation of deleted file among this embodiment of the utility model;
Fig. 5 upgrades the FAT operational flowchart among this embodiment of the utility model.
Embodiment
For in conjunction with MCU flexibly and hardware circuit efficient, the utility model adopts MCU that the file access interface is provided, and employing hardware FAT access means is handled all FAT data.FAT access means of the present utility model is applied to various special ICs (ASIC) chip, supports the FAT file system, provides and the corresponding FAT operation of operations such as file search, file space distribution, file delete, file renewal.
With reference to Fig. 1, Fig. 1 is the structured flowchart of the FAT access means of an embodiment of the utility model.FAT is stored in the storage medium 15 that is arranged in FAT access means 10 outsides, and FAT access means 10 comprises FAT sectors process module 11, storer 12 and following cluster processing module 13.Wherein, FAT sectors process module 11 will be in the storage medium 15 specifies the FAT data of N sector read in storer 12, and the FAT data in the storer 12 are write the designated sector of FAT in the storage medium, and here, N is a natural number; Storer 12 is used to store from storage medium 15 and reads, and perhaps needs the FAT data of N sector writing to storage medium 15, storer 12 preferred random access memory rams that adopt; The FAT data obtain when the prevariety content following cluster processing module 13 in the storer 12 by reading, and according to determine the storage address of cluster down when the prevariety content, descending cluster not under the situation of N sector, send the request of the FAT data of reading down sector, cluster place to FAT sectors process module 11, carry out read operation by FAT sectors process module 11, obtain required bunch of content.When needing deleted file or upgrading FAT, following cluster processing module 13 writes the file delete sign to storer 12 maybe needs the FAT data changed.
Preferably, a described N sector is a sector, and correspondingly, the capacity of RAM12 is the sector-size of FAT, such as 512 bytes.Like this, by adopting quite few RAM, reduced cost.
Preferably, between storage medium 15 and FAT access means 10, utilize direct memory access (DMA) (DMA) mode that unified memory access interface is provided, so that this FAT access means and concrete storage medium are irrelevant, applicable to such as a series of storage mediums such as SD card, NAND.
FAT access means 10 also can comprise other modules 14, is used for being responsible for the main flow process of various FAT operations.Other modules 14 can comprise a result and preserve module (not shown), are used to preserve down bunch content that cluster processing module 13 obtains, and here, the result preserves module and also can be positioned at outside other modules 14.
Operate corresponding FAT with file search and be operating as and read FAT operation, with reference to Fig. 2, Fig. 2 reads the FAT operational flowchart among this embodiment of the utility model.At first, at step S20, other modules 14 start reads a bunch content requests; Next at step S21, FAT sectors process module 11 reads the FAT data of appointment bunch sector, place in internal RAM 12 from storage medium 15, preferably, can read in advance simultaneously and specify first bunch of content, cluster processing module 13 is obtained when the prevariety content; At step S22, following cluster processing module 13 is worked as the prevariety content by reading the RAM12 acquisition, and according to calculate the address ram of cluster down when the prevariety content, at step S23, is that bunch chain data transfer is preserved the module preservation to the result in other modules 14 with bunch content; At step S24, following cluster processing module 13 judges whether bunch chain finishes, and as a bunch end of chain (EOC), then goes to step S25, continues to handle the data of being obtained by other modules 14; Do not finish as a bunch chain, execution in step S26 then, following cluster processing module 13 is judged down cluster whether in same sector, as in same sector, then at step S28, move when prevariety to cluster down, be about to be replaced by content when prevariety when the prevariety sequence number; As not in same sector, then go to step S27, send read requests to FAT sectors process module 11, the FAT data that read down sector, cluster place by FAT sectors process module 11 and obtain required bunch of content, execution in step S28 again in RAM12; Repeated execution of steps S22 subsequently is up to a bunch end of chain (EOC).
In the said process, at step S22, following cluster processing module 13 can utilize following formula to calculate the internal RAM address:
Wherein, FAT
StartIt is the FAT start sector number; Size
SectorBe every sector-size, generally be fixed as 512, its legal numerical value has 512,1024,2048,4,096 four kinds; Size
RAMThe size of expression internal RAM; Index is bunch sequence number of appointment, and is promptly described when the prevariety content; Mod (Size) expression is got the remainder operation divided by Size.
At step S24, following cluster processing module 13 can be by checking whether " bunch content " that obtain is a bunch end of chain (EOC) sign, judges whether bunch chain finishes.For example, a bunch end of chain (EOC) is masked as FFFF among the FAT16, and this is masked as 0FFFFFFF among the FAT32.
At step S26, following cluster processing module 13 utilizes " bunch content is effective " signals to judge down clusters whether in same sector, and the computing formula of " bunch content is effective " signal is as follows:
Wherein, Valid represents " bunch content is effective ", the same following formula of the implication of all the other parameters.
With reference to Fig. 3, Fig. 3 shows the waveform that reads two bunches of contents continuously for reading the oscillogram of specifying bunch content among this embodiment of the utility model.At T1 constantly, signal is changed to 1 will " to read a bunch content ", and the content when prevariety has been arranged on " bunch content " bus at this moment; " bunch content is effective " is high level; Following cluster pairing " internal RAM address " also obtains by combinational logic; " internal RAM read signal " produced by " reading a bunch content ", carves at this moment also effectively (this signal low level is effective).
At T2 constantly, internal RAM is put into " bunch content " (following cluster content) data on the data line; " internal RAM address " generated by this " bunch content " by combinational logic; " bunch content is effective " generated by the starting and ending address of " bunch content " and sector, current FAT list item place, indicate down cluster and when prevariety whether in same sector, as if in same sector, then " bunch content is effective " continues as high level; Signal continues to keep high level " to read a bunch content "; " internal RAM read signal " continues to remain valid.
At T3 constantly, internal RAM is received within on the data line in following two bunches; Simultaneously, produce new " internal RAM address ", " bunch content is effective ", " reading a bunch content " and " internal RAM read signal ".Next, carrying out next step operation, is low level or bunch end of chain (EOC) up to " bunch content is effective ".
As seen, read when prevariety content and definite internal RAM address of cluster down and utilized two level production lines (pipeline), therefore, when certain part of bunch chain is positioned at same sector, the read operation of these bunches chain can accomplish that a clock obtains a bunch of content, as shown in Figure 3, obtains first bunch of content at T2, obtain second bunch of content at T3, by that analogy.
Read process according to this, each clock period can be read a bunch of content.So, for the FAT32 file about 4M, be that 512Byte calculates with one bunch of 4k, internal RAM, read the needed time of FAT to be approximately: 1024 * T
Clk+ (1024/128) * T
Sector, wherein, T
ClkBe the clock period, T
SectorIt is the time of reading sector FAT data.
When new files allocate file space, correspondingly, the FAT operation needs to realize the application documents spatial operation.This operation is basically with to read FAT operation identical, and unique difference is, calculates down that the internal RAM address of cluster is not to be produced by the content when prevariety, determines but increase by 1 by the position when prevariety.When bunch content that obtains is " 00 ", shows that this bunch is free space, and pass to the result that other modules are preserved acquisition; Otherwise, illustrate that this bunch is occupied, continue a bunch position is added 1, till obtaining to specify the available cluster of size.
With reference to Fig. 4, Fig. 4 is the process flow diagram of the corresponding FAT operation of deleted file among this embodiment of the utility model.This operation is read the step of next bunch position and is read FAT and operate identically, repeats no more here.Difference is that reading in the prevariety content, at step S41, following cluster processing module 13 is written as the file delete sign with this bunch content among the RAM12, such as being written as 0; When judging down cluster not in same sector the time, at step S42, following cluster processing module 13 is written back to the sector content among the RAM12 in the FAT district of storage medium 15; Thereafter, read new sector FAT data again in RAM12.In this operation, owing to need reading and writing RAM, so reading and writing internal RAM12 required time is the twice of preceding two kinds of operations.
After file storage location or size change, need to upgrade FAT.With reference to Fig. 5, Fig. 5 upgrades the FAT operational flowchart among this embodiment of the utility model.Here, upgrading the FAT operation also need be in following cluster content with the sector time, and data are in FAT among the renewal RAM.The step identical with operation shown in Figure 4 repeats no more, and difference is, at first at step S50, writes a bunch content requests by other modules 14 startups; Reading in the prevariety content, at step S51, following cluster processing module 13 is written as the content that needs change with this bunch content among the RAM12, and the described content of change that needs obtains from other modules 14.Here, if the write signal of RAM and address and data produce with combinational logic, can save a clock period, each bunch write operation needs 1 clock; If clock frequency ratio is higher, can adopt Synchronization Design, each bunch write operation needs 2 clocks.
Obviously, the utility model described here can have many variations, and this variation can not be thought and departs from spirit and scope of the present utility model.Therefore, the change that all it will be apparent to those skilled in the art all is included within the covering scope of these claims.
Claims (10)
1, a kind of file allocation table (FAT) access means, described FAT is stored in the storage medium, and described access means comprises: FAT sectors process module, storer and following cluster processing module, wherein:
FAT sectors process module is connected with described storer, is used for reading from storage medium comprising the FAT data in an interior N sector when sector, prevariety place, and is stored in the storer, and wherein N is a natural number;
Storer wherein stores described FAT data;
Following cluster processing module, be connected with described FAT sectors process module and storer respectively, it reads the FAT data to obtain when the prevariety content in described storer, determine the storage address of cluster down according to the described prevariety content of working as, and, send the request of the FAT data of reading down sector, cluster place to described FAT sectors process module descending cluster not under the situation of a described N sector.
2, access means as claimed in claim 1 is characterized in that: be provided with two stage pipeline structure in the cluster processing module under described.
3, access means as claimed in claim 1 is characterized in that, comprises that also the result preserves module, and described result preserves module and is connected with described cluster processing module down, and is used to preserve bunch content that described cluster processing module down obtains.
4, access means as claimed in claim 1 is characterized in that, described N is 1, and the capacity of described storer is the sector-size of FAT.
5, access means as claimed in claim 1 is characterized in that, described storer is a random access memory.
6, access means as claimed in claim 1 is characterized in that, described cluster processing module down is connected with described storer, is used for obtaining will to work as prevariety in the file delete sign write store after the prevariety content;
Described FAT sectors process module is connected with storage medium with described storer respectively, be used in following cluster processing module before FAT sectors process module sends read request, described FAT sectors process module is written back to FAT data in the storer FAT sector of storage medium.
7, access means as claimed in claim 1 is characterized in that, described cluster processing module down is connected with described storer, is used for obtaining after the prevariety content, will work as prevariety in bunch content write store that upgrade;
Described FAT sectors process module is connected with storage medium with described storer respectively, be used in following cluster processing module before FAT sectors process module sends read request, described FAT sectors process module is written back to FAT data in the storer FAT sector of storage medium.
8, as each described access means in the claim 1 to 7, it is characterized in that, be provided with direct memory between described FAT sectors process module and the described storage medium.
9, a kind of file allocation table (FAT) access means, described FAT is stored in the storage medium, and described access means comprises: FAT sectors process module, storer and following cluster processing module, wherein
FAT sectors process module connects described storer, is used for storage medium is comprised when sector, prevariety place in the FAT data read of an interior N sector to storer, and wherein N is a natural number;
Storer is used to store described FAT data;
Following cluster processing module is connected with FAT sectors process module with described storer respectively, is used for obtaining when the prevariety content by reading storer FAT data, and according to the storage address when prevariety, determines the storage address of cluster down; Not under the situation of a described N sector, send the request of the FAT data of reading down sector, cluster place in following cluster to described FAT sectors process module.
10, a kind of special IC (ASIC) chip is characterized in that, wherein is provided with as each described file allocation table (FAT) access means in the claim 1 to 9.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200520038195 CN200986701Y (en) | 2005-12-31 | 2005-12-31 | File allocation table accessing device and chip |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN 200520038195 CN200986701Y (en) | 2005-12-31 | 2005-12-31 | File allocation table accessing device and chip |
Publications (1)
Publication Number | Publication Date |
---|---|
CN200986701Y true CN200986701Y (en) | 2007-12-05 |
Family
ID=38916160
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN 200520038195 Expired - Fee Related CN200986701Y (en) | 2005-12-31 | 2005-12-31 | File allocation table accessing device and chip |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN200986701Y (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106600750A (en) * | 2016-11-21 | 2017-04-26 | 建荣半导体(深圳)有限公司 | Method and system for loop recording and tachograph |
-
2005
- 2005-12-31 CN CN 200520038195 patent/CN200986701Y/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106600750A (en) * | 2016-11-21 | 2017-04-26 | 建荣半导体(深圳)有限公司 | Method and system for loop recording and tachograph |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20030018847A1 (en) | File memory device and information processing apparatus using the same | |
US7949818B2 (en) | Memory system comprising semiconductor memory having plural different operation modes | |
CN103559146B (en) | A kind of method improving NAND flash controller read or write speed | |
CN109669888A (en) | A kind of configurable and efficient embedded Nor-Flash controller and control method | |
US11126382B2 (en) | SD card-based high-speed data storage method | |
CN104461750A (en) | Method and device for accessing NAND flash | |
TWI533135B (en) | Methods for accessing memory and controlling access of memory, memory device and memory controller | |
CN107329929B (en) | Data transmission system and data transmission method based on SoC FPGA | |
CN101136246A (en) | Apparatus and method for realizing data rate converting based on double mouths RAM | |
CN102789424B (en) | External extended DDR2 (Double Data Rate 2) read-write method on basis of FPGA (Field Programmable Gate Array) and external extended DDR2 particle storage on basis of FPGA | |
CN200986701Y (en) | File allocation table accessing device and chip | |
CN100477005C (en) | Partition-supporting flash memory device | |
CN202584143U (en) | A read-only card reader with multiple interfaces | |
CN1790340A (en) | File allocation table accessing device, chip and accessing method | |
CN101373436A (en) | Method for automatically compressing and de-compressing data on U disk | |
CN205983448U (en) | A control chip and solid state hard drives for solid state hard drives | |
Lu et al. | The reading/writing SD card system based on FPGA | |
WO2008025238A1 (en) | Storage device with large capacity and method based on flash memory | |
KR101574540B1 (en) | Data storage device and data storage system including of the same | |
US20110119428A1 (en) | Method of duplicating data to multiple random accessible storage devices | |
CN102693199B (en) | IDMA (Internal Direct Memory Access) interface and control method thereof | |
CN102419765B (en) | Embedded-type device for smoothly storing data to universal file system and method for smoothly storing data to universal file system | |
CN100573495C (en) | The transmission method of serial circumference interface serial type flash memory | |
CN100492331C (en) | Memory access device | |
CN100444166C (en) | Position-based interface access method and device for FAT file system |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C14 | Grant of patent or utility model | ||
GR01 | Patent grant | ||
C17 | Cessation of patent right | ||
CF01 | Termination of patent right due to non-payment of annual fee |
Granted publication date: 20071205 Termination date: 20111231 |