UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer rgebauer
Observer
4,243 Views
Registered: ‎07-17-2017

How to setup ZCU111 RFSoC DAC clock

Jump to solution

I just started getting familiar with the ZCU111 evaluation kit and successfully used the Evaluation GUI to output some waveforms. Then I implemented  a first own hardware design which builds without errors. I compared it to the TRD design and the external ports look similar.

 

Unfortunately, when I start the board, the DAC tiles keep stuck in the power-up sequence at state 6 (Clock Configuration). Therefore, I used some clock dividers and fed the clocks to the LEDs. The clock from the zynqmp (pl_clk0) works as expected but the clock from the RFdc (clk_dac1) isn't. As far a I unterstood, it is locked to the input clock (dac1_clk) so this clock is not working either which explains why the thile is stuck in the power-up sequence.

I tried to find where this input clock is configured in the TRD design but it is just passed to a port of the top level wrapper and I couldn't even find constraint files that specify where this port is connected. Is this automatically done?

 

Any advice or hint how to get the clock running is highly appreciated. Probably I need to setup the LMX chip? Can I do this from the hardware design or do I have to generate my own bare-metal application? I use yocto with petalinux to build the system.

 

Thanks in advance for your help!

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
3,255 Views
Registered: ‎09-12-2007

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution
19 Replies
Moderator
Moderator
4,228 Views
Registered: ‎04-18-2011

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution
Hi,

So the LMX RF PLL doesn't come up in a default State where it is outputting a stable clock so it needs to be programmed.
There are two ways to do this. Program it in your application... You can take a look at the examples that comes with the driver these have a function to program the LMK and the LMX that are fed by it.

You also have the option to download the the SCUI for the zcu111 this is on the Xilinx website for the zcu111.
I can send you some instructions for doing this.
Can you tell me what frequency you need?
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer rgebauer
Observer
4,207 Views
Registered: ‎07-17-2017

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Hi @klumsde,

 

Thank you for your reply. Can you tell me where to find the drivers and examples? Then I will have a look.

 

Concerning the System Controller GUI (SCUI?), I opened it but one needs to load a txt file there to config the LMX and the frequency I needed was not available in the clockFiles folder. It was not clear for me how I could change the files in order to get the desired frequency.

 

The frequency was 409.625 MHz. I tried to use the highest sample rate, 8x interpolation and 4 samples per axis clock cycle. The internal PLL had a divider of 2 which gives an axis clock of ~205MHz and should result in a sample rate of 6.554 GSPS.

 

Thanks in advance for the instructions how to get the design running. Is there a recommended way to program the LMK/LMX upon boot or do one have to write a program and run it as init.rc script?

 

 

0 Kudos
Moderator
Moderator
4,170 Views
Registered: ‎04-18-2011

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Concerning the System Controller GUI (SCUI?), I opened it but one needs to load a txt file there to config the LMX and the frequency I needed was not available in the clockFiles folder. It was not clear for me how I could change the files in order to get the desired frequency.

 

You will need the TICs Pro SW from TI to enable you to create the text file for SCUI.

I have attached one for 409.6

It is difficult to get the LMX to run at 409.625Mhz because the LMK is set to run at 122.88Mhz.

you would have to get it to run at 122.8875 to ensure the LMX did not need to be in fractional mode. 

In this case I would use the DAC at 6.5536GSPS and program the LMX to be 409.6

 

So what I do is take this setting from the TRD 

Follow this path

C:\RFSoC_design\zcu111_trd\release\rdf0476-zcu111-rf-dc-eval-tool-2018-2\GUI\RFDC_UI_installer_Beta\Data\Clocking

 

you will find a lot of .tcs files. 

 

In the TICs GUI you can pick the LMX PLL and then do file>load

Then load this profile. 

 

Next do file> Export Hex Register Values

this will create the txt file for you. 

 

There are some examples with the driver that program the RF PLL

In the SDK install you can follow this path

 

C:\Xilinx\SDK\2018.2\data\embeddedsw\XilinxProcessorIPLib\drivers\rfdc_v4_0\examples

You will see some examples. 

There is a xrfdc_clk.c /xrfdc_clk.h file that can be used. 

 

if you go into the xrfdc_read_write_example for instance, you will see 

