Complex Magnitude Squared (magnitude_squared_xs_s)
Calculates the magnitude squared of the input data stream.
Design
This worker calculates the magnitude squared of the input data. This is useful for doing work with modulation schemes related to m-ary ASK signals. The reason that converting from magnitude squared to magnitude is unnecessary lies in the fact that the m-ary slicing levels can be scaled by squaring them to their appropriate values moving them into the magitude squared domain. This saves on complexity and extra computations.
The mathematical representation of the implementation is given in (2).
In (2):
\(x[n]\) is the input values.
\(y[n]\) is the output values.
Interface
<?xml version="1.0"?>
<componentspec>
<port name="input" protocol="complex_short_timed_sample-prot"/>
<port name="output" protocol="short_timed_sample-prot" producer="true"/>
</componentspec>
Opcode handling
All opcodes excluding samples are passed directly through the worker
Properties
None.
Ports
Inputs:
input: Primary input samples port.Protocol:
complex_short_timed_sample-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
short_timed_sample-protOptional:
False
Implementations
magnitude_squared_xs_s(HDL)
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="magnitude_square_xs_s">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.examples.components.magnitude_square_xs_s" connect="file_write">
</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
protocol_utilprimitives in sdr.assets
Limitations
Limitations of magnitude_squared_xs_s are:
None
Testing
Tested platforms: None
Component testing not completed.