
Numerically Controlled Oscillator (NCO) with linear-interpolated sine output.
freq_ctrl controls the output frequencydac_out drives a DACFrequency relationship (with PHASE_WIDTH = 16, ROM_ADDR_BITS = 6)
f_out = (freq_ctrl / 2^PHASE_WIDTH) * f_clk
It's a basic block for Direct Digital Synthesis (DDS).
On the board connct the uo_out on an 8-bit DAC. The output of the DAC
connected to an oscilloscope should give you a sinewave of controlled frequency
(freq_ctrl needs to be in the range [1, 255]).
You can run the python model to get an idea of the expected output by observing the generated plots:
$ cd python_nco_model
$ python3 nco_model.py
$ eog nco_qwave_waveforms.png
$ cd sim
$ make waves
You can observe in gtkwave the dac_out output using the analog data format.
8-bit DAC connected at the output.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | freq_ctrl_0 | dac_out_0 | |
| 1 | freq_ctrl_1 | dac_out_1 | |
| 2 | freq_ctrl_2 | dac_out_2 | |
| 3 | freq_ctrl_3 | dac_out_3 | |
| 4 | freq_ctrl_4 | dac_out_4 | |
| 5 | freq_ctrl_5 | dac_out_5 | |
| 6 | freq_ctrl_6 | dac_out_6 | |
| 7 | freq_ctrl_7 | dac_out_7 |