#ifdef XPS_BOARD_ZCU111
printf("\n Configuring the Clock \r\n");
#ifdef __BAREMETAL__
LMK04208ClockConfig(1, LMK04208_CKin);
LMX2594ClockConfig(1, 3932160);
#else
LMK04208ClockConfig(12, LMK04208_CKin);
LMX2594ClockConfig(12, 3932160);
#endif
#endif

 

You will see that the LMX2594ClockConfig is passed the IIC interface and the element in the array that contains the data to be programmed. 

 

I have to do a bit more research on programming this in the linux boot. 

 

 

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
Observer rgebauer
Observer
4,118 Views
Registered: ‎07-17-2017

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Thank your for your reply & help! With your text file I managed to get the system running.

 

Now I am trying to get this automatically done upon boot. Do you know how this is handled by the demo design?

 

The only thing I found is the embeddedsw repository which targets standalone application and therefore is not suited for my use case.

Can you maybe give me the link to the drivers you mentioned?

0 Kudos
Moderator
Moderator
4,111 Views
Registered: ‎04-18-2011

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

It is an interesting question. I need to dig into this a bit. 

Essentially you want to bake the clock programming into your linux boot..

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Observer rgebauer
Observer
4,105 Views
Registered: ‎07-17-2017

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Yes, that is basically it and somehow it is done for the demo design but I couldn't find any documentation how.

 

In Figure 6-1 (APU Linux Software Platform) of UG1287 (RFSoC Data Converter Evaluation Tool User Guide), there are also Kernel space drivers for LMK and LMX shown but no word is covered on them... I can find the I²C-SPI-Bridge on the I²C bus but judging from this figure there should also be a driver to directly control LMX and LMK from the user space/command line?

 

0 Kudos
Observer rgebauer
Observer
4,072 Views
Registered: ‎07-17-2017

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Using xrfdc_clk.c file in https://github.com/Xilinx/embeddedsw/tree/release-2018.2/XilinxProcessorIPLib/drivers/rfdc/examples I managed to write a script that will configure the clock from Linux. So far it's only executed if the user triggers it but one might implement it as init-rc file.

Nevertheless, I am still interested how this is done in the demo design and if there is a better way.

 

I also stumbled across another problem:

When I start the board the clocks are not yet working so I do not see any output.

If the design is now configured to run with a 409.6 MHz reference and I configure LMK and LMX with the self-built program, the system will automatically lock to the new reference and everything starts running as I would expect. So that's nice.

But if I use another reference frequency, I tried with 491.52 MHz, rebuilt the hardware design, created a new application, started the board and executed the configuration program, the PLLs from the RFdc won't lock and consequently, no output appears.

Strangely enough, if I reset the PL/PS without restarting the whole board by pressing the POR_B button, the PLLs will lock, I can see the clocks (which are outputted at the LEDs with a clock divider) and the DAC is outputting the expected signal.

This behavior is highly reproducible (at least for me), it always works straight ahead with 409.6 MHz but never works without the reset with 491.52 MHz.

 

Any ideas why this might be the case?

 

Thank you for your assistance & help.

0 Kudos
Moderator
Moderator
4,029 Views
Registered: ‎04-18-2011

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution
Let me try it out.
Are you using the xrfdc_clk.c file to do this?
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Contributor
Contributor
4,018 Views
Registered: ‎09-20-2017

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Hi rgebauer,

 

I hope your ZCU111 is doing well now. I have the same problem as you described, I think the DAC and ADC PLLs won't lock.

I used wrote a small software based on rfdc-read-write example, to configure the PLLs.

 

I reused the LMX2594ClockConfig(12, 3932160) and configured 393.16MHz in my IP cores, but i don't get any other clock out. I route the clk_adc0/dac0 clock to a clk_wizard and want to to LEDs, after downscaling to about 1Hz. 

Did I have forgotten something?

 

Regards

Franz

0 Kudos
4,021 Views
Registered: ‎09-12-2018

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Hi,

 

I have very similar problems. I am only using bare metal code based from examples xrfdc_read_write_example.c and xrfdc_selftest_example.c

 

If I disable the PLLs in the RFDC IP in Vivado IDE, the hardware just seems to uses whatever LMX2594 feeds. So far, I can only set 

 

LMX2594ClockConfig(1, 3932160);

 

Any other arguments don't work. With this LMX2594 set, the sampling rate of the DAC is always 3.93216 GSPS, despite what the Vivado IDE says.

 

However, if I enable the PLLs, no matter what I do in SDK, I always get bad status. I use

 

XRFdc_GetBlockStatus

