Re: How to compare computing power of microcontrollers?



On 30 Aug 2005 09:01:28 -0700, the renowned "Eric"
<ericjohnholland@xxxxxxxxxxx> wrote:

>If you don't have hardware for both, I would write a piece of assembly
>code "on paper". This code should be represntative of a function that
>you will be doing for your application (ie. 16 bit multiplication and
>trig). And add up the number of clock cycles it would take each
>processor to run the same piece of code.
>
>This calculations assumes each processor has similar instructions and
>the compilers you use have a similar optimization routine.
>
>You know the # of clock cycles and the frequency, you can then evaluate
>which processor has a better performance for your application.
>
>It is time consuming, but without looking at the Datapath / Instruction
>cycles you can't evaluate the performance.
>
>Example: a processor may run at a faster clock frequency, but if the
>instructions you are using aren't pipelined well your just burning up
>power and not gaining performance.
>
>Multiplication tends to be one of the instructions that is poorly
>pipelined in smaller cpus. So the # of instructions that MULT takes
>might be a good enough benchmark for your application.
>
>Good Luck,
>Eric

IIRC, the AVR has an 8 x 8 multipler, wheras the ARM core has a wider
multiplier (32 x 8?) and microcode to do 32 x 32 multiplies. By the
time you assemble all the partial products with the AVR, the
difference in speed might be quite large for multiply.

Personally, I'd write a little chunk or two of code and simulate it.


Best regards,
Spehro Pefhany
--
"it's the network..." "The Journey is the reward"
speff@xxxxxxxxxxxx Info for manufacturers: http://www.trexon.com
Embedded software/hardware/analog Info for designers: http://www.speff.com
.



Relevant Pages

  • Re: Atmega128 or MSP430 for low power, decent performance?
    ... MSP430) but otherwise 2 clock cycles is much more realistic ... claims like "most instructions will take 1 clock cycle". ... using the Dhrystone benchmark, but this assumes the compiler has ... the AVR may be faster. ...
    (comp.arch.embedded)
  • Re: Atmega128 or MSP430 for low power, decent performance?
    ... Perhaps by "most" they mean most in the instruction code space, or perhaps most different opcode names - it certainly never seems to refer to most instructions in real programs. ... it is virtually irrelevant how many clock cycles each instruction takes - what *is* relevant is how many clock cycles common operations take. ... If an operation such as moving a 16-bit integer from memory to memory takes a single 4-clock instruction on the msp430, and 6 instructions taking 10 clocks on the AVR, then that's the numbers that are important for that sort of code, and it doesn't matter that the msp430 takes more clocks per instruction. ...
    (comp.arch.embedded)
  • Re: Newbie question on Atmel AVR expanding program Flash
    ... As others have pointed out already, the AVR is a "harvard" ... architecture. ... it is not possible to fetch instructions from ... While you can't fetch AVR instructions from the data bus, ...
    (comp.arch.embedded)
  • Re: Clock cycles list - help
    ... N = Amount of instructions used, ... Intel got similar lists, but I also missed SSE-timing there. ... but it used latency values only. ... containing the clock cycles of each mnemonic, ...
    (alt.lang.asm)
  • Re: Clock cycles list - help
    ... N = Amount of instructions used, ... but it used latency values only. ... Those lists are a bit confusing.. ... containing the clock cycles of each mnemonic, ...
    (alt.lang.asm)