Data Unpacker (data_unpack_uc_b)
Unpacks a byte in to eight individual bits.
Design
This component takes in a stream of unsigned character inputs and serially outputs a stream of eight boolean outputs for each character input. The component can either output the most significant bit of the unsigned character first or the least significant bit first.
Interface
<?xml version="1.0"?>
<componentspec>
<property name="msb_first" type="bool" writable="true" default="true"
description="When true data is output most significant bit first. When false data is output least significant bit first."/>
<port name="input" producer="false" protocol="uchar_timed_sample-prot"/>
<port name="output" producer="true" protocol="bool_timed_sample-prot"/>
</componentspec>
Ports
Inputs:
input: Primary input samples port.Protocol:
uchar_timed_sample-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
bool_timed_sample-protOptional:
False
Opcode Handling
The data unpack operation is applied on data with sample opcodes only. Output stream messages over ocpi_buffer_size_output bytes are split, otherwise message boundaries are preserved. All other opcodes pass through this component without any effect.
Properties
msb_first: When true data is output most significant bit first. When false data is output least significant bit first.Type:
boolAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
true
Implementations
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="data_unpack_uc_b">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.comp.sdr.communication.data_unpack_uc_b" connect="file_write">
<property name="msb_first" value="true"/>
</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 data_unpack_uc_b are:
None.
Testing
Tested platforms: None
Component testing not completed.