HDL requirements for IIO Driver support

I have a project working with one of the ADI hdl reference designs and the Linux IIO subsystem.  I am looking to add another device to my project that doesn't have a reference design, but does have an IIO subsystem driver. 

In looking at the reference designs it appears that there is a non-trivial amount of HDL that goes in to supporting the IIO subsystem.  In the case of the AD7768 there is ad7768_if.v that appears to do crc calculations, an ad7768 instantiation of the utils_cpack IP, and an AXI gpio block.  And this is in addition to the DMA and SPI requirements, which I suppose I can find in the device tree requirements section of the linux driver manual.

My question is, if I go to incorporate a new device like the AD5064 for which there is an IIO driver, but I don't see a reference design, how do I know what hdl components the driver needs? I posted a similar question in the Linux Driver forum and was told that a device like the AD5064 just requires SPI and the GPIO should be user controlled.  But where should I look to find this out?  And this is especially true for a device like the AD7768 which seems to require the additional HDL I mentioned above.

Top Replies

Parents Reply
  • 0
    •  Analog Employees 
    on Apr 20, 2021 6:55 AM in reply to jay_col

    I'm not familiar enough with the IIO Driver development to properly answer your question. This is more suited for the Linux forum, as they are actually developing the drivers. In my opinion (as FPGA HDL developer), it depends on the driver and the part, if the driver is generic to be used on microcontrollers, it should work by directly connecting it to a generic SPI in the FPGA. If the driver is specifically using SPI Engine, or requires very specific GPIO timing (one or several clock periods specificity) or assumes additional processing in the HDL, you need custom HDL. If we have created the driver with specific HDL in mind, we probably have the HDL available also. If the driver is created in the last 5 years, the HDL is on our github repository(https://github.com/analogdevicesinc/hdl) . If the driver is older than that, it's possible that all files reside on the wiki (https://wiki.analog.com/).

    Will ask a colleague from the Linux team to add additional information, if it's the case



No Data