Prev: Space Time Coding
Next: rayleighchan function in MATLAB
From: Howard Long on 23 Nov 2005 15:42 Folks I have been dubugging some software on a 6713 DSK using an FFT. I've isolated the problem down to either (a) running the interrupt driven McBSP codec at more than 24kHz sampling rate or (b) running the fast convolution in the main() function using the TI DSPLIB DSPF_sp_cfftr2_dit function with an FFT size greater than 256 points. The stack dump indicates that it's overflowed, and the code it runs is within the ISR polling for the McBSP to become ready, code that isn't normally executed in an interrupt driven scenario. If I use an unoptimized C FFT function it works, however with the additional functionality I need to incorporate this stodgy version of the FFT will become a limitation. I've just noticed that the optimised TI DSPLIB functions are not interruptible, and have code in there to disable interrupts. Why do they need to be non-interruptible? There's a comment saying: "This code is interrupt tolerant but not interruptible" whatever that means. Kind Regards, Howard
From: Brad Griffis on 23 Nov 2005 21:19 Howard Long wrote: > Folks > > I have been dubugging some software on a 6713 DSK using an FFT. I've > isolated the problem down to either (a) running the interrupt driven McBSP > codec at more than 24kHz sampling rate or (b) running the fast convolution > in the main() function using the TI DSPLIB DSPF_sp_cfftr2_dit function with > an FFT size greater than 256 points. The stack dump indicates that it's > overflowed, and the code it runs is within the ISR polling for the McBSP to > become ready, code that isn't normally executed in an interrupt driven > scenario. > > If I use an unoptimized C FFT function it works, however with the additional > functionality I need to incorporate this stodgy version of the FFT will > become a limitation. > > I've just noticed that the optimised TI DSPLIB functions are not > interruptible, and have code in there to disable interrupts. Why do they > need to be non-interruptible? There's a comment saying: "This code is > interrupt tolerant but not interruptible" whatever that means. > > Kind Regards, Howard > > The dsplib routines use a technique called software pipelining to get the most efficiency out of the architecture. (The C compiler will use this technique for loops as well.) The c6000 is a non-protected pipeline architecture. This allows for better efficiency, though there is some danger if you don't know what you're doing. For example if you load a variable to a register the value does not appear in the register until several cycles later. While you're waiting for that value to appear you could still be doing some processing with the value that is currently in that register. This is called "multiple assignment" when one register is being used for multiple things at once. This gives a lot more efficiency but you have to disable interrupts in order to do this. If you allowed interrupts to happen then the load operation would complete before you finish doing whatever processing you were doing with the old value in the case where an interrupt occurs. That was a very dense explanation I just gave but hopefully that gives you a little better idea. The phrase "interrupt tolerant but not interruptible" means that it is okay for an interrupt to occur while that function is executing but the function will not be pre-empted by the pending interrupt. It probably would have been more clear if they had just said "this function disables interrupts"! Brad
From: Howard Long on 24 Nov 2005 04:51 "Brad Griffis" <bradgriffis(a)hotmail.com> wrote in message news:PaKdnbpjF-G8vhjeRVn-qA(a)comcast.com... > > The dsplib routines use a technique called software pipelining to get > the most efficiency out of the architecture. Thanks for that explanation. I guess I will have to resort to using EDMA rather than interrupts for sampling. Thanks again, Howard
|
Pages: 1 Prev: Space Time Coding Next: rayleighchan function in MATLAB |