XRFdc_GetPLLLockStatus

 

to check. I cannot get the PLL lock status = 2 (locked).

 

Thanks.

vivado_rfdc_2.jpg
0 Kudos
Observer rgebauer
Observer
4,006 Views
Registered: ‎07-17-2017

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Hi @klumsde

Yes, I used the xrfdc_clk.c file exactly the same as shown in the example here:
https://github.com/Xilinx/embeddedsw/blob/23eb39df101391b896adf20fa9d6c5aee27b0adc/XilinxProcessorIPLib/drivers/rfdc/examples/xrfdc_selftest_example.c#L204-L205

I just replaced the frequency in the second command by the different values I mentioned. That is all the configuration script does right now.

Thanks for checking it out.

 

CONFIG.DAC1_PLL_Enable {true} \
CONFIG.DAC1_Sampling_Rate {3.932160} \
CONFIG.DAC1_Refclk_Freq {491.520} \
CONFIG.DAC1_Outclk_Freq {122.880} \
CONFIG.DAC1_Fabric_Freq {122.880} \
CONFIG.DAC1_Outdiv {3} \

is the relevant config of the RFdc I used for 491 MHz vs.

 

 

CONFIG.DAC1_PLL_Enable {true} \
CONFIG.DAC1_Sampling_Rate {6.5536} \
CONFIG.DAC1_Refclk_Freq {409.600} \
CONFIG.DAC1_Outclk_Freq {204.800} \
CONFIG.DAC1_Fabric_Freq {204.800} \
CONFIG.DAC1_Outdiv {2} \

for 409 MHz reference.

 

 

Hi @franzforstmayr

You can try to use a clock buffer with a clock wizard and directly route the clocks to the led without the PLL to verify the clock is working.

I also had problems getting the PLL to lock. It seems that they vanished after I enabled mDAC (CONFIG.mDAC_Enable {1} \) which I thought wasn't necessary. But unfortunately, it's not documented at all ( @klumsde do you know what mDAC and mADC do?).

"LMX2594ClockConfig(12, 3932160) and configured 393.16MHz" are you aware that the command configures the LMX to run at 3.9 GHz? If you want to use it as input for a 393.16MHz reference, you will have to program it accordingly, I would say.

 

Hi k.lee-contractor@cablelabs.com

I can confirm that disabling the PLL and directly feeding ADC and DAC with the sampling frequency works. I tested with 4GHz but haven't checked if the sampling rate is also precisely that (EDIT: I measured 3.999927 GHz and I can't see any frequency instabilities right now, so it seems to work nice). Setting the LMX chip worked for me so far. Don't forget to configure LMK in advance. It seems like this configuration can also stay untouched independent of the programmed LMX frequency. "other arguments don't work" mean that you will not get any output or is there an error thrown?

 

@klumsdeA tutorial from Xilinx covering the necessary steps to create an own small application for the ZCU111 including all relevant parts of the board configuration and setting up the RFdc would be really helpful I suggest... I have the feeling that especially configuring the clocks is not really covered by the documents I saw so far.

0 Kudos
3,991 Views
Registered: ‎09-12-2018

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Hi @rgebauer,

 

The function LMX2594ClockConfig can only program the following frequencies:

 

5120000
3932160
1474560
4915200
6553600
6400000
6389760
6144000

5898240

5734400

4000000
4096000
4423680
4669440
1966080

2048000

2457600
2949120
3072000
3276800
245760
3686400
204800
409600
491520
737280
1441856

 

In xrfdc_clk.c, it only programs the above values.

 

		if (ClockingLmx[XFreqIndex].XFrequency == XFrequency)
		{
			freq_index =XFreqIndex;
			xil_printf("LMX configured to frequency %d \n", XFrequency);
		}

How did you enable the PLL? In Vivado IDE, if I enable the PLL in the GUI, the reference clock required dropdown menu only has low frequencies. For example, if I want the sampling rate to be 4.096GSPS, my choices of the reference clock are limited to low values. The highest reference clock I can select is 1228.8MHz, which is not one of the values I can program via LMX2594ClockConfig.

 

Also, I use the function XRFdc_GetBlockStatus and check the struct BlockStatus.DataPathClocksStatus. If it's 1 you know all the clocks are working as expected. I also hooked up the DAC output to a spectrum analyzer.

 

Thanks.

0 Kudos
3,946 Views
Registered: ‎09-12-2018

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

@klumsde

 

