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 (72).

(72)\[y[n] = \log10{x[n]}\]

In (72):

  • \(x[n]\) is the input values.

  • \(y[n]\) is the output values.

A block diagram representation of the implementation is given in Figure 61:.

Block diagram outlining log10 implementation.

Figure 61: 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-prot

    • Optional: False

Outputs:

  • output: Primary output samples port.

    • Protocol: float_timed_sample-prot

    • Optional: 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.

Parameters

Implementations

  • log10_f (RCC)

    Implementation provided by C++ log10 maths 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

Component testing not completed.