Reply by Ulf Samuelsson●September 11, 20062006-09-11
"David Brown" <david@westcontrol.removethisbit.com> skrev i meddelandet
news:45045139$0$19464$8404b019@news.wineasy.se...
> steve wrote:
>> Ulf Samuelsson wrote:
>>
>>> Most AVR instructions will take 1 clock cycle
>>
>> with the unrealistic assumption all the dataspace you need can be
>> accomodated by the 32 registers, yes (and the same can be said of the
>> MSP430) but otherwise 2 clock cycles is much more realistic
>>
>
> Microcontroller manufacturers always seem to be very optimistic about
> claims like "most instructions will take 1 clock cycle". 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 (either in terms of the code written, or in
> terms of the instructions executed).
Yes, that is exactly what it measn.
You cannot judge how many cycles it uses in an application program
since no application prgrams are alike. Some try to measure instructions per
clock
using the Dhrystone benchmark, but this assumes the compiler has
not been tweaked for this specific benchmark.
> And of course, 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 (estimated out of my head) 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. For
> other types of code, the AVR may be faster.
Even that is a bot on the low level.
You need to check the complete application and also there could be features
in the peripherals which more than compensate for
any drawbacks in the core itself.
Will the part do the job within the power budget.
Can I meet the EMI goals.
Do I need extra performance/code space to allow for future upgrades?
Once this and a couple of
--
Best Regards,
Ulf Samuelsson
This is intended to be my personal opinion which may,
or may not be shared by my employer Atmel Nordic AB
Reply by steve●September 10, 20062006-09-10
David Brown wrote:
> Microcontroller manufacturers always seem to be very optimistic about
> claims like "most instructions will take 1 clock cycle".
I suppose since one does it, they have to do it to at least look
competitive.
> And of course, it is virtually irrelevant how many clock cycles each
> instruction takes - what *is* relevant is how many clock cycles common
> operations take.
Yes, the claimed single cycle 16 bit MAC of the MSP430 is a good
example, it's not until you read the application notes way down on page
20 or so where they fess up and tell you it really takes 17 cycles in
normal use (the claimed single cycle case occurs when 1) the inputs
magically get loaded in the hardware multiplier unit and 2) you never
want to look at the results).
Reply by David Brown●September 10, 20062006-09-10
steve wrote:
> Ulf Samuelsson wrote:
>
>> Most AVR instructions will take 1 clock cycle
>
> with the unrealistic assumption all the dataspace you need can be
> accomodated by the 32 registers, yes (and the same can be said of the
> MSP430) but otherwise 2 clock cycles is much more realistic
>
Microcontroller manufacturers always seem to be very optimistic about
claims like "most instructions will take 1 clock cycle". 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 (either in terms of the code written, or
in terms of the instructions executed).
And of course, 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 (estimated out of my head) 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. For
other types of code, the AVR may be faster.
Reply by rickman●September 10, 20062006-09-10
rektide wrote:
> I've been planning on using a MSP430 for all my very low powered
> control work for a while, and was about to order the dev kit ($99, cant
> argue with taht). Eventually I'd like to get TinyOS running, hopefully
> to simplify some of my own work, and I noticed that 2 of the 3
> reference platforms are ATmega128 platforms.
>
> I'm pretty sure the MSP430 cant be beat for power consumption, but i
> really am not sure how the performance per watt measures up, and also
> how manipulable power consumption is. Id like the ability to scale up
> and down against computing demand.
>
> I'm reasonably familiar with the MSP430 from reading specs, but I
> really dont know much about ATmega128. But mainly, it seems impossible
> to divine real world performance from tech docs.
>
> Kind of a shame there's no external memory buses available on the
> MSP430. :/
If you don't need the absolute minimal sleep power and are more
concerned with active power and performance per watt, you might want to
check out the various ARM devices. Both Philips and Atmel offer very
low power chips. We have been using ATmega128 chips in our front
panels. In a recent product we decided to go with the AT91SAM7S64
because it is cheaper, lower power and smaller. Although the SAM7S64
uses more power at full speed, the Watts/MIPS is better.
The sleep current is only a significant factor if the unit will spend
the vast majority of its time in the sleep mode, for example if it
wakes up once a day to do a few seconds or minutes of processing. If
it is active 1% of the time or more the sleep current just won't be a
factor. Even so, the SAM7 parts are pretty low sleep current unless
you use the JTAG port which messes up a pin to drive the quiescent
current way up.
Reply by steve●September 10, 20062006-09-10
Ulf Samuelsson wrote:
> Most AVR instructions will take 1 clock cycle
with the unrealistic assumption all the dataspace you need can be
accomodated by the 32 registers, yes (and the same can be said of the
MSP430) but otherwise 2 clock cycles is much more realistic
Reply by Ulf Samuelsson●September 9, 20062006-09-09
"steve" <bungalow_steve@yahoo.com> skrev i meddelandet
news:1157659310.476600.242830@m73g2000cwd.googlegroups.com...
>
> rektide wrote:
>> I've been planning on using a MSP430 for all my very low powered
>> control work for a while, and was about to order the dev kit ($99, cant
>> argue with taht). Eventually I'd like to get TinyOS running, hopefully
>> to simplify some of my own work, and I noticed that 2 of the 3
>> reference platforms are ATmega128 platforms.
>>
>> I'm pretty sure the MSP430 cant be beat for power consumption, but i
>> really am not sure how the performance per watt measures up, and also
>> how manipulable power consumption is. Id like the ability to scale up
>> and down against computing demand.
>>
>> I'm reasonably familiar with the MSP430 from reading specs, but I
>> really dont know much about ATmega128. But mainly, it seems impossible
>> to divine real world performance from tech docs.
>>
>> Kind of a shame there's no external memory buses available on the
>> MSP430. :/
>>
>> Thanks, sorry for the rambling question, hope someone can help,
>> rektide
>
> We need to know your typical application, the latest AVR's are about
> the same, power wise, in the active mode as the MSP430, the MSP430 are
> better in sleep modes, the MSP430 has a better A/D, but consumes much
> more power the the AVR A/D when enabled. Most MSP430 instructions take
> 4-6 cycles, AVR 2 cycles, but MSP430 is 16 bit and AVR 8 bit so the
> final performance is "somewhat" similar.
Most AVR instructions will take 1 clock cycle and the latest Picopower AVR
devices
are not lagging behind the MSP430 in sleep modes, I think it is slightly
better in most cases.
This is mainly due to things like sleeping Brownout detector and the new 32
kHz osc.
If you need self-programming, then it may be of interest to know that AVRs
can use selfprogramming over the complete voltage range, while most if not
all MSP430 cannot
do selfprogramming at 1.8V so you will be forced to run the MSP at higher
voltage than the AVR
if selfprogramming is needed.
Of course there are no Picopower versions of the mega128 yet, but if the
ATmega644P
is OK, then you can be in business by the end of the year.
Part is sampling and should enter production soon.
Anyone that wants to test the performance of the AVR can download
the AVR Studio and run code in the simulator.
The IAR C compiler is free for up to 4 kB of code.
>
> I would say pick which one has the best mix of peripherals that you
> need.
>
--
Best Regards,
Ulf Samuelsson
This is intended to be my personal opinion which may,
or may not be shared by my employer Atmel Nordic AB
Reply by steve●September 7, 20062006-09-07
rektide wrote:
> I've been planning on using a MSP430 for all my very low powered
> control work for a while, and was about to order the dev kit ($99, cant
> argue with taht). Eventually I'd like to get TinyOS running, hopefully
> to simplify some of my own work, and I noticed that 2 of the 3
> reference platforms are ATmega128 platforms.
>
> I'm pretty sure the MSP430 cant be beat for power consumption, but i
> really am not sure how the performance per watt measures up, and also
> how manipulable power consumption is. Id like the ability to scale up
> and down against computing demand.
>
> I'm reasonably familiar with the MSP430 from reading specs, but I
> really dont know much about ATmega128. But mainly, it seems impossible
> to divine real world performance from tech docs.
>
> Kind of a shame there's no external memory buses available on the
> MSP430. :/
>
> Thanks, sorry for the rambling question, hope someone can help,
> rektide
We need to know your typical application, the latest AVR's are about
the same, power wise, in the active mode as the MSP430, the MSP430 are
better in sleep modes, the MSP430 has a better A/D, but consumes much
more power the the AVR A/D when enabled. Most MSP430 instructions take
4-6 cycles, AVR 2 cycles, but MSP430 is 16 bit and AVR 8 bit so the
final performance is "somewhat" similar.
I would say pick which one has the best mix of peripherals that you
need.
Reply by rektide●September 7, 20062006-09-07
I've been planning on using a MSP430 for all my very low powered
control work for a while, and was about to order the dev kit ($99, cant
argue with taht). Eventually I'd like to get TinyOS running, hopefully
to simplify some of my own work, and I noticed that 2 of the 3
reference platforms are ATmega128 platforms.
I'm pretty sure the MSP430 cant be beat for power consumption, but i
really am not sure how the performance per watt measures up, and also
how manipulable power consumption is. Id like the ability to scale up
and down against computing demand.
I'm reasonably familiar with the MSP430 from reading specs, but I
really dont know much about ATmega128. But mainly, it seems impossible
to divine real world performance from tech docs.
Kind of a shame there's no external memory buses available on the
MSP430. :/
Thanks, sorry for the rambling question, hope someone can help,
rektide