Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
|
Hello all ! I am implementing an algorithem for active noise control on 6701 processor. The requirement is that, the algorithm should pick up input from ADC and after this, within 1ms the whole algorithm should be implemented. The algorithm has about 64 adaptive filters of length 64 and another 64 of length 128 with computation of autocorrelation terms and few other terms which also significantly contributes to the computational burden. But with hand optimized code I've managed to fit in the time slot. To take care of the time, I am using a timer0 interrupt and I've included the whole code in this ISR. The problem comes here. Th code length is about 1600 lines. But if I increase lines beyond 1200, the linker fails to allocate the memory inspite of having sufficient program memory. Can anyone suggest some method to overcome this problem. For me, collecting the ADC input once in 1ms is very important. How else can I link this factor to the code ? Please do let me know. Thanking you in advance, With regards, Veena |
|
|
|
Veena- Look at the .map file generated by CCS linker. You will clearly be able to see where you have overflowed allowed memory space, and where you may have some room left that you did not use yet. Also, what board are you using? The M67? If so, our engineers here are very familar with that board and might be able to help you. As some general suggestions, your ISR should not perform the bulk of the processing. It should only place the data into a buffer, and set a "buffer ready" flag, and/or send a DSP/BIOS message to allow a non-ISR C function to do the processing. Also, you might be able to use the SDRAM on the board, but code located there will run slower. Jeff Brower DSP sw/hw engineer Signalogic vveena wrote: > > Hello all ! > I am implementing an algorithem for active noise control on 6701 processor. > The requirement is that, the algorithm should pick up input from ADC and > after this, within 1ms the whole algorithm should be implemented. The > algorithm has about 64 adaptive filters of length 64 and another 64 of > length 128 with computation of autocorrelation terms and few other terms > which also significantly contributes to the computational burden. But with > hand optimized code I've managed to fit in the time slot. > To take care of the time, I am using a timer0 interrupt and I've included > the whole code in this ISR. The problem comes here. Th code length is about > 1600 lines. But if I increase lines beyond 1200, the linker fails to > allocate the memory > inspite of having sufficient program memory. Can anyone suggest some method > to overcome this problem. For me, collecting the ADC input once in 1ms is > very important. How else can I link this factor to the code ? Please do let > me know. > > Thanking you in advance, > With regards, > Veena |
|
Veena What is the linker error statement? How do you allocate resources in your command file? > -----Original Message----- > From: vveena [mailto:] > Sent: Thursday, August 01, 2002 11:37 PM > To: > Subject: [c6x] Timer ISR > Hello all ! > I am implementing an algorithem for active noise > control on 6701 processor. The requirement is that, the > algorithm should pick up input from ADC and after this, > within 1ms the whole algorithm should be implemented. The > algorithm has about 64 adaptive filters of length 64 and > another 64 of length 128 with computation of autocorrelation > terms and few other terms which also significantly > contributes to the computational burden. But with hand > optimized code I've managed to fit in the time slot. > To take care of the time, I am using a timer0 interrupt > and I've included the whole code in this ISR. The problem > comes here. Th code length is about 1600 lines. But if I > increase lines beyond 1200, the linker fails to allocate the > memory inspite of having sufficient program memory. Can > anyone suggest some method to overcome this problem. For me, > collecting the ADC input once in 1ms is very important. How > else can I link this factor to the code ? Please do let me know. > > Thanking you in advance, > With regards, > Veena | |||||||
| |||||||
|
Veena, I get the feeling that you have not fully allocated/made available your entire 6701 memory.In the sense that you may be using one of ti written CMD file which is not advisable when you are trying to push the MIPS and shrink the code size.Check C6701 evm memory map to find out how much memory is actually available and see whether your cmd file has included those memory regions too. The idea is, "if you dont declare it, you dont get it,even if it's available" and make sure to turn of debug info too,it could give u good code size reduction in the end...use visual linker too to get a good idea of memory hogs... Regards, Bhooshan |