Bias (bias_s)
Adds a fixed bias to all input sample values.
Design
The mathematical representation of the implementation is given in (63).
In (63):
\(x[n]\) is the input values.
\(y[n]\) is the output values.
\(B\) is the bias value.
A block diagram representation of the implementation is given in Figure 52:.
Figure 52: Bias implementation.
Interface
<?xml version="1.0"?>
<componentspec>
<property name="bias" type="short" writable="true" default="1" description="Bias value added to input values."/>
<port name="input" producer="false" protocol="short_timed_sample-prot"/>
<port name="output" producer="true" protocol="short_timed_sample-prot"/>
</componentspec>
Ports
Inputs:
input: Primary input samples port.Protocol:
short_timed_sample-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
short_timed_sample-protOptional:
False
Opcode handling
A bias is only added to values in sample opcode messages.
As the output data type is larger than the input data type, messages can be split to ensure no output messages are longer than the maximum supported message length of the protocol.
All other opcode messages received are passed through this component without any effect.
Properties
bias: Bias value added to input values.Type:
shortAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
1
Parameters
Example application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="bias_s">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.comp.sdr.math.bias_s" connect="file_write">
<property name="bias" value="5"/>
</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 bias_s are:
None.
Testing
Component testing not completed.