element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Experts, Learning and Guidance
  • Technologies
  • More
Experts, Learning and Guidance
Ask an Expert Forum External 10 MHz Reference Clock for ZCU208 via Simulink HDL IP Core Generation
  • Blog
  • Forum
  • Documents
  • Leaderboard
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Experts, Learning and Guidance to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 10 replies
  • Subscribers 291 subscribers
  • Views 3105 views
  • Users 0 members are here
  • 10 MHz Reference Clock
  • zcu208
  • IP Core Generation
  • simulink
Related
See a helpful answer?

Be sure to click 'more' and select 'suggest as answer'!

If you're the thread creator, be sure to click 'more' then 'Verify as Answer'!

External 10 MHz Reference Clock for ZCU208 via Simulink HDL IP Core Generation

dchien
dchien over 3 years ago

I am using Xilinx ZCU208 evaluation board with Simulink HDL IP Core Generation design process. The CLK104 board that comes with the ZCU208 uses the onboard 10 MHz reference clock as default. With the Avnet RFSoC Explorer, I can interactively configure the CLK104 to use external 10 MHz clock. I need to configure the LMK reference clock configuration to use the external 10 MHz clock. How do you configure the source of the 10 MHz reference clock in the Simulink design flow with the ZCU208 board?

  • Sign in to reply
  • Cancel

Top Replies

  • mbrown
    mbrown over 2 years ago in reply to dchien +1
    I believe we fixed this issue with rftool, which is included in a newly released version (v1.0.3) of the 'hdlcoder-zcu208' SD image. Download here: https://github.com/AvnetDev/hdlcoder-zcu208-zip/releases…
  • lightcollector
    lightcollector over 2 years ago in reply to dchien +1
    Hi dchien, I am sorry to tell you officially I cannot recommend you do any of this. Some of the clocking restrictions are due to limitation of the RFSoC and some of them are from how the HDL Coder for…
