AT94K05AL ATMEL Corporation, AT94K05AL Datasheet - Page 108
AT94K05AL
Manufacturer Part Number
AT94K05AL
Description
Fpslic Devices Combine 5K Gates of Atmel's Patented AT40K Fpga Architecture, a 20 Mips Avr 8-bit Risc Microprocessor Core, Numerous Fixed Microcontroller Peripheries And up to 36K Bytes of Program And Data SRAM.
Manufacturer
ATMEL Corporation
Datasheet
1.AT94K05AL.pdf
(192 pages)
Available stocks
Company
Part Number
Manufacturer
Quantity
Price
- Current page: 108 of 192
- Download datasheet (2Mb)
Example 3 – Multiply-
accumulate Operation
16-bit Multiplication
108
AT94K Series FPSLIC
The final example of 8-bit multiplication shows a multiply-accumulate operation. The general
formula can be written as:
Typical applications for the multiply-accumulate operation are FIR (Finite Impulse Response)
and IIR (Infinite Impulse Response) filters, PID regulators and FFT (Fast Fourier Transform).
For these applications the FMULS instruction is particularly useful. The main advantage of
using the FMULS instruction instead of the MULS instruction is that the 16-bit result of the
FMULS operation always may be approximated to a (well-defined) 8-bit format, see “Using
Fractional Numbers” on page 111.
The new multiply instructions are specifically designed to improve 16-bit multiplication. This
section presents solutions for using the hardware multiplier to do multiplication with 16-bit
operands.
Figure 60 schematically illustrates the general algorithm for multiplying two 16-bit numbers
with a 32-bit result (C = A • B). AH denotes the high byte and AL the low byte of the A operand.
CMH denotes the middle high byte and CML the middle low byte of the result C. Equal nota-
tions are used for the remaining bytes.
The algorithm is basic for all multiplication. All of the partial 16-bit results are shifted and
added together. The sign extension is necessary for signed numbers only, but note that the
carry propagation must still be done for unsigned numbers.
Figure 60. 16-bit Multiplication, General Algorithm
c n ( )
in
ldi
muls r19,r18
add
adc
=
r18,PINB ; Get the current pin value on port B
r19,b
r16,r0
r17,r1
a n ( ) b
×
+
c n 1
; r17:r16 = r18 * r19 + r17:r16
; Load constant b into r19
; r1:r0 = variable A * variable B
; r17:r16 += r1:r0
(
–
)
AH AL
+
+
+
=
(sign
(sign
CH
AH * BH
ext)
ext)
(sign ext)
CMH
AL * BH
AH * BL
X
BH BL
CML
AL * BL
CL
Rev. 1138F–FPSLI–06/02
Related parts for AT94K05AL
Image
Part Number
Description
Manufacturer
Datasheet
Request
R
Part Number:
Description:
5K - 40K Gates of At40k FPGA with 8-bit Microcontroller, up to 36K Bytes of SRAM and On-chip JTAG ICE
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
INTERVAL AND WIPE/WASH WIPER CONTROL IC WITH DELAY
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Low-Voltage Voice-Switched IC for Hands-Free Operation
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
MONOLITHIC INTEGRATED FEATUREPHONE CIRCUIT
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
AM-FM Receiver IC U4255BM-M
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Monolithic Integrated Feature Phone Circuit
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
Multistandard Video-IF and Quasi Parallel Sound Processing
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
High-performance EE PLD
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
8-bit Flash Microcontroller
Manufacturer:
ATMEL Corporation
Datasheet:
Part Number:
Description:
2-Wire Serial EEPROM
Manufacturer:
ATMEL Corporation
Datasheet: