SpinAsm LOG: Difference between revisions
Jump to navigation
Jump to search
Created page with "==LOG== {| class="wikitable" |+ !Mnemonic !Operation !Instruction coding |- |LOG |<nowiki>C * LOG(|ACC|) + D</nowiki> |CCCCCCCCCCCCCCCCDDDDDDDDDDD01011 |} ======Description====== LOG will multiply the Base2 LOG of the current absolute value in ACC with C and add the constant D to the result. It is important to note that the LOG function returns a fixed point number in S4.19 format instead of the standard S.23 format, which in turn means that the most negative Base2 LO..." |
No edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 19: | Line 19: | ||
D an offset to be added to the logarithmic value in the range of –16 to + 15.999998. | D an offset to be added to the logarithmic value in the range of –16 to + 15.999998. | ||
====== Parameters ====== | |||
{| class="wikitable" | {| class="wikitable" | ||
|+ | |+ | ||
Line 41: | Line 43: | ||
======Coding Example====== | ======Coding Example====== | ||
< | <pre> | ||
log 1.0,0 | log 1.0,0 | ||
</ | </pre> |
Latest revision as of 13:47, 22 November 2024
LOG
Mnemonic | Operation | Instruction coding |
---|---|---|
LOG | C * LOG(|ACC|) + D | CCCCCCCCCCCCCCCCDDDDDDDDDDD01011 |
Description
LOG will multiply the Base2 LOG of the current absolute value in ACC with C and add the constant D to the result.
It is important to note that the LOG function returns a fixed point number in S4.19 format instead of the standard S.23 format, which in turn means that the most negative Base2 LOG value is –16.
The LOG instruction can handle absolute linear accumulator values from 0.99999988 to 0.00001526 which translates to a dynamic range of apx. 96dB.
D an offset to be added to the logarithmic value in the range of –16 to + 15.999998.
Parameters
Name | Width | Entry formats, range |
---|---|---|
C | 16 Bit | Real (S1.14)
Hex ($0000 $FFFF) Symbolic |
D | 11 Bit | Real(S4.6)
Symbolic |
Syntax
LOG C, D
Coding Example
log 1.0,0