Parents
  • mbrown
    0 mbrown over 3 years ago

    You could try the RFSoC Explorer API command below, which allows you to program the Texas Instruments LMK04828 onboard the CLK104.

     

    >> Avnet_RFSoC_Explorer('help','CLK104')

     

    [error_flag, data, msg] = Avnet_RFSoC_Explorer('Program_CLK104_LMK', <option>)

     

      Programs the Xilinx CLK104 LMK04828 PLL with the configuration specified

      by <option>. All predefined <option> set ADC and DAC RefClk = 245.76 MHz.

     

      Valid <option>:

     

        'Xilinx Default'

        '122.88MHz REFCLKOUT, 10MHz TCXO REF'

        '122.88MHz REFCLKOUT, 10MHz EXT REF' 

        'custom_TCS.txt'

     

      A custom LMK04828 configuration file can be created using Texas Instruments

      TICSPRO utility, saved as TEXT format with filename custom_TCS.txt, and

      located in the same directory as the RFSOC Explorer app.

    • Cancel
    • Vote Up -1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dchien
    0 dchien over 2 years ago in reply to mbrown

    Thanks for the info on the method to select the external 10 MHz reference clock using the RFSoC Explorer API commands. In my application, I would like to make the external 10 MHz as the reference clock to the CLK104 board after loading my own bit file from the Simulink HDL Coder IP Core design flow using ZCU208 board. I tried your suggestion of using the API command after loading my bit file, I could not get it to work correctly. Does the RFSoC Explorer API command work on my own design image/bit file?

    In one Xilinx posting, I read about the usage of the RFSoC APU to program the CLK104 module through the I2C/SPI interface. With the Simulink HDL Coder IP design flow using the Avnet RFSoC Explorer board support package, how do I insert the C-code for the APU commands? What is the best way to change the reference clock source (CLK104 SPI command) through the Simulink design flow?

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mbrown
    0 mbrown over 2 years ago in reply to dchien
    dchien said:
    I tried your suggestion of using the API command after loading my bit file, I could not get it to work correctly.

    Can you post the MATLAB error you are seeing when you try the API command?

    dchien said:
    Does the RFSoC Explorer API command work on my own design image/bit file?

    The APIs were not made to work in the HDL Coder workflow, but conceptually it should work if you are using the Avnet ZCU208 HDL Coder support package for Simulink (info here). It may not work with every custom bitstream you create in HDL Coder, but I tested with the default bitstream (located here) and the API successfully programmed CLK104.

    Open a serial terminal to the zcu208 and check that an application called "rftool" is running:

       zynqrf> top | grep rftool

    Let me know what you find.

    /Matt

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dchien
    0 dchien over 2 years ago in reply to mbrown

    Matt, thanks for your step-by-step help. I have the rftool confirmed in the terminal as shown below.

    zynqrf> top | grep rftool
      918     1 root     S    78572  1.9   3  0.0 /usr/bin/rftool
     1952  1898 root     S     1888  0.0   3  0.0 grep rftool

    Please help me with the detail steps to switch the 10 MHz clock source.Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • dchien
    0 dchien over 2 years ago in reply to mbrown

    Matt, thanks for your step-by-step help. I have the rftool confirmed in the terminal as shown below.

    zynqrf> top | grep rftool
      918     1 root     S    78572  1.9   3  0.0 /usr/bin/rftool
     1952  1898 root     S     1888  0.0   3  0.0 grep rftool

    Please help me with the detail steps to switch the 10 MHz clock source.Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • mbrown
    0 mbrown over 2 years ago in reply to dchien

    AMD Xilinx authored rftool. You can inquire on their forum.

    mbrown said:
    Can you post the MATLAB error you are seeing when you try the API command?
    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dchien
    0 dchien over 2 years ago in reply to mbrown

    I can successfully run my DUT_setup_rfsoc.m script by itself or run the Avnet_RFSoC_Explorer API commands independently to configure the clock with custom_TCS.txt. However, I cannot run them one after another.

    Here are my errors when I run the DUT_setup_rfsoc.m script first and followed by the API commands. The error message below “...” are removed RFTool commands not shown here because it is a long list. After the DUT_setup_rfsoc.m is complete, it releases the rfobj object. I don’t understand why the target cannot be connected.

    Connected to RFTool
    …
    SetFabClkOutDiv
    SetupFIFO 1 0 1
    SetupFIFO
    Disconnected from RFTool
    >> release(rfobj)
    >> Avnet_RFSoC_Explorer('startup');
    Target board [3] ZCU208
    Opening Avnet RFSoC Explorer...
    Failed to connect to target at 169.254.184.100
    >> [STATUS, DATA] = Avnet_RFSoC_Explorer('ipconfig', '169.254.184.100');
    Failed to connect to target at 169.254.184.100
    Warning: No TCP Connection

    However, when I run the API commands firsts then the DUT_setup_rfsoc.m next, I have the following errors.

    Error using comm.internal.xczuxdr.TcpipClass.TCPIP_Base/setupImpl
    Cannot create a communication link with the remote server. Please check the input arguments(ADDRESS and PORT) and make sure the server is running.
    Additional Information: No connection could be made because the target machine actively refused it
    See related documentation for troubleshooting steps.

    By the way, my terminal connects with the IP address and still works after these errors. When I get the connection or TCP errors, I must reboot my Xilinx board to restart the process. Do you know what is wrong? My goal is to issue RFSoC_Explorer API commands to configure the clock using custom_TCS.txt configuration file then use the DUT_setup_rfsoc.m file afterward to configure my down-conversion and up-conversion frequencies with decimation and interpolation parameters. Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • mbrown
    0 mbrown over 2 years ago in reply to dchien

    I believe we fixed this issue with rftool, which is included in a newly released version (v1.0.3) of the 'hdlcoder-zcu208' SD image.

    Download here: https://github.com/AvnetDev/hdlcoder-zcu208-zip/releases/tag/v1.03

    Let me know if this allows you to connect-disconnect-reconnect

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • dchien
    0 dchien over 2 years ago in reply to mbrown

    The V1.03 update worked and resolved the failure to connect problem. I can program the clock frequency to 250 MHz using the external 10 MHz clock. Thanks.

    I have another question. By default, the HDL Workflow Advisor uses 245.76 MHz as the reference clock. I intend to program the clock at 250 MHz. Through the FPGA synthesis and place & route process, the design meets 245.76 MHz derived clock, not 250 MHz derived clock. Is there a way change the clock value in the design flow so that the FPGA meets the timing properly? Thanks.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • lightcollector
    0 lightcollector over 2 years ago in reply to dchien

    Hi dchien,

    I am sorry to tell you officially I cannot recommend you do any of this.  Some of the clocking restrictions are due to limitation of the RFSoC and some of them are from how the HDL Coder for RFSoC architects the PL design.

    Regarding changing the external clock 104 frequencies, unfortunately workflow advisor does not allow one to input what the external clock frequency actually is.  The timing constraints would therefore not be accurate.  It may work within a certain tolerance and temperatures but it may also crash in strange ways.

    Regarding the 245.76 MHz reference clock, this is selected by HDL Coder for you.  The only way to change the frequency that the DUT runs at is to change the Fs and the data vector width for the converters.  The ADC and DAC can have different sample rates but ultimately the PL data sample clock has to match for ADC and DAC; there is only 1 clock for both RX (ADC) and TX (DAC) data samples.  The data vector width is the only thing that can be changed to make those match.  So in the end the Fs for DAC and ADC have to match by a few integer factors.  IMR mode throws in a few more wrinkles and this is mainly from the RFSoC part itself and the way it works.

    Unofficially though, what you could do is have HDL Coder generate the hardware design with the parameters it allows you to change.  It leaves behind a complete Vivado project.  You can always open this project and change it.  This can get very tricky though.  For example if you change some of the default data converter settings, Workflow Advisor won't know about them and it generates a script that is executed upon bootup that RFTool executes.  In theory though, if you know what you are doing and keep all that in sync you may be able to do what you want.

    Kind regards

    • Cancel
    • Vote Up +1 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube