Bias (bias_l)
Adds a fixed bias to all input sample values.
Design
The mathematical representation of the implementation is given in (81).
In (81):
\(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 130:.
Figure 130: Bias implementation.
Interface
<?xml version="1.0"?>
<componentspec>
<property name="bias" type="long" writable="true" default="0" description="Bias value added to input values."/>
<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-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
long_timed_sample-protOptional:
False
Opcode Handling
A bias is only added to values in sample opcode messages. All other opcode messages received are passed through this component without any effect.
Properties
bias: Bias value added to input values.Type:
longAccess:
Parameter:
FalseWritable:
TrueInitial:
FalseVolatile:
False
Default value:
0
Implementations
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="bias_l">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.comp.sdr.math.bias_l" 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_l are:
None.
Testing
Tested platforms: None
Component testing not completed.