EmbeddedRelated.com
Forums
The 2024 Embedded Online Conference

Difference of Flash / Program Execution SRAM / Data SRAM

Started by s2s1 November 16, 2004

Can anyone roughly explain different use of the memory above in our
program?

We load our program to Flash. Flash also used as xmem windows. The
program running in Program Execution SRAM (include variable, stacks,
etc). Correct?

How about Data SRAM? I'm using BL2500 which has 512kb Flash / 512kb
SRAM (i think mine is Program Execution SRAM). My program is always
run out root code space or xmem space now. If I upgrade to BL2600
which has Data SRAM, does it help?

Thank you!




Your BL2500 probably has a RCM3200 installed with a 44MHz Rabbit
3000. When you use Flash with a 44MHz R3K, you need 1 waitstate
which slows down the module 10-30%. The Z-World solution: install a
fast-sram of identical size as the Flash. This fast-sram can run
with 0 waitstates at 44MHz. To enable this feature you have to
compile your program in DC with the 'Code and BIOS in Flash, Run in
RAM' option.
When your module boots, it starts from Flash, then copies the
complete contents to fast-sram and reboots from fast-sram (this is
all done by the BIOS, you dont have to worry about it).

There is more. Above option will also allocate the root data space
in Fast-SRAM (slightly reducing the available program memory). This
makes sure all data, interrupt vectors, etc... are located in zero
wait-state memory. Result: max. speed for data access and program
memory.

When you start allocating data memory blocks (xalloc()), DC will
first use the remaining fast-sram memory. If none is available
anymore, it will start using the 256kByte standard SRAM chip (1
waitstate SRAM).

Why install the standard SRAM chip on this board? First, this memory
can have a battery backup (if a battery is installed of course). To
support this the DC BIOS has a 4kByte window in the lower 64kByte
memory map, which can be used to access the SRAM directly. Have a
look at the 'bbram' keyword in the DC manual.
Second, this memory can be used to debug/run programs in SRAM,
without using the Flash. This is usefull to test programs, read
Flash contents without erasing it, or just put less stress on the
Flash while debugging.

Basically your board has 512k+512k+256k memory on-board, but the
best solution DC can offer is a total usage of 768kByte. Unless you
start writing your own memory manager, you will have to accept this.

Success,
Rudi
www.x-graph.be the next generation Rabbit SBC with (Color) LCD

--- In rabbit-semi@rabb..., "s2s1" <s2s1@y...> wrote:
>
> Can anyone roughly explain different use of the memory above in
our
> program?
>
> We load our program to Flash. Flash also used as xmem windows. The
> program running in Program Execution SRAM (include variable,
stacks,
> etc). Correct?
>
> How about Data SRAM? I'm using BL2500 which has 512kb Flash /
512kb
> SRAM (i think mine is Program Execution SRAM). My program is
always
> run out root code space or xmem space now. If I upgrade to BL2600
> which has Data SRAM, does it help?
>
> Thank you!



Dear Rudi, Thank you very much for the information.

So the Program Execution SRAM is no-wait-state memory
which can copy my code over when rabbit boot up and
this makes program speed faster. (Code and BIOS in
Flash, Run in RAM)

The Data SRAM is used for battery backup purpose or
used to store data if the Program Execution SRAM has
no enough space when we use 'Code and BIOS in Flash,
Run in RAM'.

The conclusion is that the Data SRAM no help for me to
expand code memory.

Am I right?
Regards,
Steven --- xgraph1 <yahoo2@yaho...> wrote:

>
> Your BL2500 probably has a RCM3200 installed with a
> 44MHz Rabbit
> 3000. When you use Flash with a 44MHz R3K, you need
> 1 waitstate
> which slows down the module 10-30%. The Z-World
> solution: install a
> fast-sram of identical size as the Flash. This
> fast-sram can run
> with 0 waitstates at 44MHz. To enable this feature
> you have to
> compile your program in DC with the 'Code and BIOS
> in Flash, Run in
> RAM' option.
> When your module boots, it starts from Flash, then
> copies the
> complete contents to fast-sram and reboots from
> fast-sram (this is
> all done by the BIOS, you dont have to worry about
> it).
>
> There is more. Above option will also allocate the
> root data space
> in Fast-SRAM (slightly reducing the available
> program memory). This
> makes sure all data, interrupt vectors, etc... are
> located in zero
> wait-state memory. Result: max. speed for data
> access and program
> memory.
>
> When you start allocating data memory blocks
> (xalloc()), DC will
> first use the remaining fast-sram memory. If none is
> available
> anymore, it will start using the 256kByte standard
> SRAM chip (1
> waitstate SRAM).
>
> Why install the standard SRAM chip on this board?
> First, this memory
> can have a battery backup (if a battery is installed
> of course). To
> support this the DC BIOS has a 4kByte window in the
> lower 64kByte
> memory map, which can be used to access the SRAM
> directly. Have a
> look at the 'bbram' keyword in the DC manual.
> Second, this memory can be used to debug/run
> programs in SRAM,
> without using the Flash. This is usefull to test
> programs, read
> Flash contents without erasing it, or just put less
> stress on the
> Flash while debugging.
>
> Basically your board has 512k+512k+256k memory
> on-board, but the
> best solution DC can offer is a total usage of
> 768kByte. Unless you
> start writing your own memory manager, you will have
> to accept this.
>
> Success,
> Rudi
> www.x-graph.be the next generation Rabbit SBC with
> (Color) LCD
>
> --- In rabbit-semi@rabb..., "s2s1"
> <s2s1@y...> wrote:
> >
> > Can anyone roughly explain different use of the
> memory above in
> our
> > program?
> >
> > We load our program to Flash. Flash also used as
> xmem windows. The
> > program running in Program Execution SRAM (include
> variable,
> stacks,
> > etc). Correct?
> >
> > How about Data SRAM? I'm using BL2500 which has
> 512kb Flash /
> 512kb
> > SRAM (i think mine is Program Execution SRAM). My
> program is
> always
> > run out root code space or xmem space now. If I
> upgrade to BL2600
> > which has Data SRAM, does it help?
> >
> > Thank you! >
>

__________________________________



The 2024 Embedded Online Conference