Repeater (repeater_b)

Repeats each input data value a settable number of times.

Design

The mathematical representation of the implementation is given in (58).

(58)\[y[n] = x\left [ \left \lfloor \frac{n}{N+1} \right \rfloor \right ]\]

In (58):

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

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

  • \(N\) is the number of times a sample is to be repeated.

When \(N\) is zero the input data is passed through unmodified, when \(N\) is one each input sample will be output twice (once repeated).

Interface

<?xml version="1.0"?>
<componentspec>
  <property name="samples" type="uchar" writable="true" default="0" description="Number of times to repeat each sample."/>
  <port name="input" producer="false" protocol="bool_timed_sample-prot"/>
  <port name="output" producer="true" protocol="bool_timed_sample-prot"/>
</componentspec>

Ports

Inputs:

  • input: Primary input samples port.

    • Protocol: bool_timed_sample-prot

    • Optional: False

Outputs:

  • output: Primary output samples port.

    • Protocol: bool_timed_sample-prot

    • Optional: False

Opcode Handling

Only values in a sample opcode message are repeated. Message boundaries will be kept in the same relative position to the data, unless the output message would exceed the maximum message length for the protocol type, in which case the message is split.

All other opcode messages pass through this component without any effect.

Properties

  • samples: Number of times to repeat each sample. When set to zero the input data samples are passed through unmodified.

    • Type: uchar

    • Access:

      • Parameter: False

      • Writable: True

      • Initial: False

      • Volatile: False

    • Default value: 0

Implementations

Example Application

<?xml version="1.0"?>
<application done="file_write">
  <instance component="ocpi.core.file_read" connect="repeater_b">
    <property name="filename" value="input.bin"/>
  </instance>
  <instance component="ocpi.comp.sdr.dsp.repeater_b" connect="file_write">
    <property name="samples" value="255"/>
  </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.

There is also a dependency on:

  • ieee.std_logic_1164

  • ieee.numeric_std

Limitations

Limitations of repeater_b are:

  • None.

Testing

Tested platforms: None

Component testing not completed.