/nco

Configurable NCO (numerically controlled oscillator) written in MyHDL using a pipelined CORDIC implementation

Primary LanguagePythonBSD 2-Clause "Simplified" LicenseBSD-2-Clause

This NCO uses a CORDIC MyHDL core that is can be configured to the required
needs. A small GUI application is included which can be used to configure
the core and check the resulting performance characteristics.

The CORDIC and Rule30 PRNG cores can be used as standalone cores.


NCO
===

To configure the NCO and use it you need the following dependencies:
 * GTK+ 3.x
 * Matplotlib
 * MyHDL 0.8

Then run the script:
$ nco/parameterize_nco.py

If you copy the toVHDL_kh.py file from the "myhdl-addons" repository into
the nco directory, then multiple entities will be created.

Phase Dithering
---------------

The phase dithering implementation is rather basic; this is an area where
the core should be improved more. Some notes:
 * it is not Gaussian
 * it is added after truncating the phase for the CORDIC

CORDIC
======

The CORDIC core is a fully pipelined implementation which can be
parameterized to the required bit-depths. The pipeline consists of multiple
stages:
 * Initial stage that rotates the phase into the first quadrant and uses
   a LUT for an initial estimation.
 * A number of CORDIC stages to better approximate the output
 * Output stage that rotates the result back into the correct quadrant.

See the comment in pipelined_cordic.py for details.

This CORDIC pipeline does not require any multiplication as the required
scaling is done in the initial LUT step.