Symbol Mapper (symbol_mapper_uc_l)
Maps an unsigned character symbol to a 32 bit signed integer value.
Design
This symbol mapper component takes an unsigned character input value and selects one of 256 configurable symbol values based on the input.
A block diagram representation of the implementation is given in Figure 327:.
Figure 327: Symbol mapper implementation.
If the input value is larger than the number of symbols the output will be the symbol stored at index 0.
Interface
<?xml version="1.0"?>
<componentspec>
<property name="length" default="32" parameter="true" type="uchar" description="Number of symbols."/>
<!-- LINT EXCEPTION: xml_012: 3: Cannot specify default value on an
array due to test failing -->
<property name="symbols" type="long" arraylength="length" writable="true"
description="Array of output symbol values where input is the index."/>
<port name="input" producer="false" protocol="uchar_timed_sample-prot"/>
<port name="output" producer="true" protocol="long_timed_sample-prot"/>
</componentspec>
Ports
Inputs:
input: Primary input samples port.Protocol:
uchar_timed_sample-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
long_timed_sample-protOptional:
False
Opcode Handling
The symbol mapper function is applied on data with sample opcodes only.
As the output data type is larger than the input data type, messages may be split to ensure no output messages are longer than the maximum supported message length of the protocol.
All other opcodes pass through this component without any effect.
Properties
length: Number of symbols.Type:
ucharAccess:
Parameter:
TrueWritable:
FalseInitial:
FalseVolatile:
False
Default value:
32
symbols: Array of output symbol values where input is the index.Type:
longArray dimensions:
['length']
Access:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
None
Implementations
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="symbol_mapper_uc_l">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.comp.sdr.communication.symbol_mapper_uc_l" connect="file_write">
<property name="length" value="32"/>
<property name="symbols" value="0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31"/>
</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
ieee.numeric_std
Limitations
Limitations of symbol_mapper_uc_l are:
The HDL implementation does not use RAM to store symbols. For efficient resource usage and fast timing the number of symbols should be kept appropriately small for the FPGA.
Testing
Tested platforms: None
Component testing not completed.