Sunday, September 03, 2006

FlashDisk - Flash Translation Layer (FTL)

The FlashDisk is designed to fully replace Microsoft FAL for better stability and better performance. The original purpose of designing FlashDisk attributes to that the Microsoft FAL has some unconquerable shortcomings which are the critical features in some hardware dependent system.

Introduction

The FlashDisk is a Flash Translation Layer (FTL) which Microsoft named as Flash Abstraction Layer (FAL) used to link with Flash Media Driver (FMD) to make a Flash Block Driver. It is designed to fullly replace Microsoft FAL for better stability and better performace.

Microsoft FAL Known Disadvantages

1) Boot time is very long if the large size flash is full filled.
2) Disk may be crashed if power failure suddenly during data write process. And this will cause system can not boot up any longer if the crashed part lies in the hive-based registry area. We often have to face this issue reported by our QA engineer.
3) Read/Write performance is not well-pleasing.

FlashDisk Advantages

1) Quick Boot - Boot up very quickly even large size disk is full filled.
2) Read/Write performance is better than MS FAL driver.
3) Power failure is safe.
4) Better and more controllable wear-leveling policy.
5) Better bad block management arithmetic.
6) Automatic Garbage Collection.
7) Memory usage is acceptable.
8) Can replace MS FAL fully.

Performance Comparison

The following is a simple comparison between FlashDisk and the Microsoft FAL performance. The test platform is: 200MHz ARM920 based processor; WinCE4.2 OS; K9F1208+TC58NVG (every 2048 page is divided to four 512 pages) NAND Flash; BINFS Partition Size: 22MB, Data Partition Size: 162MB; Read/Write Performance Test App: Use 1MB buffer to R/W 5MB file 10 times.
1) Boot time
FlashDisk: 10s (empty), 10s (full)
MS FAL: 10s (empty), 35s(full)
2) Read/Write speed:
FlashDisk: R: 3563KB/s, W: 816KB/s (empty), R: 2966KB/s, W: 658KB/s (full)
MS FAL: R: 2138KB/s, W: 598KB/s (empty), R: 1854KB/s, W: 459KB/s (full)
3) Stability:
4) Memory:
5) CPU loading:
6) Bad block management:

Usage

1. Copy the FlashDisk.lib, FlashDisk.pdb to your nandflash driver path.
2. Modify the sources file in which linked with microsoft FAL.lib:
a) Remove: $(_COMMONOAKROOT)\lib\$(_CPUINDPATH)\FAL.LIB \
b) Add: \$(_CPUINDPATH)\FlashDisk.lib \
c) Modify line: DLLENTRY=DllEntry to DLLENTRY=DllMain

Remarks

To use FlashDisk, the following constraints must be followed (also these constraints are compatible with Microsoft FAL):
1) All blocks used by OEM must have the OEM_BLOCK_RESERVED flag (recommend to set OEM_BLOCK_READONLY and bad block flag, but they are optional). These blocks begin from the head of the NAND flash and include NBOOT, TOC, EBOOT, ...
2) If you use monolithic IMAGE, the blocks used by IMAGE also should have at least set the OEM_BLOCK_RESERVED flag.
3) If your system have BINFS partition, every block of the BINFS partition should have the OEM_BLOCK_READONLY flag.
4) If you want to try FlashDisk, please comment here or send mail to me.

4 Comments:

At 12/14/2006 11:03 PM , Anonymous Anonymous said...

What's the "fully" replacement mean?
Are the original data files stored in resident flash using Microsoft flash driver still usable after updating new image that using FlashDisk driver?

 
At 11/25/2008 11:56 PM , Anonymous Anonymous said...

Hi Alex,

I would like to give a try to your FlashDisk.

Could you provide me mre information about it?

My E-mail is alexander_quinones___AT___gmx___DOT___de

Regards,

Alex

 
At 2/20/2010 8:43 PM , Anonymous Anonymous said...

Amiable post and this post helped me alot in my college assignement. Thanks you for your information.

 
At 8/04/2010 10:36 PM , Blogger Unknown said...

Hi,
1.Is Wince 6.0 FAL supports the 2K and 4K NAND flash page also, i.e. Large Flash page?

2. Is FAL supports the Bad block management, Wear level techniques, ECC?

 

Post a Comment

Subscribe to Post Comments [Atom]

<< Home