Iqstream to csts (iqstream_to_csts)
iqstream_to_csts is an asset in the ocpi.assets.misc_comps component library. Implementations include iqstream_to_csts HDL Worker (iqstream_to_csts.hdl). Tested platforms include Rocky9, xsim, zed.
Design
This component receives iqstream protocol messages from the in port and converts them to ComplexShortTimedSample protocol messages that are marshaled on to the out port. The iq opcode of the iqstream protocol is converted to the appropriate CSTS opcode.
Both the input and output data is marshalled across a 32-bit bus, so bit growth is not a concern.
A block diagram representation of the implementation is given in Figure 153:
Figure 153: iqstream_to_csts block diagram.
Interface
<?xml version="1.0"?>
<!-- This file is protected by Copyright. Please refer to the COPYRIGHT file
distributed with this source distribution.
This file is part of OpenCPI <http://www.opencpi.org>
OpenCPI is free software: you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your option)
any later version.
OpenCPI is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>. -->
<componentspec>
<port name="in" producer="false" protocol="iqstream_protocol" optional="true"/>
<port name="out" producer="true" protocol="complex_short_timed_sample-prot" optional="true"/>
</componentspec>
Properties
None.
Ports
Inputs:
inProtocol:
iqstream_protocolOptional:
True
Outputs:
outProtocol:
complex_short_timed_sample-protOptional:
True
Implementations
iqstream_to_csts(HDL)
Dependencies
The dependencies to other elements in OpenCPI are:
core/hdl/primitives/timed_sample_prot/complex_short_timed_sample_body.vhd
core/hdl/primitives/timed_sample_prot/complex_short_timed_sample_marshaller.vhd
core/hdl/primitives/timed_sample_prot/complex_short_timed_sample_pkg.vhd
core/hdl/primitives/protocol/iqstream_demarshaller.vhd
core/hdl/primitives/protocol/iqstream_pkg.vhd
core/hdl/primitives/protocol/protocol_pkg.vhd
assets/components/misc_comps/iqstream_to_csts.hdl/iqstream_to_csts.vhd
Limitations
Limitations of iqstream_to_csts are:
None.
Testing
The Unit Under Test (UUT) is tested by a) generating a file containing iqstream protocol-formatted messages which are sent to the UUT via the file_read component, b) using the file_write component to save the file containing the UUT’s output as protocol-formatted message, and c) verifying the contents of the output file. The generated file contains one or more ComplexShortTimedSample sample messages. The sequence of sample messages include samples whose I and Q signals are positive and negative ramp functions, respectively. The output file is verified by confirming that a) the same number of samples exists in the input and output files, and b) the output file contains the same ramp functions as the input.