DSP Builder for Intel® FPGAs (Advanced Blockset): Handbook

ID 683337
Date 7/15/2024
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

12.1.4. Complex Mixer (ComplexMixer)

The ComplexMixer block performs a complex by complex multiply on streams of data and it splits the inputs and outputs into their real and imaginary components. This function can shift the frequency of a data stream in a digital up converter, where the first complex data is the i and q data and the second complex data is the cosine and sine data provided by an NCO.

The ComplexMixer block multiplies a complex input stream by a synchronized complex data stream, sample by sample.

You can use this block in a digital up converter for a radio system or a general purpose DSP application. The data has fixed-point types, and the output is the implied full precision fixed-point type.

Note: You can easily replicate the ComplexMixer block with a Multiply block that takes complex inputs within a Primitive subsystem.

The ComplexMixer performs element-by-element multiplication on n channels and m frequencies.

The system specification, including such factors as the channel count and sample rates, determines the main parameters for this block. The input sample rate of the block determines the number of channels present on each input wire and the number of wires:

Number of Channels per wire = Clock_Rate/Sample_Rate

Number of Wires = ceiling(Chan_Count×Sample_Rate/Clock_Rate)

For example, a sample rate of 60 MSPS and system clock rate of 240 MHz gives four samples to be TDM on to each input wire.

If a wire has more channels than TDM slots available, the input wire is a vector of sufficient width to hold all the samples. Similarly, the number of frequencies (the number of complex numbers) determines the width of the sine and cosine inputs. The number of results produced by the ComplexMixer is the product of the sample input vector and the frequency vector. The results are TDM on to the i and q outputs in a similar manner to the inputs.

Table 41.  Parameters for the ComplexMixer Block
Parameter Description
Input Rate Per Channel (MSPS) The data rate per channel measured in millions of samples per second.
Number of Complex Channels The number of complex input channels.
Number of Frequencies The number of complex frequencies in the multiplier.
Table 42.  Port Interface for the ComplexMixer Block
Signal Direction Description
i Input The real (in phase) component of the complex data input. If you request more channels than can fit on a single bus, this signal is a vector. The width in bits inherits from the input wire.
q Input The imaginary (quadrature phase) component of the complex data input. If you request more channels than can fit on a single bus, this signal is a vector. The width in bits inherits from the input wire.
v Input Indicates validity of data input signals. If v is high, the data on the a wire is valid.
c Input Indicates the channel of the data input signals. If v is high, c indicates the data channel data.
sin Input The imaginary part of the complex number. For example, the NCO's sine output.
cos Input The real part of the complex number. For example, the NCO’s cosine output.
i Output The in-phase (real) output of the mixer, which is (i × cos – q × sin). If you request more channels than can fit on a single bus, this signal is a vector. The width in bits is wide enough for the full precision result.
q Output The quadrature phase (imaginary) output of the mixer, which is (i × sin + q × cos). If you request more channels than can fit on a single bus, this signal is a vector. The width in bits is wide enough for the full precision result.
v Output Indicates validity of data output signals.
c Output Indicates the channel of the data output signals.

The ComplexMixer block performs the multiplication on corresponding components; the RealMixer block does not. The ComplexMixer block uses modulo indexing if one vector is shorter than another. Hence, the output vector width is the maximum of the widths of the input vectors. The RealMixer block performs a full outer product on the input vectors. The number of components in the output vector is the product of the width of the input vectors for sin and cos (must be the same) and the width of the input vector for a.