Any thoughts from Xilinx on releasing more example code for showing how to setup clocks?

 

I found these notes in "Zynq UltraScale+ ZCU111 RFSoC RF Data Converter Evaluation Tool - Known Issues and Limitations"

 

External RF PLL Supported Frequency

As of now a set of 20+ Frequencies can be generated using the Evaluation Tool for External RF PLLs (LMX) and only single frequency for LMK PLL 

I assume the 20+ frequencies were what I listed in my previous post?

 

I am curious if the LMK4208 -> LMX2594 -> RD ADC/DAC is the only way to clock for this board? Is it possible to use something else like the clocks generated from SI570 or SI5382?

 

Finally, in Figure 3-18 in UG1271, it looks like there are multiple LMX2594s. In the SCUI, I also see LMX2594_A, LMX2594_B and LMX2594_C. However, the C function LMX2594ClockConfig(1, 3932160) is not clear to me. How would I set up the 3 LMXs using the C function?

 

Thanks.

 

 

0 Kudos
Contributor
Contributor
3,931 Views
Registered: ‎09-20-2017

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Hi @rgebauer

Thanks for your help!

 

Please consider, the default xrfdc_clk.c file checks if your selected Frequency is available in the predefined configuration list. 

https://github.com/Xilinx/embeddedsw/blob/23eb39df101391b896adf20fa9d6c5aee27b0adc/XilinxProcessorIPLib/drivers/rfdc/examples/xrfdc_clk.c#L561 shows a for loop, where your selected frequency is compared against the lookup table headers, but the loop only checks up to index 20, instead of all 26 frequencies. So you have to change to for loop condition to the following:

	for(XFreqIndex=0 ; XFreqIndex < sizeof(ClockingLmx) / sizeof(ClockingLmx[0]); XFreqIndex++) {
		if (ClockingLmx[XFreqIndex].XFrequency == XFrequency) {
			Lmx2594Updatei2c( XIicDevFile, ClockingLmx[XFreqIndex].LMX2594_A);
			return 0;
		}
	}
3,901 Views
Registered: ‎09-12-2018

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Hi @klumsde,

 

Can you please generate the clock files for the SCUI corresponding to these frequencies? I tried looking for this TI TIC GUI but it appears to be locked behind a paywall?

 

LMX2594ClockConfig(1, 3276800);

LMX2594ClockConfig(1, 3932160);

LMX2594ClockConfig(1, 6553600);

 

 

0 Kudos
Visitor lrmiles21
Visitor
3,707 Views
Registered: ‎09-05-2018

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Good evening!!  I am currently trying to program the DACs/ADCs on the RFSoC board but i am having trouble.  I am using the "xrfdc_read_write_example.c" along with the "xrfdc_clk.c" files and the readout either has harmonics or nothing at all. 

First, what parameters do i need to give the LMX and LMK functions with the read/write example?  Are those values in GHz?

Secondly, is sysref internal or external? 

If i designed custom IP blocks in Vivado to run at a given rate of 100MHz, what parameters do i need to give the reference design to match that rate?  is there an equation to link the two or do i need to set my clock with the Vivado design to match the parameters in the clock.c file.

Also, within the converter Vivado block, do i need to enable the PLL's? 

0 Kudos
Visitor sobotka
Visitor
3,262 Views
Registered: ‎11-07-2018

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Hi, just to make sample clock setup for RFDC on ZCU111 little bit clearer. Parameter XFrequency for void LMX2594ClockConfig(int XIicBus, int XFrequency) is in kiloHertz and as is stated above it is neccessary to choose this value from 2-dim array. The functions sets all three LMX2594  (A, B, C) to the same frequency.

0 Kudos
Moderator
Moderator
3,256 Views
Registered: ‎09-12-2007

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution
Observer rkvr
Observer
901 Views
Registered: ‎07-23-2019

Re: How to setup ZCU111 RFSoC DAC clock

Jump to solution

Does follwing code configure all 3 PLL. How IIC address of 3 PLL and 0408 is mapped in follwing function 

#ifdef XPS_BOARD_ZCU111
printf("\n Configuring the Clock \r\n");
#ifdef __BAREMETAL__
LMK04208ClockConfig(1, LMK04208_CKin);
LMX2594ClockConfig(1, 3932160);
#else
LMK04208ClockConfig(12, LMK04208_CKin);
LMX2594ClockConfig(12, 3932160);
#endif
#endif

0 Kudos