Register (register_l)

Registers an input sample and continuously streams it on the output.

Design

Continuously generates a stream of messages with the sample opcode. The output sample values are set to the same value as the previously received sample on the input port. If no input samples have been received before output messages are generated, zeros are generated by default.

The size of the generated messages can be set during run time and must be between 1 and ocpi_max_bytes_output/sample_size_bytes.

Interface

<?xml version="1.0"?>
<componentspec>
  <property name="message_length" type="ushort" writable="false" initial="true" default="512" description="Sets the output message length. Must not be 0."/>
  <port name="input" producer="false" protocol="long_timed_sample-prot"/>
  <port name="output" producer="true" protocol="long_timed_sample-prot"/>
</componentspec>

Ports

Inputs:

  • input: Primary input samples port.

    • Protocol: long_timed_sample-prot

    • Optional: False

Outputs:

  • output: Primary output samples port.

    • Protocol: long_timed_sample-prot

    • Optional: False

Opcode handling

Only sample opcode messages are registered by the input and only sample opcode messages are generated.

All other opcode messages are taken but not passed through.

Properties

  • message_length: Sets the output message length. Must not be 0.

    • Type: ushort

    • Access:

      • Parameter: False

      • Writable: False

      • Initial: True

      • Volatile: False

    • Default value: 512

Parameters

Implementations

Example application

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

Dependencies

The dependencies to other elements in OpenCPI are:

There is also a dependency on:

  • ieee.std_logic_1164

Limitations

Limitations of register_l are:

  • Setting message_length to 0 or greater than ocpi_max_bytes_output/sample_size_bytes results in unsupported behaviour.

  • This component is untested because the input and output take and generate data independently. Testing this behaviour is not possible in the unit testing framework.

Testing

Component testing not completed.