New-Tech Europe | September 2016 | Digital Edition

following formula: P = C [Stotal ÷ ( F * Dwrite) ]

leveling erases. Again, considering the necessity to maintain optimal read/write performance in the flash, a flash manager should never incur wear- leveling erases if they are not necessary. It will effectively move high use areas of the flash to low use areas over time and will keep the average erase cycle count within a predefined range. It is important to note that this system utilizes the entire flash disk by forcing static areas of the flash to move, which would otherwise never be rewritten fully. In order to ensure that the wear- leveling process will not degrade performance or compromise the integrity of fixed file system meta data, the flash manager must begin erases well before the cumulative writes equals the size of the flash disk. Advanced wearleveling schemes (like Datalight FlashFX family) keep endurance cycle differences in this example between 700 and 1400, at a maximum. Simplistic Calculation of Flash Cycles In order to determine whether a certain application will challenge the endurance cycles of the flash that are specified by the flash manufacturer, a number of variables must be considerd. Assume the flash is used efficiently by the application and that all flash described by Stotal is available to be written prior to an erase cycle being incurred. Given this assumption, a single erase cycle will be incurred once the entire flash (Stotal) is written. The period of time elapsed over a given cycle count, and therefore the period of time before a flash chip wears out, is then calculated with the

Stotal describes the total flash memory available (KB) to be used as a disk. Dwrite describes the amount of data (KB) being regularly written into the disk. F is the frequency of Dwrite to the disk per day. C is a given number of cycles to calculate the period. Example – the difference with Static Wear-leveling In this example, we examine a field data recorder that collects and stores coordinates and other statistics at a rate of 1280 bytes per minute, and must maintain the last hour of data (75KB), for a total of 1800KB of writes per day. This device has 1 MB of flash media total, and the application and configuration files will take up more than half of that space - meaning only 256 KB can be used to store data. With only dynamic wear-leveling, the media will regularly swap between two 128 KB erase blocks – remember, we cannot erase just 75 KB. The chart below shows three different choices for flash media, rated for the total number of erase cycles. The other values are fixed: S total = 256 KB, D write = 1800 KB, F = 1 day

If this field recorder’s expected lifetime of 12 years, flash rated for 100,000 cycle flash is required. With both static and dynamic wear-leveling, as implemented by the FlashFX family, the entire media is eventually available for data. This results in one change to the equation values above. S total = 1024 KB, D write = 1800 KB, F = 1 day

For the same expected lifetime of 12 years, flash rated for 10,000 erase cycles is now perfectly appropriate, though a 20-year lifetime would still require flash with

New-Tech Magazine Europe l 49

Made with