cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
sarahleony
Participant
Participant
1,542 Views
Registered: ‎08-31-2018

RFDC Data Converter Eval tool 2019.1 Metal Error

Hi all,

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.
metal: error:
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!

Sarah

0 Kudos
12 Replies
sarahleony
Participant
Participant
1,516 Views
Registered: ‎08-31-2018

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.

0 Kudos
eep
Visitor
Visitor
1,370 Views
Registered: ‎07-23-2019

I am having the same exact issue in 2019.2. Is there any fix yet?

0 Kudos
klumsde
Moderator
Moderator
1,339 Views
Registered: ‎04-18-2011

can you check the source of the examples?

Check this Answer Record. 

https://www.xilinx.com/support/answers/71659.html

Section 2: Removal of xparameters.h dependency from RFDC driver when run in Linux user space.

 

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:

Status = XRFdc_GetDeviceNameByDeviceId(DeviceName, RFDC_DEVICE_ID);
if (Status < 0) {
printf("ERROR: Failed to find rfdc device with device id %d\n",RFDC_DEVICE_ID);
return XRFDC_FAILURE;
}
 
Is this there in the example application you are trying to run.
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
eep
Visitor
Visitor
1,315 Views
Registered: ‎07-23-2019

I was following this tutorial, so my understanding is that these examples are my source code. If I'm reading correctly, looks like the code on Xilinx's GitHub has not yet been updated as instructed by Answer Record 71659, as the example code still seems to depend on xparameters.h.

0 Kudos
klumsde
Moderator
Moderator
1,298 Views
Registered: ‎04-18-2011

Perhaps... 

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

Keith

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
klumsde
Moderator
Moderator
1,268 Views
Registered: ‎04-18-2011

@eep 

In the 2019.2 case the functionality I mention is replaced by 

XRFdc_RegisterMetal

i'll have to try this myself to reproduce it before I know more.

 

Keith 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
melak
Visitor
Visitor
1,165 Views
Registered: ‎01-09-2020

Hi,

It seems that I have the same problem even with the XRFdc_RegisterMetal (Vivado 19.2).

Have you found a solution yet please ?

Mélanie

 

0 Kudos
eep
Visitor
Visitor
1,109 Views
Registered: ‎07-23-2019

@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.

0 Kudos
897 Views
Registered: ‎01-07-2020

I also have the same problem with Xrfdc_RegisterMetal... 
Have anyone found a solution?? 

@klumsde 

@melak 

mjohansson95
0 Kudos
dls21962
Newbie
Newbie
623 Views
Registered: ‎11-23-2018

I have the same problem running the RF Data Converter examples in 2019.2.  Has a solution been identified?  Thanks.

0 Kudos
dls21962
Newbie
Newbie
606 Views
Registered: ‎11-23-2018

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.

0 Kudos
dls21962
Newbie
Newbie
589 Views
Registered: ‎11-23-2018

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.