Post Go back to editing

I am very confused about iio

Category: Software

I'm considering making my own AD9361 development board based on Zynq, but ADI only provides many examples for the official development board, so I have a lot of questions.

ADI official documents provide a way to control AD9361 and send and receive data through matlab plug-in or iio Oscilloscop, but this seems to be based on libiio.

[1] I think that iio is similar to a bus. I want to know what it is based on to determine whether there are iio devices, such as two AD9361s. What mechanism is it based on to determine whether there are two 9361s?

[2] 9361 is controlled through the spi bus. Why can iio control 9361? What is the relationship between the iio bus and the spi bus? Why can iio even read the data received by the axi_9361 ip core? Can it be considered that the spi and axi_9361 inside the iio library are driver?

[3] I built the Linux system through petalinux2018.3 and meta-adi-2019_R1. Is libiio installed by default in this way? However, to build a Linux system in this way, it seems that you must use the official hdl design, which only supports the official development board. I think it is very difficult to modify the device tree or driver. For example, I want to control multiple chips  AD9361 through independent spi.  I don’t need HDMI port either.

[4] In addition to the libiio library, I also found a library libad9361-iio library. Does this library require additional installation? This library seems to provide the function of multi-chip synchronization. After I install the libiio library, can I use the matlab plug-in to connect to my own development board, even if my development board is made by myself, the design is different from the official development board.

[5] I prefer to use matlab plug-ins than iioscope. I want to know if matlab can achieve fmcomms5 synchronization. If so, can I adapt it to my own board by modifying the ad9361_fmcomms5_phase_sync.c function in libad9361-iio? 

Thank you very much. Hope to get your reply

Thread Notes

Parents
  • [1] I think that iio is similar to a bus. I want to know what it is based on to determine whether there are iio devices, such as two AD9361s. What mechanism is it based on to determine whether there are two 9361s?

    Every physical AD9361 will have an instantiation of the AD9361 driver, so in theory you can have as many AD9361s on a system as you want. FMComms5 is an example with two transceiver chips.

    [2] 9361 is controlled through the spi bus. Why can iio control 9361? What is the relationship between the iio bus and the spi bus? Why can iio even read the data received by the axi_9361 ip core? Can it be considered that the spi and axi_9361 inside the iio library are driver?

    IIO is a kernel subsystem and is not tied to a specific physical interface bus. IIO drivers can use SPI or other interfaces depending on their needs. For AD9361 we also link the DMA drivers with the HDL interface IP controls and transceiver controls to make managing data easier but its not a hard requirement. Note that if the AD9361 driver uses a SPI interface and chip selected it will be claimed by that driver. Other AD9361 initiations will need a separate SPI driver instance or chip select.

    [3] I built the Linux system through petalinux2018.3 and meta-adi-2019_R1. Is libiio installed by default in this way? However, to build a Linux system in this way, it seems that you must use the official hdl design, which only supports the official development board. I think it is very difficult to modify the device tree or driver. For example, I want to control multiple chips  AD9361 through independent spi.  I don’t need HDMI port either.

    If you used meta-adi then it will contain layers for libiio and will function similar to our Kuiper Linux releases. Now we cannot make completely arbitrary designs for the device trees and related HDL. However, moving the HDL to a different FPGA is what all customers do and there is a port guide here Porting ADI's HDL reference designs [Analog Devices Wiki] Note that there is limited support on "other" FPGAs. You need to repeat an issue on an ADI supported system if you find a problem.

    [4] In addition to the libiio library, I also found a library libad9361-iio library. Does this library require additional installation? This library seems to provide the function of multi-chip synchronization. After I install the libiio library, can I use the matlab plug-in to connect to my own development board, even if my development board is made by myself, the design is different from the official development board.

    libad9361 provides more application specific functionality like MCS or filter designing tools. This is not required to use the device but will make it easier. As long as you are using the IIO drivers for the transceiver and DMA you can use IIO-Scope, MATLAB, pyadi-iio, and other tools.

    [5] I prefer to use matlab plug-ins than iioscope. I want to know if matlab can achieve fmcomms5 synchronization. If so, can I adapt it to my own board by modifying the ad9361_fmcomms5_phase_sync.c function in libad9361-iio? 

    MATLAB simply calls into the library functions of libad9361 through the calllib API. If you want to modify libad9361 that is totally valid, but you will need to understand the calllib API to expand functionality.

    -Travis

Reply
  • [1] I think that iio is similar to a bus. I want to know what it is based on to determine whether there are iio devices, such as two AD9361s. What mechanism is it based on to determine whether there are two 9361s?

    Every physical AD9361 will have an instantiation of the AD9361 driver, so in theory you can have as many AD9361s on a system as you want. FMComms5 is an example with two transceiver chips.

    [2] 9361 is controlled through the spi bus. Why can iio control 9361? What is the relationship between the iio bus and the spi bus? Why can iio even read the data received by the axi_9361 ip core? Can it be considered that the spi and axi_9361 inside the iio library are driver?

    IIO is a kernel subsystem and is not tied to a specific physical interface bus. IIO drivers can use SPI or other interfaces depending on their needs. For AD9361 we also link the DMA drivers with the HDL interface IP controls and transceiver controls to make managing data easier but its not a hard requirement. Note that if the AD9361 driver uses a SPI interface and chip selected it will be claimed by that driver. Other AD9361 initiations will need a separate SPI driver instance or chip select.

    [3] I built the Linux system through petalinux2018.3 and meta-adi-2019_R1. Is libiio installed by default in this way? However, to build a Linux system in this way, it seems that you must use the official hdl design, which only supports the official development board. I think it is very difficult to modify the device tree or driver. For example, I want to control multiple chips  AD9361 through independent spi.  I don’t need HDMI port either.

    If you used meta-adi then it will contain layers for libiio and will function similar to our Kuiper Linux releases. Now we cannot make completely arbitrary designs for the device trees and related HDL. However, moving the HDL to a different FPGA is what all customers do and there is a port guide here Porting ADI's HDL reference designs [Analog Devices Wiki] Note that there is limited support on "other" FPGAs. You need to repeat an issue on an ADI supported system if you find a problem.

    [4] In addition to the libiio library, I also found a library libad9361-iio library. Does this library require additional installation? This library seems to provide the function of multi-chip synchronization. After I install the libiio library, can I use the matlab plug-in to connect to my own development board, even if my development board is made by myself, the design is different from the official development board.

    libad9361 provides more application specific functionality like MCS or filter designing tools. This is not required to use the device but will make it easier. As long as you are using the IIO drivers for the transceiver and DMA you can use IIO-Scope, MATLAB, pyadi-iio, and other tools.

    [5] I prefer to use matlab plug-ins than iioscope. I want to know if matlab can achieve fmcomms5 synchronization. If so, can I adapt it to my own board by modifying the ad9361_fmcomms5_phase_sync.c function in libad9361-iio? 

    MATLAB simply calls into the library functions of libad9361 through the calllib API. If you want to modify libad9361 that is totally valid, but you will need to understand the calllib API to expand functionality.

    -Travis

Children
No Data