A Windows 98 & ME forum. Win98banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Win98banter forum » Windows 98 » Disk Drives
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

File Allocation Table in Embedded system



 
 
Thread Tools Display Modes
  #1  
Old December 23rd 06, 08: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

  #2  
Old December 23rd 06, 01:33 PM posted to microsoft.public.win98.disks.general
Jeff Richards
External Usenet User
 
Posts: 1,526
Default File Allocation Table in Embedded system

You do not have to implement the MBR. It's only required when the system
has to boot from the disk.

The file system talks in clusters because that keeps the absolute value of
the number stored in the FAT smaller for any given total accessible storage.
The smallest space any file could take is one cluster. The wasted space is
the price you pay for a smaller FAT. You will have to consider the sectors
per cluster when converting between CHS and cluster number - it's part of
the standard formula.

Reading and writing data on the disk is done through the ATA interface,
which in a Windows system is looked after by the device drivers. You will
need to write your own drivers for the ATA interface.

IMHO you would be better off forgetting about the FPGA and implementing
Windows Embedded instead.
http://www.microsoft.com/Windows/embedded/default.mspx
--
Jeff Richards
MS MVP (Windows - Shell/User)
wrote in message
ups.com...
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



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
COLLECTED hard drive usage after XP NTFS MEB General 167 November 23rd 06 05:54 PM
"file allocation table bad - file c bobteague General 1 October 5th 04 06:22 PM
Help! SE won't boot Ken Knecht Setup & Installation 8 October 2nd 04 01:55 PM
master ide controller annalee15 Hardware 14 September 20th 04 10:44 PM
Win9x : Utility to dynamic mapping TEMP to memory ? Libor Striz General 22 September 15th 04 06:56 AM


All times are GMT +1. The time now is 05:02 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Win98banter.
The comments are property of their posters.