09-09-2019 05:50 PM
I have Vivado 2019.1 and petalinux installed on my ubuntu 18.04 machine trying to get the example program from rdf0476-zcu111-rf-dc-eval-tool-2019-1 NON-MTSDesign_8x8 running on my ZCU111. I was able to successfully generate the hdf from vivado and run the petalinux commands for configuring and building the project. I put the generated BOOT.BIN and image.ub (as well as the pl.dtbo and the zcu111_rfsoc_trd_wrapper.bit.bin files) into my sd-card. I connect to the zcu111 serially via screen, but when I go to run any of the examples, they all fail because of the following error:
metal: info: Registered shmem provider linux_shm.
metal: info: Registered shmem provider ion.reserved.
metal: info: Registered shmem provider ion.ion_system_contig_heap.
metal: info: Registered shmem provider ion.ion_system_heap.
Invalid device id 0
I can't seem to find any data about what I did wrong or how to resolve this issue. Please let me know what I need to do to get the example programs running (so I can customize them like I did in 2018.3 version). I went to the 2019.1 version because there was a dma buffer issue with large buffers in the rfdc data read portion, but apparently it was fixed in 2019.1.
Thank you for your time!
09-10-2019 02:08 PM
I also forgot to mention that the pre-built BOOT.BIN and image.ub works with no problem, but when I follow the steps to build the BOOT.BIN and image.ub files myself thats when I get the above error.
12-16-2019 01:37 AM
can you check the source of the examples?
Check this Answer Record.
Details of the change:
With the new implementation, users will get all RFDC configuration data from the Linux Device tree. They do not have to rely on xparameters.h and *_g.c files.
A new API has been introduced to make this new solution work.
Impact to the applications:
Users have to make one extra API call XRFdc_GetDeviceNameByDeviceId() to get the RFDC device name before making a call to metal_device_open().
Example code snippet:
12-16-2019 10:57 AM
12-16-2019 01:45 PM
Let me look in more detail,
In the driver examples that are in the install i think this is not the case.
Perhaps the step is called elsewhere. I'll have to do some digging
12-17-2019 12:49 AM
In the 2019.2 case the functionality I mention is replaced by
i'll have to try this myself to reproduce it before I know more.
01-16-2020 03:13 AM - edited 01-16-2020 05:08 AM
It seems that I have the same problem even with the XRFdc_RegisterMetal (Vivado 19.2).
Have you found a solution yet please ?
01-21-2020 06:57 AM
@klumsdeAny progress on your end?
@melakUnfortunately, I haven't much more time to spend on this particular issue. In my application, I actually just need the LMK and LMX clocks configured; I don't need to dynamically update the ADC or DAC settings as is done in the xrfdc example codes. Thus, I ended up taking a different path and gutting the rftool that comes with the ZCU111 reference design to configure the clocks as I needed.
09-16-2020 04:19 AM
XRFdc_GetDeviceNameByDeviceId in xrfdc_sinit.c is searching through /sys/bus/platform/devices directory for an entry with the string "usp_rf_data_converter"
When it doesn't find this it prints the Invalid device id 0 error. (Actually, XRFdc_LookupConfig which calls XRFdc_GetDeviceNameByDeviceId outputs the error.)
When I boot from the image built from my hardware design, there is no entry in this directory for usp_rf_data_converter.
I rebooted from the pre-built image provided in the RF Data Converter evaluation tool and looked in this directory and I see the following entry:
lrwxrwxrwx 1 root root 0 Sep 16 10:17 b0040000.usp_rf_data_converter -> ../../../devices/platform/amba/b0040000.usp_rf_data_converter
So I'm going back through all the documents, wikis, etc. trying to figure out what step I missed in the process. Hardware-wise, I've confirmed my design is working with two DACs generating waveforms and two ADCs capturing and saving waveforms, I'm running a bootscript in Linux that I found in one of the wikis that programs the on-board PLLs and using the GPIO-Demo app to manually set some bits. But I also need to be able to write my own application that uses the RFDC driver and that's where I'm stuck.
Any help figuring out what step I missed is appreciated. I'll keep looking and post another reply if/when I figure it out. Targeting the ZCU111, btw. Thanks.
09-16-2020 03:55 PM
So I cleaned with petalinux-build -x mrproper, then the only change I made was to uncheck FPGA Manager in config because I don't really know what that does except some of the instructions I read said to check it w/no explanation as to why so I originally did. Now it works! usp_rf_data_converter now shows up in /sys/bus/platform/devices and the RFDC driver function calls work! Probably cleaning was what did it but mentioning the FPGA Manager just in case.