Prev: Call for Papers Reminder (extended): The World Congress on Engineering WCE 2010
Next: Call for papers: IVPCV-10, USA, July 2010
From: John on 12 Mar 2010 20:39 On Mar 12, 10:52 am, Nicholas Kinar <n.ki...(a)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
From: Jerry Avins on 12 Mar 2010 21:14 John wrote: > On Mar 12, 10:52 am, Nicholas Kinar <n.ki...(a)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 �����������������������������������������������������������������������
From: Vince on 18 Mar 2010 11:49 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.
From: Michael Plante on 18 Mar 2010 12:38 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).
From: Jerry Avins on 18 Mar 2010 18:45
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 ����������������������������������������������������������������������� |