DSPRelated.com
Forums

DFT Computation time at 16 MIPS

Started by Vince March 12, 2010
I'm processing a 1-D DFT at 16 MIPS and I'm trying to find out my
computation time.  How do I do this?  Any help would be great.


Vince wrote:
> I'm processing a 1-D DFT at 16 MIPS and I'm trying to find out my > computation time. How do I do this? Any help would be great.
Measure it? Jerry -- Why am I in a hand basket? Where are we going? �����������������������������������������������������������������������

Vince wrote:

> I'm processing a 1-D DFT at 16 MIPS and I'm trying to find out my > computation time. How do I do this? Any help would be great.
There is a thing which they call a "clock"; it is very useful if you need to know when to do something. VLV
On 12/03/2010 6:36 AM, Vince wrote:
> I'm processing a 1-D DFT at 16 MIPS and I'm trying to find out my > computation time. How do I do this? Any help would be great. > >
To elaborate on this discussion: (1) Your microcontroller should have a timer which can be triggered immediately before the computation and stopped immediately after the computation. Then print the output of the timer to a spare serial port of your microcontroller. Usually on a prototype system, the spare serial port could be connected to a RS-232 level shifter, so you can view the results on your computer using terminal emulation software (i.e TerraTerm). (2) Toggle an LED attached to a port pin of your microcontroller. (For example, turn on the LED immediately before the calculation begins, and turn it off immediately after the calculation.) Measure the time with a stopwatch for a rough estimate. This may be more appropriate if the input data is a very long sequence. (3) Toggle the level of a port pin, and use a logic analyzer to find the time taken for the calculation. (4) If your embedded system runs some form of operating system such as Linux or uCLinux, use the OS time functions to measure elapsed time. HTH
On Fri, 12 Mar 2010 06:36:24 -0600
"Vince" <vpriolo@strasbaugh.com> wrote:

> I'm processing a 1-D DFT at 16 MIPS and I'm trying to find out my > computation time. How do I do this? Any help would be great. >
I'll add to everyone else's comments the fact that you haven't specified the number of points you're working with. Given that, if my memory's not totally shot, the dumb DFT is O(N^2) and that the FFT is O(N log N), do keep in mind that your computation time will be a strong function of N, i.e. size matters. -- Rob Gaddi, Highland Technology Email address is currently out of order
On Mar 12, 10:52&#4294967295;am, Nicholas Kinar <n.ki...@usask.ca> wrote:
> On 12/03/2010 6:36 AM, Vince wrote: > > > I'm processing a 1-D DFT at 16 MIPS and I'm trying to find out my > > computation time. &#4294967295;How do I do this? &#4294967295;Any help would be great. > > To elaborate on this discussion: > > (1) Your microcontroller should have a timer which can be triggered > immediately before the computation and stopped immediately after the > computation. &#4294967295;Then print the output of the timer to a spare serial port > of your microcontroller. &#4294967295;Usually on a prototype system, the spare > serial port could be connected to a RS-232 level shifter, so you can > view the results on your computer using terminal emulation software (i.e > TerraTerm). > > (2) Toggle an LED attached to a port pin of your microcontroller. &#4294967295;(For > example, turn on the LED immediately before the calculation begins, and > turn it off immediately after the calculation.) &#4294967295;Measure the time with a > stopwatch for a rough estimate. &#4294967295;This may be more appropriate if the > input data is a very long sequence. > > (3) Toggle the level of a port pin, and use a logic analyzer to find the > time taken for the calculation. > > (4) If your embedded system runs some form of operating system such as > Linux or uCLinux, use the OS time functions to measure elapsed time. > > HTH
(5) Do it many times in a loop and use a stopwatch
John wrote:
> On Mar 12, 10:52 am, Nicholas Kinar <n.ki...@usask.ca> wrote: >> On 12/03/2010 6:36 AM, Vince wrote: >> >>> I'm processing a 1-D DFT at 16 MIPS and I'm trying to find out my >>> computation time. How do I do this? Any help would be great. >> To elaborate on this discussion: >> >> (1) Your microcontroller should have a timer which can be triggered >> immediately before the computation and stopped immediately after the >> computation. Then print the output of the timer to a spare serial port >> of your microcontroller. Usually on a prototype system, the spare >> serial port could be connected to a RS-232 level shifter, so you can >> view the results on your computer using terminal emulation software (i.e >> TerraTerm). >> >> (2) Toggle an LED attached to a port pin of your microcontroller. (For >> example, turn on the LED immediately before the calculation begins, and >> turn it off immediately after the calculation.) Measure the time with a >> stopwatch for a rough estimate. This may be more appropriate if the >> input data is a very long sequence. >> >> (3) Toggle the level of a port pin, and use a logic analyzer to find the >> time taken for the calculation. >> >> (4) If your embedded system runs some form of operating system such as >> Linux or uCLinux, use the OS time functions to measure elapsed time. >> >> HTH > > (5) Do it many times in a loop and use a stopwatch
There are many ways to time it. In embedded systems, I write timer words early on. Another way turns an I/O pin on and off and displays the pulse on a scope with a calibrated sweep. Executing a null word establishes the overhead that needs to be subtracted. Jerry -- Discovery consists of seeing what everybody has seen, and thinking what nobody has thought. .. Albert Szent-Gyorgi &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;
Maybe I formulated the question incorrectly.  I'm trying to estimate the
time it will take to complete the computation.  I am taking data every 3
seconds and want to make sure my calculations are done before the next set
of data is taken.  I want to make sure 16MIPS is enough to finish the
computation in time.  I will be clocking the computation time when I get
the chance.
Vince wrote:
>Maybe I formulated the question incorrectly. I'm trying to estimate the >time it will take to complete the computation. I am taking data every 3 >seconds and want to make sure my calculations are done before the next
set
>of data is taken. I want to make sure 16MIPS is enough to finish the >computation in time. I will be clocking the computation time when I get >the chance. >
I don't see how that changes the answers you were given. Do you not have the processor/board yet? If that's the case, and you need an answer now, and if the processor is fairly simple (not pipelined), then counting instruction cycles from the assembly listing is easy (though tedious).
Vince wrote:
> Maybe I formulated the question incorrectly. I'm trying to estimate the > time it will take to complete the computation. I am taking data every 3 > seconds and want to make sure my calculations are done before the next set > of data is taken. I want to make sure 16MIPS is enough to finish the > computation in time. I will be clocking the computation time when I get > the chance.
When I formulated my answer I considered, then rejected the thought that that might be the case. I concluded that if you wanted an /a priori/ time estimate, you would have mentioned the size. A 256-point FFT executes more quickly than a 1048576-point one. You probably want one between. Jerry -- Discovery consists of seeing what everybody has seen, and thinking what nobody has thought. .. Albert Szent-Gyorgi &#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;&#4294967295;