AT94K05AL ATMEL Corporation, AT94K05AL Datasheet - Page 112

no-image

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

Available stocks

Company
Part Number
Manufacturer
Quantity
Price
Part Number:
AT94K05AL-25AJC
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT94K05AL-25AJI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT94K05AL-25AQC
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT94K05AL-25AQI
Manufacturer:
Atmel
Quantity:
10 000
Part Number:
AT94K05AL-25AQU
Manufacturer:
Atmel
Quantity:
10 000
112
AT94K Series FPSLIC
Table 34. Comparison of Integer and Fractional Formats
Using the FMUL, FMULS and FMULSU instructions should not be more complex than the
MUL, MULS and MULSU instructions. However, one potential problem is to assign fractional
variables right values in a simple way. The fraction 0.75 (= 0.5 + 0.25) will, for example, be
“0110 0000” if 8 bits are used.
To convert a positive fractional number in the range [0, 2> (for example 1.8125) to the format
used in the AVR, the following algorithm, illustrated by an example, should be used:
Is there a “1” in the number?
Yes, 1.8125 is higher than or equal to 1.
Is there a “0.5” in the rest?
Yes, 1.625 is higher than or equal to 1.
Byte is now “11xx xxxx”
Is there a “0.25” in the rest?
Yes, 1.25 is higher than or equal to 1.
Is there a “0.125” in the rest?
No, 0.5 is lower than 1.
Is there a “0.0625” in the rest?
Yes, 1 is higher than or equal to 1.
Since we do not have a rest, the remaining three bits will be zero, and the final result is “1110
1000”, which is 1 + 0.5 + 0.25 + 0.0625 = 1.8125.
Byte is now “1xxx xxxx”
0.8125 / 0.5 = 1.625
0.625 / 0.5 = 1.25
Byte is now “111x xxxx”
0.25 / 0.5 = 0.5
Byte is now “1110 xxxx”
0.5 / 0.5 = 1
Byte is now “1110 1xxx”
Bit Number
7
6
5
4
3
2
1
0
Unsigned Integer
Bit Significance
2
2
2
2
2
2
2
2
7
6
5
4
3
2
1
0
= 64
= 128
= 32
= 16
= 8
= 4
= 2
= 1
Unsigned Fractional Number
Bit Significance
2
2
2
2
2
2
2
2
0
-1
-2
-3
-4
-5
-6
-7
= 1
= 0.0078125
= 0.5
= 0.25
= 0.125
= 0.0625
= 0.3125
= 0.015625
Rev. 1138F–FPSLI–06/02

Related parts for AT94K05AL