Skip to content

Run the Demonstration (ADRV9002)

skravats edited this page Dec 5, 2022 · 17 revisions

Run the Demonstration

Connect to the target terminal

  • A wired Micro USB serial port connection between the host PC and the embedded target is required
  • Launch a terminal program (like Tera Term VT or Putty) and connect using serial port
  • Select 115200 baud
  • Select the appropriate target COM port

Profile and Stream Configuration Settings

Stream and profile configurations can be used to specify the desired operational mode of the ADRV9002. Users can specify, from the terminal command prompt, the stream and profile configuration files to run on that device configuration.

This example currently supports the ADRV9002 in the LVDS LSSI 2-lane mode. This sets the converter sampling rates at about 54 Msps and provides about 27 MHz of bandwidth.

Setup the LVDS-LSSI-2-Lane-mode

  • Navigate to the ADRV9002 PHY device in the terminal

      $ cd /sys/bus/iio/devices/iio:device0
    
  • Send the LVDS-LSSI-2-Lane-mode stream configuration file to ADRV9002

      $ cat /home/analog/configs/lvds-lssi/two_lane/LVDS_2_Lane_55.29MSPS.bin > stream_config
    
  • Send the LVDS-LSSI-2-Lane-mode profile configuration file to ADRV9002

      $ cat /home/analog/configs/lvds-lssi/two_lane/LVDS_2_Lane_55.29MSPS.json > profile_config
    

Define the host PC IP address

A wired ethernet point-to-point connection between the host PC and the embedded target is required. Use this link for instructions on how to assign a static IP address to the host Ethernet adapter. Set the following values

  • IP address : 192.168.0.1

  • Subnet mask : 255.255.255.0

  • No entries required for the other fields

Define the target IP address

Type the following at the terminal prompt to set the target IP address

  • $ ifconfig eth0 192.168.0.2 up

Launch IIO Oscilloscope

Note: IIO Oscilloscope creates a .osc_profile.ini file in the home directory. The next time IIO Oscilloscope is opened, the existence of this file delays connection to the target. It is recommended to delete the .osc_profile.ini (if it exists) prior to launching IIO Oscilloscope.

Launch IIO Oscilloscope

Double click the IIO Oscilloscope application icon on the host Windows PC.

Connect to the target

  • Select the Remote Devices option and enter the IP address 192.168.0.2 and click the Refresh button..
  • A successful connection results in discovery of the IIO devices. Press OK to continue.
    (Note that Refresh may have to be clicked more than once if the connection is not successful)

Receiver / Transmitter settings

Set the Local Oscillator for the receiver and transmitter to be 2400 MHz. Set the transmitter attenuation to -24 dB.


Transmit DDS Waveforms

The IIO Oscilloscope includes Transmit / Direct Digital Synthesis (DDS) waveform controls. Users specify, through the GUI, a selection of waveforms to be transmitted.

Transmit a One CW tone

  • Select the One CW Tone option in the DDS mode pulldown menu
  • Select an appropriate frequency. .25 MHz is suitable for the 54 MSPS sample rate.
  • Select a Scale of -18 dB (default)

View the waveform

View the wave in the time domain:

  • Switch to the Plot window. Add a Plot window if necessary. File --> New Plot
  • In the Plot Channels section select voltage0_i and voltage0_q
  • In the Plot Type section select the Time Domain mode
  • Press the Capture / Stop button for a continuous waveform. Press the Single Shot capture to obtain a snapshot.


