Register (register_b)
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.
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="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-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
bool_timed_sample-protOptional:
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:
ushortAccess:
Parameter:
FalseWritable:
FalseInitial:
TrueVolatile:
False
Default value:
512
Implementations
register_b(HDL)
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="register_b">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.comp.sdr.interface.register_b" 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_b are:
Setting
message_lengthto 0 or greater thanocpi_max_bytes_outputresults 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
Tested platforms: None
Component testing not completed.