DSPRelated.com
Forums

Slow Runing in SDRAM

Started by Saeed Shahhoseiny April 21, 2008
Hi all

I am using a DM640 based board.
when I run my simple program(LED Blink) in SDRAM(MT48LC4M32B2 16Mbyte) it is around 100 times slower than when in internal SRAM(l2 cache).

(the amount 100 is gathered with the aid of oscilloscope)

my simple program consists of two loops one in another.

if I define loop variables as "register type" the result is about %20 persent better but it is not still acceptabe.

the effect of EMIF and SDRAM settings is small.

please guide me where is the fault? some parts of my real program(ndk_1_92_eval) need to run in SDRAM.

thanks in advance.
regards
shahhoseiny

Send instant messages to your online friends http://uk.messenger.yahoo.com
Saeed-
> I am using a DM640 based board.
> when I run my simple program(LED Blink) in SDRAM(MT48LC4M32B2 16Mbyte) it is around
> 100 times slower than when in internal SRAM(l2 cache).
> (the amount 100 is gathered with the aid of oscilloscope) my simple program
> consists of two loops one in another. if I define loop variables as "register type"
> the result is about %20 persent better but it is not still acceptabe. the effect of
> EMIF and SDRAM settings is small.
> please guide me where is the fault? some parts of my real program(ndk_1_92_eval)
> need to run in SDRAM.

With L2 cache disabled, mem access time is determined by the parameters of the
external device. If I recall, the MT48LC4M32B2 device has about 70 nsec "random
address, single access" time. I.e. if you access a location not in sequence with the
previous access and make just one access, it can take up to 70 nsec.

If the DM640 is running at 400 MHz, and assuming you could further increase your C
code optimization, then your measurements start to look about what might be expected.

-Jeff