[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Possible new hardware project
John King <joki@eskimo.com> wrote:
> Isn't flash ram pretty slow though, compared to static ram? Least it is on
> the Newton. Maybe it's getting faster now.
I've never heard of "Flash RAM", at least, not as far as the actual
chips are concerned. This is probably a misnomer for "Flash ROM".
Flash ROM can be read at the same speed as static RAM. Writing is quite
a lot slower.
There are two general types of architecture: chips that support writing
a byte at a time, with large block erases (usually erasing quarter of
the chip at once), and chips which support erasing and writing small
pages (usually a power of two, anything up to 512 bytes at a time).
The block-erase/byte-write variants require something in the range of 2
to 15 microseconds to write each byte (plus polling overhead), and 10
milliseconds to erase a block. I doubt this type would be practical for
a disk, since you'd have to erase most of it to write anything.
The page-write variants require filling the page with data, waiting 150
to 200 microseconds for the device to time out, then waiting 5 to 10
milliseconds for the page to be burned (polling the device for
completion). Assuming a typical 128 bytes per page, this works out to
about 41 milliseconds to write a ProDOS block. This is in the same
ballpark as writing to a 5.25" floppy disk (about 12 KB per second). An
ideal device with a 512 byte page would require about 10 milliseconds to
write each block, which gives a transfer rate more like 50 KB per
second, which is more like the speed of a high density 3.5" disk.
A potential problem is the number of write operations which can be
supported by the chip. Flash ROMs are usually rated at 1000, 10K or
100K write cycles. If you did a simple block-level implementation, you
could run into this limit with the root directory and volume bitmap
blocks (and any frequently overwritten file blocks). It should be OK
for an occasionally updated application/system volume. I'd recommend
having the firmware claim that the device is write protected, to avoid
accidental writes. There would need to be a software or hardware
facility to turn off the write protection temporarily, so that the user
could update the contents of the Flash disk.
Devices that use Flash ROMs for file storage generally use a special
file system which avoids frequent overwriting of a directory area. For
example, they might use a sequential and distributed directory and file
structure, with changes being added at the end of the Flash ROM,
including some information about earlier areas which are no longer
valid. Once the ROM is filled, the obsolete areas can be erased and
reused. There is very little performance penalty for fragmented data in
a Flash ROM, unlike a floppy or hard disk.
--
David Empson
dempson@actrix.gen.nz
Snail mail: P O Box 27-103, Wellington, New Zealand