Multiplier (multiplier_f)

Multiplies each input float sample value by a constant float value.

Design

The mathematical representation of the component function is given in (10).

(131)\[y[n] = \alpha \times x[n]\]

In (10):

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

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

  • \(\alpha\) is the value property.

Interface

<?xml version="1.0"?>
<componentspec>
  <property name="value" type="float" writable="true" default="1.0" description="Multiplier constant value."/>
  <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

Multiplication is only applied to values in sample opcode messages. All other opcode messages received are passed through this component without any effect.

Properties

  • value: Multiplier constant value.

    • Type: float

    • Access:

      • Parameter: False

      • Writable: True

      • Initial: False

      • Volatile: False

    • Default value: 1.0

Implementations

Example Application

<?xml version="1.0"?>
<application done="file_write">
  <instance component="ocpi.core.file_read" connect="multiplier_f">
    <property name="filename" value="input.bin"/>
  </instance>
  <instance component="ocpi.comp.sdr.math.multiplier_f" connect="file_write">
    <property name="value" value="10.01"/>
  </instance>
  <instance component="ocpi.core.file_write">
    <property name="filename" value="output.bin"/>
  </instance>
</application>

Dependencies

The dependencies to other elements in OpenCPI are:

  • None.

Limitations

Limitations of multiplier_f are:

  • None.

Testing

Tested platforms: None

Component testing not completed.