Page boundary crossing problem with tms320c55x

Status
Not open for further replies.

dora

Full Member level 3
Joined
Jun 11, 2003
Messages
161
Helped
4
Reputation
8
Reaction score
3
Trophy points
1,298
Activity points
2,190
Hello friends!

I would like to share a practicle problem programming tms320c5509.

In large memory model the data pointers are 23 bits long so they are stored in 2 words (32 bits).
Using C if I write

int *pint;
pint=(int *)0xffff;
pint++; //the result depend of the version of the CPU. if it is version 3.0 or higer the result is 0x10000 otherwice it is 0x0000

Now the code:
int *pint;
pint=(int *)0xffff;
pint=pint+10; //the reselt is 0x0009 independent of the CPU version since the ADD #10, AR1 is used not the full register XAR1.


This behaviour imposes very strict limitation of the section size in respect to the page boundaries. For example the heap cannot be bigger then 64 K words. My application is in image processing area so it is very bad for me.

My question is have you faced similar page boundary problems? Is there a soltion? Some advice?

Thanks in advance!
dora
 

I did not work with tms320 but i think there is compiler problem - if pint++ can give 0x10000 and pint+10 = 0x09.
Bcoz pint++ can be regarded as pint + 1 . Well , compiler can use optimization techniques such as replace addition with asm statement var increment in RAM but results must be contiguous .
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…