[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-gcc-list] Using hardware multiplier on ATmega128L
From: |
Alessio Mattÿffffe8 |
Subject: |
[avr-gcc-list] Using hardware multiplier on ATmega128L |
Date: |
Fri, 22 Oct 2004 12:04:34 +0200 (CEST) |
Hi all,
I'm working with "Wireless Sensor Networks" using the platform Crossbow MICA2
(www.xbow.com) + TinyOS (www.tinyos.net)
In particular, inside the MICA2 sensor node there is an ATMEL Atmega128L
microcontroller ....
I want to use the hardware multiplier located inside Atmega128L microcontroller
to improve the performances of my FFT algorithm under MICA2.
In particular I have this kind of instruction on my NeSC program (NeSC is a
"dialect" of C language ...):
Wr = ((int32_t)c * (int32_t)real[k+n1] - (int32_t)s * (int32_t)imag[k+n1]) >>
15;
where Wr,c,real[k+n1],s and imag[k+n1] are declared as int16_t variables.
The problem is that the computation time of above multiply is very high ... and
therefore (if possible !!!) I want to improve the performances ...
On Internet I discover this document
(http://www.atmel.com/dyn/resources/prod_documents/DOC1631.PDF) which describes
the use of the hardware multiplier on AVR Microcontroller: the problem is that
the 16-bit x 16-bit =32 bit operation is written using Assembly code, so I have
to use Inline Asm inside my program and I have never used it before.
Has anybody implemented a solution like this yet ???
Does anybody known if documentation (I found only
http://hubbard.engr.scu.edu/embedded/avr/doc/avr-libc/avr-libc-user-manual/inline_asm.html)
about Inline Assembly is available ???
Please help me !!!
Thanks in advance,
Alessio
---------------------------------
Nuovo Yahoo! Messenger E' molto più divertente: Audibles, Avatar, Webcam,
Giochi, Rubrica
Scaricalo ora!
- [avr-gcc-list] Using hardware multiplier on ATmega128L,
Alessio Mattÿffffe8 <=