Click here to return to the Basic DSP section.
This module computes the log to base 2 of the incoming data.
There are 2 versions of Log2 module on ADAU144x processors.
ADAU145x, ADSP-214xx and ADSP-SC5xx/215xx processors support a single version of the Log2 implementation.
This Log2 algorithm computes the integral part of Log2 accurately. Fractional part of the Log is calculated using Linear interpolation. This algorithm takes very less cycles and less accurate.
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Input Data | decimal - audio | Input data to be converted to Log base 2 |
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Log value | decimal - control | log2(input) |
This module uses a binary algorithm to compute the Log2. This is more accurate and takes more cycle. Number of iterations in the algorithm can be configured. Accuracy of the algorithm increases when the number of iterations is increased.
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Input Data | decimal - audio | Input data to be converted to Log base 2 |
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Log value | decimal - control | log2(input) |
Right Click on the module to configure the number of iterations.
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Input Data | decimal(ADAU145x) - audio float(ADSP-214xx/ADSP-215xx) - audio | Input data to be converted to Log base 2 |
Name | Format [int/dec] - [control/audio] | Function Description |
---|---|---|
Pin 0: Log value | decimal(ADAU145x) - control float(ADSP-214xx/ADSP-215xx) - control | log2(input) |
The module supports Add functionality. Growth is not supported.
None
None
log2(x) is implemented as (ln(x) / ln(2)) using the change of base formula. ln(x) is implemented using the taylor series expansion.
1. ADSP-213xx
2. ADSP-214xx
3. ADSP-SC5xx
4. ADSP-215xx