ID 683406
Date 11/06/2017
Public

## 3. NCO IP Core Functional Description

Figure 8. NCO Block Diagram

The NCO IP core allows you to generate a variety of NCO architectures. Your custom NCO includes both time- and frequency-domain analysis tools. The custom NCO outputs a sinusoidal waveform in two's complement representation.

The waveform for the generated sine wave is defined by the following equation:

s(nT) = A sin[2π(f O + f FM )nT + ϕ PM + ϕ DITH )]

where:

• T is the operating clock period
• f O is the unmodulated output frequency based on the input value ϕ INC
• f FM is a frequency modulating parameter based on the input value ϕ FM
• Φ PM is derived from the phase modulation input value P and the number of bits (P width) used for this value by the equation: ϕ PM = P/2^P width
• Φ DITH is the internal dithering value
• A is 2 N -1 where N is the magnitude precision (and N is an integer in the range 10 to 32

The generated output frequency, fo for a given phase increment, ϕinc is determined by the equation: f 0 = ϕinc f clk /2M Hz

where M is the accumulator precision and f clk is the clock frequency

The minimum possible output frequency waveform is generated for the case where ϕinc= 1. This case is also the smallest observable frequency at the output of the NCO, also known as the frequency resolution of the NCO, f res given in Hz by the equation:

f RES = f clk/2M Hz

For example, if a 100 MHz clock drives an NCO with an accumulator precision of 32 bits, the frequency resolution of the oscillator is 0.0233 Hz. For an output frequency of 6.25 MHz from this oscillator, you should apply an input phase increment of:

(6.25 x 106/100 x 106) x 232 = 268435456

The NCO MegaCore function automatically calculates this value, using the specified parameters. IP Toolbench also sets the value of the phase increment in all testbenches and vector source files it generates.

Similarly, the generated output frequency, f FM for a given frequency modulation increment, ϕFM is determined by the equation:

f FM = ϕ FM f clk /2 F Hz

where F is the modulator resolution

The angular precision of an NCO is the phase angle precision before the polar-to-cartesian transformation. The magnitude precision is the precision to which the sine and/or cosine of that phase angle can be represented. The effects of reduction or augmentation of the angular, magnitude, accumulator precision on the synthesized waveform vary across NCO architectures and for different fo/fclk ratios.

You can view these effects in the NCO time and frequency domain graphs as you change the NCO IP core parameters.