Why Do embedded processors have more Flash than RAM
CASTalk.com Forum Index CASTalk.com
Discussion of DSP, FPGA, storage and embedded system.
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web castalk.com
Why Do embedded processors have more Flash than RAM

 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System
Author Message
Maddy
Guest





Posted: Wed Nov 02, 2005 5:15 pm    Post subject: Why Do embedded processors have more Flash than RAM Reply with quote

Hi,

I cant help wonder why embedded processors have more Flash than RAM?
Right now, I am working with the AT91SAM7S, it has 256K Flash and only
64K RAM. Why is this?
I am assuming we cannot run out of Flash. So if I had a program greater
than 64K what am I suppposed to do?

Maddy
Back to top
Meindert Sprang
Guest





Posted: Wed Nov 02, 2005 5:15 pm    Post subject: Re: Why Do embedded processors have more Flash than RAM Reply with quote

"Maddy" <santhos@gmail.com> wrote in message
news:1130945007.761856.138370@g14g2000cwa.googlegroups.com...
Quote:
Hi,

I cant help wonder why embedded processors have more Flash than RAM?
Right now, I am working with the AT91SAM7S, it has 256K Flash and only
64K RAM. Why is this?

Because a) SRAM is more expensive and b) the majority of the applications
need less RAM than ROM.

Quote:
I am assuming we cannot run out of Flash. So if I had a program greater
than 64K what am I suppposed to do?

Read the datasheet and you'll see that this processor executes it's code
directly from flash. So your program can be as large as the flash size.

Meindert
Back to top
Peter Dickerson
Guest





Posted: Wed Nov 02, 2005 5:15 pm    Post subject: Re: Why Do embedded processors have more Flash than RAM Reply with quote

"Maddy" <santhos@gmail.com> wrote in message
news:1130945007.761856.138370@g14g2000cwa.googlegroups.com...
Quote:
Hi,

I cant help wonder why embedded processors have more Flash than RAM?
Right now, I am working with the AT91SAM7S, it has 256K Flash and only
64K RAM. Why is this?
I am assuming we cannot run out of Flash. So if I had a program greater
than 64K what am I suppposed to do?

You assume wrongly. On chip Flash is almost always capable of
execute-in-place. How do you expect the CPU to boot if it can't execute any
code from Flash.

Why more flash than RAM, well generally that is what customers need and RAM
uses a lot more silicon per byte than Flash so you might lose 8K of Flash
for even K of RAM gained.

Peter
Back to top
Andreas S.
Guest





Posted: Wed Nov 02, 2005 5:15 pm    Post subject: Re: Why Do embedded processors have more Flash than RAM Reply with quote

Maddy wrote:
Quote:
I cant help wonder why embedded processors have more Flash than RAM?
Right now, I am working with the AT91SAM7S, it has 256K Flash and only
64K RAM. Why is this?

Usually you have more static (program code including libraries, strings)
than dynamic data.

Quote:
I am assuming we cannot run out of Flash.

Why?

Quote:
So if I had a program greater than 64K what am I suppposed to do?

Use a controller with more (internal or external) RAM.

Andreas
Back to top
Phil W
Guest





Posted: Thu Nov 03, 2005 1:16 am    Post subject: Re: Why Do embedded processors have more Flash than RAM Reply with quote

Hi,

Obviously your concept of processors comes from PC type system where all
programs run in RAM.
However, in embedded microprocessors programs generally run in flash, eeprom
or rom, since there is no other storage medium that is non-volatile to hold
the program whilst the power is off.
In embedded systems there is generally no need to run programs in RAM since
they are usually dedicated to a single application and do not need the
ability to run different applications.
Have a look at the AVR. It does not even give you the option of running a
program from RAM, it's all assumed to be data.

Phil


"Maddy" <santhos@gmail.com> wrote in message
news:1130945007.761856.138370@g14g2000cwa.googlegroups.com...
Quote:
Hi,

I cant help wonder why embedded processors have more Flash than RAM?
Right now, I am working with the AT91SAM7S, it has 256K Flash and only
64K RAM. Why is this?
I am assuming we cannot run out of Flash. So if I had a program greater
than 64K what am I suppposed to do?

Maddy
Back to top
enguinear
Guest





Posted: Fri Nov 18, 2005 7:25 am    Post subject: Re: Why Do embedded processors have more Flash than RAM Reply with quote

For an embedded computer just think of Flash as disk and there is
always more disk than RAM. Except you can access the flash much faster
than disk so you can execute code right out of the flash with out
loading it in RAM as you would from a disk. That actually cuts down
the amount of RAM needed. On the other hand Flash has limited
write/rewrite life so your dynamic storage for temporary feequently
changing data is why the RAM is there at all. Just write out to Flash
what you want to keep around between power cycles, without power
refreshes RAM forgets.

So Flash is disk, with limits and bennifits.

-dcb

On Thu, 3 Nov 2005 07:48:18 +1100, "Phil W" <electropw@hotmail.com>
wrote:

Quote:
Hi,

Obviously your concept of processors comes from PC type system where all
programs run in RAM.
However, in embedded microprocessors programs generally run in flash, eeprom
or rom, since there is no other storage medium that is non-volatile to hold
the program whilst the power is off.
In embedded systems there is generally no need to run programs in RAM since
they are usually dedicated to a single application and do not need the
ability to run different applications.
Have a look at the AVR. It does not even give you the option of running a
program from RAM, it's all assumed to be data.

Phil


"Maddy" <santhos@gmail.com> wrote in message
news:1130945007.761856.138370@g14g2000cwa.googlegroups.com...
Hi,

I cant help wonder why embedded processors have more Flash than RAM?
Right now, I am working with the AT91SAM7S, it has 256K Flash and only
64K RAM. Why is this?
I am assuming we cannot run out of Flash. So if I had a program greater
than 64K what am I suppposed to do?

Maddy

Back to top
An Schwob in the USA
Guest





Posted: Sat Nov 19, 2005 1:15 am    Post subject: Re: Why Do embedded processors have more Flash than RAM Reply with quote

Well,
for one reason, every time your turn the power off to the RAM, the
contents is gone, a so called volatile memory. So, you need at least
all the program in the Flash to begin with, even if you want to execute
it out of RAM>
Secondly and much more important, you would not want to pay for the
chips if the Flash would be 64k and the SRAM 256k, it would probably be
double.
Last but not least, the combination 256k Flash and 64k RAM is a HUGE
RAM. As the SAM7S needs the SRAM to run fast code in ARM mode a part of
the SRAM is needed for that. If you look for example at the Philips
LPC2000 families of ARM microcontrollers, you will find the SRAM being
smaller, biggest reason is that these devices can run full speed in the
high performance ARM mode from Flash.
Discussions about this and other related subjects can be found in the
LPC2000 forum:
http://groups.yahoo.com/group/lpc2000/
or for the SAM7S here:
http://groups.yahoo.com/group/AT91SAM7/
An Schwob
Back to top
 
Post new topic   Reply to topic    CASTalk.com Forum Index -> Embedded System All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum




VoIP Electronics Powered by phpBB