View Single Post
  #1  
Old December 23rd 06, 07:45 AM posted to microsoft.public.win98.disks.general
[email protected]
External Usenet User
 
Posts: 1
Default File Allocation Table in Embedded system

Hi All,
I need to get some information on the implementation of FAT for an
embedded system environment. I am developing a system with an FPGA
(Field Programmable Gate Array) on it. The FPGA is supposed to read and
write data to/from the hard-disk. There is no operating system involved
which can manage the file system as is done in Windows and other OSes.
I have been reading FAT12, FAT16 and FAT32 structures, but there are
some confusions as far as implementing any of these FATs for the
embedded environment I just described is concerned. Here are my
questions:

1. Do I need to implement the MBR section of the file system where
there is no OS involved?

2. Why do we have File allocation table section talking about clusters,
the linked list thing? Why not sectors? Because if I need to access a
file, I will lookup in the directory table of the FAT system, from
there I will get the starting CLUSTER of that file and then I access
the CLUSTER index in the FAT where clusters are indexed (linked list).
The thing which is confusing for me, what should I do with these
clusters number, dont I have to still convert them into CHS that is,
get the cluster number, convert it into the corresponding cylinder,
head and sector and then access that CHS for reading out that cluster.
I hope I am successful in putting forward my question.

3. What is the exact relationship between clusters and sectors while
writing/ reading data to/from the hard disk. There are mode like CHS
and LBA modes, and then there are terms like clusters and holes. So if
I have to write a file to the hard dirve which is only 1 KB long, I
will end up using 1 cluster (depending on the FAT). But dont you think
I am writing that file to the disk accessing sectors, heads and
cylinders and every sector in that particular cluster is accessble to
me?

I will be in a better position if someone can write down each step
involved in accessing data from the hard drive or writing data to the
hard drive. For example, if I have to write some data in streaming mode
to the hard drive, what would be steps involved in doing so. We can
take some example like writine a 32.45 KB file to the hard drive...


Hoping to get a detailed reply.......

Farhan