View the wave in the frequency domain:

  • In the Plot Type section select the Frequency Domain mode.
  • Select a 16384 FFT Size and set Average to 10.
  • Press the Capture / Stop button for a continuous display of the spectrum.
  • Right click in the display plot and select Peak Markers
    _(Note that your peak marker values may differ from those shown in the image.

Transmit Two CW tones

  • Select the Two CW Tones option in the DDS mode pulldown menu
  • Select appropriate frequencies. 4 and 10 MHz are suitable choices.
  • Select a Scale of -18 dB (default)

View the waveform

View the wave in the time domain:

  • Switch to the Plot window. Add a Plot window if necessary. File --> New Plot
  • In the Plot Channels section select voltage0_i and voltage_q
  • In the Plot Type section select the Time Domain mode
  • Press the Capture / Stop button for a continuous waveform. Press the Single Shot capture to obtain a snapshot.

View the wave in the frequency domain:

  • In the Plot Type section select the Frequency Domain mode.
  • Select a 16384 FFT Size and set Average to 10.
  • Press the Capture / Stop button for a continuous display of the spectrum.
  • Right click in the display plot and select Peak Markers

Transmit Complex waveforms

  • Select the DAC Buffer Output option in the DDS mode pulldown menu
  • Select qam16_20M waveform
  • Select DAC Channels voltage0 and voltage1

View the wave in the frequency domain:

  • In the Plot Type section select the Frequency Domain mode.
  • Select a 4096 FFT Size and set Average to 10.
  • Press the Capture / Stop button for a continuous display of the spectrum.

Change the file selection to LTE20

Change the file selection to Tx_20MHz_245.76Msps_PeakScaling3.0dBFS_ETM1.1_PAR7.5db_Offset0MHz_4Carrier

Software for the Python demonstration

NOTE: This example is demonstrated with an internal loopback configuration enabled on both TX channels in ADRV9002.

There are a few software components that need to be installed in order to run this demonstration successfully:

Install Python 3.7

  • Download Python 3.7 and run the installer

  • A typical installation location will be C:\Users\username\AppData\Local\Programs\Python

  • Edit the Windows System PATH environment variable to add the path to the Python directory

  • Edit the Windows System PATH environment variable to add the path to the Python\Scripts directory

Install PIP

Install LibIIO - API library for IIO

  • Download and run the latest LibIIO installer from the GitHub releases page here

Install PyADI-IIO and matplotlib

  • Open a Windows CMD shell.

      C:\Users\myuser> pip install pyadi-iio
      C:\Users\myuser> python -m pip install -U matplotlib
      C:\Users\myuser> python -m pip install -U scipy
    

Download Python source code

NOTE: Python script, by default, runs on a DDS mode configuration. To use any other TX modes available in the FPGA, use the variable TX_DAC_MODE as shown below and set the value according the instructions provided in the code comment.


  • Run the Python source code. Open a Windows CMD shell

      C:\Users\myuser\pyadi-iio\examples> python adrv9002_example.py
    


This capture shows a DDS single tone waveform with its I and Q components at a -10kHz frequency and a 0.9 scale value.


Software for the C demonstration

NOTE: This example is demonstrated with an internal loopback configuration enabled on both TX channels in ADRV9002.

The C examples provided are only tested on a Linux environment as mentioned here. The following example is demonstrated using the Arrow Ubuntu-64bit VM provided in the build prerequisites here.

There are a few software components that need to be installed in order to run this demonstration successfully:

Install LibIIO - API library for IIO

  • Follow this tutorial to directly install LibIIO dependencies on the host machine.

Run the C programs

NOTE: C program, by default, runs on a DDS mode configuration. To use any other TX modes available in the FPGA, use the variable TX_DAC_MODE as shown below and set the value according the instructions provided in the code comment.


  • Compile the C source code (Use -liio flag to dynamically link the LibIIO libraries)

      $ gcc adrv9002-iiostream.c -o adrv9002-iiostream -liio
    


  • Run the C executable (use your relevant target IP address here)

      $ ./adrv9002-iiostream ip:192.168.0.2
    


Software for the MATLAB demonstration

NOTE: This example is demonstrated with an internal loopback configuration enabled on both TX channels in ADRV9002.

This demonstration requires a licensed version of MATLAB and Simulink along with the Communication Toolbox installed.

There are a few software components that need to be installed in order to run this demonstration successfully:

Install MATLAB

Install LibIIO - API library for IIO

  • Download and run the LibIIO installer from the GitHub releases page here

Run MATLAB

  • Download the MATLAB source for DDS Single Tone demo from the github repository. Demo examples for DAC/DMA Buffer and DDS Dual Tone signals are also available on the respective links as per desired application.

  • Open the Simulink model DAQ9002.slx file


  • Double click on the system object block of adrv9002-phy. Set your relevant target IP Address in the "IP Address".


  • Double click on the system object block of axi-adrv9002-tx-lpc. Set your relevant target IP Address in the "IP Address".


  • Set your preferred stop time or keep it at default (inf) and run the simulation to see waveforms

The following capture shows a DDS single tone waveform on both channels. Channel 1 has I and Q components at a 5kHz frequency at a 0.9 scale value while Channel 2 has 10kHz frequency at a 0.5 scale value.


The following capture shows the FFT output of the I channel of Channel 1 at 5kHz frequency from the Spectrum Analyser.


NOTE: Output shown here is of only the DDS generated single tone waveforms. Examples for DMA/DAC Buffer and DDS Dual Tone signals have also been provided that can be utilized based on the desired application.

Shutting down the demo

  • Power down the target. Type the following at the terminal prompt

      $ poweroff  
    
  • Wait until the linux terminal shows

      $ reboot : System Halted
    
  • Close out IIO Oscilloscope and all associated windows


Prev- Install Required Software

Next Steps -
      Explore the ADRV9002 Platform Architecture
      Build the ADRV9002 Example Design

Return to Quick Start Guide Table of Contents
Return to ADRV9002 Platform User Guide
Return to Arrow High-Speed Converter Platforms Home

Clone this wiki locally