Magnitude Squared Complex Short to Ulong (magnitude_squared_xs_ul)
Performs a magnitude square calculation on a complex short sample and outputs sample as unsigned long.
Function
Sums the square of real and imaginary values of input sample and then take square root of result to output as unsigned long value.
The mathematical representation of the component function is given in (9).
In (9):
\(x[n]\) is the input values.
\(y[n]\) is the output values.
Interface
<?xml version="1.0"?>
<componentspec>
<!-- Add property and port elements here -->
<port name="input" protocol="complex_short_timed_sample-prot"/>
<port name="output" protocol="ulong_timed_sample-prot" producer="true"/>
</componentspec>
Opcode Handling
Passthru of all opcodes except sample.
Properties
None.
Ports
Inputs:
input: Primary input samples port.Protocol:
complex_short_timed_sample-protOptional:
False
Outputs:
output: Primary output samples port.Protocol:
ulong_timed_sample-protOptional:
False
Implementations
magnitude_squared_xs_ul(HDL)Skeleton outline: Optional summary of the implementation of this worker. Anything before the next heading will be included as worker summary on component documentation page.
Example Application
<?xml version="1.0"?>
<application done="file_write">
<instance component="ocpi.core.file_read" connect="magnitude_squared_xs_ul">
<property name="filename" value="input.bin"/>
</instance>
<instance component="ocpi.examples.components.magnitude_squared_xs_ul" 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:
None
There is also a dependency on:
ieee.std_logic_1164
ieee.numeric_std
Limitations
Limitations of magnitude_squared_xs_ul are:
Non
Testing
Tested platforms: None