AnsweredAssumed Answered

Allocating large memory block in SDRAM

Question asked by MaxLovic on Jan 15, 2011
Latest reply on Jan 31, 2011 by Prashant

Hello!

 

I wrote a program to decode images and want it to run on ADSP BF-533, but don't have enough experience to do this well.

So my C++ program works, but too slow.

 

First problem I faced was mmemory allocation. Construction new int[512*512] made processor jump to idle state, which seems not to allocate this memory size. I tryed malloc(...) but it returnes zero.

So the way I have found was just addressing the memory without allocation. So it works like this:

unsigned char *BufPtr = NULL;
BufPtr += 0x65400;
BufPtr[0] = 0;
BufPtr[65535] = 1;

 

No errors, everything seems ok, except the way it is done and the time program takes. Just arithmetical operations take 0.18 ms. When I add memory reading, it takes approximately the same time. But when I start to write to this unallocated memory, the same process takes 500 ms!!! That's a way too much.

 

I looked through documentation, in the web, on this site in particular, but haven't found a clear answer. I guess it is too obvious for the people working with DSP, but I'm a newby and haven't got a solution yet.

 

I atached the simplified code I test right now to solve the time problem. I walked through all SDRAM initializations in Project Propertyes and examples, but still can't find a way out.

 

Could you please help me!

Outcomes