template class xf::dsp::aie::mixer::dds_mixer::dds_mixer_graph

#include "dds_mixer_graph.hpp"

Overview

dds_mixer operates in 3 modes:

Mixer Mode 0:

This is dds mode only. The library element has a single output window, which is written to with the sin/cos components corresponding to the programmed phase increment.

Mixer Mode 1:

This is dds plus mixer for a single data input port.

Each data input sample is complex multiplied with the corresponding dds sample, to create a modulated signal that is written to the output window.

Mixer Mode 2:

This is a special configuration for symmetrical carriers and two data input ports.

Each data sample of the first input is complex multiplied with the corresponding dds sample to create a modulated signal.

These are the templates to configure the dds_mixer class.

Parameters:

TT_DATA

describes the type of individual data samples input to and output from the dds_mixer function. This is a typename and must be one of the following:

cint16, cint32, cfloat. Note that for cint32, the internal DDS still works to int16 precision, so Mixer Mode 0 will be cast, though for Modes 1 and 2, data to be mixed will be cint32.

TP_INPUT_WINDOW_VSIZE describes the number of samples in the input/output window API or number of samples to process per iteration.
TP_MIXER_MODE

describes the mode of operation of the dds_mixer .

The values supported are:

0 (dds only mode),

1 (dds plus single data channel mixer),

2 (dds plus two data channel mixer for symmetrical carriers)

TP_API

specifies if the input/output interface should be window-based or stream-based.

The values supported are 0 (window API) or 1 (stream API).

TP_SSR

specifies the super sample rate, ie how much data input/output in parallel for a single channel.

There will be a TP_SSR number of kernels, with a TP_SSR number of each port used on the interface.

A default value of 1 corresponds to the typical single kernel case.

template <
    typename TT_DATA,
    unsigned int TP_INPUT_WINDOW_VSIZE,
    unsigned int TP_MIXER_MODE,
    unsigned int TP_API = IO_API::WINDOW,
    unsigned int TP_SSR = 1
    >
class dds_mixer_graph: public graph

// typedefs

typedef typename std::conditional < (TP_API==IO_API::WINDOW), window <TP_INPUT_WINDOW_VSIZE*sizeof (TT_DATA)>, stream>::type inPortType
typedef inPortType outPortType
typedef std::array <port <direction>, TP_SSR> portArray
typedef dds_mixer <TT_DATA, TP_INPUT_WINDOW_VSIZE, TP_MIXER_MODE, TP_API> kernelClass

// fields

portArray <input> in1
portArray <input> in2
portArray <output> out
kernel m_ddsKernel[TP_SSR]

Fields

portArray <input> in1

The input data to the function. When in TP_API=WINDOW, the port is a window of samples of TT_DATA type. The number of samples in the window is described by TP_INPUT_WINDOW_VSIZE.

portArray <output> out

An output port of TT_DATA type. When in TP_API=WINDOW, the port is a window of TP_INPUT_WINDOW_VSIZE samples.

kernel m_ddsKernel [TP_SSR]

kernel instance used to set constraints - getKernels function returns a pointer to this.

Methods

getKernels

kernel* getKernels ()

Access function for getting kernel - useful for setting runtime ratio, location constraints, fifo_depth (for stream), etc.

dds_mixer_graph

dds_mixer_graph (
    const uint32_t phaseInc,
    const uint32_t initialPhaseOffset = 0
    )

This is the constructor function for the dds_mixer graph.

Parameters:

phaseInc specifies the phase increment between samples. Input value 2^31 corresponds to Pi (i.e. 180’).
initialPhaseOffset specifies the initial value of the phase accumulator, creating a phase offset. Input value 2^31 corresponds to Pi (i.e. 180’).