
The project implements a fully digital NCO/DDS core that generates different waveform outputs (sine, cosine, triangle, sawtooth, square, ramp) using a phase accumulator and a waveform lookup ROM. Each clock cycle, the phase accumulator adds a frequency tuning word (FTW) to determine the waveform phase. This phase value is then mapped to an amplitude using the ROM. The resulting 8-bit digital waveform is sent to the output, either as parallel digital data or through a PWM/resistor-ladder DAC for analog output. The waveform type is selected using simple control pins.
We can test the design in simulation or on hardware. In simulation, run the provided testbench to verify frequency sweep, waveform selection, and edge cases. On hardware, connect the 8-bit output to an external R-2R resistor ladder DAC and view the generated waveform on an oscilloscope. Change the waveform select pins to observe different shapes (sine, triangle, etc.) and vary the FTW to adjust frequency.
R-2R Resistor Ladder DAC – converts the 8-bit digital output to an analog waveform.
Oscilloscope – used to visualize the generated waveforms.
Optional LEDs or logic analyzer – to observe the digital output pattern directly.
| # | Input | Output | Bidirectional |
|---|---|---|---|
| 0 | a[0] | b[0] | c[0] |
| 1 | a[1] | b[1] | c[1] |
| 2 | a[2] | b[2] | c[2] |
| 3 | a[3] | b[3] | c[3] |
| 4 | a[4] | b[4] | c[4] |
| 5 | a[5] | b[5] | c[5] |
| 6 | a[6] | b[6] | c[6] |
| 7 | a[7] | b[7] | c[7] |