Generating a Chirp (sweep) signal using A10Soc and FMC-DAQ2 Boards


I'm a complete newbie trying to implement a sweep (chirp) signal using the A10SoC dev kit and FMC-DAQ2 board.I was really hoping for some guidance of how to start implementing this. Any kind of direction for just getting the DAC to transmit a chirp signal would be really appreciated. I'm really trying to learn how to do this but I just dont know where to look. 

As far as progress is concerned, I just managed to implement the hdl reference design and use IIO oscilloscope on the boards. 

Any and all guidance would be really appreciated, thank you in advance! 

Top Replies

Parents Reply
  • Oh yes, I'm sorry I should've been clearer about what I'm doing.  So we are using the daq2 kit just for testing and will eventually migrate to AD9163, which is when we have to implement the 5Ghz chirp. 

    For now I only want to generate a 1Ghz (or max possible) chirp on the daq2 with the goal of expanding it upto 5ghz when we migrate to our custom pcb. 

    Once again, thank you so much for your time and effort!! I really really appreciate the support!



  • 0
    •  Analog Employees 
    on Dec 14, 2020 11:29 PM 4 months ago in reply to URathore946

    The easiest thing to do is to generate your chirp in DDR. DDR will limit the sequence length to  ~2^21.
    If you need to do things in fabric you will need to create a vectorized chirp generator since no FPGA can run logic at speeds you require serially.


  • Thank you so much for your reply! 

    Would it be possible to guide me as to how I can generate the chirp in the DDR? I will start with this and then in parallel try to create the vectorized chirp generator.

    Just some basic steps of how to do it would be absolutely amazing, thank you so much for helping me out with this! 

    2^21 means that I could generate chirps of upto 1Ghz? 

    Thank you so so much once again for your time and effort, I really appreciate the help! I have no idea what I'm doing and getting this done is a very overwhelming job, thank you once again! 

  • +1
    •  Analog Employees 
    on Dec 16, 2020 1:15 AM 4 months ago in reply to URathore946

    There are many existing libraries to create chirps. For example:

    You can generate a data vector and pass that through pyadi-iio ( to DAQ2. Here is a basic example of DAQ2 in pyadi-iio:

    Here is some doc about interfacing with  the buffers:


  • Hello Travis! 

    Thank you so much for those extremely helpful resources, this is exactly what I was looking for at this point! 

    I got the DAQ2 pyadi-iio example that you provided to work on the board, so I think the environment and all the dependencies are installed correctly on my machine. 

    However, I'm unable to get the chirp to work (using the chirp library you provided). If I set the sample rate of the chirp to the daq2.sample_rate then I get this error (for even a chirp of just 5 hz): 

    However, If I lower the sampling rate then I get no output from the DAC, its just constant noise. I'm probably doing something incredibly wrong with calling the libraries, I was wondering if you could have a look at it? I've attached the file I'm currently trying to run. 

    Thank you once again for your time, effort and support! I really appreciate the help! 

    - Udai 

    import time
    import adi
    import matplotlib.pyplot as plt
    import numpy as np
    from scipy import signal
    from scipy.signal import chirp, spectrogram
    #Set daq parameters
    daq = adi.DAQ2(uri="ip:")
    #destroy buffer and enable channel 0
    daq.tx_enabled_channels = [0]
    # Create a chirp
    fs = daq.sample_rate
    T = 1
    t = np.arange(0, int(T*fs)) / fs
    w = chirp(t, f0=1500, f1=1495, t1=T, method='linear')
    # Enable cyclic buffers
    daq.tx_cyclic_buffer = True
    # Send data cyclically
    # Collect data 
    fs = float(daq.sample_rate)
    for r in range(10):
        x = daq.rx()
        print (x[0])
        f, Pxx_den = signal.periodogram(x[0], fs)
        plt.semilogy(f, Pxx_den)
        plt.ylim([1e-11, 1e2])
        plt.xlabel("frequency [Hz]")
        plt.ylabel("PSD [V**2/Hz]")

  • 0
    •  Analog Employees 
    on Dec 19, 2020 12:51 AM 3 months ago in reply to URathore946

    The default sample rate of DAQ2 is 1 GS/s. With your code, w will be a 1e9 length vector which is var larger than the max input buffer size which is ~2^21.

    Also, DAQ2 has a 16-bit DAC. Make sure your input data maximizes this range by providing samples that are [-2^15 to 2^15-1]. By default I believe chip scales data [-1,1].