Technical discussions about the TI C55x DSPs (including the c5501, c5502, c5503, c5507, c5509, c5510 and OMAP5910).
|
Hello All, Can I malloc 40k memory of 5 buffers in C55x and how will I allocate these buffers from different memory sections Lets say one malloc operation in DARAM and others in SDRAM. I tried doing malloc keeping .sysmem at DARAM | SDRAM in .cmd file but malloc fails to allocate. One possible fix could be using MEM_alloc where we can specify segment Id when using DSP/BIOS. Since I’m not using DSP/BIOS in my project, I want to defer this idea…. Thanks and regards -Lakshman __________________________________ |
|
|
|
Hi Lakshman, The "DARAM | SARAM" syntax is not going to allocate a heap in each DARAM and SARAM. The syntax just indicates to the linker to span a input section in two memory sections in case it doesn't fit into the first. You surely can't split the heap and choose which memory to use if you use the rts.lib malloc function. Since you don't want to use the BIOS, the only options left are, either to use static allocation, or implement a small heap manager of your own. For the former, you can use #DATA_SECTION pragmas to place the data in user defined sections and then choose to put them in either SARAM or DARAM. The latter is essentially equivalant to implementing some part of BIOS functionality on your own. Hope it helps. Regards Piyush --- Lakshman <> wrote: > Hello All, > > Can I malloc 40k memory of 5 buffers in C55x and how > will I allocate these buffers from different memory > sections Lets say one malloc operation in DARAM and > others in SDRAM. I tried doing malloc keeping > .sysmem > at DARAM | SDRAM in .cmd file but malloc fails to > allocate. One possible fix could be using MEM_alloc > where we can specify segment Id when using DSP/BIOS. > Since I’m not using DSP/BIOS in my project, I want > to > defer this idea…. > > Thanks and regards > -Lakshman > __________________________________ > > ------------------------ Yahoo! Groups Sponsor > --------------------~--> > $9.95 domain names from Yahoo!. Register anything. > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/9rHolB/TM > --------------------------------------------------------------------~- > _____________________________________ > > > Yahoo! Groups Links ===== ************************************** And---"A blind Understanding!" Heav'n replied. Piyush Kaul http://www.geocities.com/piyushkaul __________________________________ |
|
|
|
Hello All, How to allocate more than one page(64Kb) memory on C5510 and wht additional code must be added to prevent pointer wrapping once it crosses a page boundry. I read TRM of C5510 silicon revision 3 where this bug is fixed, Is there any patch available from TI for fixing the above problem.. Thanks and regards -Lakshman --- piyush kaul <> wrote: > Hi Lakshman, > > The "DARAM | SARAM" syntax is not going to allocate > a > heap in each DARAM and SARAM. The syntax just > indicates to the linker to span a input section in > two > memory sections in case it doesn't fit into the > first. > You surely can't split the heap and choose which > memory to use if you use the rts.lib malloc > function. > Since you don't want to use the BIOS, the only > options > left are, either to use static allocation, or > implement a small heap manager of your own. For the > former, you can use #DATA_SECTION pragmas to place > the > data in user defined sections and then choose to put > them in either SARAM or DARAM. The latter is > essentially equivalant to implementing some part of > BIOS functionality on your own. > > Hope it helps. > > Regards > Piyush > > --- Lakshman <> wrote: > > > > > Hello All, > > > > Can I malloc 40k memory of 5 buffers in C55x and > how > > will I allocate these buffers from different > memory > > sections Lets say one malloc operation in DARAM > and > > others in SDRAM. I tried doing malloc keeping > > .sysmem > > at DARAM | SDRAM in .cmd file but malloc fails to > > allocate. One possible fix could be using > MEM_alloc > > where we can specify segment Id when using > DSP/BIOS. > > Since I’m not using DSP/BIOS in my project, I want > > to > > defer this idea…. > > > > Thanks and regards > > -Lakshman > > > > > > > > > > > > __________________________________ > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > > --------------------~--> > > $9.95 domain names from Yahoo!. Register anything. > > > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/9rHolB/TM > > > --------------------------------------------------------------------~-> > > > > > > _____________________________________ > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > ===== > ************************************** > And---"A blind Understanding!" Heav'n replied. > > Piyush Kaul > http://www.geocities.com/piyushkaul > > __________________________________ _______________________________ |
|
|
|
Hi Lakshman, The revision 2.x of c55x CPU used 16 bit addressing, hence it will wrap up to address 0 in same page when you increment at page boundary. The latest 3.0 revision of c55x uses 23 bit addressing, hence it will move to next page. It is the way hardware designed and CPU behaves at page boundary. Let me stress that it is not bug. There won't be concept of patch (which is mostly valid for software) for this. Hope this clarifies behavior of revision 3. The compiler takes care for all C/C++ code. You have careful of this fact only when you write code in assembly. As far as I know, during allocation more then one page, you have manually allocated integer number of pages and remainder via malloc() or MEM_alloc() functions. Regards, Mihir Mody, Multimedia codecs group, Texas Instruments India, Ltd, Email : Phone : +91-80-25099307 -----Original Message----- From: Lakshman [mailto:] Sent: Wednesday, September 22, 2004 8:20 PM To: piyush kaul; Subject: Re: [c55x] malloc in different sections without DSP/BIOS Hello All, How to allocate more than one page(64Kb) memory on C5510 and wht additional code must be added to prevent pointer wrapping once it crosses a page boundry. I read TRM of C5510 silicon revision 3 where this bug is fixed, Is there any patch available from TI for fixing the above problem.. Thanks and regards -Lakshman --- piyush kaul <> wrote: > Hi Lakshman, > > The "DARAM | SARAM" syntax is not going to allocate > a > heap in each DARAM and SARAM. The syntax just > indicates to the linker to span a input section in > two > memory sections in case it doesn't fit into the > first. > You surely can't split the heap and choose which > memory to use if you use the rts.lib malloc > function. > Since you don't want to use the BIOS, the only > options > left are, either to use static allocation, or > implement a small heap manager of your own. For the > former, you can use #DATA_SECTION pragmas to place > the > data in user defined sections and then choose to put > them in either SARAM or DARAM. The latter is > essentially equivalant to implementing some part of > BIOS functionality on your own. > > Hope it helps. > > Regards > Piyush > > --- Lakshman <> wrote: > > > > > Hello All, > > > > Can I malloc 40k memory of 5 buffers in C55x and > how > > will I allocate these buffers from different > memory > > sections Lets say one malloc operation in DARAM > and > > others in SDRAM. I tried doing malloc keeping > > .sysmem > > at DARAM | SDRAM in .cmd file but malloc fails to > > allocate. One possible fix could be using > MEM_alloc > > where we can specify segment Id when using > DSP/BIOS. > > Since I'm not using DSP/BIOS in my project, I want > > to > > defer this idea.... > > > > Thanks and regards > > -Lakshman > > > > > > > > > > > > __________________________________ > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > > --------------------~--> > > $9.95 domain names from Yahoo!. Register anything. > > > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/9rHolB/TM > > > --------------------------------------------------------------------~-> > > > > > > _____________________________________ > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > ===== > ************************************** > And---"A blind Understanding!" Heav'n replied. > > Piyush Kaul > http://www.geocities.com/piyushkaul > > __________________________________ _______________________________ _____________________________________ Yahoo! Groups Links |
|
I never declare anything which might cross a 64 k boundary as a pointer.Call it Uint32. Just cast it at the last moment when it really has to address something. Paul Pignon, CTO Borthwick Pignon Solutions http://bps.co.ee Tartu Science Park Riia 185 51014 Tartu Estonia Office +372 7 302641 Mob +372 53 463942 > -----Original Message----- > From: Lakshman [mailto:] > Sent: 22 September 2004 17:50 > To: piyush kaul; > Subject: Re: [c55x] malloc in different sections without DSP/BIOS > Hello All, > > How to allocate more than one page(64Kb) memory on > C5510 and wht additional code must be added to prevent > pointer wrapping once it crosses a page boundry. > I read TRM of C5510 silicon revision 3 where this bug > is fixed, Is there any patch available from TI for > fixing the above problem.. > > Thanks and regards > -Lakshman > > > --- piyush kaul <> wrote: > > > Hi Lakshman, > > > > The "DARAM | SARAM" syntax is not going to allocate > > a > > heap in each DARAM and SARAM. The syntax just > > indicates to the linker to span a input section in > > two > > memory sections in case it doesn't fit into the > > first. > > > > > > You surely can't split the heap and choose which > > memory to use if you use the rts.lib malloc > > function. > > Since you don't want to use the BIOS, the only > > options > > left are, either to use static allocation, or > > implement a small heap manager of your own. For the > > former, you can use #DATA_SECTION pragmas to place > > the > > data in user defined sections and then choose to put > > them in either SARAM or DARAM. The latter is > > essentially equivalant to implementing some part of > > BIOS functionality on your own. > > > > Hope it helps. > > > > Regards > > Piyush > > > > --- Lakshman <> wrote: > > > > > > > > Hello All, > > > > > > Can I malloc 40k memory of 5 buffers in C55x and > > how > > > will I allocate these buffers from different > > memory > > > sections Lets say one malloc operation in DARAM > > and > > > others in SDRAM. I tried doing malloc keeping > > > .sysmem > > > at DARAM | SDRAM in .cmd file but malloc fails to > > > allocate. One possible fix could be using > > MEM_alloc > > > where we can specify segment Id when using > > DSP/BIOS. > > > Since I'm not using DSP/BIOS in my project, I want > > > to > > > defer this idea.. > > > > > > Thanks and regards > > > -Lakshman > > > > > > > > > > > > > > > > > > __________________________________ > > > > > > > > > > > > > > > ------------------------ Yahoo! Groups Sponsor > > > --------------------~--> $9.95 domain names from Yahoo!. Register > > > anything. > > > > > > http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/9rHolB/TM > > > > > > -------------------------------------------------------------- > ------~-> > > > > > > > > > _____________________________________ > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > ===== > > ************************************** > > And---"A blind Understanding!" Heav'n replied. > > > > Piyush Kaul > > http://www.geocities.com/piyushkaul > > > > > > > > __________________________________ > > > > _______________________________ _____________________________________ Yahoo! Groups Links |