Example - High Speed DAC - ADC
Example - High Speed DAC - ADC
Under Construction
This page is currently undergoing updates. Check back later!
An XFP GUI allows the user to define up to four frequency domain vectors. The FrontPanel
Subsystem Vivado IP Core stimulates our HLS Fast Fourier Transform (FFT) core to
combine and convert these vectors into a time domain digital output signal. That digital
output signal is then converted to analog with our SZG-DAC-AD9116 on the XEM8320-
AU25P.
This sample paired with an Opal Kelly FPGA Development or Integration module provides a
great starting template for those interested in DSP applications. The sample can be
https://docs.opalkelly.com/sample-fft-signal-generator/ 1/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
enhanced by additional DSP processing through additional user defined AMD-Xilinx’s HLS
cores, or through AMD-Xilinx’s Filter, Modulation, Trig Functions, etc. DSP IP Cores.
/ Example: High Speed DAC/ADC
Documentation Portal
0.1 Artix-7 and Legacy ADC and DAC Example Support Information
We currently have simpler ADC and DAC example designs available on our open source
Github that target the XEM7320 and the XEM8320. Note, these are no longer supported or
maintained.
The ADC design is a simple scope that uses Python to display the signals from the ADC.
More information is available in the READMEs for the desired XEM module.
The DAC design features AM/FM modulation and can pipe audio into the design to
modulate it over a carrier wave with the requested parameters. You can learn more about
it on our blog, here.
1. Resources
GitHub: Opal Kelly’s HLS Fast Fourier Transform (FFT) Core
A synthesizable and scalable pipelined fixed-point Decimation-in-Frequency FFT and
IFFT FPGA library for use with AMD-Xilinx’s High Level Synthesis (HLS).
GitHub: FFT Signal Generator Sample
A complete sample using HLS FFT and IFFT cores. This sample targets the XEM8320,
SZG-DAC-AD9116, and SZG-ADC-LTC226x.
https://docs.opalkelly.com/sample-fft-signal-generator/ 2/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
2. Learning Objectives
Users will be able to:
/ Example: High Speed DAC/ADC
Documentation Portal
1. Create IPI Block Designer projects utilizing the FrontPanel Subsystem Vivado IP Core.
2. Use an XFP GUI with FrontPanel Scripting for GUI control of gateware.
3. Get introduced to a workflow that incorporates FrontPanel and AMD-Xilinx’s High
Level Synthesis (HLS) components.
4. Use the FrontPanel Alloy GUI to set frequency bins and view the frequency domain of
measured signals.
3. Getting Started
The end result of this tutorial is to use our prebuilt bitfile in-hardware to produce the
following three-tone wave and capture it on an oscilloscope:
3.1 Requirements
Latest FFTSignalGenerator-vX.Y release files:
– FFTSignalGenerator-vX.Y.bit
– FFTSignalGenerator-vX.Y.lua
– FFTSignalGenerator-vX.Y.xfp
FrontPanel 5.2.12 or later
XEM8320-AU25P
SZG-DAC-AD9116 on Port A
SZG-ADC-LTC226x on Port B (if using FrontPanel Alloy GUI)
Oscilloscope (if not using FrontPanel Alloy GUI)
Note: For best results, use an oscilloscope with 200 MHz bandwidth to best represent
the SZG-DAC-AD9116’s full Nyquist bandwidth of 62.5MHz.
https://docs.opalkelly.com/sample-fft-signal-generator/ 3/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
1. Open FrontPanel 5.2.12 or later (6.0.0 or later if using the Alloy GUI).
2. Click the Download FPGA Configuration button and select
FFTSignalGenerator-vX.Y.bit .
3. Click the Load FrontPanel Profile button and select FFTSignalGenerator-vX.Y.xfp .
Note: FFTSignalGenerator-vX.Y.lua needs to be in the same directory as
FFTSignalGenerator-vX.Y.xfp .
https://docs.opalkelly.com/sample-fft-signal-generator/ 4/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
https://docs.opalkelly.com/sample-fft-signal-generator/ 5/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
Vitis HLS
Notice: Our supported version is v2023.2. Versions outside of this are not guaranteed
to be maintained.
Documentation Portal / Example: High Speed DAC/ADC
Vivado
Notice: Our supported version is v2023.2. Versions outside of this are not guaranteed
to be maintained.
Vivado IP Cores’ Distribution v1.0.2 or later
XEM8320-AU25P Board file v1.2 or later
Latest FFTSignalGenerator-vX.Y release Source Code (zip or tar.gz)
Windows
1. Follow How-To Install for the XEM8320-AU25P’s Board file v1.2 or later.
2. Follow Add IP Cores’ Distribution to Vivado for Vivado IP Cores’ Distribution v1.0.2 or
later. The location you installed this Distribution to will be used in step 6.
3. Extract the sample’s release zip/tar.gz.
4. Open a command prompt and cd to the directory containing the sample’s Build
folder.
cd C:/pathToDownload/design-resources-FFTSignalGenerator-
vX.Y/ExampleProjects/FFT_Sample/Build
Note: PowerShell won’t work, Command Prompt must be used.
5. Run the settings64.bat file in the Vitis HLS and Vivado installation directories.
path/to/vitis/2022.1/settings64.bat
path/to/vivado/2022.1/settings64.bat
6. Run the .bat file with the path to the Vivado IP Cores’ Distribution as an argument.
windows_create_project.bat C:/pathToDownload/FrontPanel-Vivado-IP-Dist-vX.Y.Z
Linux
1. Follow How-To Install for the XEM8320-AU25P’s Board file v1.2 or later.
2. Follow Add IP Cores’ Distribution to Vivado for Vivado IP Cores’ Distribution v1.0.2 or
later. The location you installed this Distribution to will be used in step 6.
3. Extract the sample’s release zip/tar.gz.
4. Open a terminal window and cd to the directory containing the sample’s Build
folder.
cd pathToDownload/design-resources-FFTSignalGenerator-
vX.Y/ExampleProjects/FFT_Sample/Build
5. Run the settings64.sh files in the Vitis HLS and Vivado installation directories.
source path/to/vitis/2022.1/settings64.sh
source path/to/vivado/2022.1/settings64.sh
6. Run the .sh file with the path to the Vivado IP Cores’ Distribution as an argument.
linux_create_project.sh pathToDownload/FrontPanel-Vivado-IP-Dist-vX.Y.Z
https://docs.opalkelly.com/sample-fft-signal-generator/ 6/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
https://docs.opalkelly.com/sample-fft-signal-generator/ 7/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
Frequency Domain BRAM – Contains the 256 frequency domain vectors the FFT
computes with.
IFFT Start – The XFP GUI with FrontPanel Scripting communicates with the FrontPanel
Subsystem Vivado IP Core generated FrontPanel HDL endpoints to store the Vector
Set into the Frequency Domain BRAM. A custom RTL Slicer is used to distribute
control signals throughout the design.
Enable – Enables the FFT core to calculate the SZG-ADC input.
8. Software
https://docs.opalkelly.com/sample-fft-signal-generator/ 8/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
The user interface shown above has the following components to control the behavior of
the FFT signal generator:
Bin Number – This selects a frequency bin number in the FFT to activate, from 0 to
127.
dBFS – DeciBel Full Scale. 0 = full power, 120 = nearly off.
Note: You must use your scroll wheel to input into this entry
Enable – If unchecked, disables the bin. Also discludes the dBFS value from any Auto
Scaling calculations.
Frequency (kHz) – The frequency of the specified Bin Number.
Enable Auto Scaling – If enabled, will prevent the sum of all the bin values (calculated
from dBFS) from going over the maximum. This will prevent clipping. For example, if
two bins were enabled with a dBFS of zero, the Lua script will halve the components
to the selected bins and the output signal from the SZG-DAC will not be clipping.
Reset IFFT – Resets the design.
https://docs.opalkelly.com/sample-fft-signal-generator/ 9/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
9. Limitations
A limitation of the provided XFP and Lua script is the lack of the ability to set the phase of
the frequency domain vectors. This involves incorporating the complex component of the
frequency bins. In gateware, the functionality to do this is present, but is not implemented
in the XFP and Lua script.
https://docs.opalkelly.com/sample-fft-signal-generator/ 10/11
2/13/25, 12:44 AM Example: High Speed DAC/ADC - Opal Kelly Documentation Portal
Newsletter
[email protected] SUBSCRIBE
Product Lifecycle
Pins Downloads
About Us
https://docs.opalkelly.com/sample-fft-signal-generator/ 11/11