cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
alifalafel007
Visitor
Visitor
230 Views
Registered: ‎10-08-2018

RFDC driver not working right after upgrade to Petalinux 2020.1

I recently upgraded a ZCU111 Vivado project from 2019.2 to 2020.1 which required an upgrade of the usp_rf_data_converter IP core from 2.2 to 2.3.  Our homegrown rfdc-control utility, which is just a command-line wrapper utility that calls functions in the xrfdc driver (version 6.0), continued to work just fine as long as I used a .dtb generated by Petalinux 2019.2 using the following script:

 

 

petalinux-create -t project -s [path/to]/xilinx-zcu111-v2019.2-final.bsp

# Generate an XSA file
echo "open_project [path/to/project].xpr" > xsagen.do
echo "write_hw_platform -fixed -force -file [project_name].xsa" >> xsagen.do
vivado -mode batch -nolog -nojournal -source xsagen.do
rm xsagen.do

# Copy in some customizations -- none have anything to do with the RFDC as far as I know
cp [path/to/customizations]/config
cp [path/to/customizations]/system_user.dtsi
cp [path/to/customizations]/platform_top.h

petalinux-config --silentconfig --get-hw-description
petalinux-build

 

 

After upgrading to Petalinux 2020.1, however, and using the above script (with the bsp changed to xilinx-zcu111-v2020.1-final.bsp) to create a new .dtb, the xrfdc driver now provides garbage data for sample rates, mixer settings, etc.  I thought this might be related to our using an old libmetal and the old xrfdc driver, so I cloned libmetal xilinx-v2020.1 and embeddedsw release-2020.1, which of course upgrades the xrfdc driver to version 8.0.  This did not solve the problem, however; it correctly reports my ADCs but now shows that I have no DACs enabled at all.  The homegrown rfdc-control utility I'm using to pull this information is simply doing the following:

 

 

XRFdc RFdcInst;
XRFdc *RFdcInstPtr = &RFdcInst;
struct metal_device *deviceptr = NULL;
struct metal_init_params init_param = METAL_INIT_DEFAULTS;
XRFdc_Config *ConfigPtr;
u16 RFdcDeviceId = 0;
init_param.log_level = METAL_LOG_NOTICE;

# Initialization
metal_init(&init_param);
ConfigPtr = XRFdc_LookupConfig(RFdcDeviceId);
XRFdc_RegisterMetal(RFdcInstPtr, RFdcDeviceId, &deviceptr);
XRFdc_CfgInitialize(RFdcInstPtr, ConfigPtr);

# Display some status
if (XRFdc_CheckTileEnabled(RFdcInstPtr, XRFDC_DAC_TILE, 1) == XRFDC_SUCCESS)
{
   printf("dac tile 1 has %d blocks enabled\n", (int)XRFdc_GetNoOfDACBlock(RFdcInstPtr, 1));
   printf("dac tile 1 sample rate = %.3f GHz\n", RFdcInst.RFdc_Config.DACTile_Config[1].SamplingRate);
}

 

 

This should report in our case that Tile 1 is enabled and has four blocks enabled; instead it reports that Tile 1 is enabled but with zero blocks.  If I revert back to version 6.0 only the function XRFdc_IsDACBlockEnabled() (which is used by XRFdc_CfgInitialize() above to determine the number returned by XRFdc_GetNoOfDACBlock()), I get the correct number of enabled blocks, but again get garbage data for mixer settings when I call XRFdc_GetMixerSettings().

So I'm at 2020.1 across the board--all my tools, bitstream, hardware description, libraries, drivers, etc., but I can't get back good data about the RFDC device any more.  Anyone know what I'm doing wrong here?

0 Kudos
0 Replies