How to use big array in DSP?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to use big array in DSP?

1,424 Views
JackyUM
Contributor I

Hi,

 

I am new to dsp. It seems

int array[10000]

can not work properly. Could you anyone tell me how to fix this?

 

Sorry for asking this simple question~ 

Labels (1)
Tags (1)
0 Kudos
6 Replies

900 Views
CrasyCat
Specialist III

Hello

 

Can you please be a bit more specific here/

 

Which processor are you using (MSC8156, MSC8144, ...)?

What is the problem you are seeing?

Are you getting an error message at link time? Which one?

Are you getting a problem at runtime? Which one?

 

CrasyCat

0 Kudos

900 Views
JackyUM
Contributor I

Sorry I did not make it clear.

 

I use MSC8156EVM board, which is a six-core SC3850 architecture. In my program, I have to use a lot of large arrays.

This, for instance, is what I did,

 

#define SIZE 20000

...

...

void main()

{

int din[SIZE];

...

...

CRC(din,g);

Seg(din,F);

}

 

I use codewarrior 10.1.5, it gives me this error:

 

Fatal: LCF configuration: no physical layout result;physical memory M3. Memory size is 0x001000000 and the requested size is 0x00112c00

 

0 Kudos

900 Views
CrasyCat
Specialist III

Hello

 

Any reason you are defining the big array as local variable?

 

If din needs to be local, you need to increase the stack size in the linker command file (_StackSize defined in common.l3k).

But I would rather recommend to define din as global variable.

 

Then using pragma data_seg you can place the variable in DDR where you have more room available.

 

CrasyCat

0 Kudos

900 Views
JackyUM
Contributor I

Hi,

 

As you suggested, I put it as the global variable. But can you show me how to use the #pragma to put this into DDR? An example would be great!

 

Thanks!

0 Kudos

900 Views
JackyUM
Contributor I

Hi,

 

This is what i tried,

#pragma data_seg_name "Mydata"

I do not know how "Mydata" is mapped to DDR. Can you please show me how to use this pragma as well as how to assign some specific section in DDR?

0 Kudos

900 Views
CrasyCat
Specialist III

Hello

 

Which version of CodeWarrior are you using?

V3.2?

V10.1.5?

 

CrasyCat

0 Kudos