Log10 (log10_f)
Calculates the logarithm to the base 10 of all input sample values.
Design
The mathematical representation of the implementation is given in (108).
In (108):
\(x[n]\) is the input values.
\(y[n]\) is the output values.
A block diagram representation of the implementation is given in Figure 147:.
Figure 147: Log10 implementation.
Interface
<?xml version="1.0"?>
<componentspec>
<port name="input" producer="false" protocol="float_timed_sample-prot"/>
<port name="output" producer="true" protocol="float_timed_sample-prot"/>
</componentspec>
Ports
Inputs:
input: Primary input samples port.Protocol:
float_timed_sample-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
float_timed_sample-protOptional:
False
Opcode Handling
The logarithm operation is only applied to values in a sample opcode message. All other opcodes messages received are passed through this component without any effect.
Properties
None.
Implementations
log10_f(RCC)Implementation provided by C++
log10maths function.
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="log10_f">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.comp.sdr.math.log10_f" connect="file_write"/>
<instance component="ocpi.core.file_write">
<property name="filename" value="output.bin"/>
</instance>
</application>
Dependencies
The dependencies to other elements in OpenCPI are:
None.
There is also a dependency on:
cmath
Limitations
Limitations of log10_f are:
None.
Testing
Tested platforms: None
Component testing not completed.